summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2014-02-09 13:06:35 +0000
committeralberth <alberth@openttd.org>2014-02-09 13:06:35 +0000
commit77e62f0b986ebe254f1b0c431674f1da9e94e5e5 (patch)
tree38c9021104f2148f8d31118c29ca582fc27b6f0d
parent202f21f2628da335b5738a9120833906a71cdbde (diff)
downloadopenttd-77e62f0b986ebe254f1b0c431674f1da9e94e5e5.tar.xz
(svn r26322) -Feature: Warn the user about empty setting search results too.
-rw-r--r--src/lang/english.txt1
-rw-r--r--src/settings_gui.cpp3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index d60be39d4..d0673e9ea 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -1089,6 +1089,7 @@ STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_INGAME :Company setting
STR_CONFIG_SETTING_CATEGORY_HIDES :{BLACK}Show all search results by setting{}{SILVER}Category {BLACK}to {WHITE}{STRING}
STR_CONFIG_SETTING_TYPE_HIDES :{BLACK}Show all search results by setting{}{SILVER}Type {BLACK}to {WHITE}All setting types
STR_CONFIG_SETTING_CATEGORY_AND_TYPE_HIDES :{BLACK}Show all search results by setting{}{SILVER}Category {BLACK}to {WHITE}{STRING} {BLACK}and {SILVER}Type {BLACK}to {WHITE}All setting types
+STR_CONFIG_SETTINGS_NONE :{WHITE}- None -
STR_CONFIG_SETTING_OFF :Off
STR_CONFIG_SETTING_ON :On
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 9cd578980..908ddadbf 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -1920,8 +1920,9 @@ struct GameSettingsWindow : Window {
case WID_GS_OPTIONSPANEL: {
int top_pos = r.top + SETTINGTREE_TOP_OFFSET + 1 + this->warn_lines * FONT_HEIGHT_NORMAL;
uint last_row = this->vscroll->GetPosition() + this->vscroll->GetCapacity() - this->warn_lines;
- _settings_main_page.Draw(settings_ptr, r.left + SETTINGTREE_LEFT_OFFSET, r.right - SETTINGTREE_RIGHT_OFFSET, top_pos,
+ int next_row = _settings_main_page.Draw(settings_ptr, r.left + SETTINGTREE_LEFT_OFFSET, r.right - SETTINGTREE_RIGHT_OFFSET, top_pos,
this->vscroll->GetPosition(), last_row, this->last_clicked);
+ if (next_row == 0) DrawString(r.left + SETTINGTREE_LEFT_OFFSET, r.right - SETTINGTREE_RIGHT_OFFSET, top_pos, STR_CONFIG_SETTINGS_NONE);
break;
}