mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r11592) -Codechange: Use the Window member RaiseButtons and remove the now useless RaiseWindowButtons function
This commit is contained in:
parent
6fb71047d6
commit
8c89641dbe
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -406,7 +406,7 @@ static void BuildTreesWndProc(Window *w, WindowEvent *e)
|
|||
break;
|
||||
|
||||
case WE_ABORT_PLACE_OBJ:
|
||||
RaiseWindowButtons(w);
|
||||
w->RaiseButtons();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ static void TerraformToolbWndProc(Window *w, WindowEvent *e)
|
|||
break;
|
||||
|
||||
case WE_ABORT_PLACE_OBJ:
|
||||
RaiseWindowButtons(w);
|
||||
w->RaiseButtons();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue