18 #include "table/strings.h"
34 void OnClick([[maybe_unused]]
Point pt,
WidgetID widget, [[maybe_unused]]
int click_count)
override
50 static constexpr
NWidgetPart _nested_screenshot[] = {
68 WDP_AUTO,
"take_a_screenshot", 200, 100,
74 void ShowScreenshotWindow()
88 if (scw ==
nullptr)
return;
93 scw->
left += 2 * _screen.width;
96 scw->
left -= 2 * _screen.width;
Functions related to the gfx engine.
void SetDirty() const
Mark entire window as dirty (in need of re-paint)
A number of safeguards to prevent using unsafe methods.
void MakeScreenshotWithConfirm(ScreenshotType t)
Make a screenshot.
Functions to make screenshots.
ScreenshotType
Type of requested screenshot.
@ SC_VIEWPORT
Screenshot of viewport.
@ SC_ZOOMEDIN
Fully zoomed in screenshot of the visible area.
@ SC_HEIGHTMAP
Heightmap of the world.
@ SC_WORLD
World screenshot.
@ SC_MINIMAP
Minimap screenshot.
@ SC_DEFAULTZOOM
Zoomed to default zoom level screenshot of the visible area.
void SetScreenshotWindowVisibility(bool hide)
Set the visibility of the screenshot window when taking a screenshot.
Definition of base types and functions in a cross-platform compatible way.
Coordinates of a point in 2D.
void OnPaint() override
The window must be repainted.
High level window description.
Data structure for an opened window.
void FinishInitNested(WindowNumber window_number=0)
Perform the second part of the initialization of a nested widget tree.
void DrawWidgets() const
Paint all widgets of a window.
void CreateNestedTree()
Perform the first part of the initialization of a nested widget tree.
int left
x position of left edge of the window
Window(WindowDesc &desc)
Empty constructor, initialization has been moved to InitNested() called from the constructor of the d...
void CloseWindowById(WindowClass cls, WindowNumber number, bool force, int data)
Close a window by its class and window number (if it is open).
Window * FindWindowById(WindowClass cls, WindowNumber number)
Find a window by its class and window number.
Window functions not directly related to making/drawing windows.
Functions, definitions and such used only by the GUI.
@ WDP_AUTO
Find a place automatically.
@ WC_NONE
No window, redirects to WC_MAIN_WINDOW.
@ WC_SCREENSHOT
Screenshot window; Window numbers: