summaryrefslogtreecommitdiff
path: root/src/script/api/template
diff options
context:
space:
mode:
authorJ0an Josep <juanjo.ng.83@gmail.com>2018-07-23 14:39:13 +0200
committerMichael Lutz <michi@icosahedron.de>2018-07-23 20:32:18 +0200
commit8975318286cd4d7c3da768331987bbf8375394e5 (patch)
tree550499805f0ef6df4c750eec21b0f5691a725952 /src/script/api/template
parent0bca1c53c96a5ba69f81906b3d459a0682bd8111 (diff)
downloadopenttd-8975318286cd4d7c3da768331987bbf8375394e5.tar.xz
Fix 2a868b9f3b8e3b5f8b9e5f728f628ec88fd5e3ad: Expose widgets and windows to scripts and fix documentation.
Diffstat (limited to 'src/script/api/template')
-rw-r--r--src/script/api/template/template_window.hpp.sq4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/api/template/template_window.hpp.sq b/src/script/api/template/template_window.hpp.sq
index a21a75ab8..3077215ec 100644
--- a/src/script/api/template/template_window.hpp.sq
+++ b/src/script/api/template/template_window.hpp.sq
@@ -77,6 +77,10 @@ namespace SQConvert {
template <> inline int Return<ScriptWindow::ErrorMessageWidgets>(HSQUIRRELVM vm, ScriptWindow::ErrorMessageWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::SaveLoadWidgets GetParam(ForceType<ScriptWindow::SaveLoadWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SaveLoadWidgets)tmp; }
template <> inline int Return<ScriptWindow::SaveLoadWidgets>(HSQUIRRELVM vm, ScriptWindow::SaveLoadWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
+ template <> inline ScriptWindow::FramerateWindowWidgets GetParam(ForceType<ScriptWindow::FramerateWindowWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::FramerateWindowWidgets)tmp; }
+ template <> inline int Return<ScriptWindow::FramerateWindowWidgets>(HSQUIRRELVM vm, ScriptWindow::FramerateWindowWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
+ template <> inline ScriptWindow::FrametimeGraphWindowWidgets GetParam(ForceType<ScriptWindow::FrametimeGraphWindowWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::FrametimeGraphWindowWidgets)tmp; }
+ template <> inline int Return<ScriptWindow::FrametimeGraphWindowWidgets>(HSQUIRRELVM vm, ScriptWindow::FrametimeGraphWindowWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::GenerateLandscapeWidgets GetParam(ForceType<ScriptWindow::GenerateLandscapeWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GenerateLandscapeWidgets)tmp; }
template <> inline int Return<ScriptWindow::GenerateLandscapeWidgets>(HSQUIRRELVM vm, ScriptWindow::GenerateLandscapeWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::CreateScenarioWidgets GetParam(ForceType<ScriptWindow::CreateScenarioWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CreateScenarioWidgets)tmp; }