ViewportSign Struct Reference

Location information about a sign as seen on the viewport. More...

#include <viewport_type.h>

Inheritance diagram for ViewportSign:
TextEffect

Public Member Functions

void UpdatePosition (int center, int top, StringID str)
 Update the position of the viewport sign.
void MarkDirty () const
 Mark the sign dirty in all viewports.

Data Fields

int32 center
 The center position of the sign.
int32 top
 The top of the sign.
uint16 width_normal
 The width when not zoomed out (normal font).
uint16 width_small
 The width when zoomed out (small font).

Detailed Description

Location information about a sign as seen on the viewport.

Definition at line 44 of file viewport_type.h.


Member Function Documentation

void ViewportSign::UpdatePosition ( int  center,
int  top,
StringID  str 
)

Update the position of the viewport sign.

Parameters:
center the (preferred) center of the viewport sign
top the new top of the sign
str the string to show in the sign

Definition at line 1226 of file viewport.cpp.

References Align(), DRAW_STRING_BUFFER, FS_SMALL, GetStringBoundingBox(), lastof, MarkDirty(), VPSM_LEFT, VPSM_RIGHT, width_normal, and width_small.

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


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

Generated on Sun Jan 23 01:50:43 2011 for OpenTTD by  doxygen 1.6.1