summaryrefslogtreecommitdiff
path: root/src/script/api/script_story_page.hpp
diff options
context:
space:
mode:
authorzuu <zuu@openttd.org>2014-02-06 19:25:39 +0000
committerzuu <zuu@openttd.org>2014-02-06 19:25:39 +0000
commit5165be2698a9d92de4b675b0dece9057e92484bf (patch)
tree2939c724ef744237783100bf3368f03a195ed572 /src/script/api/script_story_page.hpp
parentebcc8462b7d09d36ff74843748ab5277a81bc409 (diff)
downloadopenttd-5165be2698a9d92de4b675b0dece9057e92484bf.tar.xz
(svn r26303) -Add: [nogo] ScriptStoryPageList() - a list of all story pages
Diffstat (limited to 'src/script/api/script_story_page.hpp')
-rw-r--r--src/script/api/script_story_page.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/script/api/script_story_page.hpp b/src/script/api/script_story_page.hpp
index 149ac55b8..2ce74dcbc 100644
--- a/src/script/api/script_story_page.hpp
+++ b/src/script/api/script_story_page.hpp
@@ -119,6 +119,16 @@ public:
static bool UpdateElement(StoryPageElementID story_page_element_id, uint32 reference, Text *text);
/**
+ * Get story page sort value. Each page has a sort value that is internally assigned and used
+ * to sort the pages in the story book. OpenTTD maintains this number so that the sort order
+ * is perceived. This API exist only so that you can sort ScriptStoryPageList the same order
+ * as in GUI. You should not use this number for anything else.
+ * @param story_page_id The story page to get the sort value of.
+ * @return Page sort value.
+ */
+ static uint32 GetPageSort(StoryPageID story_page_id);
+
+ /**
* Update title of a story page. The title is shown in the page selector drop down.
* @param story_page_id The story page to update.
* @param title Page title (can be either a raw string, a ScriptText object, or null).