|
OpenTTD Source 20260129-master-g2bb01bd0e4
|
Public Member Functions | |
| 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. | |
| StringID | GetCollectionTooltip () const override |
| Get the tooltip string for the collection list. | |
| bool | IsActive () const override |
| Should picker class/type selection be enabled? | |
| int | GetSelectedClass () const override |
| Get the index of the selected class. | |
| void | SetSelectedClass (int id) const override |
| Set the selected class. | |
| StringID | GetClassName (int id) const override |
| Get the name of a class. | |
| 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 cls_id, int id) const override |
| Test if an item is currently buildable. | |
| void | DrawType (int x, int y, int cls_id, 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. | |
Public Member Functions inherited from PickerCallbacksNewGRFClass< ObjectClass > | |
| PickerCallbacksNewGRFClass (const std::string &ini_group) | |
| T::index_type | GetClassIndex (int cls_id) const |
| const ObjectClass * | GetClass (int cls_id) const |
| const T::spec_type * | GetSpec (int cls_id, int id) const |
| bool | HasClassChoice () const override |
| Are there multiple classes to chose from? | |
| int | GetClassCount () const override |
| Get the number of classes. | |
| int | GetTypeCount (int cls_id) const override |
| Get the number of types in a class. | |
| PickerItem | GetPickerItem (const typename T::spec_type *spec, int cls_id=-1, int id=-1) const |
| PickerItem | GetPickerItem (int cls_id, int id) const override |
| Get data about an item. | |
| std::map< std::string, std::set< PickerItem > > | UpdateSavedItems (const std::map< std::string, 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) |
| std::set< std::string > | InitializeInactiveCollections (const std::map< std::string, std::set< PickerItem > > collections) |
| Initialize the list of active collections for sorting purposes. | |
Static Public Attributes | |
| static ObjectPickerCallbacks | instance |
Additional Inherited Members | |
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. | |
| Listing | collection_last_sorting = { false, 0 } |
| Default sorting of PickerCollectionList. | |
| const std::string | ini_group |
| Ini Group for saving favourites. | |
| uint8_t | mode = 0 |
Bitmask of PickerFilterModes. | |
| bool | rename_collection = false |
| Are we renaming a collection? | |
| std::string | sel_collection |
| Currently selected collection of saved items. | |
| std::string | edit_collection |
| Collection to rename or delete. | |
| std::set< std::string > | rm_collections |
| Set of removed or renamed collections for updating ini file. | |
| int | preview_height = 0 |
| Previously adjusted height. | |
| std::set< PickerItem > | used |
| Set of items used in the current game by the current company. | |
| std::map< std::string, std::set< PickerItem > > | saved |
| Set of saved collections of items. | |
Definition at line 45 of file object_gui.cpp.
|
inline |
Definition at line 47 of file object_gui.cpp.
|
inlineoverridevirtual |
Draw preview image of an item.
Implements PickerCallbacks.
Definition at line 97 of file object_gui.cpp.
References _object_gui, DrawNewObjectTileInGUI(), DrawOrigTileSeqInGUI(), and ObjectPickerSelection::sel_view.
|
inlineoverridevirtual |
Fill a set with all items that are used by the current player.
Implements PickerCallbacks.
Definition at line 109 of file object_gui.cpp.
References _current_company, NewGRFSpecBase< Tindex >::class_index, ObjectSpec::Get(), GetTileOwner(), INVALID_OBJECT_CLASS, ObjectSpec::IsEverAvailable(), and Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_object_pool >::Iterate().
|
inlineoverridevirtual |
Get the name of a class.
Implements PickerCallbacks.
Definition at line 68 of file object_gui.cpp.
References INVALID_STRING_ID.
|
inlineoverridevirtual |
Get the tooltip string for the class list.
Implements PickerCallbacks.
Definition at line 51 of file object_gui.cpp.
|
inlineoverridevirtual |
Get the tooltip string for the collection list.
Implements PickerCallbacks.
Definition at line 53 of file object_gui.cpp.
|
inlineoverridevirtual |
Implements PickerCallbacks.
Definition at line 49 of file object_gui.cpp.
|
inlineoverridevirtual |
Get the index of the selected class.
Implements PickerCallbacks.
Definition at line 65 of file object_gui.cpp.
References _object_gui, and ObjectPickerSelection::sel_class.
|
inlineoverridevirtual |
Get the selected type.
Implements PickerCallbacks.
Definition at line 75 of file object_gui.cpp.
References _object_gui, and ObjectPickerSelection::sel_type.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Get the item of a type.
Implements PickerCallbacks.
Definition at line 78 of file object_gui.cpp.
References INVALID_STRING_ID.
|
inlineoverridevirtual |
Get the tooltip string for the type grid.
Implements PickerCallbacks.
Definition at line 52 of file object_gui.cpp.
|
inlineoverridevirtual |
Should picker class/type selection be enabled?
Implements PickerCallbacks.
Definition at line 55 of file object_gui.cpp.
References NewGRFClass< Tspec, Tindex, Tmax >::Classes().
|
inlineoverridevirtual |
Test if an item is currently buildable.
Implements PickerCallbacks.
Definition at line 91 of file object_gui.cpp.
|
inlineoverridevirtual |
Set the selected class.
Implements PickerCallbacks.
Definition at line 66 of file object_gui.cpp.
References _object_gui, and ObjectPickerSelection::sel_class.
|
inlineoverridevirtual |
Set the selected type.
Implements PickerCallbacks.
Definition at line 76 of file object_gui.cpp.
References _object_gui, and ObjectPickerSelection::sel_type.
|
static |
Definition at line 119 of file object_gui.cpp.