|
OpenTTD Source 20251117-master-g7398d2e290
|
Graphical selection of a date. More...
#include "stdafx.h"#include "strings_func.h"#include "timer/timer_game_economy.h"#include "window_func.h"#include "window_gui.h"#include "date_gui.h"#include "core/geometry_func.hpp"#include "dropdown_type.h"#include "dropdown_func.h"#include "widgets/date_widget.h"#include "table/strings.h"#include "safeguards.h"Go to the source code of this file.
Data Structures | |
| struct | SetDateWindow |
| Window to select a date graphically by using dropdowns. More... | |
Functions | |
| void | ShowSetDateWindow (Window *parent, int window_number, TimerGameEconomy::Date initial_date, TimerGameEconomy::Year min_year, TimerGameEconomy::Year max_year, SetDateCallback &&callback) |
| Create the new 'set date' window. | |
Variables | |
| static constexpr std::initializer_list< NWidgetPart > | _nested_set_date_widgets |
| Widgets for the date setting window. | |
| static WindowDesc | _set_date_desc (WDP_CENTER, {}, 0, 0, WC_SET_DATE, WC_NONE, {}, _nested_set_date_widgets) |
| Description of the date setting window. | |
Graphical selection of a date.
Definition in file date_gui.cpp.
| void ShowSetDateWindow | ( | Window * | parent, |
| int | window_number, | ||
| TimerGameEconomy::Date | initial_date, | ||
| TimerGameEconomy::Year | min_year, | ||
| TimerGameEconomy::Year | max_year, | ||
| SetDateCallback && | callback | ||
| ) |
Create the new 'set date' window.
| window_number | number for the window |
| parent | the parent window, i.e. if this closes we should close too |
| initial_date | the initial date to show |
| min_year | the minimum year to show in the year dropdown |
| max_year | the maximum year (inclusive) to show in the year dropdown |
| callback | the callback to call once a date has been selected |
Definition at line 214 of file date_gui.cpp.
References _set_date_desc, CloseWindowByClass(), and WC_SET_DATE.
Referenced by TimetableWindow::OnClick().
|
staticconstexpr |
Widgets for the date setting window.
Definition at line 176 of file date_gui.cpp.