|
OpenTTD Source 20251117-master-g7398d2e290
|
Public Member Functions | |
| void | SetClimateMask () |
| Set climate mask for filtering buildings from current landscape. | |
| GrfSpecFeature | GetFeature () const override |
| 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. | |
| void | Close (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. | |
| 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. | |
| std::span< const BadgeID > | GetTypeBadges (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) | |
Static Public Member Functions | |
| static HouseZone | GetHouseZoneFromClassId (int cls_id) |
| static int | GetClassIdFromHouseZone (HouseZones zones) |
Data Fields | |
| HouseZones | climate_mask {} |
| uint8_t | class_mask = 0 |
| 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. | |
| int | preview_height = 0 |
| Previously adjusted height. | |
| 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, NUM_HOUSE_ZONES > | zone_names |
| static HousePickerCallbacks | instance |
Definition at line 1445 of file town_gui.cpp.
|
inline |
Definition at line 1447 of file town_gui.cpp.
|
inlineoverridevirtual |
Reimplemented from PickerCallbacks.
Definition at line 1499 of file town_gui.cpp.
|
inlineoverridevirtual |
Draw preview image of an item.
Implements PickerCallbacks.
Definition at line 1566 of file town_gui.cpp.
References DrawHouseInGUI(), and sel_view.
|
inlineoverridevirtual |
Fill a set with all items that are used by the current player.
Implements PickerCallbacks.
Definition at line 1571 of file town_gui.cpp.
References HouseSpec::building_availability, HouseSpec::Get(), and GetBuildingHouseIDCounts().
|
inlineoverridevirtual |
Get the number of classes.
Implements PickerCallbacks.
Definition at line 1497 of file town_gui.cpp.
Referenced by GetClassName(), GetTypeCount(), and SetClimateMask().
|
inlinestatic |
Definition at line 1528 of file town_gui.cpp.
|
inlineoverridevirtual |
Get the name of a class.
Implements PickerCallbacks.
Definition at line 1504 of file town_gui.cpp.
References GetClassCount(), HasBit(), and INVALID_STRING_ID.
|
inlineoverridevirtual |
Get the tooltip string for the class list.
Implements PickerCallbacks.
Definition at line 1492 of file town_gui.cpp.
|
inlineoverridevirtual |
Implements PickerCallbacks.
Definition at line 1490 of file town_gui.cpp.
|
inlinestatic |
Definition at line 1527 of file town_gui.cpp.
|
inlineoverridevirtual |
Get data about an item.
Implements PickerCallbacks.
Definition at line 1517 of file town_gui.cpp.
References HouseSpec::Get().
|
inlineoverridevirtual |
Get the index of the selected class.
Implements PickerCallbacks.
Definition at line 1501 of file town_gui.cpp.
References sel_class.
|
inlineoverridevirtual |
Get the selected type.
Implements PickerCallbacks.
Definition at line 1524 of file town_gui.cpp.
References sel_type.
|
inlineoverridevirtual |
Get the item of a type.
Implements PickerCallbacks.
Definition at line 1545 of file town_gui.cpp.
References HouseSpec::Get().
|
inlineoverridevirtual |
Get the number of types in a class.
Implements PickerCallbacks.
Definition at line 1511 of file town_gui.cpp.
References GetClassCount(), and HouseSpec::Specs().
Referenced by SetClimateMask().
|
inlineoverridevirtual |
Get the item of a type.
Implements PickerCallbacks.
Definition at line 1530 of file town_gui.cpp.
References BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any(), HouseSpec::building_availability, HouseSpec::enabled, HouseSpec::Get(), GetHouseName(), INVALID_STRING_ID, and BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test().
Referenced by SetClimateMask().
|
inlineoverridevirtual |
Get the tooltip string for the type grid.
Implements PickerCallbacks.
Definition at line 1493 of file town_gui.cpp.
|
inlineoverridevirtual |
Are there multiple classes to chose from?
Implements PickerCallbacks.
Definition at line 1496 of file town_gui.cpp.
|
inlineoverridevirtual |
Should picker class/type selection be enabled?
Implements PickerCallbacks.
Definition at line 1494 of file town_gui.cpp.
|
inlineoverridevirtual |
Test if an item is currently buildable.
Implements PickerCallbacks.
Definition at line 1560 of file town_gui.cpp.
References HouseSpec::enabled, and HouseSpec::Get().
|
inline |
Set climate mask for filtering buildings from current landscape.
Definition at line 1452 of file town_gui.cpp.
References class_mask, GetClassCount(), GetClimateMaskForLandscape(), GetTypeCount(), GetTypeName(), INVALID_STRING_ID, and SetBit().
|
inlineoverridevirtual |
Set the selected class.
Implements PickerCallbacks.
Definition at line 1502 of file town_gui.cpp.
References sel_class.
|
inlineoverridevirtual |
Set the selected type.
Implements PickerCallbacks.
Definition at line 1525 of file town_gui.cpp.
References sel_type.
|
inlineoverridevirtual |
Update link between grfid/localidx and class_index/index in saved items.
Implements PickerCallbacks.
Definition at line 1583 of file town_gui.cpp.
References HouseSpec::grf_prop, GRFFilePropsBase::grfid, GRFFilePropsBase::local_id, and HouseSpec::Specs().
| uint8_t HousePickerCallbacks::class_mask = 0 |
Mask of available 'classes'.
Definition at line 1474 of file town_gui.cpp.
Referenced by SetClimateMask().
| HouseZones HousePickerCallbacks::climate_mask {} |
Definition at line 1473 of file town_gui.cpp.
|
static |
Definition at line 1608 of file town_gui.cpp.
|
inlinestatic |
Currently selected 'class'.
Definition at line 1476 of file town_gui.cpp.
Referenced by GetSelectedClass(), and SetSelectedClass().
|
inlinestatic |
Currently selected HouseID.
Definition at line 1477 of file town_gui.cpp.
Referenced by GetSelectedType(), BuildHouseWindow::OnInvalidateData(), BuildHouseWindow::OnPlaceObject(), and SetSelectedType().
|
inlinestatic |
Currently selected 'view'. This is not controllable as its based on random data.
Definition at line 1478 of file town_gui.cpp.
Referenced by DrawType().
|
inlinestatic |
Definition at line 1482 of file town_gui.cpp.