diff --git a/src/date_gui.cpp b/src/date_gui.cpp --- a/src/date_gui.cpp +++ b/src/date_gui.cpp @@ -65,7 +65,7 @@ struct SetDateWindow : Window { * Helper function to construct the dropdown. * @param widget the dropdown widget to create the dropdown for */ - void ShowDateDropDown(int widget) + void ShowDateDropDown(WidgetID widget) { int selected; DropDownList list; @@ -99,7 +99,7 @@ struct SetDateWindow : Window { ShowDropDownList(this, std::move(list), selected, widget); } - 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 { Dimension d = {0, 0}; switch (widget) { @@ -128,7 +128,7 @@ struct SetDateWindow : Window { *size = d; } - void SetStringParameters(int widget) const override + void SetStringParameters(WidgetID widget) const override { switch (widget) { case WID_SD_DAY: SetDParam(0, this->date.day - 1 + STR_DAY_NUMBER_1ST); break; @@ -137,7 +137,7 @@ struct SetDateWindow : 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_SD_DAY: @@ -153,7 +153,7 @@ struct SetDateWindow : Window { } } - void OnDropdownSelect(int widget, int index) override + void OnDropdownSelect(WidgetID widget, int index) override { switch (widget) { case WID_SD_DAY: