|
OpenTTD Source 20260109-master-g241b5fcdfe
|
Code related to the (main) toolbar. More...
#include "stdafx.h"#include "gui.h"#include "window_gui.h"#include "window_func.h"#include "viewport_func.h"#include "command_func.h"#include "dropdown_type.h"#include "dropdown_func.h"#include "house.h"#include "vehicle_gui.h"#include "rail_gui.h"#include "road.h"#include "road_gui.h"#include "vehicle_func.h"#include "sound_func.h"#include "terraform_gui.h"#include "strings_func.h"#include "company_func.h"#include "company_gui.h"#include "vehicle_base.h"#include "cheat_func.h"#include "transparency_gui.h"#include "screenshot.h"#include "signs_func.h"#include "fios.h"#include "console_gui.h"#include "news_gui.h"#include "ai/ai_gui.hpp"#include "game/game_gui.hpp"#include "script/script_gui.h"#include "tilehighlight_func.h"#include "smallmap_gui.h"#include "graph_gui.h"#include "textbuf_gui.h"#include "linkgraph/linkgraph_gui.h"#include "newgrf_debug.h"#include "hotkeys.h"#include "engine_base.h"#include "highscore.h"#include "game/game.hpp"#include "goal_base.h"#include "story_base.h"#include "toolbar_gui.h"#include "framerate_type.h"#include "screenshot_gui.h"#include "misc_cmd.h"#include "league_gui.h"#include "league_base.h"#include "timer/timer.h"#include "timer/timer_window.h"#include "timer/timer_game_calendar.h"#include "help_gui.h"#include "core/string_consumer.hpp"#include "widgets/toolbar_widget.h"#include "network/network.h"#include "network/network_gui.h"#include "network/network_func.h"#include "table/strings.h"#include "dropdown_common_type.h"#include "safeguards.h"Go to the source code of this file.
Data Structures | |
| class | DropDownListCompanyItem |
| Company name list item, with company-colour icon, name, and lock components. More... | |
| class | NWidgetToolbarContainer |
| Full blown container to make it behave exactly as we want :) More... | |
| class | NWidgetMainToolbarContainer |
| Container for the 'normal' main toolbar. More... | |
| class | NWidgetScenarioToolbarContainer |
| Container for the scenario editor's toolbar. More... | |
| struct | MainToolbarWindow |
| Main toolbar. More... | |
| struct | ScenarioEditorToolbarWindow |
Typedefs | |
| typedef CallBackFunction | MenuClickedProc(int index) |
| typedef CallBackFunction | ToolbarButtonProc(Window *w) |
Enumerations | |
| enum | ToolbarMode : uint8_t { TB_NORMAL , TB_UPPER , TB_LOWER } |
| Toolbar modes. More... | |
| enum | CallBackFunction : uint8_t { CBF_NONE , CBF_PLACE_SIGN , CBF_PLACE_LANDINFO } |
| Callback functions. More... | |
| enum | OptionMenuEntries : uint8_t { OME_GAMEOPTIONS , OME_AI_SETTINGS , OME_GAMESCRIPT_SETTINGS , OME_NEWGRFSETTINGS , OME_SANDBOX , OME_TRANSPARENCIES , OME_SHOW_TOWNNAMES , OME_SHOW_STATIONNAMES , OME_SHOW_STATIONNAMES_TRAIN , OME_SHOW_STATIONNAMES_LORRY , OME_SHOW_STATIONNAMES_BUS , OME_SHOW_STATIONNAMES_SHIP , OME_SHOW_STATIONNAMES_PLANE , OME_SHOW_STATIONNAMES_GHOST , OME_SHOW_WAYPOINTNAMES , OME_SHOW_SIGNS , OME_SHOW_COMPETITOR_SIGNS , OME_FULL_ANIMATION , OME_FULL_DETAILS , OME_TRANSPARENTBUILDINGS , OME_SHOW_STATIONSIGNS } |
| Game Option button menu entries. More... | |
| enum | SaveLoadEditorMenuEntries : uint8_t { SLEME_SAVE_SCENARIO = 0 , SLEME_LOAD_SCENARIO , SLEME_SAVE_HEIGHTMAP , SLEME_LOAD_HEIGHTMAP , SLEME_EXIT_TOINTRO , SLEME_EXIT_GAME } |
| SaveLoad entries in scenario editor mode. More... | |
| enum | SaveLoadNormalMenuEntries : uint8_t { SLNME_SAVE_GAME = 0 , SLNME_LOAD_GAME , SLNME_EXIT_TOINTRO , SLNME_EXIT_GAME } |
| SaveLoad entries in normal game mode. More... | |
| enum | MapMenuEntries : uint8_t { MME_SHOW_SMALLMAP = 0 , MME_SHOW_EXTRAVIEWPORTS , MME_SHOW_LINKGRAPH , MME_SHOW_SIGNLISTS , MME_SHOW_TOWNDIRECTORY , MME_SHOW_INDUSTRYDIRECTORY } |
| enum | TownMenuEntries { TME_SHOW_DIRECTORY = 0 , TME_SHOW_FOUND_TOWN , TME_SHOW_PLACE_HOUSES } |
| enum | MainToolbarEditorHotkeys : int32_t { MTEHK_PAUSE , MTEHK_FASTFORWARD , MTEHK_SETTINGS , MTEHK_SAVEGAME , MTEHK_GENLAND , MTEHK_GENTOWN , MTEHK_GENINDUSTRY , MTEHK_BUILD_ROAD , MTEHK_BUILD_TRAM , MTEHK_BUILD_DOCKS , MTEHK_BUILD_TREES , MTEHK_SIGN , MTEHK_MUSIC , MTEHK_LANDINFO , MTEHK_SMALL_SCREENSHOT , MTEHK_ZOOMEDIN_SCREENSHOT , MTEHK_DEFAULTZOOM_SCREENSHOT , MTEHK_GIANT_SCREENSHOT , MTEHK_ZOOM_IN , MTEHK_ZOOM_OUT , MTEHK_TERRAFORM , MTEHK_SMALLMAP , MTEHK_EXTRA_VIEWPORT } |
Functions | |
| static DropDownOptions | GetToolbarDropDownOptions () |
| static void | PopupMainToolbarMenu (Window *w, WidgetID widget, DropDownList &&list, int def) |
| Pop up a generic text only menu. | |
| static void | PopupMainToolbarMenu (Window *w, WidgetID widget, const std::initializer_list< StringID > &strings) |
| Pop up a generic text only menu. | |
| static void | PopupMainCompanyToolbMenu (Window *w, WidgetID widget, CompanyMask grey={}) |
| Pop up a generic company list menu. | |
| static CallBackFunction | SelectSignTool () |
| static CallBackFunction | ToolbarPauseClick (Window *) |
| static CallBackFunction | ToolbarFastForwardClick (Window *) |
| Toggle fast forward mode. | |
| static CallBackFunction | ToolbarOptionsClick (Window *w) |
| Handle click on Options button in toolbar. | |
| static CallBackFunction | MenuClickSettings (int index) |
| Handle click on one of the entries in the Options button menu. | |
| static CallBackFunction | ToolbarSaveClick (Window *w) |
| Handle click on Save button in toolbar in normal game mode. | |
| static CallBackFunction | ToolbarScenSaveOrLoad (Window *w) |
| Handle click on SaveLoad button in toolbar in the scenario editor. | |
| static CallBackFunction | MenuClickSaveLoad (int index=0) |
| Handle click on one of the entries in the SaveLoad menu. | |
| static CallBackFunction | ToolbarMapClick (Window *w) |
| static CallBackFunction | ToolbarScenMapTownDir (Window *w) |
| static CallBackFunction | MenuClickMap (int index) |
| Handle click on one of the entries in the Map menu. | |
| static CallBackFunction | ToolbarTownClick (Window *w) |
| static CallBackFunction | MenuClickTown (int index) |
| Handle click on one of the entries in the Town menu. | |
| static CallBackFunction | ToolbarSubsidiesClick (Window *w) |
| static CallBackFunction | MenuClickSubsidies (int) |
| Handle click on the entry in the Subsidies menu. | |
| static CallBackFunction | ToolbarStationsClick (Window *w) |
| static CallBackFunction | MenuClickStations (int index) |
| Handle click on the entry in the Stations menu. | |
| static CallBackFunction | ToolbarFinancesClick (Window *w) |
| static CallBackFunction | MenuClickFinances (int index) |
| Handle click on the entry in the finances overview menu. | |
| static CallBackFunction | ToolbarCompaniesClick (Window *w) |
| static CallBackFunction | MenuClickCompany (int index) |
| Handle click on the entry in the Company menu. | |
| static CallBackFunction | ToolbarStoryClick (Window *w) |
| static CallBackFunction | MenuClickStory (int index) |
| Handle click on the entry in the Story menu. | |
| static CallBackFunction | ToolbarGoalClick (Window *w) |
| static CallBackFunction | MenuClickGoal (int index) |
| Handle click on the entry in the Goal menu. | |
| static void | AddDropDownLeagueTableOptions (DropDownList &list) |
| static CallBackFunction | ToolbarGraphsClick (Window *w) |
| static CallBackFunction | ToolbarLeagueClick (Window *w) |
| static CallBackFunction | MenuClickGraphsOrLeague (int index) |
| Handle click on the entry in the Graphs or CompanyLeague. | |
| static CallBackFunction | ToolbarIndustryClick (Window *w) |
| static CallBackFunction | MenuClickIndustry (int index) |
| Handle click on the entry in the Industry menu. | |
| static void | ToolbarVehicleClick (Window *w, VehicleType veh) |
| static CallBackFunction | ToolbarTrainClick (Window *w) |
| static CallBackFunction | MenuClickShowTrains (int index) |
| Handle click on the entry in the Train menu. | |
| static CallBackFunction | ToolbarRoadClick (Window *w) |
| static CallBackFunction | MenuClickShowRoad (int index) |
| Handle click on the entry in the Road Vehicles menu. | |
| static CallBackFunction | ToolbarShipClick (Window *w) |
| static CallBackFunction | MenuClickShowShips (int index) |
| Handle click on the entry in the Ships menu. | |
| static CallBackFunction | ToolbarAirClick (Window *w) |
| static CallBackFunction | MenuClickShowAir (int index) |
| Handle click on the entry in the Aircraft menu. | |
| static CallBackFunction | ToolbarZoomInClick (Window *w) |
| static CallBackFunction | ToolbarZoomOutClick (Window *w) |
| static CallBackFunction | ToolbarBuildRailClick (Window *w) |
| static CallBackFunction | MenuClickBuildRail (int index) |
| Handle click on the entry in the Build Rail menu. | |
| static CallBackFunction | ToolbarBuildRoadClick (Window *w) |
| static CallBackFunction | MenuClickBuildRoad (int index) |
| Handle click on the entry in the Build Road menu. | |
| static CallBackFunction | ToolbarBuildTramClick (Window *w) |
| static CallBackFunction | MenuClickBuildTram (int index) |
| Handle click on the entry in the Build Tram menu. | |
| static CallBackFunction | ToolbarBuildWaterClick (Window *w) |
| static CallBackFunction | MenuClickBuildWater (int) |
| Handle click on the entry in the Build Waterways menu. | |
| static CallBackFunction | ToolbarBuildAirClick (Window *w) |
| static CallBackFunction | MenuClickBuildAir (int) |
| Handle click on the entry in the Build Air menu. | |
| static CallBackFunction | ToolbarForestClick (Window *w) |
| static CallBackFunction | MenuClickForest (int index) |
| Handle click on the entry in the landscaping menu. | |
| static CallBackFunction | ToolbarMusicClick (Window *w) |
| static CallBackFunction | MenuClickMusicWindow (int) |
| Handle click on the entry in the Music menu. | |
| static CallBackFunction | ToolbarNewspaperClick (Window *w) |
| static CallBackFunction | MenuClickNewspaper (int index) |
| Handle click on the entry in the Newspaper menu. | |
| static CallBackFunction | PlaceLandBlockInfo () |
| static CallBackFunction | ToolbarHelpClick (Window *w) |
| void | ToggleBoundingBoxes () |
| Toggle drawing of sprites' bounding boxes. | |
| void | ToggleDirtyBlocks () |
| Toggle drawing of the dirty blocks. | |
| void | ToggleWidgetOutlines () |
| Toggle drawing of widget outlines. | |
| void | SetStartingYear (TimerGameCalendar::Year year) |
| Set the starting year for a scenario. | |
| static CallBackFunction | MenuClickHelp (int index) |
| Choose the proper callback function for the main toolbar's help menu. | |
| static CallBackFunction | ToolbarSwitchClick (Window *w) |
| static CallBackFunction | ToolbarScenDatePanel (Window *w) |
| Called when clicking at the date panel of the scenario editor toolbar. | |
| static CallBackFunction | ToolbarScenDateBackward (Window *w) |
| static CallBackFunction | ToolbarScenDateForward (Window *w) |
| static CallBackFunction | ToolbarScenGenLand (Window *w) |
| static CallBackFunction | ToolbarScenGenTownClick (Window *w) |
| static CallBackFunction | ToolbarScenGenTown (int index) |
| static CallBackFunction | ToolbarScenGenIndustry (Window *w) |
| static CallBackFunction | ToolbarScenBuildRoadClick (Window *w) |
| static CallBackFunction | ToolbarScenBuildRoad (int index) |
| Handle click on the entry in the Build Road menu. | |
| static CallBackFunction | ToolbarScenBuildTramClick (Window *w) |
| static CallBackFunction | ToolbarScenBuildTram (int index) |
| Handle click on the entry in the Build Tram menu. | |
| static CallBackFunction | ToolbarScenBuildDocks (Window *w) |
| static CallBackFunction | ToolbarScenPlantTrees (Window *w) |
| static CallBackFunction | ToolbarScenPlaceSign (Window *w) |
| static CallBackFunction | ToolbarBtn_NULL (Window *) |
| static std::unique_ptr< NWidgetBase > | MakeMainToolbar () |
| static std::unique_ptr< NWidgetBase > | MakeScenarioToolbar () |
| void | AllocateToolbar () |
| Allocate the toolbar. | |
Variables | |
| uint | _toolbar_width = 0 |
| Width of the toolbar, shared by statusbar. | |
| RailType | _last_built_railtype |
| RoadType | _last_built_roadtype |
| RoadType | _last_built_tramtype |
| static CallBackFunction | _last_started_action = CBF_NONE |
| Last started user action. | |
| static const int | CTMN_CLIENT_LIST = MAX_COMPANIES |
| Indicates the "all connected players" entry. | |
| static const int | CTMN_SPECTATE = COMPANY_SPECTATOR.base() |
| Indicates the "become spectator" entry. | |
| static const int | CTMN_SPECTATOR = CompanyID::Invalid().base() |
| Indicates that a window is being opened for the spectator. | |
| static ToolbarMode | _toolbar_mode |
| static const int | GRMN_OPERATING_PROFIT_GRAPH = -1 |
| Enum for the League Toolbar's and Graph Toolbar's related buttons. | |
| static const int | GRMN_INCOME_GRAPH = -2 |
| Show income graph. | |
| static const int | GRMN_DELIVERED_CARGO_GRAPH = -3 |
| Show delivered cargo graph. | |
| static const int | GRMN_PERFORMANCE_HISTORY_GRAPH = -4 |
| Show performance history graph. | |
| static const int | GRMN_COMPANY_VALUE_GRAPH = -5 |
| Show company value graph. | |
| static const int | GRMN_CARGO_PAYMENT_RATES = -6 |
| Show cargo payment rates graph. | |
| static const int | LTMN_PERFORMANCE_LEAGUE = -7 |
| Show default league table. | |
| static const int | LTMN_PERFORMANCE_RATING = -8 |
| Show detailed performance rating. | |
| static const int | LTMN_HIGHSCORE = -9 |
| Show highscrore table. | |
| static MenuClickedProc *const | _menu_clicked_procs [] |
| static ToolbarButtonProc *const | _toolbar_button_procs [] |
| static constexpr std::initializer_list< NWidgetPart > | _nested_toolbar_normal_widgets |
| static WindowDesc | _toolb_normal_desc (WDP_MANUAL, {}, 0, 0, WC_MAIN_TOOLBAR, WC_NONE, {WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose}, _nested_toolbar_normal_widgets, &MainToolbarWindow::hotkeys) |
| static MenuClickedProc *const | _scen_toolbar_dropdown_procs [] |
| static ToolbarButtonProc *const | _scen_toolbar_button_procs [] |
| static constexpr std::initializer_list< NWidgetPart > | _nested_toolb_scen_inner_widgets |
| static constexpr std::initializer_list< NWidgetPart > | _nested_toolb_scen_widgets |
| static WindowDesc | _toolb_scen_desc (WDP_MANUAL, {}, 0, 0, WC_MAIN_TOOLBAR, WC_NONE, {WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose}, _nested_toolb_scen_widgets, &ScenarioEditorToolbarWindow::hotkeys) |
Code related to the (main) toolbar.
Definition in file toolbar_gui.cpp.
| typedef CallBackFunction MenuClickedProc(int index) |
Definition at line 1318 of file toolbar_gui.cpp.
| typedef CallBackFunction ToolbarButtonProc(Window *w) |
Definition at line 1941 of file toolbar_gui.cpp.
| enum CallBackFunction : uint8_t |
Callback functions.
Definition at line 92 of file toolbar_gui.cpp.
| enum MainToolbarEditorHotkeys : int32_t |
Definition at line 2284 of file toolbar_gui.cpp.
| enum MapMenuEntries : uint8_t |
Definition at line 421 of file toolbar_gui.cpp.
| enum OptionMenuEntries : uint8_t |
Game Option button menu entries.
Definition at line 236 of file toolbar_gui.cpp.
| enum SaveLoadEditorMenuEntries : uint8_t |
SaveLoad entries in scenario editor mode.
Definition at line 345 of file toolbar_gui.cpp.
| enum SaveLoadNormalMenuEntries : uint8_t |
SaveLoad entries in normal game mode.
Definition at line 357 of file toolbar_gui.cpp.
| enum ToolbarMode : uint8_t |
Toolbar modes.
Definition at line 85 of file toolbar_gui.cpp.
| enum TownMenuEntries |
Definition at line 474 of file toolbar_gui.cpp.
|
static |
Definition at line 663 of file toolbar_gui.cpp.
| void AllocateToolbar | ( | ) |
Allocate the toolbar.
Definition at line 2573 of file toolbar_gui.cpp.
References ROADTYPE_ROAD, and ROADTYPE_TRAM.
Referenced by ShowVitalWindows().
|
static |
Definition at line 110 of file toolbar_gui.cpp.
|
static |
Sprites to use for the different toolbar buttons
Definition at line 2160 of file toolbar_gui.cpp.
References WID_TN_AIR, WID_TN_AIRCRAFT, WID_TN_BUILDING_TOOLS_START, WID_TN_COMPANIES, WID_TN_FAST_FORWARD, WID_TN_FINANCES, WID_TN_GOAL, WID_TN_GRAPHS, WID_TN_HELP, WID_TN_INDUSTRIES, WID_TN_LANDSCAPE, WID_TN_LEAGUE, WID_TN_MESSAGES, WID_TN_MUSIC_SOUND, WID_TN_PAUSE, WID_TN_RAILS, WID_TN_ROADS, WID_TN_ROADVEHS, WID_TN_SAVE, WID_TN_SETTINGS, WID_TN_SHIPS, WID_TN_SMALL_MAP, WID_TN_STATIONS, WID_TN_STORY, WID_TN_SUBSIDIES, WID_TN_SWITCH_BAR, WID_TN_TOWNS, WID_TN_TRAINS, WID_TN_TRAMS, WID_TN_VEHICLE_START, WID_TN_WATER, WID_TN_ZOOM_IN, WID_TN_ZOOM_OUT, WWT_IMGBTN, WWT_IMGBTN_2, and WWT_PUSHIMGBTN.
|
static |
Definition at line 2555 of file toolbar_gui.cpp.
|
static |
Handle click on the entry in the Build Air menu.
Definition at line 974 of file toolbar_gui.cpp.
References ShowBuildAirToolbar().
|
static |
Handle click on the entry in the Build Rail menu.
| index | RailType to show the build toolbar for. |
Definition at line 889 of file toolbar_gui.cpp.
References ShowBuildRailToolbar().
|
static |
Handle click on the entry in the Build Road menu.
| index | RoadType to show the build toolbar for. |
Definition at line 910 of file toolbar_gui.cpp.
References ShowBuildRoadToolbar().
|
static |
Handle click on the entry in the Build Tram menu.
| index | RoadType to show the build toolbar for. |
Definition at line 931 of file toolbar_gui.cpp.
References ShowBuildRoadToolbar().
|
static |
Handle click on the entry in the Build Waterways menu.
Definition at line 953 of file toolbar_gui.cpp.
References ShowBuildDocksToolbar().
|
static |
Handle click on the entry in the Company menu.
| index | Menu entry to handle. |
Definition at line 585 of file toolbar_gui.cpp.
References _network_server, _networking, CLIENT_ID_SERVER, COMPANY_SPECTATOR, CTMN_CLIENT_LIST, CTMN_SPECTATE, MarkWholeScreenDirty(), NetworkClientRequestMove(), NetworkServerDoMove(), and ShowCompany().
|
static |
Handle click on the entry in the finances overview menu.
| index | CompanyID to show finances for. |
Definition at line 565 of file toolbar_gui.cpp.
References ShowCompanyFinances().
|
static |
Handle click on the entry in the landscaping menu.
| index | Menu entry clicked. |
Definition at line 998 of file toolbar_gui.cpp.
References ShowTerraformToolbar().
|
static |
Handle click on the entry in the Goal menu.
| index | CompanyID to show story book for |
Definition at line 641 of file toolbar_gui.cpp.
References ShowGoalsList().
|
static |
Handle click on the entry in the Graphs or CompanyLeague.
| index | Graph to show. |
Definition at line 712 of file toolbar_gui.cpp.
References GRMN_CARGO_PAYMENT_RATES, GRMN_COMPANY_VALUE_GRAPH, GRMN_DELIVERED_CARGO_GRAPH, GRMN_INCOME_GRAPH, GRMN_OPERATING_PROFIT_GRAPH, GRMN_PERFORMANCE_HISTORY_GRAPH, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_league_table_pool >::IsValidID(), LTMN_HIGHSCORE, LTMN_PERFORMANCE_LEAGUE, LTMN_PERFORMANCE_RATING, and ShowHighscoreTable().
|
static |
Choose the proper callback function for the main toolbar's help menu.
| index | The menu index which was selected. |
Definition at line 1154 of file toolbar_gui.cpp.
References _ctrl_pressed, IConsoleSwitch(), ShowFramerateWindow(), ShowScriptDebugWindow(), ShowSpriteAlignerWindow(), ToggleBoundingBoxes(), ToggleDirtyBlocks(), and ToggleWidgetOutlines().
|
static |
Handle click on the entry in the Industry menu.
| index | Menu entry number. |
Definition at line 754 of file toolbar_gui.cpp.
References ShowIndustryCargoesWindow().
|
static |
Handle click on one of the entries in the Map menu.
| index | Index being clicked. |
Definition at line 459 of file toolbar_gui.cpp.
References ShowExtraViewportWindow(), ShowLinkGraphLegend(), ShowSignList(), and ShowSmallMap().
|
static |
Handle click on the entry in the Music menu.
Definition at line 1021 of file toolbar_gui.cpp.
|
static |
Handle click on the entry in the Newspaper menu.
| index | Menu entry clicked. |
Definition at line 1041 of file toolbar_gui.cpp.
References DeleteAllMessages(), ShowLastNewsMessage(), and ShowMessageHistory().
|
static |
Handle click on one of the entries in the SaveLoad menu.
| index | Index being clicked. |
Definition at line 397 of file toolbar_gui.cpp.
References FT_HEIGHTMAP, FT_SAVEGAME, FT_SCENARIO, ShowSaveLoadDialog(), SLO_LOAD, and SLO_SAVE.
Referenced by MainToolbarWindow::OnHotkey(), and ScenarioEditorToolbarWindow::OnHotkey().
|
static |
Handle click on one of the entries in the Options button menu.
| index | Index being clicked. |
Definition at line 309 of file toolbar_gui.cpp.
References _display_opt, _facility_display_opt, _grfconfig, _networking, _settings_client, Airport, BusStop, CheckBlitter(), DO_FULL_ANIMATION, DO_FULL_DETAIL, DO_SHOW_COMPETITOR_SIGNS, DO_SHOW_SIGNS, DO_SHOW_STATION_NAMES, DO_SHOW_TOWN_NAMES, DO_SHOW_WAYPOINT_NAMES, Dock, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Flip(), ClientSettings::gui, InvalidateWindowClassesData(), MarkWholeScreenDirty(), ShowAIConfigWindow(), ShowCheatWindow(), ShowGameOptions(), ShowGSConfigWindow(), ShowNewGRFSettings(), ShowTransparencyToolbar(), STATION_FACILITY_GHOST, TO_HOUSES, TO_SIGNS, ToggleBit(), ToggleTransparency(), Train, TruckStop, GUISettings::UserIsAllowedToChangeNewGRFs(), and WC_SIGN_LIST.
|
static |
Handle click on the entry in the Aircraft menu.
| index | CompanyID to show aircraft list for. |
Definition at line 849 of file toolbar_gui.cpp.
References VEH_AIRCRAFT.
|
static |
Handle click on the entry in the Road Vehicles menu.
| index | CompanyID to show road vehicles list for. |
Definition at line 809 of file toolbar_gui.cpp.
References VEH_ROAD.
|
static |
Handle click on the entry in the Ships menu.
| index | CompanyID to show ship list for. |
Definition at line 829 of file toolbar_gui.cpp.
References VEH_SHIP.
|
static |
Handle click on the entry in the Train menu.
| index | CompanyID to show train list for. |
Definition at line 789 of file toolbar_gui.cpp.
References VEH_TRAIN.
|
static |
Handle click on the entry in the Stations menu.
| index | CompanyID to show station list for |
Definition at line 545 of file toolbar_gui.cpp.
References ShowCompanyStations().
|
static |
Handle click on the entry in the Story menu.
| index | CompanyID to show story book for |
Definition at line 621 of file toolbar_gui.cpp.
References ShowStoryBook().
|
static |
Handle click on the entry in the Subsidies menu.
Definition at line 525 of file toolbar_gui.cpp.
|
static |
Handle click on one of the entries in the Town menu.
| index | Index being clicked. |
Definition at line 498 of file toolbar_gui.cpp.
References _settings_game, GameSettings::economy, EconomySettings::found_town, EconomySettings::place_houses, and TF_FORBIDDEN.
|
static |
Definition at line 1053 of file toolbar_gui.cpp.
|
static |
Pop up a generic company list menu.
| w | The toolbar window. |
| widget | The button widget id. |
| grey | A bitmask of which companies to mark as disabled. |
Definition at line 161 of file toolbar_gui.cpp.
|
static |
Pop up a generic text only menu.
| w | Toolbar |
| widget | Toolbar button |
| strings | List of strings for each item in the menu |
Definition at line 134 of file toolbar_gui.cpp.
References PopupMainToolbarMenu().
|
static |
Pop up a generic text only menu.
| w | Toolbar |
| widget | Toolbar button |
| list | List of items |
| def | Default item |
Definition at line 123 of file toolbar_gui.cpp.
References ShowDropDownList().
Referenced by PopupMainToolbarMenu(), ToolbarSaveClick(), and ToolbarScenSaveOrLoad().
|
static |
Definition at line 195 of file toolbar_gui.cpp.
| void SetStartingYear | ( | TimerGameCalendar::Year | year | ) |
Set the starting year for a scenario.
| year | New starting year. |
Definition at line 1132 of file toolbar_gui.cpp.
References _settings_game, Clamp(), TimerGameCalendar::ConvertYMDToDate(), TimerGameEconomy::date, GameSettings::game_creation, LinkGraphSchedule::instance, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_vehicle_pool >::Iterate(), TimerGameConst< struct Calendar >::MAX_YEAR, TimerGameConst< struct Calendar >::MIN_YEAR, TimerGameCalendar::SetDate(), TimerGameEconomy::SetDate(), LinkGraphSchedule::ShiftDates(), and GameCreationSettings::starting_year.
Referenced by ScenarioEditorToolbarWindow::OnQueryTextFinished().
| void ToggleBoundingBoxes | ( | ) |
Toggle drawing of sprites' bounding boxes.
Function is found here and not in viewport.cpp in order to avoid importing the settings structs to there.
Definition at line 1087 of file toolbar_gui.cpp.
References _settings_client, ClientSettings::gui, MarkWholeScreenDirty(), and GUISettings::newgrf_developer_tools.
Referenced by MenuClickHelp(), and MainWindow::OnHotkey().
| void ToggleDirtyBlocks | ( | ) |
Toggle drawing of the dirty blocks.
Function is found here and not in viewport.cpp in order to avoid importing the settings structs to there.
Definition at line 1104 of file toolbar_gui.cpp.
References _settings_client, ClientSettings::gui, MarkWholeScreenDirty(), and GUISettings::newgrf_developer_tools.
Referenced by MenuClickHelp(), and MainWindow::OnHotkey().
| void ToggleWidgetOutlines | ( | ) |
Toggle drawing of widget outlines.
Definition at line 1118 of file toolbar_gui.cpp.
References _settings_client, ClientSettings::gui, MarkWholeScreenDirty(), and GUISettings::newgrf_developer_tools.
Referenced by MenuClickHelp(), and MainWindow::OnHotkey().
|
static |
Definition at line 837 of file toolbar_gui.cpp.
|
static |
Definition at line 1313 of file toolbar_gui.cpp.
|
static |
Definition at line 961 of file toolbar_gui.cpp.
|
static |
Definition at line 877 of file toolbar_gui.cpp.
|
static |
Definition at line 898 of file toolbar_gui.cpp.
|
static |
Definition at line 919 of file toolbar_gui.cpp.
|
static |
Definition at line 940 of file toolbar_gui.cpp.
|
static |
Definition at line 573 of file toolbar_gui.cpp.
|
static |
Toggle fast forward mode.
Definition at line 223 of file toolbar_gui.cpp.
References _game_speed, _networking, and SndClickBeep().
Referenced by MainToolbarWindow::OnHotkey(), and ScenarioEditorToolbarWindow::OnHotkey().
|
static |
Definition at line 553 of file toolbar_gui.cpp.
|
static |
Definition at line 982 of file toolbar_gui.cpp.
|
static |
Definition at line 629 of file toolbar_gui.cpp.
|
static |
Definition at line 678 of file toolbar_gui.cpp.
|
static |
Definition at line 1064 of file toolbar_gui.cpp.
|
static |
Definition at line 737 of file toolbar_gui.cpp.
|
static |
Definition at line 695 of file toolbar_gui.cpp.
|
static |
Definition at line 430 of file toolbar_gui.cpp.
|
static |
Definition at line 1010 of file toolbar_gui.cpp.
|
static |
Definition at line 1029 of file toolbar_gui.cpp.
|
static |
Handle click on Options button in toolbar.
| w | parent window the shown Drop down list is attached to. |
Definition at line 266 of file toolbar_gui.cpp.
References _display_opt, _facility_display_opt, _network_server, _networking, Airport, BusStop, DO_FULL_ANIMATION, DO_FULL_DETAIL, DO_SHOW_COMPETITOR_SIGNS, DO_SHOW_SIGNS, DO_SHOW_STATION_NAMES, DO_SHOW_TOWN_NAMES, DO_SHOW_WAYPOINT_NAMES, Dock, HasBit(), IsTransparencySet(), ShowDropDownList(), STATION_FACILITY_GHOST, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TO_HOUSES, TO_SIGNS, Train, TruckStop, and WID_TN_SETTINGS.
|
static |
Definition at line 208 of file toolbar_gui.cpp.
|
static |
Definition at line 797 of file toolbar_gui.cpp.
|
static |
Handle click on Save button in toolbar in normal game mode.
| w | parent window the shown save dialogue is attached to. |
Definition at line 370 of file toolbar_gui.cpp.
References PopupMainToolbarMenu(), and WID_TN_SAVE.
|
static |
Definition at line 1293 of file toolbar_gui.cpp.
|
static |
Handle click on the entry in the Build Road menu.
| index | RoadType to show the build toolbar for. |
Definition at line 1267 of file toolbar_gui.cpp.
References ShowBuildRoadScenToolbar().
|
static |
Definition at line 1255 of file toolbar_gui.cpp.
|
static |
Handle click on the entry in the Build Tram menu.
| index | RoadType to show the build toolbar for. |
Definition at line 1286 of file toolbar_gui.cpp.
References ShowBuildRoadScenToolbar().
|
static |
Definition at line 1274 of file toolbar_gui.cpp.
|
static |
Definition at line 1199 of file toolbar_gui.cpp.
|
static |
Definition at line 1212 of file toolbar_gui.cpp.
|
static |
Called when clicking at the date panel of the scenario editor toolbar.
Definition at line 1193 of file toolbar_gui.cpp.
References _settings_game, CS_NUMERAL, EnableDefault, GameSettings::game_creation, GetString(), ShowQueryString(), and GameCreationSettings::starting_year.
|
static |
Definition at line 1248 of file toolbar_gui.cpp.
|
static |
Definition at line 1225 of file toolbar_gui.cpp.
|
static |
Definition at line 1239 of file toolbar_gui.cpp.
|
static |
Definition at line 1233 of file toolbar_gui.cpp.
|
static |
Definition at line 441 of file toolbar_gui.cpp.
|
static |
Definition at line 1307 of file toolbar_gui.cpp.
|
static |
Definition at line 1300 of file toolbar_gui.cpp.
|
static |
Handle click on SaveLoad button in toolbar in the scenario editor.
| w | parent window the shown save dialogue is attached to. |
Definition at line 383 of file toolbar_gui.cpp.
References PopupMainToolbarMenu(), and WID_TE_SAVE.
|
static |
Definition at line 817 of file toolbar_gui.cpp.
|
static |
Definition at line 533 of file toolbar_gui.cpp.
|
static |
Definition at line 609 of file toolbar_gui.cpp.
|
static |
Definition at line 514 of file toolbar_gui.cpp.
|
static |
Definition at line 1174 of file toolbar_gui.cpp.
|
static |
Definition at line 480 of file toolbar_gui.cpp.
|
static |
Definition at line 777 of file toolbar_gui.cpp.
|
static |
Definition at line 766 of file toolbar_gui.cpp.
|
static |
Definition at line 857 of file toolbar_gui.cpp.
|
static |
Definition at line 867 of file toolbar_gui.cpp.
| RailType _last_built_railtype |
Definition at line 80 of file toolbar_gui.cpp.
| RoadType _last_built_roadtype |
Definition at line 81 of file toolbar_gui.cpp.
| RoadType _last_built_tramtype |
Definition at line 82 of file toolbar_gui.cpp.
|
static |
Last started user action.
Definition at line 98 of file toolbar_gui.cpp.
Referenced by ScenarioEditorToolbarWindow::OnClick(), MainToolbarWindow::OnDropdownSelect(), ScenarioEditorToolbarWindow::OnDropdownSelect(), MainToolbarWindow::OnHotkey(), ScenarioEditorToolbarWindow::OnHotkey(), MainToolbarWindow::OnPlaceObject(), ScenarioEditorToolbarWindow::OnPlaceObject(), MainToolbarWindow::OnPlaceObjectAbort(), and ScenarioEditorToolbarWindow::OnPlaceObjectAbort().
|
static |
Definition at line 1320 of file toolbar_gui.cpp.
|
staticconstexpr |
Definition at line 2520 of file toolbar_gui.cpp.
|
staticconstexpr |
Definition at line 2560 of file toolbar_gui.cpp.
|
staticconstexpr |
Definition at line 2217 of file toolbar_gui.cpp.
|
static |
Definition at line 2258 of file toolbar_gui.cpp.
|
static |
Definition at line 2232 of file toolbar_gui.cpp.
|
static |
Definition at line 1943 of file toolbar_gui.cpp.
|
static |
Definition at line 193 of file toolbar_gui.cpp.
| uint _toolbar_width = 0 |
Width of the toolbar, shared by statusbar.
Definition at line 78 of file toolbar_gui.cpp.
Referenced by NetworkChatWindow::FindWindowPlacementAndResize(), StatusBarWindow::FindWindowPlacementAndResize(), MainToolbarWindow::FindWindowPlacementAndResize(), ScenarioEditorToolbarWindow::FindWindowPlacementAndResize(), RelocateAllWindows(), NWidgetToolbarContainer::SetupSmallestSize(), and NWidgetScenarioToolbarContainer::SetupSmallestSize().
|
static |
Indicates the "all connected players" entry.
Definition at line 151 of file toolbar_gui.cpp.
Referenced by MenuClickCompany().
|
static |
Indicates the "become spectator" entry.
Definition at line 152 of file toolbar_gui.cpp.
Referenced by MenuClickCompany().
|
static |
Indicates that a window is being opened for the spectator.
Definition at line 153 of file toolbar_gui.cpp.
|
static |
Show cargo payment rates graph.
Definition at line 658 of file toolbar_gui.cpp.
Referenced by MenuClickGraphsOrLeague().
|
static |
Show company value graph.
Definition at line 657 of file toolbar_gui.cpp.
Referenced by MenuClickGraphsOrLeague().
|
static |
Show delivered cargo graph.
Definition at line 655 of file toolbar_gui.cpp.
Referenced by MenuClickGraphsOrLeague().
|
static |
Show income graph.
Definition at line 654 of file toolbar_gui.cpp.
Referenced by MenuClickGraphsOrLeague().
|
static |
Enum for the League Toolbar's and Graph Toolbar's related buttons.
Use continuous numbering as League Toolbar can be combined into the Graph Toolbar. Show operating profit graph
Definition at line 653 of file toolbar_gui.cpp.
Referenced by MenuClickGraphsOrLeague().
|
static |
Show performance history graph.
Definition at line 656 of file toolbar_gui.cpp.
Referenced by MenuClickGraphsOrLeague().
|
static |
Show highscrore table.
Definition at line 661 of file toolbar_gui.cpp.
Referenced by MenuClickGraphsOrLeague().
|
static |
Show default league table.
Definition at line 659 of file toolbar_gui.cpp.
Referenced by MenuClickGraphsOrLeague().
|
static |
Show detailed performance rating.
Definition at line 660 of file toolbar_gui.cpp.
Referenced by MenuClickGraphsOrLeague().