|
OpenTTD Source 20251116-master-g21329071df
|
GUI functions that shouldn't be here. More...
#include "strings_type.h"#include "vehicle_type.h"#include "economy_type.h"#include "tile_type.h"#include "transport_type.h"#include "story_type.h"#include "company_type.h"Go to the source code of this file.
Functions | |
| void | InitializeGUI () |
| void | ShowGameOptions () |
| Open the game options window. | |
| void | ShowOrdersWindow (const Vehicle *v) |
| Window * | ShowBuildDocksToolbar () |
| Open the build water toolbar window. | |
| Window * | ShowBuildDocksScenToolbar () |
| Open the build water toolbar window for the scenario editor. | |
| Window * | ShowBuildAirToolbar () |
| Open the build airport toolbar window. | |
| void | ShowGenerateLandscape () |
| Start with a normal game. | |
| void | ShowHeightmapLoad () |
| Start with loading a heightmap. | |
| void | ShowLandInfo (TileIndex tile) |
| Show land information window. | |
| void | ShowAboutWindow () |
| void | ShowEstimatedCostOrIncome (Money cost, int x, int y) |
| Display estimated costs. | |
| void | ShowBuildTreesToolbar () |
| void | ShowTownDirectory () |
| void | ShowFoundTownWindow () |
| void | ShowIndustryDirectory () |
| void | ShowIndustryCargoesWindow () |
| Open the industry and cargoes window with an industry. | |
| void | ShowBuildIndustryWindow () |
| void | ShowSubsidiesList () |
| void | ShowGoalsList (CompanyID company) |
| Open a goal list window. | |
| void | ShowGoalQuestion (uint16_t id, uint8_t type, uint32_t button_mask, const EncodedString &question) |
| Display a goal question. | |
| void | ShowStoryBook (CompanyID company, StoryPageID page_id=StoryPageID::Invalid(), bool centered=false) |
| Raise or create the story book window for company, at page page_id. | |
| void | ShowExtraViewportWindow (TileIndex tile=INVALID_TILE) |
| Show a new Extra Viewport window. | |
| void | ShowExtraViewportWindowForTileUnderCursor () |
| Show a new Extra Viewport window. | |
| void | ShowBuildBridgeWindow (TileIndex start, TileIndex end, TransportType transport_type, uint8_t bridge_type) |
| Prepare the data for the build a bridge window. | |
| void | ShowMusicWindow () |
GUI functions that shouldn't be here.
Definition in file gui.h.
| void InitializeGUI | ( | ) |
Definition at line 1554 of file vehicle_gui.cpp.
| void ShowAboutWindow | ( | ) |
Definition at line 478 of file misc_gui.cpp.
| Window * ShowBuildAirToolbar | ( | ) |
Open the build airport toolbar window.
If the terraform toolbar is linked to the toolbar, that window is also opened.
Definition at line 233 of file airport_gui.cpp.
References _local_company, CloseWindowByClass(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), TRANSPORT_AIR, and WC_BUILD_TOOLBAR.
Referenced by BuildAirToolbarWindow::AirportToolbarGlobalHotkeys(), MenuClickBuildAir(), and MainToolbarWindow::OnHotkey().
| void ShowBuildBridgeWindow | ( | TileIndex | start, |
| TileIndex | end, | ||
| TransportType | transport_type, | ||
| uint8_t | road_rail_type | ||
| ) |
Prepare the data for the build a bridge window.
If we can't build a bridge under the given conditions show an error message.
| start | The start tile of the bridge |
| end | The end tile of the bridge |
| transport_type | The transport type |
| road_rail_type | The road/rail type |
Definition at line 357 of file bridge_gui.cpp.
References _build_bridge_desc, _ctrl_pressed, _last_railbridge_type, _last_roadbridge_type, CalcBridgeLenCostFactor(), CcBuildBridge(), CheckBridgeAvailability(), CloseWindowByClass(), CommandFlagsToDCFlags(), CommandCost::Failed(), GetBridgeSpec(), CommandCost::GetCost(), GetEncodedString(), GetTunnelBridgeLength(), INVALID_ROADTYPE, IsBridgeTile(), MAX_BRIDGES, BridgeSpec::price, QueryCost, RailBuildCost(), RoadBuildCost(), ShowErrorMessage(), CommandCost::Succeeded(), TILE_SIZE, TileX(), TileY(), TRANSPORT_RAIL, TRANSPORT_ROAD, and WC_BUILD_BRIDGE.
Referenced by BuildRailToolbarWindow::OnPlaceMouseUp(), and BuildRoadToolbarWindow::OnPlaceMouseUp().
| Window * ShowBuildDocksScenToolbar | ( | ) |
Open the build water toolbar window for the scenario editor.
Definition at line 415 of file dock_gui.cpp.
References _build_docks_scen_toolbar_desc, and TRANSPORT_WATER.
| Window * ShowBuildDocksToolbar | ( | ) |
Open the build water toolbar window.
If the terraform toolbar is linked to the toolbar, that window is also opened.
Definition at line 374 of file dock_gui.cpp.
References _local_company, CloseWindowByClass(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), TRANSPORT_WATER, and WC_BUILD_TOOLBAR.
Referenced by BuildDocksToolbarWindow::DockToolbarGlobalHotkeys(), MenuClickBuildWater(), and MainToolbarWindow::OnHotkey().
| void ShowBuildIndustryWindow | ( | ) |
Definition at line 774 of file industry_gui.cpp.
| void ShowBuildTreesToolbar | ( | ) |
Definition at line 320 of file tree_gui.cpp.
| void ShowEstimatedCostOrIncome | ( | Money | cost, |
| int | x, | ||
| int | y | ||
| ) |
Display estimated costs.
| cost | Estimated cost (or income if negative). |
| x | X position of the notification window. |
| y | Y position of the notification window. |
Definition at line 490 of file misc_gui.cpp.
References GetEncodedString(), ShowErrorMessage(), and WL_INFO.
Referenced by CommandHelperBase::InternalPostResult().
| void ShowExtraViewportWindow | ( | TileIndex | tile | ) |
Show a new Extra Viewport window.
| tile | Tile to center the view on. INVALID_TILE means to use the center of main viewport. |
Definition at line 159 of file viewport_gui.cpp.
References FindWindowById(), and WC_EXTRA_VIEWPORT.
Referenced by GoalListWindow::HandleClick(), MenuClickMap(), CompanyWindow::OnClick(), DepotWindow::OnClick(), IndustryViewWindow::OnClick(), IndustryDirectoryWindow::OnClick(), LandInfoWindow::OnClick(), NewsWindow::OnClick(), SignWindow::OnClick(), CompanyStationsWindow::OnClick(), StationViewWindow::OnClick(), TownViewWindow::OnClick(), TownDirectoryWindow::OnClick(), VehicleViewWindow::OnClick(), WaypointWindow::OnClick(), StoryBookWindow::OnPageElementClick(), and ShowExtraViewportWindowForTileUnderCursor().
| void ShowExtraViewportWindowForTileUnderCursor | ( | ) |
Show a new Extra Viewport window.
Center it on the tile under the cursor, if the cursor is inside a viewport. If that fails, center it on main viewport center.
Definition at line 174 of file viewport_gui.cpp.
References INVALID_TILE, ShowExtraViewportWindow(), TileVirtXY(), Coord2D< T >::x, and Coord2D< T >::y.
Referenced by MainToolbarWindow::OnHotkey(), and ScenarioEditorToolbarWindow::OnHotkey().
| void ShowFoundTownWindow | ( | ) |
Definition at line 1352 of file town_gui.cpp.
| void ShowGameOptions | ( | ) |
Open the game options window.
Definition at line 1851 of file settings_gui.cpp.
References CloseWindowByClass(), and WC_GAME_OPTIONS.
Referenced by MenuClickSettings(), SelectGameWindow::OnClick(), MainToolbarWindow::OnHotkey(), and ScenarioEditorToolbarWindow::OnHotkey().
| void ShowGenerateLandscape | ( | ) |
Start with a normal game.
Definition at line 1041 of file genworld_gui.cpp.
References GLWM_GENERATE.
Referenced by CreateScenarioWindow::OnClick(), SelectGameWindow::OnClick(), and NetworkStartServerWindow::OnClick().
| void ShowGoalQuestion | ( | uint16_t | id, |
| uint8_t | type, | ||
| uint32_t | button_mask, | ||
| const EncodedString & | 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 475 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 CompanyID::Invalid() to display global goals. |
Definition at line 311 of file goal_gui.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID().
Referenced by MenuClickGoal(), GoalListWindow::OnClick(), MainToolbarWindow::OnHotkey(), and StoryBookWindow::OnPageElementClick().
| void ShowHeightmapLoad | ( | ) |
Start with loading a heightmap.
Definition at line 1047 of file genworld_gui.cpp.
References GLWM_HEIGHTMAP.
Referenced by SaveLoadWindow::OnClick().
| void ShowIndustryCargoesWindow | ( | ) |
Open the industry and cargoes window with an industry.
Definition at line 3203 of file industry_gui.cpp.
References NUM_INDUSTRYTYPES, and ShowIndustryCargoesWindow().
Referenced by MenuClickIndustry(), BuildIndustryWindow::OnClick(), IndustryViewWindow::OnClick(), and ShowIndustryCargoesWindow().
| void ShowIndustryDirectory | ( | ) |
Definition at line 1928 of file industry_gui.cpp.
| void ShowLandInfo | ( | TileIndex | tile | ) |
Show land information window.
| tile | The tile to show information about. |
Definition at line 316 of file misc_gui.cpp.
References CloseWindowById(), and WC_LAND_INFO.
Referenced by MainToolbarWindow::OnPlaceObject(), and ScenarioEditorToolbarWindow::OnPlaceObject().
| void ShowMusicWindow | ( | ) |
Definition at line 927 of file music_gui.cpp.
| void ShowOrdersWindow | ( | const Vehicle * | v | ) |
Definition at line 1765 of file order_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().
| void ShowSubsidiesList | ( | ) |
Definition at line 290 of file subsidy_gui.cpp.
| void ShowTownDirectory | ( | ) |
Definition at line 1052 of file town_gui.cpp.