21 #include "table/strings.h" 36 if (widget < 0)
return;
58 if ((uint64)vp.
width * (uint64)vp.
height > 8192 * 8192) {
60 _screenshot_type = st;
99 WDP_AUTO,
"take_a_screenshot", 200, 100,
102 _nested_screenshot,
lengthof(_nested_screenshot)
105 void ShowScreenshotWindow() {
Functions related to OTTD's strings.
Window(WindowDesc *desc)
Empty constructor, initialization has been moved to InitNested() called from the constructor of the d...
High level window description.
int height
Screen height of the viewport.
void DrawWidgets() const
Paint all widgets of a window.
Stuff related to the text buffer GUI.
Functions to make screenshots.
Fully zoomed in screenshot of the visible area.
void CreateNestedTree(bool fill_nested=true)
Perform the first part of the initialization of a nested widget tree.
Functions, definitions and such used only by the GUI.
Functions related to (drawing on) viewports.
void SetupScreenshotViewport(ScreenshotType t, ViewPort *vp)
Configure a ViewPort for rendering (a part of) the map into a screenshot.
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 OnClick(Point pt, int widget, int click_count) override
A click with the left mouse button has been made on the window.
void OnPaint() override
The window must be repainted.
void ShowQuery(StringID caption, StringID message, Window *parent, QueryCallbackProc *callback)
Show a modal confirmation window with standard 'yes' and 'no' buttons The window is aligned to the ce...
Definition of base types and functions in a cross-platform compatible way.
#define lengthof(x)
Return the length of an fixed size array.
bool MakeScreenshot(ScreenshotType t, const char *name)
Make an actual screenshot.
No window, redirects to WC_MAIN_WINDOW.
void DeleteWindowById(WindowClass cls, WindowNumber number, bool force)
Delete a window by its class and window number (if it is open).
static void TakeScreenshot(ScreenshotType st)
Make a screenshot.
Data structure for viewport, display of a part of the world.
Zoomed to default zoom level screenshot of the visible area.
Coordinates of a point in 2D.
static void ScreenshotConfirmationCallback(Window *w, bool confirmed)
Callback on the confirmation window for huge screenshots.
Screenshot window; Window numbers:
Window functions not directly related to making/drawing windows.
Find a place automatically.
GUI functions that shouldn't be here.
ScreenshotType
Type of requested screenshot.
static void SetDParam(uint n, uint64 v)
Set a string parameter v at index n in the global string parameter array.
int width
Screen width of the viewport.