OpenTTD Source 20241224-master-gf74b0cf984
|
Helper to construct packed "id" values for button-type StoryPageElement. More...
#include <story_base.h>
Public Member Functions | |
void | SetColour (Colours button_colour) |
Set the button background colour. | |
void | SetFlags (StoryPageButtonFlags flags) |
void | SetCursor (StoryPageButtonCursor cursor) |
Set the mouse cursor used while waiting for input for the button. | |
void | SetVehicleType (VehicleType vehtype) |
Set the type of vehicles that are accepted by the button. | |
Colours | GetColour () const |
Get the button background colour. | |
StoryPageButtonFlags | GetFlags () const |
StoryPageButtonCursor | GetCursor () const |
Get the mouse cursor used while waiting for input for the button. | |
VehicleType | GetVehicleType () const |
Get the type of vehicles that are accepted by the button. | |
bool | ValidateColour () const |
Verify that the data stored a valid Colour value. | |
bool | ValidateFlags () const |
bool | ValidateCursor () const |
Verify that the data stores a valid StoryPageButtonCursor value. | |
bool | ValidateVehicleType () const |
Verity that the data stored a valid VehicleType value. | |
Data Fields | |
uint32_t | referenced_id |
Helper to construct packed "id" values for button-type StoryPageElement.
Definition at line 122 of file story_base.h.
Colours StoryPageButtonData::GetColour | ( | ) | const |
Get the button background colour.
Definition at line 147 of file story.cpp.
References GB(), and IsValidColours().
StoryPageButtonCursor StoryPageButtonData::GetCursor | ( | ) | const |
Get the mouse cursor used while waiting for input for the button.
Definition at line 160 of file story.cpp.
References GB(), and IsValidStoryPageButtonCursor().
StoryPageButtonFlags StoryPageButtonData::GetFlags | ( | ) | const |
VehicleType StoryPageButtonData::GetVehicleType | ( | ) | const |
void StoryPageButtonData::SetColour | ( | Colours | button_colour | ) |
void StoryPageButtonData::SetCursor | ( | StoryPageButtonCursor | cursor | ) |
void StoryPageButtonData::SetFlags | ( | StoryPageButtonFlags | flags | ) |
void StoryPageButtonData::SetVehicleType | ( | VehicleType | vehtype | ) |
Set the type of vehicles that are accepted by the button.
Definition at line 140 of file story.cpp.
References SB(), VEH_COMPANY_END, and VEH_INVALID.
bool StoryPageButtonData::ValidateColour | ( | ) | const |
bool StoryPageButtonData::ValidateCursor | ( | ) | const |
bool StoryPageButtonData::ValidateVehicleType | ( | ) | const |
Verity that the data stored a valid VehicleType value.
Definition at line 196 of file story.cpp.
References GB(), VEH_COMPANY_END, and VEH_INVALID.
uint32_t StoryPageButtonData::referenced_id |
Definition at line 123 of file story_base.h.