OpenTTD Source  20240917-master-g9ab0a47812
TrackedViewportSign Struct Reference

Specialised ViewportSign that tracks whether it is valid for entering into a Kdtree. More...

#include <viewport_type.h>

Inheritance diagram for TrackedViewportSign:
ViewportSign

Public Member Functions

auto operator (const TrackedViewportSign &) const =default
 
void UpdatePosition (int center, int top, StringID str, StringID str_small=STR_NULL)
 Update the position of the viewport sign. More...
 
- Public Member Functions inherited from ViewportSign
auto operator (const ViewportSign &) const =default
 
void UpdatePosition (int center, int top, StringID str, StringID str_small=STR_NULL)
 Update the position of the viewport sign. More...
 
void MarkDirty (ZoomLevel maxzoom=ZOOM_LVL_MAX) const
 Mark the sign dirty in all viewports. More...
 

Data Fields

bool kdtree_valid
 Are the sign data valid for use with the _viewport_sign_kdtree?
 
- Data Fields inherited from ViewportSign
int32_t center
 The center position of the sign.
 
int32_t top
 The top of the sign.
 
uint16_t width_normal
 The width when not zoomed out (normal font)
 
uint16_t width_small
 The width when zoomed out (small font)
 

Detailed Description

Specialised ViewportSign that tracks whether it is valid for entering into a Kdtree.

Definition at line 51 of file viewport_type.h.

Member Function Documentation

◆ UpdatePosition()

void TrackedViewportSign::UpdatePosition ( int  center,
int  top,
StringID  str,
StringID  str_small = STR_NULL 
)
inline

Update the position of the viewport sign.

Note that this function hides the base class function.

Definition at line 60 of file viewport_type.h.

References ViewportSign::top, and ViewportSign::UpdatePosition().

Referenced by Sign::UpdateVirtCoord(), Waypoint::UpdateVirtCoord(), and Town::UpdateVirtCoord().


The documentation for this struct was generated from the following file: