OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
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;
ScreenshotType
Type of requested screenshot.
void OnPaint() override
The window must be repainted.
@ SC_HEIGHTMAP
Heightmap of the world.
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.
@ SC_ZOOMEDIN
Fully zoomed in screenshot of the visible area.
High level window description.
@ WDP_AUTO
Find a place automatically.
void SetDirty() const
Mark entire window as dirty (in need of re-paint)
@ WC_SCREENSHOT
Screenshot window; Window numbers:
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...
Coordinates of a point in 2D.
@ WC_NONE
No window, redirects to WC_MAIN_WINDOW.
void SetScreenshotWindowVisibility(bool hide)
Set the visibility of the screenshot window when taking a screenshot.
void CreateNestedTree()
Perform the first part of the initialization of a nested widget tree.
@ SC_WORLD
World screenshot.
@ SC_DEFAULTZOOM
Zoomed to default zoom level screenshot of the visible area.
void FinishInitNested(WindowNumber window_number=0)
Perform the second part of the initialization of a nested widget tree.
@ SC_VIEWPORT
Screenshot of viewport.
void MakeScreenshotWithConfirm(ScreenshotType t)
Make a screenshot.
Data structure for an opened window.
void DrawWidgets() const
Paint all widgets of a window.
@ SC_MINIMAP
Minimap screenshot.