|
OpenTTD Source 20251104-master-g3befbdd52f
|
GUI for stories. More...
#include "stdafx.h"#include "window_gui.h"#include "strings_func.h"#include "gui.h"#include "story_base.h"#include "core/geometry_func.hpp"#include "company_func.h"#include "command_func.h"#include "dropdown_type.h"#include "dropdown_func.h"#include "sortlist_type.h"#include "goal_base.h"#include "viewport_func.h"#include "window_func.h"#include "company_base.h"#include "tilehighlight_func.h"#include "vehicle_base.h"#include "story_cmd.h"#include "widgets/story_widget.h"#include "table/strings.h"#include "table/sprites.h"#include "safeguards.h"Go to the source code of this file.
Data Structures | |
| struct | StoryBookWindow |
| struct | StoryBookWindow::LayoutCacheElement |
Typedefs | |
| typedef GUIList< const StoryPage * > | GUIStoryPageList |
| typedef GUIList< const StoryPageElement * > | GUIStoryPageElementList |
Functions | |
| static CursorID | TranslateStoryPageButtonCursor (StoryPageButtonCursor cursor) |
| void | ShowStoryBook (CompanyID company, StoryPageID page_id, bool centered) |
| Raise or create the story book window for company, at page page_id. | |
Variables | |
| static constexpr std::initializer_list< NWidgetPart > | _nested_story_book_widgets |
| static WindowDesc | _story_book_desc (WDP_AUTO, "view_story", 400, 300, WC_STORY_BOOK, WC_NONE, {}, _nested_story_book_widgets) |
| static WindowDesc | _story_book_gs_desc (WDP_CENTER, "view_story_gs", 400, 300, WC_STORY_BOOK, WC_NONE, {}, _nested_story_book_widgets) |
GUI for stories.
Definition in file story_gui.cpp.
| typedef GUIList<const StoryPageElement*> GUIStoryPageElementList |
Definition at line 39 of file story_gui.cpp.
| typedef GUIList<const StoryPage*> GUIStoryPageList |
Definition at line 38 of file story_gui.cpp.
| void ShowStoryBook | ( | CompanyID | company, |
| StoryPageID | page_id, | ||
| bool | centered | ||
| ) |
Raise or create the story book window for company, at page page_id.
| company | 'Owner' of the story book, may be CompanyID::Invalid(). |
| page_id | Page to open, may be StoryPageID::Invalid(). |
| centered | Whether to open the window centered. |
Definition at line 1043 of file story_gui.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), and StoryBookWindow::SetSelectedPage().
Referenced by CmdShowStoryPage(), GoalListWindow::HandleClick(), MenuClickStory(), and MainToolbarWindow::OnHotkey().
|
static |
Definition at line 975 of file story_gui.cpp.
|
staticconstexpr |
Definition at line 940 of file story_gui.cpp.