OpenTTD Source 20250205-master-gfd85ab1e2c
|
Number to differentiate different windows of the same class. More...
#include <window_type.h>
Public Member Functions | |
WindowNumber (int32_t value) | |
WindowNumber (ConvertibleThroughBase auto value) | |
operator int32_t () const | |
template<typename T > requires (std::is_enum_v<T> || std::is_class_v<T>) | |
operator T () const | |
Private Attributes | |
int32_t | value = 0 |
Number to differentiate different windows of the same class.
This number generally implicitly passes some information, e.g. the TileIndex or Company associated with the window. To ease this use, the window number is lenient with what it accepts and broad with what it returns.
Anything that converts into a number and ConvertibleThroughBase types will be accepted. When it's being used it returns int32_t or any other type when that's specifically requested, e.g. VehicleType type = window_number
or GetEngineListHeight(window_number)
in which the returned value will be a VehicleType
.
Definition at line 752 of file window_type.h.
|
inline |
Definition at line 757 of file window_type.h.
|
inline |
Definition at line 758 of file window_type.h.
|
inline |
Definition at line 761 of file window_type.h.
|
inline |
Definition at line 765 of file window_type.h.
|
private |
Definition at line 754 of file window_type.h.