OpenTTD Source
20241108-master-g80f628063a
|
Metadata about the current highlighting. More...
#include <tilehighlight_type.h>
Public Member Functions | |
void | Reset () |
Reset tile highlighting. | |
bool | IsDraggingDiagonal () |
Is the user dragging a 'diagonal rectangle'? More... | |
Window * | GetCallbackWnd () |
Get the window that started the current highlighting. More... | |
Data Fields | |
Point | pos |
Location, in tile "units", of the northern tile of the selected area. | |
Point | size |
Size, in tile "units", of the white/red selection area. | |
Point | offs |
Offset, in tile "units", for the blue coverage area from the selected area's northern tile. | |
Point | outersize |
Size, in tile "units", of the blue coverage area excluding the side of the selected area. | |
bool | diagonal |
Whether the dragged area is a 45 degrees rotated rectangle. | |
bool | freeze |
Freeze highlight in place. | |
Point | new_pos |
New value for pos; used to determine whether to redraw the selection. | |
Point | new_size |
New value for size; used to determine whether to redraw the selection. | |
Point | new_outersize |
New value for outersize; used to determine whether to redraw the selection. | |
uint8_t | dirty |
Whether the build station window needs to redraw due to the changed selection. | |
Point | selstart |
The location where the dragging started. | |
Point | selend |
The location where the drag currently ends. | |
uint8_t | sizelimit |
Whether the selection is limited in length, and what the maximum length is. | |
HighLightStyle | drawstyle |
Lower bits 0-3 are reserved for detailed highlight information. | |
HighLightStyle | next_drawstyle |
Queued, but not yet drawn style. | |
HighLightStyle | place_mode |
Method which is used to place the selection. | |
WindowClass | window_class |
The WindowClass of the window that is responsible for the selection mode. | |
WindowNumber | window_number |
The WindowNumber of the window that is responsible for the selection mode. | |
bool | make_square_red |
Whether to give a tile a red selection. | |
TileIndex | redsq |
The tile that has to get a red selection. | |
ViewportPlaceMethod | select_method |
The method which governs how tiles are selected. | |
ViewportDragDropSelectionProcess | select_proc |
The procedure that has to be called when the selection is done. | |
Metadata about the current highlighting.
Definition at line 46 of file tilehighlight_type.h.
Window * TileHighlightData::GetCallbackWnd | ( | ) |
Get the window that started the current highlighting.
nullptr
if not available. Definition at line 2588 of file viewport.cpp.
References FindWindowById(), window_class, and window_number.
bool TileHighlightData::IsDraggingDiagonal | ( | ) |
Is the user dragging a 'diagonal rectangle'?
Definition at line 2579 of file viewport.cpp.
References _ctrl_pressed, _left_button_down, HT_DIAGONAL, and place_mode.