OpenTTD Source
20241108-master-g80f628063a
|
GUI for towns. More...
#include "stdafx.h"
#include "town.h"
#include "viewport_func.h"
#include "error.h"
#include "gui.h"
#include "house.h"
#include "newgrf_house.h"
#include "picker_gui.h"
#include "command_func.h"
#include "company_func.h"
#include "company_base.h"
#include "company_gui.h"
#include "network/network.h"
#include "string_func.h"
#include "strings_func.h"
#include "sound_func.h"
#include "tilehighlight_func.h"
#include "sortlist_type.h"
#include "road_cmd.h"
#include "landscape.h"
#include "querystring_gui.h"
#include "window_func.h"
#include "townname_func.h"
#include "core/backup_type.hpp"
#include "core/geometry_func.hpp"
#include "genworld.h"
#include "fios.h"
#include "stringfilter_type.h"
#include "dropdown_func.h"
#include "town_kdtree.h"
#include "town_cmd.h"
#include "timer/timer.h"
#include "timer/timer_game_calendar.h"
#include "timer/timer_window.h"
#include "zoom_func.h"
#include "hotkeys.h"
#include "widgets/town_widget.h"
#include "table/strings.h"
#include "safeguards.h"
Go to the source code of this file.
Data Structures | |
struct | TownAuthorityWindow |
Town authority window. More... | |
struct | TownViewWindow |
struct | TownDirectoryWindow |
Town directory window class. More... | |
struct | FoundTownWindow |
Found a town window class. More... | |
class | HousePickerCallbacks |
struct | BuildHouseWindow |
Typedefs | |
typedef GUIList< const Town *, const bool & > | GUITownList |
Enumerations | |
enum | TownDirectoryHotkeys { TDHK_FOCUS_FILTER_BOX } |
Enum referring to the Hotkeys in the town directory window. More... | |
Functions | |
static void | ShowTownAuthorityWindow (uint town) |
void | ShowTownViewWindow (TownID town) |
void | ShowTownDirectory () |
void | CcFoundTown (Commands, const CommandCost &result, TileIndex tile) |
void | CcFoundRandomTown (Commands, const CommandCost &result, Money, TownID town_id) |
void | ShowFoundTownWindow () |
void | InitializeTownGui () |
void | DrawNewHouseTileInGUI (int x, int y, const HouseSpec *spec, HouseID house_id, int view) |
Draw representation of a house tile for GUI purposes. More... | |
void | DrawHouseInGUI (int x, int y, HouseID house_id, int view) |
Draw a house that does not exist. More... | |
void | ShowBuildHousePicker (Window *parent) |
Variables | |
TownKdtree _town_local_authority_kdtree & | Kdtree_TownXYFunc |
static constexpr NWidgetPart | _nested_town_authority_widgets [] |
static WindowDesc | _town_authority_desc (WDP_AUTO, "view_town_authority", 317, 222, WC_TOWN_AUTHORITY, WC_NONE, 0, _nested_town_authority_widgets) |
static constexpr NWidgetPart | _nested_town_game_view_widgets [] |
static WindowDesc | _town_game_view_desc (WDP_AUTO, "view_town", 260, TownViewWindow::WID_TV_HEIGHT_NORMAL, WC_TOWN_VIEW, WC_NONE, 0, _nested_town_game_view_widgets) |
static constexpr NWidgetPart | _nested_town_editor_view_widgets [] |
static WindowDesc | _town_editor_view_desc (WDP_AUTO, "view_town_scen", 260, TownViewWindow::WID_TV_HEIGHT_NORMAL, WC_TOWN_VIEW, WC_NONE, 0, _nested_town_editor_view_widgets) |
static constexpr NWidgetPart | _nested_town_directory_widgets [] |
static WindowDesc | _town_directory_desc (WDP_AUTO, "list_towns", 208, 202, WC_TOWN_DIRECTORY, WC_NONE, 0, _nested_town_directory_widgets, &TownDirectoryWindow::hotkeys) |
static constexpr NWidgetPart | _nested_found_town_widgets [] |
static WindowDesc | _found_town_desc (WDP_AUTO, "build_town", 160, 162, WC_FOUND_TOWN, WC_NONE, WDF_CONSTRUCTION, _nested_found_town_widgets) |
static constexpr NWidgetPart | _nested_build_house_widgets [] |
Nested widget definition for the build NewGRF rail waypoint window. More... | |
static WindowDesc | _build_house_desc (WDP_AUTO, "build_house", 0, 0, WC_BUILD_HOUSE, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_build_house_widgets, &BuildHouseWindow::hotkeys) |
GUI for towns.
Definition in file town_gui.cpp.
enum TownDirectoryHotkeys |
Enum referring to the Hotkeys in the town directory window.
Enumerator | |
---|---|
TDHK_FOCUS_FILTER_BOX | Focus the filter box. |
Definition at line 723 of file town_gui.cpp.
void DrawHouseInGUI | ( | int | x, |
int | y, | ||
HouseID | house_id, | ||
int | view | ||
) |
Draw a house that does not exist.
x | Position x of image. |
y | Position y of image. |
house_id | House ID to draw. |
view | The house's 'view'. |
Definition at line 1380 of file town_gui.cpp.
Draw representation of a house tile for GUI purposes.
x | Position x of image. |
y | Position y of image. |
spec | House spec to draw. |
house_id | House ID to draw. |
view | The house's 'view'. |
Definition at line 1342 of file town_gui.cpp.
|
staticconstexpr |
Nested widget definition for the build NewGRF rail waypoint window.
Definition at line 1640 of file town_gui.cpp.
|
staticconstexpr |
Definition at line 57 of file town_gui.cpp.
|
staticconstexpr |
Definition at line 694 of file town_gui.cpp.
|
staticconstexpr |
Definition at line 654 of file town_gui.cpp.
|
staticconstexpr |
Definition at line 624 of file town_gui.cpp.