OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
24 extern uint32_t _story_page_element_next_sort_value;
25 extern uint32_t _story_page_next_sort_value;
44 SPBF_FLOAT_LEFT = 1 << 0,
45 SPBF_FLOAT_RIGHT = 1 << 1,
118 return cursor < SPBC_END;
123 uint32_t referenced_id;
134 bool ValidateFlags()
const;
183 if (spe->page == this->index)
delete spe;
StoryPageButtonCursor
Mouse cursors usable by story page buttons.
std::string title
Title of story page.
TimerGameCalendar::Date date
Date when the page was created.
StoryPageButtonCursor GetCursor() const
Get the mouse cursor used while waiting for input for the button.
void SetCursor(StoryPageButtonCursor cursor)
Set the mouse cursor used while waiting for input for the button.
StoryPageElement()
We need an (empty) constructor so struct isn't zeroed (as C++ standard states)
Owner
Enum for all companies/owners.
Templated helper to make a type-safe 'typedef' representing a single POD value.
void SetColour(Colours button_colour)
Set the button background colour.
@ SPET_BUTTON_PUSH
A push button that triggers an immediate event.
bool ValidateVehicleType() const
Verity that the data stored a valid VehicleType value.
@ SPET_BUTTON_TILE
A button that allows the player to select a tile, and triggers an event with the tile.
bool ValidateCursor() const
Verify that the data stores a valid StoryPageButtonCursor value.
@ SPET_BUTTON_VEHICLE
A button that allows the player to select a vehicle, and triggers an event wih the vehicle.
StoryPageElementType type
Type of page element.
VehicleType GetVehicleType() const
Get the type of vehicles that are accepted by the button.
@ SPET_LOCATION
An element that references a tile along with a one-line text.
bool IsValidStoryPageButtonCursor(StoryPageButtonCursor cursor)
Checks if a StoryPageButtonCursor value is valid.
Struct about stories, current and completed.
StoryPage()
We need an (empty) constructor so struct isn't zeroed (as C++ standard states)
~StoryPage()
(Empty) destructor has to be defined else operator delete might be called with nullptr parameter
void SetVehicleType(VehicleType vehtype)
Set the type of vehicles that are accepted by the button.
@ SPET_TEXT
A text element.
static Pool::IterateWrapper< Titem > Iterate(size_t from=0)
Returns an iterable ensemble of all valid Titem.
Base class for all pools.
@ SPET_GOAL
An element that references a goal.
uint32_t referenced_id
Id of referenced object (location, goal etc.)
uint32_t sort_value
A number that increases for every created story page. Used for sorting. The id of a story page is the...
static bool CleaningPool()
Returns current state of pool cleaning - yes or no.
Colours GetColour() const
Get the button background colour.
std::string text
Static content text of page element.
Struct about story page elements.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
VehicleType
Available vehicle types.
Helper to construct packed "id" values for button-type StoryPageElement.
bool ValidateColour() const
Verify that the data stored a valid Colour value.
uint16_t StoryPageID
ID of a story page.
uint32_t sort_value
A number that increases for every created story page element. Used for sorting. The id of a story pag...
Base class for all PoolItems.
CompanyID company
StoryPage is for a specific company; INVALID_COMPANY if it is global.
StoryPageID page
Id of the page which the page element belongs to.
StoryPageButtonFlags
Flags available for buttons.
~StoryPageElement()
(Empty) destructor has to be defined else operator delete might be called with nullptr parameter