Codechange: Replace mishmash of types for widget index with WidgetID.

Indices were stored as int, but often passed around as uint/uint8_t and casts.

Now they should all use WidgetID.
This commit is contained in:
2023-12-29 19:11:59 +00:00
committed by Peter Nelson
parent fd84f73323
commit a0dfb76e34
77 changed files with 666 additions and 657 deletions

View File

@@ -488,7 +488,7 @@ Point GetTileZoomCenterWindow(bool in, Window * w)
* @param widget_zoom_in widget index for window with zoom-in button
* @param widget_zoom_out widget index for window with zoom-out button
*/
void HandleZoomMessage(Window *w, const Viewport *vp, byte widget_zoom_in, byte widget_zoom_out)
void HandleZoomMessage(Window *w, const Viewport *vp, WidgetID widget_zoom_in, WidgetID widget_zoom_out)
{
w->SetWidgetDisabledState(widget_zoom_in, vp->zoom <= _settings_client.gui.zoom_min);
w->SetWidgetDirty(widget_zoom_in);