OpenTTD Source: TrackedViewportSign Struct Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields
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:

## Public Member Functions
auto | operator<=> (const TrackedViewportSign &) const =default
void | UpdatePosition (int center, int top, std::string_view str, std::string_view str_small={})
| Update the position of the viewport sign.
Public Member Functions inherited from ViewportSign
auto | operator<=> (const ViewportSign &) const =default
void | UpdatePosition (int center, int top, std::string_view str, std::string_view str_small={})
| Update the position of the viewport sign.
void | MarkDirty (ZoomLevel maxzoom=ZoomLevel::Max) const
| Mark the sign dirty in all viewports.

## Data Fields
bool | kdtree_valid = false
| Are the sign data valid for use with the _viewport_sign_kdtree?
Data Fields inherited from ViewportSign
int32_t | center = 0
| The center position of the sign.
int32_t | top = 0
| The top of the sign.
uint16_t | width_normal = 0
| The width when not zoomed out (normal font)
uint16_t | width_small = 0
| 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 60 of file viewport_type.h.

## Member Function Documentation

## ◆ UpdatePosition()

void TrackedViewportSign::UpdatePosition | ( | int | center,
|  | int | top,
|  | std::string_view | str,
|  | std::string_view | str_small = `{}`
| ) |  |
| inline

Update the position of the viewport sign.

Note that this function hides the base class function.

Definition at line 69 of file viewport_type.h.

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

## Field Documentation

## ◆ kdtree_valid

bool TrackedViewportSign::kdtree_valid = false

Are the sign data valid for use with the _viewport_sign_kdtree?

Definition at line 61 of file viewport_type.h.

Referenced by CmdDeleteTown(), CmdRenameSign(), Sign::UpdateVirtCoord(), Town::UpdateVirtCoord(), Station::UpdateVirtCoord(), Waypoint::UpdateVirtCoord(), and Station::~Station().

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

- src/viewport_type.h