summaryrefslogtreecommitdiff
path: root/src/script/api
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-02-12 10:32:41 +0000
committerrubidium <rubidium@openttd.org>2012-02-12 10:32:41 +0000
commite8dbcf90430610e2f19aeb3b764d9e8809c8f3ea (patch)
tree8cca3b6ad3193e943cd0121ba465e5cedf268307 /src/script/api
parent0542e26460cf5da6fb4a3486ed9b515721bdb0bd (diff)
downloadopenttd-e8dbcf90430610e2f19aeb3b764d9e8809c8f3ea.tar.xz
(svn r23932) -Codechange: split the NewGRF text window into its own source files
Diffstat (limited to 'src/script/api')
-rw-r--r--src/script/api/game/game_window.hpp.sq10
-rw-r--r--src/script/api/script_window.hpp18
-rw-r--r--src/script/api/template/template_window.hpp.sq4
3 files changed, 16 insertions, 16 deletions
diff --git a/src/script/api/game/game_window.hpp.sq b/src/script/api/game/game_window.hpp.sq
index 084a72471..e1c118adf 100644
--- a/src/script/api/game/game_window.hpp.sq
+++ b/src/script/api/game/game_window.hpp.sq
@@ -59,7 +59,7 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SET_DATE, "WC_SET_DATE");
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_AI_SETTINGS, "WC_AI_SETTINGS");
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GRF_PARAMETERS, "WC_GRF_PARAMETERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NEWGRF_TEXTFILE, "WC_NEWGRF_TEXTFILE");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TEXTFILE, "WC_TEXTFILE");
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TOWN_AUTHORITY, "WC_TOWN_AUTHORITY");
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_DETAILS, "WC_VEHICLE_DETAILS");
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_REFIT, "WC_VEHICLE_REFIT");
@@ -750,10 +750,6 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_RESET, "WID_NP_RESET");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_SHOW_DESCRIPTION, "WID_NP_SHOW_DESCRIPTION");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_DESCRIPTION, "WID_NP_DESCRIPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NT_CAPTION, "WID_NT_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NT_BACKGROUND, "WID_NT_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NT_VSCROLLBAR, "WID_NT_VSCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NT_HSCROLLBAR, "WID_NT_HSCROLLBAR");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_PRESET_LIST, "WID_NS_PRESET_LIST");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_PRESET_SAVE, "WID_NS_PRESET_SAVE");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_PRESET_DELETE, "WID_NS_PRESET_DELETE");
@@ -782,6 +778,10 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SHOW_APPLY, "WID_NS_SHOW_APPLY");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SP_PROGRESS_BAR, "WID_SP_PROGRESS_BAR");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SP_PROGRESS_TEXT, "WID_SP_PROGRESS_TEXT");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_CAPTION, "WID_TF_CAPTION");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_BACKGROUND, "WID_TF_BACKGROUND");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_VSCROLLBAR, "WID_TF_VSCROLLBAR");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_HSCROLLBAR, "WID_TF_HSCROLLBAR");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_PANEL, "WID_N_PANEL");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_TITLE, "WID_N_TITLE");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_HEADLINE, "WID_N_HEADLINE");
diff --git a/src/script/api/script_window.hpp b/src/script/api/script_window.hpp
index 558a8f620..0cda667db 100644
--- a/src/script/api/script_window.hpp
+++ b/src/script/api/script_window.hpp
@@ -250,7 +250,7 @@ public:
* textfile; Window numbers:
* - 0 = #NewGRFTextfileWidgets
*/
- WC_NEWGRF_TEXTFILE = ::WC_NEWGRF_TEXTFILE,
+ WC_TEXTFILE = ::WC_TEXTFILE,
/**
@@ -1671,14 +1671,6 @@ public:
WID_NP_DESCRIPTION = ::WID_NP_DESCRIPTION, ///< Multi-line description of a parameter.
};
- /** Widgets of the #NewGRFTextfileWindow class. */
- enum NewGRFTextfileWidgets {
- WID_NT_CAPTION = ::WID_NT_CAPTION, ///< The caption of the window.
- WID_NT_BACKGROUND = ::WID_NT_BACKGROUND, ///< Panel to draw the textfile on.
- WID_NT_VSCROLLBAR = ::WID_NT_VSCROLLBAR, ///< Vertical scrollbar to scroll through the textfile up-and-down.
- WID_NT_HSCROLLBAR = ::WID_NT_HSCROLLBAR, ///< Horizontal scrollbar to scroll through the textfile left-to-right.
- };
-
/** Widgets of the #NewGRFWindow class. */
enum NewGRFStateWidgets {
WID_NS_PRESET_LIST = ::WID_NS_PRESET_LIST, ///< Active NewGRF preset.
@@ -1715,6 +1707,14 @@ public:
WID_SP_PROGRESS_TEXT = ::WID_SP_PROGRESS_TEXT, ///< Text explaining what is happening.
};
+ /** Widgets of the #TextfileWindow class. */
+ enum TextfileWidgets {
+ WID_TF_CAPTION = ::WID_TF_CAPTION, ///< The caption of the window.
+ WID_TF_BACKGROUND = ::WID_TF_BACKGROUND, ///< Panel to draw the textfile on.
+ WID_TF_VSCROLLBAR = ::WID_TF_VSCROLLBAR, ///< Vertical scrollbar to scroll through the textfile up-and-down.
+ WID_TF_HSCROLLBAR = ::WID_TF_HSCROLLBAR, ///< Horizontal scrollbar to scroll through the textfile left-to-right.
+ };
+
/** Widgets of the #NewsWindow class. */
enum NewsWidgets {
WID_N_PANEL = ::WID_N_PANEL, ///< Panel of the window.
diff --git a/src/script/api/template/template_window.hpp.sq b/src/script/api/template/template_window.hpp.sq
index 3cb9c1afb..a4b933341 100644
--- a/src/script/api/template/template_window.hpp.sq
+++ b/src/script/api/template/template_window.hpp.sq
@@ -155,12 +155,12 @@ namespace SQConvert {
template <> inline int Return<ScriptWindow::SpriteAlignerWidgets>(HSQUIRRELVM vm, ScriptWindow::SpriteAlignerWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::NewGRFParametersWidgets GetParam(ForceType<ScriptWindow::NewGRFParametersWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NewGRFParametersWidgets)tmp; }
template <> inline int Return<ScriptWindow::NewGRFParametersWidgets>(HSQUIRRELVM vm, ScriptWindow::NewGRFParametersWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::NewGRFTextfileWidgets GetParam(ForceType<ScriptWindow::NewGRFTextfileWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NewGRFTextfileWidgets)tmp; }
- template <> inline int Return<ScriptWindow::NewGRFTextfileWidgets>(HSQUIRRELVM vm, ScriptWindow::NewGRFTextfileWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::NewGRFStateWidgets GetParam(ForceType<ScriptWindow::NewGRFStateWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NewGRFStateWidgets)tmp; }
template <> inline int Return<ScriptWindow::NewGRFStateWidgets>(HSQUIRRELVM vm, ScriptWindow::NewGRFStateWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::ScanProgressWidgets GetParam(ForceType<ScriptWindow::ScanProgressWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ScanProgressWidgets)tmp; }
template <> inline int Return<ScriptWindow::ScanProgressWidgets>(HSQUIRRELVM vm, ScriptWindow::ScanProgressWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
+ template <> inline ScriptWindow::TextfileWidgets GetParam(ForceType<ScriptWindow::TextfileWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TextfileWidgets)tmp; }
+ template <> inline int Return<ScriptWindow::TextfileWidgets>(HSQUIRRELVM vm, ScriptWindow::TextfileWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::NewsWidgets GetParam(ForceType<ScriptWindow::NewsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NewsWidgets)tmp; }
template <> inline int Return<ScriptWindow::NewsWidgets>(HSQUIRRELVM vm, ScriptWindow::NewsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::MessageHistoryWidgets GetParam(ForceType<ScriptWindow::MessageHistoryWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::MessageHistoryWidgets)tmp; }