|
OpenTTD Source 20260606-master-ga894ddf665
|
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 121 of file story_base.h.
| Colours StoryPageButtonData::GetColour | ( | ) | const |
Get the button background colour.
Definition at line 173 of file story.cpp.
References GB(), Invalid, 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 193 of file story.cpp.
References GB(), Invalid, and IsValidStoryPageButtonCursor().
Referenced by StoryBookWindow::OnPageElementClick().
| StoryPageButtonFlags StoryPageButtonData::GetFlags | ( | ) | const |
Get the button flags.
See StoryPageButtonFlags for more details.
Definition at line 184 of file story.cpp.
References GB().
Referenced by StoryBookWindow::GetPageElementFloat().
| VehicleType StoryPageButtonData::GetVehicleType | ( | ) | const |
| void StoryPageButtonData::SetColour | ( | Colours | button_colour | ) |
Set the button background colour.
| button_colour | The new background colour. |
Definition at line 134 of file story.cpp.
References End, SB(), and to_underlying().
| void StoryPageButtonData::SetCursor | ( | StoryPageButtonCursor | cursor | ) |
Set the mouse cursor used while waiting for input for the button.
| cursor | The cursor to use. |
Definition at line 153 of file story.cpp.
References End, SB(), and to_underlying().
| void StoryPageButtonData::SetFlags | ( | StoryPageButtonFlags | flags | ) |
Set the button flags.
See StoryPageButtonFlags for more details.
| flags | The new state of flags. |
Definition at line 144 of file story.cpp.
References BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::base(), and 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 163 of file story.cpp.
References CompanyEnd, Invalid, SB(), and to_underlying().
| bool StoryPageButtonData::ValidateColour | ( | ) | const |
Verify that the data stored a valid Colour value.
true iff the stored colour is valid. Definition at line 213 of file story.cpp.
References End, GB(), and to_underlying().
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 237 of file story.cpp.
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 223 of file story.cpp.
References BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::All(), GB(), and BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Reset().
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 246 of file story.cpp.
References CompanyEnd, GB(), and Invalid.
Referenced by VerifyElementContentParameters().
| uint32_t StoryPageButtonData::referenced_id = 0 |
Definition at line 122 of file story_base.h.