10#ifndef NEWGRF_BADGE_GUI_H
11#define NEWGRF_BADGE_GUI_H
32 inline std::span<const Element> GetClasses()
const
34 return this->gui_classes;
37 inline std::span<const uint> GetColumnWidths()
const
39 return this->column_widths;
45 std::vector<Element> gui_classes{};
46 std::vector<uint> column_widths{};
50void DrawBadgeColumn(
Rect r,
int column_group,
const GUIBadgeClasses &gui_classes, std::span<const BadgeID> badges,
GrfSpecFeature feature, std::optional<TimerGameCalendar::Date> introduction_date,
PaletteID remap);
52std::unique_ptr<DropDownListItem> MakeDropDownListBadgeItem(
const std::shared_ptr<GUIBadgeClasses> &gui_classes, std::span<const BadgeID> badges,
GrfSpecFeature feature, std::optional<TimerGameCalendar::Date> introduction_date, std::string &&str,
int value,
bool masked =
false,
bool shaded =
false);
53std::unique_ptr<DropDownListItem> MakeDropDownListBadgeIconItem(
const std::shared_ptr<GUIBadgeClasses> &gui_classes, std::span<const BadgeID> badges,
GrfSpecFeature feature, std::optional<TimerGameCalendar::Date> introduction_date,
const Dimension &dim,
SpriteID sprite,
PaletteID palette, std::string &&str,
int value,
bool masked =
false,
bool shaded =
false);
uint GetTotalColumnsWidth() const
Get total width of all columns.
Types related to the drop down widget.
uint32_t SpriteID
The number of a sprite, without mapping bits and colourtables.
uint32_t PaletteID
The number of the palette.
Base for the NewGRF implementation.
Types related to NewGRF badges.
Dimensions (a width and height) of a rectangle in 2D.
Dimension size
Maximal size of this element.
uint sort_order
Order of element.
std::string_view label
Class label (string owned by the class badge)
BadgeClassID class_index
Badge class index.
bool visible
Whether this element is visible.
uint8_t column_group
Column group in UI. 0 = left, 1 = centre, 2 = right.
Specification of a rectangle with absolute coordinates of all edges.
Definition of the game-calendar-timer.