OpenTTD Source 20241224-master-gee860a5c8e
|
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, uint16_t page_id, bool centered) |
Raise or create the story book window for company, at page page_id. | |
Variables | |
static constexpr NWidgetPart | _nested_story_book_widgets [] |
static WindowDesc | _story_book_desc (WDP_AUTO, "view_story", 400, 300, WC_STORY_BOOK, WC_NONE, 0, _nested_story_book_widgets) |
static WindowDesc | _story_book_gs_desc (WDP_CENTER, "view_story_gs", 400, 300, WC_STORY_BOOK, WC_NONE, 0, _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, |
uint16_t | 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 INVALID_COMPANY. |
page_id | Page to open, may be INVALID_STORY_PAGE. |
centered | Whether to open the window centered. |
Definition at line 1051 of file story_gui.cpp.
References INVALID_COMPANY, INVALID_STORY_PAGE, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), and StoryBookWindow::SetSelectedPage().
Referenced by CmdShowStoryPage(), GoalListWindow::HandleClick(), MenuClickStory(), and MainToolbarWindow::OnHotkey().
|
static |
Definition at line 983 of file story_gui.cpp.
|
staticconstexpr |
Definition at line 948 of file story_gui.cpp.