10#ifndef VIEWPORT_TYPE_H
11#define VIEWPORT_TYPE_H
15#include "table/strings.h"
34 std::shared_ptr<LinkGraphOverlay> overlay;
62 this->kdtree_valid =
true;
Handles drawing of links into some window.
#define DECLARE_ENUM_AS_BIT_SET(enum_type)
Operators to allow to work with enum as with type safe bit set in C++.
void MarkDirty(ZoomLevel maxzoom=ZOOM_LVL_MAX) const
Mark the sign dirty in all viewports.
Types related to strings.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Specialised ViewportSign that tracks whether it is valid for entering into a Kdtree.
void UpdatePosition(int center, int top, StringID str, StringID str_small=STR_NULL)
Update the position of the viewport sign.
bool kdtree_valid
Are the sign data valid for use with the _viewport_sign_kdtree?
Location information about a sign as seen on the viewport.
int32_t center
The center position of the sign.
uint16_t width_small
The width when zoomed out (small font)
uint16_t width_normal
The width when not zoomed out (normal font)
void UpdatePosition(int center, int top, StringID str, StringID str_small=STR_NULL)
Update the position of the viewport sign.
int32_t top
The top of the sign.
Data structure for viewport, display of a part of the world.
int top
Screen coordinate top edge of the viewport.
int width
Screen width of the viewport.
ZoomLevel zoom
The zoom level of the viewport.
int virtual_top
Virtual top coordinate.
int virtual_left
Virtual left coordinate.
int virtual_width
width << zoom
int left
Screen coordinate left edge of the viewport.
int height
Screen height of the viewport.
int virtual_height
height << zoom
ViewportScrollTarget
Target of the viewport scrolling GS method.
@ VST_EVERYONE
All players.
@ VST_COMPANY
All players in specific company.
@ VST_CLIENT
Single player.
static const uint BB_HEIGHT_UNDER_BRIDGE
Some values for constructing bounding boxes (BB).
static const uint BB_Z_SEPARATOR
Separates the bridge/tunnel from the things under/above it.
ViewportDragDropSelectionProcess
Drag and drop selection process, or, what to do with an area of land when you've selected it.
@ DDSP_PLACE_ROAD_Y_DIR
Road placement (Y axis)
@ DDSP_CREATE_DESERT
Fill area with desert.
@ DDSP_BUILD_BUSSTOP
Road stop placement (buses)
@ DDSP_REMOVE_BUSSTOP
Road stop removal (buses)
@ DDSP_REMOVE_ROAD_WAYPOINT
Road stop removal (waypoint)
@ DDSP_LOWER_AND_LEVEL_AREA
Lower / level area.
@ DDSP_CONVERT_RAIL
Rail conversion.
@ DDSP_DEMOLISH_AREA
Clear area.
@ DDSP_BUILD_SIGNALS
Signal placement.
@ DDSP_BUILD_TRUCKSTOP
Road stop placement (trucks)
@ DDSP_REMOVE_STATION
Station removal.
@ DDSP_CREATE_ROCKS
Fill area with rocks.
@ DDSP_REMOVE_TRUCKSTOP
Road stop removal (trucks)
@ DDSP_RAISE_AND_LEVEL_AREA
Raise / level area.
@ DDSP_LEVEL_AREA
Level area.
@ DDSP_BUILD_STATION
Station placement.
@ DDSP_CREATE_WATER
Create a canal.
@ DDSP_PLANT_TREES
Plant trees.
@ DDSP_PLACE_AUTOROAD
Road placement (auto)
@ DDSP_BUILD_ROAD_WAYPOINT
Road stop placement (waypoint)
@ DDSP_CREATE_RIVER
Create rivers.
@ DDSP_BUILD_OBJECT
Build an object.
@ DDSP_PLACE_ROAD_X_DIR
Road placement (X axis)
@ DDSP_BUILD_BRIDGE
Bridge placement.
@ DDSP_PLACE_RAIL
Rail placement.
@ DDSP_CONVERT_ROAD
Road conversion.
ZoomStateChange
Directions of zooming.
@ ZOOM_IN
Zoom in (get more detailed view).
@ ZOOM_NONE
Hack, used to update the button status.
@ ZOOM_OUT
Zoom out (get helicopter view).
ViewportPlaceMethod
Viewport place method (type of highlighted area and placed objects)
@ VPM_FIX_Y
drag only in Y axis
@ VPM_Y_LIMITED
Drag only in Y axis with limited size.
@ VPM_X_AND_Y_LIMITED
area of land of limited size
@ VPM_FIX_VERTICAL
drag only in vertical direction
@ VPM_X_LIMITED
Drag only in X axis with limited size.
@ VPM_X_AND_Y
area of land in X and Y directions
@ VPM_FIX_HORIZONTAL
drag only in horizontal direction
@ VPM_FIX_X
drag only in X axis
@ VPM_SIGNALDIRS
similar to VMP_RAILDIRS, but with different cursor
@ VPM_X_OR_Y
drag in X or Y direction
@ VPM_RAILDIRS
all rail directions
Types related to zooming in and out.
ZoomLevel
All zoom levels we know.
@ ZOOM_LVL_MAX
Maximum zoom level.