Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/ci-build.yml # .github/workflows/release-linux.yml # .github/workflows/release-macos.yml # .github/workflows/release-windows.yml # .gitignore # COMPILING.md # src/company_gui.cpp # src/date_gui.cpp # src/engine.cpp # src/engine_func.h # src/fileio.cpp # src/linkgraph/linkgraph_gui.h # src/newgrf_debug_gui.cpp # src/newgrf_gui.cpp # src/order_gui.cpp # src/osk_gui.cpp # src/rail_gui.cpp # src/road_gui.cpp # src/script/api/script_event_types.hpp # src/sl/oldloader_sl.cpp # src/smallmap_gui.cpp # src/station_cmd.cpp # src/toolbar_gui.cpp # src/town_gui.cpp # src/transparency_gui.cpp # src/vehicle_gui.cpp # src/widget.cpp # src/widget_type.h # src/widgets/dropdown.cpp # src/widgets/dropdown_func.h # src/widgets/dropdown_type.h # src/widgets/group_widget.h # src/widgets/vehicle_widget.h # src/window.cpp # src/window_gui.h # src/window_type.h
This commit is contained in:
@@ -221,7 +221,7 @@ struct TerraformToolbarWindow : Window {
|
||||
SetWidgetDisabledState(WID_TT_BUY_LAND, _settings_game.construction.purchase_land_permitted == 0);
|
||||
}
|
||||
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
if (widget < WID_TT_BUTTONS_START) return;
|
||||
|
||||
@@ -628,7 +628,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
void UpdateWidgetSize(WidgetID widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
{
|
||||
if (widget != WID_ETT_DOTS) return;
|
||||
|
||||
@@ -636,7 +636,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
|
||||
size->height = std::max<uint>(size->height, ScaleGUITrad(31));
|
||||
}
|
||||
|
||||
void DrawWidget(const Rect &r, int widget) const override
|
||||
void DrawWidget(const Rect &r, WidgetID widget) const override
|
||||
{
|
||||
if (widget != WID_ETT_DOTS) return;
|
||||
|
||||
@@ -653,7 +653,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
|
||||
} while (--n);
|
||||
}
|
||||
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
if (widget < WID_ETT_BUTTONS_START) return;
|
||||
|
||||
@@ -731,9 +731,9 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
|
||||
|
||||
void OnTimeout() override
|
||||
{
|
||||
for (uint i = WID_ETT_START; i < this->nested_array_size; i++) {
|
||||
if (i == WID_ETT_BUTTONS_START) i = WID_ETT_BUTTONS_END; // skip the buttons
|
||||
this->RaiseWidgetWhenLowered(i);
|
||||
for (const auto &pair : this->widget_lookup) {
|
||||
if (pair.first < WID_ETT_START || (pair.first >= WID_ETT_BUTTONS_START && pair.first < WID_ETT_BUTTONS_END)) continue; // skip the buttons
|
||||
this->RaiseWidgetWhenLowered(pair.first);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user