OpenTTD Source
20241108-master-g80f628063a
|
Public Member Functions | |
void | SetClimateMask () |
Set climate mask for filtering buildings from current landscape. | |
StringID | GetClassTooltip () const override |
Get the tooltip string for the class list. | |
StringID | GetTypeTooltip () const override |
Get the tooltip string for the type grid. | |
bool | IsActive () const override |
Should picker class/type selection be enabled? | |
bool | HasClassChoice () const override |
Are there multiple classes to chose from? | |
int | GetClassCount () const override |
Get the number of classes. More... | |
void | Close ([[maybe_unused]] int data) override |
int | GetSelectedClass () const override |
Get the index of the selected class. | |
void | SetSelectedClass (int cls_id) const override |
Set the selected class. | |
StringID | GetClassName (int id) const override |
Get the name of a class. | |
int | GetTypeCount (int cls_id) const override |
Get the number of types in a class. More... | |
PickerItem | GetPickerItem (int cls_id, int id) const override |
Get data about an item. | |
int | GetSelectedType () const override |
Get the selected type. | |
void | SetSelectedType (int id) const override |
Set the selected type. | |
StringID | GetTypeName (int cls_id, int id) const override |
Get the item of a type. | |
bool | IsTypeAvailable (int, int id) const override |
Test if an item is currently buildable. | |
void | DrawType (int x, int y, int, int id) const override |
Draw preview image of an item. | |
void | FillUsedItems (std::set< PickerItem > &items) override |
Fill a set with all items that are used by the current player. | |
std::set< PickerItem > | UpdateSavedItems (const std::set< PickerItem > &src) override |
Update link between grfid/localidx and class_index/index in saved items. | |
Public Member Functions inherited from PickerCallbacks | |
PickerCallbacks (const std::string &ini_group) | |
virtual void | Close (int) |
Data Fields | |
HouseZones | climate_mask |
uint8_t | class_mask |
Mask of available 'classes'. | |
Data Fields inherited from PickerCallbacks | |
Listing | class_last_sorting = { false, 0 } |
Default sorting of PickerClassList. | |
Filtering | class_last_filtering = { false, 0 } |
Default filtering of PickerClassList. | |
Listing | type_last_sorting = { false, 0 } |
Default sorting of PickerTypeList. | |
Filtering | type_last_filtering = { false, 0 } |
Default filtering of PickerTypeList. | |
const std::string | ini_group |
Ini Group for saving favourites. | |
uint8_t | mode = 0 |
Bitmask of PickerFilterModes . | |
std::set< PickerItem > | used |
Set of items used in the current game by the current company. | |
std::set< PickerItem > | saved |
Set of saved favourite items. | |
Static Public Attributes | |
static int | sel_class |
Currently selected 'class'. | |
static int | sel_type |
Currently selected HouseID. | |
static int | sel_view |
Currently selected 'view'. This is not controllable as its based on random data. | |
static const std::array< StringID, HZB_END > | zone_names |
static HousePickerCallbacks | instance |
Definition at line 1430 of file town_gui.cpp.
|
inlineoverridevirtual |
Get the number of classes.
Implements PickerCallbacks.
Definition at line 1486 of file town_gui.cpp.
Referenced by GetClassName(), and GetTypeCount().
|
inlineoverridevirtual |
Get the number of types in a class.
Implements PickerCallbacks.
Definition at line 1500 of file town_gui.cpp.
References GetClassCount(), and HouseSpec::Specs().
|
inlinestatic |
Definition at line 1473 of file town_gui.cpp.