OpenTTD Source 20241224-master-gf74b0cf984
|
GUI for goals. More...
#include "stdafx.h"
#include "industry.h"
#include "town.h"
#include "window_gui.h"
#include "strings_func.h"
#include "viewport_func.h"
#include "gui.h"
#include "goal_base.h"
#include "core/geometry_func.hpp"
#include "company_func.h"
#include "company_base.h"
#include "company_gui.h"
#include "story_base.h"
#include "command_func.h"
#include "string_func.h"
#include "goal_cmd.h"
#include "widgets/goal_widget.h"
#include "table/strings.h"
#include "safeguards.h"
Go to the source code of this file.
Data Structures | |
struct | GoalListWindow |
Window for displaying goals. More... | |
struct | GoalQuestionWindow |
Ask a question about a goal. More... | |
struct | NestedGoalWidgets< bg_colour, btn_colour, caption > |
Widgets of the goal question window. More... | |
Enumerations | |
enum | GoalColumn { GC_GOAL = 0 , GC_PROGRESS } |
Goal list columns. More... | |
Functions | |
void | ShowGoalsList (CompanyID company) |
Open a goal list window. | |
void | ShowGoalQuestion (uint16_t id, uint8_t type, uint32_t button_mask, const std::string &question) |
Display a goal question. | |
Variables | |
static constexpr NWidgetPart | _nested_goals_list_widgets [] |
Widgets of the GoalListWindow. | |
static WindowDesc | _goals_list_desc (WDP_AUTO, "list_goals", 500, 127, WC_GOALS_LIST, WC_NONE, 0, _nested_goals_list_widgets) |
static constexpr auto | _nested_goal_question_widgets_question = NestedGoalWidgets<COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, STR_GOAL_QUESTION_CAPTION_QUESTION>::widgetparts |
static constexpr auto | _nested_goal_question_widgets_info = NestedGoalWidgets<COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, STR_GOAL_QUESTION_CAPTION_INFORMATION>::widgetparts |
static constexpr auto | _nested_goal_question_widgets_warning = NestedGoalWidgets<COLOUR_YELLOW, COLOUR_YELLOW, STR_GOAL_QUESTION_CAPTION_WARNING>::widgetparts |
static constexpr auto | _nested_goal_question_widgets_error = NestedGoalWidgets<COLOUR_RED, COLOUR_YELLOW, STR_GOAL_QUESTION_CAPTION_ERROR>::widgetparts |
static WindowDesc | _goal_question_list_desc [] |
GUI for goals.
Definition in file goal_gui.cpp.
enum GoalColumn |
Goal list columns.
Enumerator | |
---|---|
GC_GOAL | Goal text column. |
GC_PROGRESS | Goal progress column. |
Definition at line 34 of file goal_gui.cpp.
void ShowGoalQuestion | ( | uint16_t | id, |
uint8_t | type, | ||
uint32_t | button_mask, | ||
const std::string & | question | ||
) |
Display a goal question.
id | Window number to use. |
type | Type of question. |
button_mask | Buttons to display. |
question | Question to ask. |
Definition at line 482 of file goal_gui.cpp.
Referenced by CmdGoalQuestion().
void ShowGoalsList | ( | CompanyID | company | ) |
Open a goal list window.
company | Company to display the goals for, use INVALID_COMPANY to display global goals. |
Definition at line 316 of file goal_gui.cpp.
References INVALID_COMPANY, and Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID().
Referenced by MenuClickGoal(), GoalListWindow::OnClick(), MainToolbarWindow::OnHotkey(), and StoryBookWindow::OnPageElementClick().
|
static |
Definition at line 448 of file goal_gui.cpp.
|
staticconstexpr |
Definition at line 446 of file goal_gui.cpp.
|
staticconstexpr |
Definition at line 444 of file goal_gui.cpp.
|
staticconstexpr |
Definition at line 443 of file goal_gui.cpp.
|
staticconstexpr |
Definition at line 445 of file goal_gui.cpp.
|
staticconstexpr |
Widgets of the GoalListWindow.
Definition at line 283 of file goal_gui.cpp.