diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp --- a/src/newgrf_debug_gui.cpp +++ b/src/newgrf_debug_gui.cpp @@ -359,14 +359,14 @@ struct NewGRFInspectWindow : Window { this->OnInvalidateData(0, true); } - void SetStringParameters(int widget) const override + void SetStringParameters(WidgetID widget) const override { if (widget != WID_NGRFI_CAPTION) return; GetFeatureHelper(this->window_number)->SetStringParameters(this->GetFeatureIndex()); } - 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_NGRFI_VEH_CHAIN: { @@ -542,7 +542,7 @@ struct NewGRFInspectWindow : Window { const_cast(this)->vscroll->SetCount(i); } - void DrawWidget(const Rect &r, int widget) const override + void DrawWidget(const Rect &r, WidgetID widget) const override { switch (widget) { case WID_NGRFI_VEH_CHAIN: @@ -555,7 +555,7 @@ struct NewGRFInspectWindow : Window { } } - 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_NGRFI_PARENT: { @@ -843,7 +843,7 @@ struct SpriteAlignerWindow : Window { this->InvalidateData(0, true); } - void SetStringParameters(int widget) const override + void SetStringParameters(WidgetID widget) const override { const Sprite *spr = GetSprite(this->current_sprite, SpriteType::Normal); switch (widget) { @@ -877,7 +877,7 @@ struct SpriteAlignerWindow : 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 { switch (widget) { case WID_SA_SPRITE: @@ -895,7 +895,7 @@ struct SpriteAlignerWindow : Window { } } - void DrawWidget(const Rect &r, int widget) const override + void DrawWidget(const Rect &r, WidgetID widget) const override { switch (widget) { case WID_SA_SPRITE: { @@ -947,7 +947,7 @@ struct SpriteAlignerWindow : Window { } } - 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_SA_PREVIOUS: