summaryrefslogtreecommitdiff
path: root/src/script/api/game/game_text.hpp.sq
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 21:05:57 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 21:05:57 +0000
commitb0ac529a6ff4e087520a14d2a0169f445952e7e0 (patch)
treef545f15ff52b6c1ad6279f7e028f2a058465d672 /src/script/api/game/game_text.hpp.sq
parent2ae87e72131a8e88327dbb0b5b286accddafe05d (diff)
downloadopenttd-b0ac529a6ff4e087520a14d2a0169f445952e7e0.tar.xz
(svn r23635) -Add: introduce GSText, to allow translating GameScript text, even over network
Diffstat (limited to 'src/script/api/game/game_text.hpp.sq')
-rw-r--r--src/script/api/game/game_text.hpp.sq31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/script/api/game/game_text.hpp.sq b/src/script/api/game/game_text.hpp.sq
new file mode 100644
index 000000000..d43506580
--- /dev/null
+++ b/src/script/api/game/game_text.hpp.sq
@@ -0,0 +1,31 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_text.hpp"
+#include "../template/template_text.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptText, ST_GS>() { return "GSText"; }
+
+void SQGSText_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptText, ST_GS> SQGSText("GSText");
+ SQGSText.PreRegister(engine);
+ SQGSText.AddConstructor<void (ScriptText::*)(StringID string), 2>(engine, "xi");
+
+ SQGSText.DefSQConst(engine, ScriptText::SCRIPT_TEXT_MAX_PARAMETERS, "SCRIPT_TEXT_MAX_PARAMETERS");
+
+ SQGSText.DefSQAdvancedMethod(engine, &ScriptText::_set, "_set");
+ SQGSText.DefSQAdvancedMethod(engine, &ScriptText::SetParam, "SetParam");
+ SQGSText.DefSQAdvancedMethod(engine, &ScriptText::AddParam, "AddParam");
+
+ SQGSText.PostRegister(engine);
+}