From e558aa8ff461ddf660240c9ed209e7d2823f0b2b Mon Sep 17 00:00:00 2001 From: pnda <43609023+ThePNDA@users.noreply.github.com> Date: Mon, 29 Apr 2019 16:58:15 +0200 Subject: Feature: Screenshot window --- src/script/api/game/game_window.hpp.sq | 6 ++++++ src/script/api/script_window.hpp | 17 +++++++++++++++++ src/script/api/template/template_window.hpp.sq | 2 ++ 3 files changed, 25 insertions(+) (limited to 'src/script/api') diff --git a/src/script/api/game/game_window.hpp.sq b/src/script/api/game/game_window.hpp.sq index be8967604..adc790ad9 100644 --- a/src/script/api/game/game_window.hpp.sq +++ b/src/script/api/game/game_window.hpp.sq @@ -138,6 +138,7 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SAVE_PRESET, "WC_SAVE_PRESET"); SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FRAMERATE_DISPLAY, "WC_FRAMERATE_DISPLAY"); SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FRAMETIME_GRAPH, "WC_FRAMETIME_GRAPH"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SCREENSHOT, "WC_SCREENSHOT"); SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INVALID, "WC_INVALID"); SQGSWindow.DefSQConst(engine, ScriptWindow::TC_BLUE, "TC_BLUE"); SQGSWindow.DefSQConst(engine, ScriptWindow::TC_SILVER, "TC_SILVER"); @@ -1028,6 +1029,11 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_LT_OFF, "WID_BROS_LT_OFF"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_LT_ON, "WID_BROS_LT_ON"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_INFO, "WID_BROS_INFO"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE, "WID_SC_TAKE"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_ZOOMIN, "WID_SC_TAKE_ZOOMIN"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_DEFAULTZOOM, "WID_SC_TAKE_DEFAULTZOOM"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_WORLD, "WID_SC_TAKE_WORLD"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SC_TAKE_HEIGHTMAP, "WID_SC_TAKE_HEIGHTMAP"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BACKGROUND, "WID_GO_BACKGROUND"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_CURRENCY_DROPDOWN, "WID_GO_CURRENCY_DROPDOWN"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_DISTANCE_DROPDOWN, "WID_GO_DISTANCE_DROPDOWN"); diff --git a/src/script/api/script_window.hpp b/src/script/api/script_window.hpp index 4efcc5bb6..9847f543b 100644 --- a/src/script/api/script_window.hpp +++ b/src/script/api/script_window.hpp @@ -52,6 +52,7 @@ #include "../../widgets/osk_widget.h" #include "../../widgets/rail_widget.h" #include "../../widgets/road_widget.h" +#include "../../widgets/screenshot_widget.h" #include "../../widgets/settings_widget.h" #include "../../widgets/sign_widget.h" #include "../../widgets/smallmap_widget.h" @@ -775,6 +776,12 @@ public: */ WC_FRAMETIME_GRAPH = ::WC_FRAMETIME_GRAPH, + /** + * Screenshot window; %Window numbers: + * - 0 = #ScreenshotWidgets + */ + WC_SCREENSHOT = ::WC_SCREENSHOT, + WC_INVALID = ::WC_INVALID, ///< Invalid window. }; @@ -2171,6 +2178,16 @@ public: WID_BROS_INFO = ::WID_BROS_INFO, ///< Station acceptance info. }; + /* automatically generated from ../../widgets/screenshot_widget.h */ + /** Widgets of the #ScreenshotWindow class. */ + enum ScreenshotWindowWidgets { + WID_SC_TAKE = ::WID_SC_TAKE, ///< Button for taking a normal screenshot + WID_SC_TAKE_ZOOMIN = ::WID_SC_TAKE_ZOOMIN, ///< Button for taking a zoomed in screenshot + WID_SC_TAKE_DEFAULTZOOM = ::WID_SC_TAKE_DEFAULTZOOM, ///< Button for taking a screenshot at normal zoom + WID_SC_TAKE_WORLD = ::WID_SC_TAKE_WORLD, ///< Button for taking a screenshot of the whole world + WID_SC_TAKE_HEIGHTMAP = ::WID_SC_TAKE_HEIGHTMAP, ///< Button for taking a heightmap "screenshot" + }; + /* automatically generated from ../../widgets/settings_widget.h */ /** Widgets of the #GameOptionsWindow class. */ enum GameOptionsWidgets { diff --git a/src/script/api/template/template_window.hpp.sq b/src/script/api/template/template_window.hpp.sq index 016726db2..723c98a91 100644 --- a/src/script/api/template/template_window.hpp.sq +++ b/src/script/api/template/template_window.hpp.sq @@ -193,6 +193,8 @@ namespace SQConvert { template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::BuildRoadDepotWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } template <> inline ScriptWindow::BuildRoadStationWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildRoadStationWidgets)tmp; } template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::BuildRoadStationWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } + template <> inline ScriptWindow::ScreenshotWindowWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ScreenshotWindowWidgets)tmp; } + template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::ScreenshotWindowWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } template <> inline ScriptWindow::GameOptionsWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GameOptionsWidgets)tmp; } template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::GameOptionsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; } template <> inline ScriptWindow::GameSettingsWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GameSettingsWidgets)tmp; } -- cgit v1.2.3-70-g09d2