diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -315,7 +315,7 @@ public: this->sel_group = id_g; } - 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 { switch (widget) { case WID_RV_SORT_ASCENDING_DESCENDING: { @@ -402,7 +402,7 @@ public: } } - void SetStringParameters(int widget) const override + void SetStringParameters(WidgetID widget) const override { switch (widget) { case WID_RV_CAPTION: @@ -457,7 +457,7 @@ public: } } - void DrawWidget(const Rect &r, int widget) const override + void DrawWidget(const Rect &r, WidgetID widget) const override { switch (widget) { case WID_RV_SORT_ASCENDING_DESCENDING: @@ -541,7 +541,7 @@ public: } } - 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 { switch (widget) { case WID_RV_SORT_ASCENDING_DESCENDING: @@ -655,7 +655,7 @@ public: } } - void OnDropdownSelect(int widget, int index) override + void OnDropdownSelect(WidgetID widget, int index) override { switch (widget) { case WID_RV_SORT_DROPDOWN: @@ -697,7 +697,7 @@ public: } } - bool OnTooltip([[maybe_unused]] Point pt, int widget, TooltipCloseCondition close_cond) override + bool OnTooltip([[maybe_unused]] Point pt, WidgetID widget, TooltipCloseCondition close_cond) override { if (widget != WID_RV_TRAIN_WAGONREMOVE_TOGGLE) return false;