summaryrefslogtreecommitdiff
path: root/src/smallmap_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-04-07 21:24:27 +0000
committersmatz <smatz@openttd.org>2010-04-07 21:24:27 +0000
commit941f0c7056f65b65c67839a927bd07fd93452406 (patch)
tree059c0c201bedff9446641796036531ff336c3f55 /src/smallmap_gui.cpp
parentfc878baee69eb4286ec92100dc1b536560928152 (diff)
downloadopenttd-941f0c7056f65b65c67839a927bd07fd93452406.tar.xz
(svn r19580) -Codechange: auto-raise 'Enable/Disable all' buttons in the Smallmap window
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r--src/smallmap_gui.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index dcb4cc1a9..be437703c 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -1208,10 +1208,6 @@ public:
if (industry_pos < _smallmap_industry_count) {
_legend_from_industries[industry_pos].show_on_map = !_legend_from_industries[industry_pos].show_on_map;
}
-
- /* Raise the two buttons "all", as we have done a specific choice */
- this->RaiseWidget(SM_WIDGET_ENABLEINDUSTRIES);
- this->RaiseWidget(SM_WIDGET_DISABLEINDUSTRIES);
this->SetDirty();
}
break;
@@ -1220,9 +1216,6 @@ public:
for (int i = 0; i != _smallmap_industry_count; i++) {
_legend_from_industries[i].show_on_map = true;
}
- /* Toggle appeareance indicating the choice */
- this->LowerWidget(SM_WIDGET_ENABLEINDUSTRIES);
- this->RaiseWidget(SM_WIDGET_DISABLEINDUSTRIES);
this->SetDirty();
break;
@@ -1230,9 +1223,6 @@ public:
for (int i = 0; i != _smallmap_industry_count; i++) {
_legend_from_industries[i].show_on_map = false;
}
- /* Toggle appeareance indicating the choice */
- this->RaiseWidget(SM_WIDGET_ENABLEINDUSTRIES);
- this->LowerWidget(SM_WIDGET_DISABLEINDUSTRIES);
this->SetDirty();
break;
@@ -1468,8 +1458,8 @@ static const NWidgetPart _nested_smallmap_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SELECTION, INVALID_COLOUR, SM_WIDGET_SELECTINDUSTRIES),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_TEXTBTN, COLOUR_BROWN, SM_WIDGET_ENABLEINDUSTRIES), SetDataTip(STR_SMALLMAP_ENABLE_ALL, STR_SMALLMAP_TOOLTIP_ENABLE_ALL),
- NWidget(WWT_TEXTBTN, COLOUR_BROWN, SM_WIDGET_DISABLEINDUSTRIES), SetDataTip(STR_SMALLMAP_DISABLE_ALL, STR_SMALLMAP_TOOLTIP_DISABLE_ALL),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, SM_WIDGET_ENABLEINDUSTRIES), SetDataTip(STR_SMALLMAP_ENABLE_ALL, STR_SMALLMAP_TOOLTIP_ENABLE_ALL),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, SM_WIDGET_DISABLEINDUSTRIES), SetDataTip(STR_SMALLMAP_DISABLE_ALL, STR_SMALLMAP_TOOLTIP_DISABLE_ALL),
NWidget(WWT_TEXTBTN, COLOUR_BROWN, SM_WIDGET_SHOW_HEIGHT), SetDataTip(STR_SMALLMAP_SHOW_HEIGHT, STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT),
EndContainer(),
NWidget(NWID_SPACER), SetFill(1, 1),