summaryrefslogtreecommitdiff
path: root/src/script/api
diff options
context:
space:
mode:
authorzuu <zuu@openttd.org>2013-06-09 12:48:27 +0000
committerzuu <zuu@openttd.org>2013-06-09 12:48:27 +0000
commita2d84868e74ab6814b55db75df82dfb48d494d14 (patch)
treedc2bb8b0f9b3cfba4e34d0e94a186725cb9f74c5 /src/script/api
parente31190219872a69e4497f8d8f0fb3235c59f826b (diff)
downloadopenttd-a2d84868e74ab6814b55db75df82dfb48d494d14.tar.xz
(svn r25344) -Feature: GUI for viewing story pages
Diffstat (limited to 'src/script/api')
-rw-r--r--src/script/api/game/game_window.hpp.sq7
-rw-r--r--src/script/api/script_window.hpp17
-rw-r--r--src/script/api/template/template_window.hpp.sq2
3 files changed, 26 insertions, 0 deletions
diff --git a/src/script/api/game/game_window.hpp.sq b/src/script/api/game/game_window.hpp.sq
index 01811a212..73b4d4bac 100644
--- a/src/script/api/game/game_window.hpp.sq
+++ b/src/script/api/game/game_window.hpp.sq
@@ -76,6 +76,7 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SIGN_LIST, "WC_SIGN_LIST");
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_AI_LIST, "WC_AI_LIST");
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GOALS_LIST, "WC_GOALS_LIST");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WC_STORY_BOOK, "WC_STORY_BOOK");
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_STATION_LIST, "WC_STATION_LIST");
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TRAINS_LIST, "WC_TRAINS_LIST");
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_ROADVEH_LIST, "WC_ROADVEH_LIST");
@@ -1084,6 +1085,12 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_S_LEFT, "WID_S_LEFT");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_S_MIDDLE, "WID_S_MIDDLE");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_S_RIGHT, "WID_S_RIGHT");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_CAPTION, "WID_SB_CAPTION");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_SEL_PAGE, "WID_SB_SEL_PAGE");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_PAGE_PANEL, "WID_SB_PAGE_PANEL");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_SCROLLBAR, "WID_SB_SCROLLBAR");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_PREV_PAGE, "WID_SB_PREV_PAGE");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_NEXT_PAGE, "WID_SB_NEXT_PAGE");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SUL_PANEL, "WID_SUL_PANEL");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SUL_SCROLLBAR, "WID_SUL_SCROLLBAR");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_SHOW_PLACE_OBJECT, "WID_TT_SHOW_PLACE_OBJECT");
diff --git a/src/script/api/script_window.hpp b/src/script/api/script_window.hpp
index 1fae2bfae..e9e10e3ed 100644
--- a/src/script/api/script_window.hpp
+++ b/src/script/api/script_window.hpp
@@ -69,6 +69,7 @@
#include "../../widgets/viewport_widget.h"
#include "../../widgets/waypoint_widget.h"
#include "../../widgets/link_graph_legend_widget.h"
+#include "../../widgets/story_widget.h"
/**
* Class that handles window interaction. A Window in OpenTTD has two imporant
@@ -366,6 +367,11 @@ public:
*/
WC_GOALS_LIST = ::WC_GOALS_LIST,
+ /**
+ * Story book; %Window numbers:
+ * - CompanyID = #StoryBookWidgets
+ */
+ WC_STORY_BOOK = ::WC_STORY_BOOK,
/**
* Station list; %Window numbers:
@@ -2241,6 +2247,17 @@ public:
WID_S_RIGHT = ::WID_S_RIGHT, ///< Right part; bank balance.
};
+ /* automatically generated from ../../widgets/story_widget.h */
+ /** Widgets of the #GoalListWindow class. */
+ enum StoryBookWidgets {
+ WID_SB_CAPTION = ::WID_SB_CAPTION, ///< Caption of the window.
+ WID_SB_SEL_PAGE = ::WID_SB_SEL_PAGE, ///< Page selector.
+ WID_SB_PAGE_PANEL = ::WID_SB_PAGE_PANEL, ///< Page body.
+ WID_SB_SCROLLBAR = ::WID_SB_SCROLLBAR, ///< Scrollbar of the goal list.
+ WID_SB_PREV_PAGE = ::WID_SB_PREV_PAGE, ///< Prev button.
+ WID_SB_NEXT_PAGE = ::WID_SB_NEXT_PAGE, ///< Next button.
+ };
+
/* automatically generated from ../../widgets/subsidy_widget.h */
/** Widgets of the #SubsidyListWindow class. */
enum SubsidyListWidgets {
diff --git a/src/script/api/template/template_window.hpp.sq b/src/script/api/template/template_window.hpp.sq
index 238c403c2..9f01e42d5 100644
--- a/src/script/api/template/template_window.hpp.sq
+++ b/src/script/api/template/template_window.hpp.sq
@@ -209,6 +209,8 @@ namespace SQConvert {
template <> inline int Return<ScriptWindow::JoinStationWidgets>(HSQUIRRELVM vm, ScriptWindow::JoinStationWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::StatusbarWidgets GetParam(ForceType<ScriptWindow::StatusbarWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::StatusbarWidgets)tmp; }
template <> inline int Return<ScriptWindow::StatusbarWidgets>(HSQUIRRELVM vm, ScriptWindow::StatusbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
+ template <> inline ScriptWindow::StoryBookWidgets GetParam(ForceType<ScriptWindow::StoryBookWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::StoryBookWidgets)tmp; }
+ template <> inline int Return<ScriptWindow::StoryBookWidgets>(HSQUIRRELVM vm, ScriptWindow::StoryBookWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::SubsidyListWidgets GetParam(ForceType<ScriptWindow::SubsidyListWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SubsidyListWidgets)tmp; }
template <> inline int Return<ScriptWindow::SubsidyListWidgets>(HSQUIRRELVM vm, ScriptWindow::SubsidyListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
template <> inline ScriptWindow::TerraformToolbarWidgets GetParam(ForceType<ScriptWindow::TerraformToolbarWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TerraformToolbarWidgets)tmp; }