summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/airport_gui.cpp2
-rw-r--r--src/dock_gui.cpp2
-rw-r--r--src/industry_gui.cpp4
-rw-r--r--src/main_gui.cpp4
-rw-r--r--src/misc_gui.cpp2
-rw-r--r--src/player_gui.cpp4
-rw-r--r--src/rail_gui.cpp2
-rw-r--r--src/terraform_gui.cpp2
-rw-r--r--src/window.cpp8
-rw-r--r--src/window.h1
10 files changed, 15 insertions, 16 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index a65c54504..ef456e144 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -101,7 +101,7 @@ static void BuildAirToolbWndProc(Window *w, WindowEvent *e)
break;
case WE_ABORT_PLACE_OBJ:
- RaiseWindowButtons(w);
+ w->RaiseButtons();
w = FindWindowById(WC_BUILD_STATION, 0);
if (w != 0)
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp
index 2d42afb33..781b16a5f 100644
--- a/src/dock_gui.cpp
+++ b/src/dock_gui.cpp
@@ -171,7 +171,7 @@ static void BuildDocksToolbWndProc(Window *w, WindowEvent *e)
break;
case WE_ABORT_PLACE_OBJ:
- RaiseWindowButtons(w);
+ w->RaiseButtons();
w = FindWindowById(WC_BUILD_STATION, 0);
if (w != NULL) WP(w, def_d).close = true;
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 9593a593b..67356a802 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -248,7 +248,7 @@ static void BuildDynamicIndustryWndProc(Window *w, WindowEvent *e)
if ((_game_mode != GM_EDITOR && _patches.raw_industry_construction == 2 && indsp != NULL && indsp->IsRawIndustry()) ||
WP(w, fnd_d).select == INVALID_INDUSTRYTYPE) {
/* Reset the button state if going to prospecting or "build many industries" */
- RaiseWindowButtons(w);
+ w->RaiseButtons();
ResetObjectToPlace();
}
}
@@ -337,7 +337,7 @@ static void BuildDynamicIndustryWndProc(Window *w, WindowEvent *e)
case WE_TIMEOUT:
case WE_ABORT_PLACE_OBJ:
- RaiseWindowButtons(w);
+ w->RaiseButtons();
break;
}
}
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index e5f28d29c..dbf98d41d 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -1389,7 +1389,7 @@ static void ScenEditLandGenWndProc(Window *w, WindowEvent *e)
break;
case WE_ABORT_PLACE_OBJ:
- RaiseWindowButtons(w);
+ w->RaiseButtons();
SetWindowDirty(w);
break;
}
@@ -1509,7 +1509,7 @@ static void ScenEditTownGenWndProc(Window *w, WindowEvent *e)
_place_proc(e->we.place.tile);
break;
case WE_ABORT_PLACE_OBJ:
- RaiseWindowButtons(w);
+ w->RaiseButtons();
w->LowerWidget(_scengen_town_size + 7);
SetWindowDirty(w);
break;
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index e95c59fbd..535c8de37 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -406,7 +406,7 @@ static void BuildTreesWndProc(Window *w, WindowEvent *e)
break;
case WE_ABORT_PLACE_OBJ:
- RaiseWindowButtons(w);
+ w->RaiseButtons();
break;
}
}
diff --git a/src/player_gui.cpp b/src/player_gui.cpp
index 16d5ff3f3..d296ed6d8 100644
--- a/src/player_gui.cpp
+++ b/src/player_gui.cpp
@@ -1218,11 +1218,11 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
if (DoCommandP(e->we.place.tile, 0, 0, NULL, CMD_BUILD_COMPANY_HQ | CMD_NO_WATER | CMD_MSG(STR_7071_CAN_T_BUILD_COMPANY_HEADQUARTERS)))
ResetObjectToPlace();
w->widget[PCW_WIDGET_BUILD_VIEW_HQ].type = WWT_PUSHTXTBTN; // this button can now behave as a normal push button
- RaiseWindowButtons(w);
+ w->RaiseButtons();
break;
case WE_ABORT_PLACE_OBJ:
- RaiseWindowButtons(w);
+ w->RaiseButtons();
break;
case WE_DESTROY:
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index a31399d40..af2a8f25e 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -578,7 +578,7 @@ static void BuildRailToolbWndProc(Window *w, WindowEvent *e)
break;
case WE_ABORT_PLACE_OBJ:
- RaiseWindowButtons(w);
+ w->RaiseButtons();
w->DisableWidget(RTW_REMOVE);
w->InvalidateWidget(RTW_REMOVE);
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 3b7840579..115eb5de5 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -255,7 +255,7 @@ static void TerraformToolbWndProc(Window *w, WindowEvent *e)
break;
case WE_ABORT_PLACE_OBJ:
- RaiseWindowButtons(w);
+ w->RaiseButtons();
break;
}
}
diff --git a/src/window.cpp b/src/window.cpp
index ef172230b..19b5ccc7f 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -85,9 +85,9 @@ void Window::RaiseButtons()
uint i;
for (i = 0; i < this->widget_count; i++) {
- if (IsWidgetLowered(i)) {
- RaiseWidget(i);
- InvalidateWidget(i);
+ if (this->IsWidgetLowered(i)) {
+ this->RaiseWidget(i);
+ this->InvalidateWidget(i);
}
}
}
@@ -1041,7 +1041,7 @@ static void DecreaseWindowCounters()
if (w->flags4&WF_TIMEOUT_MASK && !(--w->flags4&WF_TIMEOUT_MASK)) {
CallWindowEventNP(w, WE_TIMEOUT);
- if (w->desc_flags & WDF_UNCLICK_BUTTONS) RaiseWindowButtons(w);
+ if (w->desc_flags & WDF_UNCLICK_BUTTONS) w->RaiseButtons();
}
}
}
diff --git a/src/window.h b/src/window.h
index 97975c768..137d99804 100644
--- a/src/window.h
+++ b/src/window.h
@@ -629,7 +629,6 @@ int GetMenuItemIndex(const Window *w, int x, int y);
void InputLoop();
void InvalidateThisWindowData(Window *w);
void InvalidateWindowData(WindowClass cls, WindowNumber number);
-void RaiseWindowButtons(Window *w);
void RelocateAllWindows(int neww, int newh);
int PositionMainToolbar(Window *w);