OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
46 #include "table/strings.h"
60 return GB(window_number, 0, 24);
72 assert((index >> 24) == 0);
73 return (feature << 24) | index;
85 typedef const void *NIOffsetProc(
const void *b);
135 virtual uint
GetParent(uint index)
const = 0;
142 virtual const void *
GetInstance(uint index)
const = 0;
149 virtual const void *
GetSpec(uint index)
const = 0;
162 virtual uint32_t
GetGRFID(uint index)
const = 0;
172 virtual uint
Resolve(uint index, uint var, uint param,
bool &avail)
const = 0;
189 virtual const std::span<int32_t>
GetPSA([[maybe_unused]] uint index, [[maybe_unused]] uint32_t grfid)
const
215 SetDParam(0, STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT);
298 this->caller_grfid = grfid;
308 return f == GSF_TRAINS || f == GSF_ROADVEHICLES;
318 if (this->chain_index > 0) {
321 v = v->
Move(this->chain_index);
322 if (v !=
nullptr) index = v->
index;
332 if (this->chain_index == 0)
return;
337 v = v->
Move(this->chain_index);
338 if (v ==
nullptr) this->chain_index = 0;
353 void SetStringParameters(
WidgetID widget)
const override
388 if (offset < 0 || offset >= this->vscroll->
GetCapacity())
return;
404 if (u == v) sel_start = total_width;
408 default: NOT_REACHED();
410 if (u == v) sel_end = total_width;
416 if (total_width >
width) {
417 int sel_center = (sel_start + sel_end) / 2;
418 if (sel_center >
width / 2) skip = std::min(total_width -
width, sel_center -
width / 2);
444 const void *base_spec = nih->
GetSpec(index);
452 uint value = nih->
Resolve(index, niv->var, param, avail);
454 if (!avail)
continue;
457 this->
DrawString(r, i++, fmt::format(
" {:02x}[{:02x}]: {:08x} ({})", niv->var, param, value, niv->name));
459 this->
DrawString(r, i++, fmt::format(
" {:02x}: {:08x} ({})", niv->var, value, niv->name));
464 auto psa = nih->
GetPSA(index, this->caller_grfid);
467 this->
DrawString(r, i++, fmt::format(
"Persistent storage [{:08X}]:",
BSWAP32(this->caller_grfid)));
469 this->
DrawString(r, i++,
"Persistent storage:");
471 assert(psa.size() % 4 == 0);
472 for (
size_t j = 0; j < psa.size(); j += 4) {
473 this->
DrawString(r, i++, fmt::format(
" {}: {} {} {} {}", j, psa[j], psa[j + 1], psa[j + 2], psa[j + 3]));
480 const void *ptr = nip->offset_proc(base);
482 switch (nip->read_size) {
483 case 1: value = *(
const uint8_t *)ptr;
break;
484 case 2: value = *(
const uint16_t *)ptr;
break;
485 case 4: value = *(
const uint32_t *)ptr;
break;
486 default: NOT_REACHED();
493 string = STR_JUST_INT;
504 this->
DrawString(r, i++, fmt::format(
" {:02x}: {} ({})", nip->prop,
GetString(
string), nip->name));
512 const void *ptr = nic->offset_proc(base_spec);
514 switch (nic->read_size) {
515 case 1: value = *(
const uint8_t *)ptr;
break;
516 case 2: value = *(
const uint16_t *)ptr;
break;
517 case 4: value = *(
const uint32_t *)ptr;
break;
518 default: NOT_REACHED();
521 if (!
HasBit(value, nic->cb_bit))
continue;
522 this->
DrawString(r, i++, fmt::format(
" {:03x}: {}", nic->cb_id, nic->name));
524 this->
DrawString(r, i++, fmt::format(
" {:03x}: {} (unmasked)", nic->cb_id, nic->name));
535 void DrawWidget(
const Rect &r,
WidgetID widget)
const override
548 void OnClick([[maybe_unused]]
Point pt,
WidgetID widget, [[maybe_unused]]
int click_count)
override
559 if (this->chain_index > 0) {
569 if (v !=
nullptr && v->
Next() !=
nullptr) {
583 if (line == INT32_MAX)
return;
587 if (line != 1)
continue;
591 this->current_edit_param = niv->var;
598 void OnQueryTextFinished(std::optional<std::string> str)
override
600 if (!str.has_value() || str->empty())
return;
616 void OnInvalidateData([[maybe_unused]]
int data = 0, [[maybe_unused]]
bool gui_scope =
true)
override
618 if (!gui_scope)
return;
630 static constexpr
NWidgetPart _nested_newgrf_inspect_chain_widgets[] = {
654 static constexpr
NWidgetPart _nested_newgrf_inspect_widgets[] = {
673 WDP_AUTO,
"newgrf_inspect_chain", 400, 300,
676 _nested_newgrf_inspect_chain_widgets
680 WDP_AUTO,
"newgrf_inspect", 400, 300,
683 _nested_newgrf_inspect_widgets
700 WindowDesc &desc = (feature == GSF_TRAINS || feature == GSF_ROADVEHICLES) ? _newgrf_inspect_chain_desc : _newgrf_inspect_desc;
754 if (nif ==
nullptr)
return false;
775 case STATION_RAIL:
return GSF_STATIONS;
776 case STATION_AIRPORT:
return GSF_AIRPORTTILES;
777 case STATION_BUS:
return GSF_ROADSTOPS;
778 case STATION_TRUCK:
return GSF_ROADSTOPS;
793 case VEH_ROAD:
return GSF_ROADVEHICLES;
805 typedef std::pair<int16_t, int16_t>
XyOffs;
813 static bool crosshair;
824 this->SelectAction5Type();
837 void SetStringParameters(
WidgetID widget)
const override
842 if (this->act5_type !=
nullptr) {
843 SetDParam(0, STR_SPRITE_ALIGNER_CAPTION_ACTION5);
849 SetDParam(0, STR_SPRITE_ALIGNER_CAPTION_ACTIONA);
854 SetDParam(0, STR_SPRITE_ALIGNER_CAPTION_NO_ACTION);
869 const auto key_offs_pair = this->offs_start_map.find(this->current_sprite);
870 if (key_offs_pair != this->offs_start_map.end()) {
899 size.width = d.width + padding.width;
902 fill.height =
resize.height;
911 void DrawWidget(
const Rect &r,
WidgetID widget)
const override
920 if (SpriteAlignerWindow::centre) {
932 DrawSprite(this->current_sprite, PAL_NONE, x, y,
nullptr, SpriteAlignerWindow::zoom);
938 if (SpriteAlignerWindow::crosshair) {
949 const NWidgetBase *nwid = this->GetWidget<NWidgetBase>(widget);
956 for (
auto it = first; it != last; ++it) {
958 if (file ==
nullptr) {
964 DrawString(ir, STR_SPRITE_ALIGNER_SPRITE, *it == this->current_sprite ? TC_WHITE : TC_BLACK);
973 void OnClick([[maybe_unused]]
Point pt,
WidgetID widget, [[maybe_unused]]
int click_count)
override
980 this->SelectAction5Type();
990 this->current_sprite = (this->current_sprite + 1) %
GetMaxSpriteID();
992 this->SelectAction5Type();
998 _newgrf_debug_sprite_picker.
mode = SPM_WAIT_CLICK;
1008 this->SelectAction5Type();
1033 if (this->offs_start_map.count(this->current_sprite) == 0) {
1052 this->offs_start_map.erase(this->current_sprite);
1057 SpriteAlignerWindow::centre = !SpriteAlignerWindow::centre;
1063 SpriteAlignerWindow::crosshair = !SpriteAlignerWindow::crosshair;
1077 void OnQueryTextFinished(std::optional<std::string> str)
override
1079 if (!str.has_value() || str->empty())
return;
1081 this->current_sprite = atoi(str->c_str());
1082 if (this->current_sprite >=
GetMaxSpriteID()) this->current_sprite = 0;
1084 this->current_sprite = (this->current_sprite + 1) %
GetMaxSpriteID();
1086 this->SelectAction5Type();
1095 void OnInvalidateData([[maybe_unused]]
int data = 0, [[maybe_unused]]
bool gui_scope =
true)
override
1097 if (!gui_scope)
return;
1117 void SelectAction5Type()
1120 for (
auto it = std::begin(act5types); it != std::end(act5types); ++it) {
1121 if (it->sprite_base <= this->current_sprite && this->current_sprite < it->sprite_base + it->max_sprites) {
1122 this->act5_type = &*it;
1126 this->act5_type =
nullptr;
1130 bool SpriteAlignerWindow::centre =
true;
1131 bool SpriteAlignerWindow::crosshair =
true;
1133 static constexpr
NWidgetPart _nested_sprite_aligner_widgets[] = {
1183 NWidget(
WWT_MATRIX, COLOUR_GREY,
WID_SA_LIST),
SetResize(1, 1),
SetMatrixDataTip(1, 0, STR_NULL),
SetFill(1, 1),
SetScrollbar(
WID_SA_SCROLLBAR),
1204 WDP_AUTO,
"sprite_aligner", 400, 300,
1207 _nested_sprite_aligner_widgets
1215 AllocateWindowDescFront<SpriteAlignerWindow>(_sprite_aligner_desc, 0);
int GetDisplayImageWidth(Point *offset=nullptr) const
Get the width of a train vehicle image in the GUI.
uint16_t height
Height of the sprite.
void OnResize() override
Called after the window got resized.
@ MP_HOUSE
A house by a town.
uint8_t current_edit_param
The currently edited parameter, to update the right one.
SpriteID sprite_base
Load the sprites starting from this sprite.
void InvalidateWindowData(WindowClass cls, WindowNumber number, int data, bool gui_scope)
Mark window data of the window of a given class and specific window number as invalid (in need of re-...
uint height
Vehicle cell height.
int Height() const
Get height of Rect.
static Titem * Get(size_t index)
Returns Titem with given index.
uint chain_index
For ground vehicles: Index in vehicle chain.
int16_t x_offs
Number of pixels to shift the sprite to the right.
void SetDParamMaxDigits(size_t n, uint count, FontSize size)
Set DParam n to some number that is suitable for string size computations.
Dimensions (a width and height) of a rectangle in 2D.
static const int CBM_NO_BIT
Mask to show no bit needs to be enabled for the callback.
void DrawVehicleChainWidget(const Rect &r) const
Helper function to draw the vehicle chain widget.
@ WC_LAND_INFO
Land info window; Window numbers:
Rect Shrink(int s) const
Copy and shrink Rect by s pixels.
@ NIT_INT
The property is a simple integer.
Vehicle * Next() const
Get the next vehicle of this vehicle.
uint8_t read_size
Number of bytes (i.e. byte, word, dword etc)
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
@ ZOOM_LVL_END
End for iteration.
static const uint8_t PC_WHITE
White palette colour.
bool HasChainIndex() const
Check whether this feature has chain index, i.e.
void CloseWindowById(WindowClass cls, WindowNumber number, bool force, int data)
Close a window by its class and window number (if it is open).
Representation of the available callbacks with information on when they actually apply.
constexpr static debug_inline uint GB(const T x, const uint8_t s, const uint8_t n)
Fetch n bits from x, started at bit s.
NIType
The type of a property to show.
std::vector< SpriteID > sprites
Sprites found.
NewGrfDebugSpritePickerMode mode
Current state.
Tindex index
Index of this pool item.
void InvalidateNewGRFInspectWindow(GrfSpecFeature feature, uint index)
Invalidate the inspect window for a given feature and index.
static CargoSpec * Get(size_t index)
Retrieve cargo details for the given cargo ID.
@ VEH_TRAIN
Train vehicle type.
Dimension maxdim(const Dimension &d1, const Dimension &d2)
Compute bounding box of both dimensions.
@ Normal
The most basic (normal) sprite.
bool _ctrl_pressed
Is Ctrl pressed?
@ VEH_ROAD
Road vehicle type.
static const NIHelper * GetFeatureHelper(uint window_number)
Get the NIHelper related to the window number.
const NIProperty * properties
The properties associated with this feature.
bool IsLevelCrossing(Tile t)
Return whether a tile is a level crossing.
ClientSettings _settings_client
The current settings for this game.
@ EIT_IN_DETAILS
Vehicle drawn in vehicle details, refit window, ...
uint32_t caller_grfid
GRFID of the caller of this window, 0 if it has no caller.
@ MP_INDUSTRY
Part of an industry.
constexpr uint Vertical() const
Get total vertical padding of RectPadding.
const char * name
The human readable name of the callback.
@ GSF_INVALID
An invalid spec feature.
uint8_t read_size
The number of bytes (i.e. byte, word, dword etc) to read.
Rect Expand(int s) const
Copy and expand Rect by s pixels.
@ SA_RIGHT
Right align the text (must be a single bit).
@ ZOOM_LVL_OUT_2X
Zoomed 2 times out.
SpriteType GetSpriteType(SpriteID sprite)
Get the sprite type of a given sprite.
ZoomLevel _gui_zoom
GUI Zoom level.
uint8_t cb_bit
The bit that needs to be set for this callback to be enabled.
const NIVariable * variables
The variables associated with this feature.
const Scrollbar * GetScrollbar(WidgetID widnum) const
Return the Scrollbar to a widget index.
ZoomLevel zoom_max
maximum zoom out level
@ MP_ROAD
A tile with road (or tram tracks)
Helper class to wrap some functionality/queries in.
VehicleCellSize GetVehicleImageCellSize(VehicleType type, EngineImageType image_type)
Get the GUI cell size for a vehicle image.
bool IsNewGRFInspectable(GrfSpecFeature feature, uint index)
Can we inspect the data given a certain feature and index.
Representation of the data from a NewGRF property.
void DeleteNewGRFInspectWindow(GrfSpecFeature feature, uint index)
Delete inspect window for a given feature and index.
std::map< SpriteID, XyOffs > offs_start_map
Mapping of starting offsets for the sprites which have been aligned in the sprite aligner window.
uint32_t GetSpriteLocalID(SpriteID sprite)
Get the GRF-local sprite id of a given sprite.
static debug_inline TileType GetTileType(Tile tile)
Get the tiletype of a given tile.
@ ZOOM_LVL_BEGIN
Begin for iteration.
High level window description.
uint16_t cb_id
The number of the callback.
int ScaleGUITrad(int value)
Scale traditional pixel dimensions to GUI zoom level.
virtual bool IsInspectable(uint index) const =0
Is the item with the given index inspectable?
constexpr bool IsInsideBS(const T x, const size_t base, const size_t size)
Checks if a value is between a window started at some base point.
static const NIFeature * GetFeature(uint window_number)
Get the NIFeature related to the window number.
@ WDP_AUTO
Find a place automatically.
@ ZOOM_LVL_OUT_4X
Zoomed 4 times out.
ResizeInfo resize
Resize information.
static uint32_t BSWAP32(uint32_t x)
Perform a 32 bits endianness bitswap on x.
virtual void SetStringParameters(uint index) const =0
Set the string parameters to write the right data for a STRINGn.
int32_t WindowNumber
Number to differentiate different windows of the same class.
@ FS_NORMAL
Index of the normal font in the font tables.
Rect Translate(int x, int y) const
Copy and translate Rect by x,y pixels.
@ ZOOM_LVL_NORMAL
The normal zoom level.
NewGrfDebugSpritePicker _newgrf_debug_sprite_picker
The sprite picker.
int height
Height of the window (number of pixels down in y direction)
virtual uint Resolve(uint index, uint var, uint param, bool &avail) const =0
Resolve (action2) variable for a given index.
static const VehicleID INVALID_VEHICLE
Constant representing a non-existing vehicle.
void SetDirty() const
Mark entire window as dirty (in need of re-paint)
static const NIFeature *const _nifeatures[]
Table with all NIFeatures.
@ MP_OBJECT
Contains objects such as transmitters and owned land.
@ NIT_CARGO
The property is a cargo.
uint16_t width
Width of the sprite.
SpriteID current_sprite
The currently shown sprite.
@ VEH_SHIP
Ship vehicle type.
@ GSF_FAKE_END
End of the fake features.
void SetObjectAtStringParameters(StringID string, uint32_t index, TileIndex tile) const
Helper to make setting the strings easier for objects at a specific tile.
@ SA_FORCE
Force the alignment, i.e. don't swap for RTL languages.
NIOffsetProc * offset_proc
Callback proc to get the actual variable address in memory.
void DrawMainPanelWidget(const Rect &r) const
Helper function to draw the main panel widget.
void ShowQueryString(StringID str, StringID caption, uint maxsize, Window *parent, CharSetFilter afilter, QueryStringFlags flags)
Show a query popup window with a textbox in it.
void LowerWidget(WidgetID widget_index)
Marks a widget as lowered.
virtual void ShowNewGRFInspectWindow() const
Show the NewGRF inspection window.
Container for all information for a given feature.
void SetCallerGRFID(uint32_t grfid)
Set the GRFID of the item opening this window.
virtual const std::span< int32_t > GetPSA([[maybe_unused]] uint index, [[maybe_unused]] uint32_t grfid) const
Gets the span containing the persistent storage.
@ TC_NO_SHADE
Do not add shading to this text colour.
void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub, ZoomLevel zoom)
Draw a sprite, not in a viewport.
virtual const void * GetSpec(uint index) const =0
Get (NewGRF) specs given an index.
Coordinates of a point in 2D.
int CenterBounds(int min, int max, int size)
Determine where to draw a centred object inside a widget.
uint GetFeatureIndex() const
Get the feature index.
void OnInvalidateData([[maybe_unused]] int data=0, [[maybe_unused]] bool gui_scope=true) override
Some data on this window has become invalid.
WindowNumber window_number
Window number within the window class.
uint32_t SpriteID
The number of a sprite, without mapping bits and colourtables.
void OnResize() override
Called after the window got resized.
static uint GetInspectWindowNumber(GrfSpecFeature feature, uint index)
Get the window number for the inspect window given a feature and index.
void InvalidateData(int data=0, bool gui_scope=true)
Mark this window's data as invalid (in need of re-computing)
@ WC_NONE
No window, redirects to WC_MAIN_WINDOW.
StationType GetStationType(Tile t)
Get the station type of this tile.
@ ZOOM_LVL_OUT_8X
Zoomed 8 times out.
void SetWidgetLoweredState(WidgetID widget_index, bool lowered_stat)
Sets the lowered/raised status of a widget.
std::span< const Action5Type > GetAction5Types()
Get list of all action 5 types.
@ EIT_IN_DEPOT
Vehicle drawn in depot.
bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int height)
Set up a clipping area for only drawing into a certain area.
virtual const void * GetInstance(uint index) const =0
Get the instance given an index.
uint8_t prop
The number of the property.
void SetWidgetDisabledState(WidgetID widget_index, bool disab_stat)
Sets the enabled/disabled status of a widget.
ZoomLevel zoom_min
minimum zoom out level
const NICallback * callbacks
The callbacks associated with this feature.
static uint GetFeatureIndex(uint window_number)
Get the feature index related to the window number.
RandomAccessFile with some extra information specific for sprite files.
virtual bool PSAWithParameter() const
Used to decide if the PSA needs a parameter or not.
Vehicle * Move(int n)
Get the vehicle at offset n of this vehicle chain.
static bool HasVariableParameter(uint variable)
Check whether the given variable has a parameter.
void OnInvalidateData([[maybe_unused]] int data=0, [[maybe_unused]] bool gui_scope=true) override
Some data on this window has become invalid.
Spritepicker of SpriteAligner.
void CreateNestedTree()
Perform the first part of the initialization of a nested widget tree.
static GrfSpecFeature GetFeatureNum(uint window_number)
Get the feature number related to the window number.
int UnScaleByZoom(int value, ZoomLevel zoom)
Scale by zoom level, usually shift right (when zoom > ZOOM_LVL_MIN) When shifting right,...
Vehicle * First() const
Get the first vehicle of this vehicle chain.
SpriteFile * GetOriginFile(SpriteID sprite)
Get the SpriteFile of a given sprite.
int GetDisplayImageWidth(Point *offset=nullptr) const
Get the width of a road vehicle image in the GUI.
static Train * From(Vehicle *v)
Converts a Vehicle to SpecializedVehicle with type checking.
@ ZOOM_LVL_IN_4X
Zoomed 4 times in.
virtual ~NIHelper()=default
Silence a warning.
void ShowSpriteAlignerWindow()
Show the window for aligning sprites.
uint GetMaxSpriteID()
Get a reasonable (upper bound) estimate of the maximum SpriteID used in OpenTTD; there will be no spr...
const NIHelper * helper
The class container all helper functions.
void SetDParam(size_t n, uint64_t v)
Set a string parameter v at index n in the global string parameter array.
const Action5Type * act5_type
Sprite Area of current selected sprite.
int16_t y_offs
Number of pixels to shift the sprite downwards.
virtual uint GetParent(uint index) const =0
Get the parent "window_number" of a given instance.
void SetSimpleStringParameters(StringID string, uint32_t index) const
Helper to make setting the strings easier.
@ ZOOM_LVL_IN_2X
Zoomed 2 times in.
Window used for aligning sprites.
static const SpriteID SPR_OPENTTD_BASE
Extra graphic spritenumbers.
Class to backup a specific variable and restore it upon destruction of this object to prevent stack v...
const char * name
A (human readable) name for the property.
@ MP_STATION
A tile of a station.
std::string GetString(StringID string)
Resolve the given StringID into a std::string with all the associated DParam lookups and formatting.
void SetDParamStr(size_t n, const char *str)
This function is used to "bind" a C string to a OpenTTD dparam slot.
StringID name
Name of this type of cargo.
void FinishInitNested(WindowNumber window_number=0)
Perform the second part of the initialization of a nested widget tree.
std::pair< int16_t, int16_t > XyOffs
Pair for x and y offsets of the sprite before alignment. First value contains the x offset,...
const std::string & GetSimplifiedFilename() const
Get the simplified filename of the opened file.
void SetWidgetsLoweredState(bool lowered_stat, Args... widgets)
Sets the lowered/raised status of a list of widgets.
void RaiseWidget(WidgetID widget_index)
Marks a widget as raised.
int GetCharacterHeight(FontSize size)
Get height of a character for a given font size.
int width
width of the window (number of pixels to the right in x direction)
void MarkWholeScreenDirty()
This function mark the whole screen as dirty.
void DrawRectOutline(const Rect &r, int colour, int width, int dash)
Draw the outline of a Rect.
Representation on the NewGRF variables.
VehicleType
Available vehicle types.
int DrawString(int left, int right, int top, std::string_view str, TextColour colour, StringAlignment align, bool underline, FontSize fontsize)
Draw string, possibly truncated to make it fit in its allocated space.
void DrawVehicleImage(const Vehicle *v, const Rect &r, VehicleID selection, EngineImageType image_type, int skip)
Draws an image of a vehicle chain.
void ShowNewGRFInspectWindow(GrfSpecFeature feature, uint index, const uint32_t grfid)
Show the inspect window for a given feature and index.
@ VEH_AIRCRAFT
Aircraft vehicle type.
bool IsValidCargoID(CargoID t)
Test whether cargo type is not INVALID_CARGO.
@ WC_NEWGRF_INSPECT
NewGRF inspect (debug); Window numbers:
Data structure for an opened window.
virtual uint32_t GetGRFID(uint index) const =0
Get the GRFID of the file that includes this item.
NIOffsetProc * offset_proc
Callback proc to get the actual variable address in memory.
void DrawString(const Rect &r, int offset, const std::string &string) const
Helper function to draw a string (line) in the window.
static uint32_t var60params[GSF_FAKE_END][0x20]
The value for the variable 60 parameters.
constexpr T Clamp(const T a, const T min, const T max)
Clamp a value between an interval.
std::span< const std::unique_ptr< SpriteFile > > GetCachedSpriteFiles()
Get the list of cached SpriteFiles.
GrfSpecFeature GetGrfSpecFeature(TileIndex tile)
Get the GrfSpecFeature associated with the tile.
int Width() const
Get width of Rect.
@ CS_HEXADECIMAL
Only hexadecimal characters.
Window used for inspecting NewGRFs.
Specification of a rectangle with absolute coordinates of all edges.
int ScaleByZoom(int value, ZoomLevel zoom)
Scale by zoom level, usually shift left (when zoom > ZOOM_LVL_MIN) When shifting right,...
@ WC_SPRITE_ALIGNER
Sprite aligner (debug); Window numbers:
void SetWidgetsDisabledState(bool disab_stat, Args... widgets)
Sets the enabled/disabled status of a list of widgets.
Data structure describing a sprite.
@ TD_RTL
Text is written right-to-left by default.
TextDirection _current_text_dir
Text direction of the currently selected language.
@ CS_NUMERAL
Only numeric ones.
static const uint8_t PC_LIGHT_BLUE
Light blue palette colour.
Information about a single action 5 type.
Dimension GetStringBoundingBox(std::string_view str, FontSize start_fontsize)
Return the string dimension in pixels.
void ValidateChainIndex()
Ensure that this->chain_index is in range.
GUISettings gui
settings related to the GUI
ZoomLevel
All zoom levels we know.
@ FR_BORDERONLY
Draw border only, no background.
Data about how and where to blit pixels.
constexpr debug_inline bool HasBit(const T x, const uint8_t y)
Checks if a bit in a value is set.