OpenTTD Source 20241224-master-gf74b0cf984
|
Public Member Functions | |
RoadStopPickerCallbacks (const std::string &ini_group) | |
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 | 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. | |
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. | |
StringID | GetClassTooltip () const |
Get the tooltip string for the class list. | |
StringID | GetTypeTooltip () const |
Get the tooltip string for the type grid. | |
StringID | GetClassTooltip () const |
Get the tooltip string for the class list. | |
StringID | GetTypeTooltip () const |
Get the tooltip string for the type grid. | |
Public Member Functions inherited from PickerCallbacksNewGRFClass< RoadStopClass > | |
PickerCallbacksNewGRFClass (const std::string &ini_group) | |
T::index_type | GetClassIndex (int cls_id) const |
const RoadStopClass * | GetClass (int cls_id) const |
const T::spec_type * | GetSpec (int cls_id, int id) const |
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::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) |
Static Public Member Functions | |
static bool | IsClassChoice (const RoadStopClass &cls) |
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. | |
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. | |
Definition at line 1179 of file road_gui.cpp.
|
inline |
Definition at line 1181 of file road_gui.cpp.
|
inlineoverridevirtual |
Draw preview image of an item.
Implements PickerCallbacks.
Definition at line 1236 of file road_gui.cpp.
References DIAGDIR_END, HasBit(), INVALID_RAILTYPE, RoadStopPickerSelection::orientation, ROADSTOP_BUS, and RSF_DRIVE_THROUGH_ONLY.
|
inlineoverridevirtual |
Fill a set with all items that are used by the current player.
Implements PickerCallbacks.
Definition at line 1248 of file road_gui.cpp.
References _local_company, FACIL_BUS_STOP, FACIL_TRUCK_STOP, SpecializedStation< Station, false >::Iterate(), ROADSTOP_BUS, ROADSTOP_CLASS_DFLT, ROADSTOP_TRUCK, ROADSTOPTYPE_ALL, ROADSTOPTYPE_FREIGHT, and ROADSTOPTYPE_PASSENGER.
|
inlineoverridevirtual |
Get the name of a class.
Implements PickerCallbacks.
Definition at line 1213 of file road_gui.cpp.
References INVALID_STRING_ID.
|
virtual |
Get the tooltip string for the class list.
Implements PickerCallbacks.
Definition at line 1265 of file road_gui.cpp.
|
virtual |
Get the tooltip string for the class list.
Implements PickerCallbacks.
Definition at line 1268 of file road_gui.cpp.
|
overridevirtual |
Get the tooltip string for the class list.
Implements PickerCallbacks.
|
inlineoverridevirtual |
Get the index of the selected class.
Implements PickerCallbacks.
Definition at line 1210 of file road_gui.cpp.
References RoadStopPickerSelection::sel_class.
|
inlineoverridevirtual |
Get the selected type.
Implements PickerCallbacks.
Definition at line 1220 of file road_gui.cpp.
References RoadStopPickerSelection::sel_type.
|
inlineoverridevirtual |
Get the item of a type.
Implements PickerCallbacks.
Definition at line 1223 of file road_gui.cpp.
References INVALID_STRING_ID, and ROADSTOP_BUS.
|
virtual |
Get the tooltip string for the type grid.
Implements PickerCallbacks.
Definition at line 1266 of file road_gui.cpp.
|
virtual |
Get the tooltip string for the type grid.
Implements PickerCallbacks.
Definition at line 1269 of file road_gui.cpp.
|
overridevirtual |
Get the tooltip string for the type grid.
Implements PickerCallbacks.
|
inlineoverridevirtual |
Are there multiple classes to chose from?
Reimplemented from PickerCallbacksNewGRFClass< RoadStopClass >.
Definition at line 1205 of file road_gui.cpp.
References NewGRFClass< Tspec, Tindex, Tmax >::Classes().
|
inlineoverridevirtual |
Should picker class/type selection be enabled?
Implements PickerCallbacks.
Definition at line 1186 of file road_gui.cpp.
References NewGRFClass< Tspec, Tindex, Tmax >::Classes(), IsWaypointClass(), ROADSTOP_BUS, ROADSTOP_TRUCK, ROADSTOPTYPE_ALL, ROADSTOPTYPE_FREIGHT, and ROADSTOPTYPE_PASSENGER.
|
inlinestatic |
Definition at line 1200 of file road_gui.cpp.
|
inlineoverridevirtual |
Test if an item is currently buildable.
Implements PickerCallbacks.
Definition at line 1230 of file road_gui.cpp.
References IsRoadStopAvailable(), and ROADSTOP_BUS.
|
inlineoverridevirtual |
Set the selected class.
Implements PickerCallbacks.
Definition at line 1211 of file road_gui.cpp.
References RoadStopPickerSelection::sel_class.
|
inlineoverridevirtual |
Set the selected type.
Implements PickerCallbacks.
Definition at line 1221 of file road_gui.cpp.
References RoadStopPickerSelection::sel_type.