|
OpenTTD Source 20260206-master-g4d4e37dbf1
|
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) |
| Set the button 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 |
| Get the button flags. | |
| 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 |
| Verify that valid flags were set. | |
| 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 = 0 |
Helper to construct packed "id" values for button-type StoryPageElement.
Definition at line 123 of file story_base.h.
| Colours StoryPageButtonData::GetColour | ( | ) | const |
Get the button background colour.
Definition at line 172 of file story.cpp.
References GB(), and IsValidColours().
Referenced by StoryBookWindow::DrawWidget().
| StoryPageButtonCursor StoryPageButtonData::GetCursor | ( | ) | const |
Get the mouse cursor used while waiting for input for the button.
Definition at line 192 of file story.cpp.
References GB(), and IsValidStoryPageButtonCursor().
Referenced by StoryBookWindow::OnPageElementClick().
| StoryPageButtonFlags StoryPageButtonData::GetFlags | ( | ) | const |
Get the button flags.
See StoryPageButtonFlags for more details.
Definition at line 183 of file story.cpp.
References GB().
Referenced by StoryBookWindow::GetPageElementFloat().
| VehicleType StoryPageButtonData::GetVehicleType | ( | ) | const |
| void StoryPageButtonData::SetColour | ( | Colours | button_colour | ) |
| void StoryPageButtonData::SetCursor | ( | StoryPageButtonCursor | cursor | ) |
| void StoryPageButtonData::SetFlags | ( | StoryPageButtonFlags | flags | ) |
Set the button flags.
See StoryPageButtonFlags for more details.
| flags | The new state of flags. |
Definition at line 143 of file story.cpp.
References SB().
| void StoryPageButtonData::SetVehicleType | ( | VehicleType | vehtype | ) |
Set the type of vehicles that are accepted by the button.
| vehtype | The type of vehicle to accept. |
Definition at line 162 of file story.cpp.
References SB(), VEH_COMPANY_END, and VEH_INVALID.
| bool StoryPageButtonData::ValidateColour | ( | ) | const |
Verify that the data stored a valid Colour value.
true iff the stored colour is valid. Definition at line 212 of file story.cpp.
References GB().
Referenced by VerifyElementContentParameters().
| bool StoryPageButtonData::ValidateCursor | ( | ) | const |
Verify that the data stores a valid StoryPageButtonCursor value.
true iff the stored cursor is valid. Definition at line 236 of file story.cpp.
References GB().
Referenced by VerifyElementContentParameters().
| bool StoryPageButtonData::ValidateFlags | ( | ) | const |
Verify that valid flags were set.
Some flags in StoryPageButtonFlags can't be used together.
true iff the flags are valid. Definition at line 222 of file story.cpp.
References GB().
Referenced by VerifyElementContentParameters().
| bool StoryPageButtonData::ValidateVehicleType | ( | ) | const |
Verity that the data stored a valid VehicleType value.
true iff the stored VehicleType is valid. Definition at line 245 of file story.cpp.
References GB(), VEH_COMPANY_END, and VEH_INVALID.
Referenced by VerifyElementContentParameters().
| uint32_t StoryPageButtonData::referenced_id = 0 |
Definition at line 124 of file story_base.h.