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:
Peter Nelson
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

@@ -10,6 +10,13 @@
#ifndef WINDOW_TYPE_H
#define WINDOW_TYPE_H
/**
* Widget ID.
* Even though the ID is signed, actual IDs must be non-negative.
* Negative IDs are used for special cases, like denoting 'no widget'.
*/
using WidgetID = int;
/** %Window numbers. */
enum WindowNumberEnum {
WN_GAME_OPTIONS_AI = 0, ///< AI settings.