OpenTTD Source 20260401-master-g3efaeb0eea
toolbar_gui.cpp File Reference

Code related to the (main) toolbar. More...

#include "stdafx.h"
#include "core/geometry_func.hpp"
#include "gui.h"
#include "spritecache.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)
using ToolbarButtonProc = CallBackFunction(Window *w)
 Callback for when a button is clicked in the given window.

Enumerations

enum class  ToolbarMode : uint8_t { Normal , Upper , Lower }
 Toolbar modes. More...
enum class  CallBackFunction : uint8_t { None , PlaceSign , PlaceLandInfo }
 Callback functions. More...
enum class  OptionMenuEntries : uint8_t {
  GameOptions , AISettings , GameScriptSettings , NewGRFSettings ,
  SandboxOptions , Transparencies , ShowTownNames , ShowStationNames ,
  ShowTrainStationNames , ShowLorryStationNames , ShowBusStationNames , ShowDockNames ,
  ShowAirportNames , ShowGhostStationNames , ShowWaypointNames , ShowSigns ,
  ShowCompetitorSigns , FullAnimation , FullDetails , TransparentBuildings ,
  TransparentStationSigns
}
 Game Option button menu entries. More...
enum class  SaveLoadEditorMenuEntries : uint8_t {
  SaveScenario = 0 , LoadScenario , SaveHeightmap , LoadHeightmap ,
  ExitToMainMenu , ExitGame
}
 SaveLoad entries in scenario editor mode. More...
enum class  SaveLoadNormalMenuEntries : uint8_t { SaveGame = 0 , LoadGame , ExitToMainMenu , ExitGame }
 SaveLoad entries in normal game mode. More...
enum class  MapMenuEntries : uint8_t {
  ShowSmallMap = 0 , ShowExtraViewport , ShowLinkGraph , ShowSignList ,
  ShowTownDirectory , ShowIndustryDirectory
}
 Map button menu entries. More...
enum class  TownMenuEntries { ShowDirectory = 0 , ShowFoundTown , ShowPlaceHouses }
 Town button menu entries. More...
enum class  MainToolbarEditorHotkeys : int32_t {
  Pause = WID_TE_PAUSE , FastForward = WID_TE_FAST_FORWARD , ZoomIn = WID_TE_ZOOM_IN , ZoomOut = WID_TE_ZOOM_OUT ,
  GenerateLand = WID_TE_LAND_GENERATE , GenerateIndustry = WID_TE_INDUSTRY , BuildWater = WID_TE_WATER , BuildTrees = WID_TE_TREES ,
  Sign = WID_TE_SIGNS , Settings = 1 << SPECIAL_HOTKEY_BIT , SaveGame , Music ,
  LandInfo , SmallScreenshot , ZoomedInScreenshot , DefaultZoomScreenshot ,
  GiantScreenshot , Terraform , SmallMap , ExtraViewport ,
  GenerateTown , BuildRoad , BuildTram
}
 List of hotkeys available in scenario editor. More...

Functions

static DropDownOptions GetToolbarDropDownOptions (DropDownOptions options={})
 Get options for toolbar dropdown menus,.
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 *)
Dimension GetToolbarMaximalImageSize ()
 Get maximal square size of a toolbar image.
static std::unique_ptr< NWidgetBaseMakeMainToolbar ()
 Make widgets for the main toolbar.
static std::unique_ptr< NWidgetBaseMakeScenarioToolbar ()
void AllocateToolbar ()
 Allocate the toolbar.

Variables

uint _toolbar_width = 0
 Width of the toolbar, shared by statusbar.
RailType _last_built_railtype
 The most recently used type of rail.
RoadType _last_built_roadtype
 The most recently used type of road.
RoadType _last_built_tramtype
 The most recently used type of tram track.
static CallBackFunction _last_started_action = CallBackFunction::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 std::string _railtype_filter
 Persistent filter text for railtype dropdown menu.
static std::string _roadtype_filter
 Persistent filter text for roadtype dropdown menu.
static std::string _tramtype_filter
 Persistent filter text for tramtype dropdown menu.
static MenuClickedProc *const _menu_clicked_procs []
static ToolbarButtonProc *const _toolbar_button_procs []
static constexpr std::tuple< WidgetID, WidgetType, SpriteID_toolbar_button_sprites []
 Sprites to use for the different toolbar buttons.
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)

Detailed Description

Code related to the (main) toolbar.

Definition in file toolbar_gui.cpp.

Typedef Documentation

◆ MenuClickedProc

typedef CallBackFunction MenuClickedProc(int index)

Definition at line 1332 of file toolbar_gui.cpp.

◆ ToolbarButtonProc

Callback for when a button is clicked in the given window.

Parameters
wThe clicked window.
Returns
The callback function.

Definition at line 1961 of file toolbar_gui.cpp.

Enumeration Type Documentation

◆ CallBackFunction

enum class CallBackFunction : uint8_t
strong

Callback functions.

Enumerator
None 

No action will happen when tile is selected afterwards.

PlaceSign 

A new sign will be placed when tile is selected afterwards.

PlaceLandInfo 

Land info window will appear when tile is selected afterwards.

Definition at line 94 of file toolbar_gui.cpp.

◆ MainToolbarEditorHotkeys

enum class MainToolbarEditorHotkeys : int32_t
strong

List of hotkeys available in scenario editor.

Note
Hotkeys that behave like toolbar buttons must have the same value as corresponding widget. Other hotkeys have to have SPECIAL_HOTKEY_BIT set.
Enumerator
Pause 

(Un)pause the game.

FastForward 

Toggle the fast-forward mode.

ZoomIn 

Zoom in.

ZoomOut 

Zoom out.

GenerateLand 

Open land generation window.

GenerateIndustry 

Open industry funding window.

BuildWater 

Open window for building locks, canals, rivers and aqueducts.

BuildTrees 

Open tree selection window.

Sign 

Toggle sign creation tool.

Settings 

Open game options window.

SaveGame 

Open save scenario window.

Music 

Open sound end music window.

LandInfo 

Toggle land info tool.

SmallScreenshot 

Take small screenshot.

ZoomedInScreenshot 

Take zoomed in screenshot.

DefaultZoomScreenshot 

Take screenshot with default zoom.

GiantScreenshot 

Take detailed screenshot of whole map.

Terraform 

Open land generation window.

SmallMap 

Open small map window.

ExtraViewport 

Open new extra viewport window.

GenerateTown 

Open town generation window.

BuildRoad 

Open toolbar window with tools for building roads.

BuildTram 

Open toolbar window with tools for building tramways.

Definition at line 2327 of file toolbar_gui.cpp.

◆ MapMenuEntries

enum class MapMenuEntries : uint8_t
strong

Map button menu entries.

Enumerator
ShowSmallMap 

Open small map window.

ShowExtraViewport 

Open new extra viewport window.

ShowLinkGraph 

Open cargo flow legend window.

ShowSignList 

Open sign list window.

ShowTownDirectory 

Open window with list of towns.

ShowIndustryDirectory 

Open window with list of industries.

Definition at line 429 of file toolbar_gui.cpp.

◆ OptionMenuEntries

enum class OptionMenuEntries : uint8_t
strong

Game Option button menu entries.

Enumerator
GameOptions 

Open game options window.

AISettings 

Open AI settings window.

GameScriptSettings 

Open GS settings window.

NewGRFSettings 

Open NewGRF settings window.

SandboxOptions 

Open sandbox options window.

Transparencies 

Open transparency options window.

ShowTownNames 

Toggle visibility of town names.

ShowStationNames 

Toggle visibility of station names.

ShowTrainStationNames 

Toggle visibility of train station names.

ShowLorryStationNames 

Toggle visibility of lorry station names.

ShowBusStationNames 

Toggle visibility of bus station names.

ShowDockNames 

Toggle visibility of dock names.

ShowAirportNames 

Toggle visibility of airport names.

ShowGhostStationNames 

Toggle visibility of ghost station names.

ShowWaypointNames 

Toggle visibility of waypoint names.

ShowSigns 

Toggle visibility of signs.

ShowCompetitorSigns 

Toggle visibility of competitor signs and names.

FullAnimation 

Toggle full animations.

FullDetails 

Toggle full details.

TransparentBuildings 

Toggle buildings transparency.

TransparentStationSigns 

Toggle transparency of signs and names.

Definition at line 243 of file toolbar_gui.cpp.

◆ SaveLoadEditorMenuEntries

enum class SaveLoadEditorMenuEntries : uint8_t
strong

SaveLoad entries in scenario editor mode.

Enumerator
SaveScenario 

Save the scenario.

LoadScenario 

Load a scenario.

SaveHeightmap 

Save the heightmap.

LoadHeightmap 

Load a heightmap.

ExitToMainMenu 

Exit to main menu.

ExitGame 

Exit to desktop.

Definition at line 352 of file toolbar_gui.cpp.

◆ SaveLoadNormalMenuEntries

enum class SaveLoadNormalMenuEntries : uint8_t
strong

SaveLoad entries in normal game mode.

Enumerator
SaveGame 

Save the game.

LoadGame 

Load a save.

ExitToMainMenu 

Exit to main menu.

ExitGame 

Exit to desktop.

Definition at line 364 of file toolbar_gui.cpp.

◆ ToolbarMode

enum class ToolbarMode : uint8_t
strong

Toolbar modes.

Enumerator
Normal 

Toolbar is in normal mode, in wich all 30 buttons are accessible.

Upper 

Toolbar is in split mode and the first part is selected.

Lower 

Toolbar is in split mode and the second part is selected.

Definition at line 87 of file toolbar_gui.cpp.

◆ TownMenuEntries

enum class TownMenuEntries
strong

Town button menu entries.

Enumerator
ShowDirectory 

Open window with list of towns.

ShowFoundTown 

Open town generation window.

ShowPlaceHouses 

Open house selection window.

Definition at line 483 of file toolbar_gui.cpp.

Function Documentation

◆ AddDropDownLeagueTableOptions()

void AddDropDownLeagueTableOptions ( DropDownList & list)
static

Definition at line 672 of file toolbar_gui.cpp.

◆ AllocateToolbar()

void AllocateToolbar ( )

Allocate the toolbar.

Definition at line 2611 of file toolbar_gui.cpp.

References _last_built_roadtype, _last_built_tramtype, ROADTYPE_ROAD, and ROADTYPE_TRAM.

Referenced by ShowVitalWindows().

◆ GetToolbarDropDownOptions()

DropDownOptions GetToolbarDropDownOptions ( DropDownOptions options = {})
static

Get options for toolbar dropdown menus,.

Parameters
optionsAdditional options to include.
Returns
DropDownOptions to use for toolbar dropdown menus.

Definition at line 117 of file toolbar_gui.cpp.

Referenced by PopupMainToolbarMenu(), and ToolbarOptionsClick().

◆ GetToolbarMaximalImageSize()

Dimension GetToolbarMaximalImageSize ( )

Get maximal square size of a toolbar image.

Returns
maximal toolbar image size.

Definition at line 2219 of file toolbar_gui.cpp.

References _toolbar_button_sprites, GetSquareScaledSpriteSize(), and maxdim().

Referenced by SetupWidgetDimensions().

◆ MakeMainToolbar()

std::unique_ptr< NWidgetBase > MakeMainToolbar ( )
static

Make widgets for the main toolbar.

Returns
widgets for the main toolbar.

Definition at line 2233 of file toolbar_gui.cpp.

References _toolbar_button_sprites, WID_TN_BUILDING_TOOLS_START, WID_TN_FINANCES, WID_TN_MUSIC_SOUND, WID_TN_SMALL_MAP, WID_TN_VEHICLE_START, and WID_TN_ZOOM_IN.

◆ MakeScenarioToolbar()

std::unique_ptr< NWidgetBase > MakeScenarioToolbar ( )
static

Definition at line 2593 of file toolbar_gui.cpp.

◆ MenuClickBuildAir()

CallBackFunction MenuClickBuildAir ( int )
static

Handle click on the entry in the Build Air menu.

Returns
CallBackFunction::None

Definition at line 987 of file toolbar_gui.cpp.

References None, and ShowBuildAirToolbar().

◆ MenuClickBuildRail()

CallBackFunction MenuClickBuildRail ( int index)
static

Handle click on the entry in the Build Rail menu.

Parameters
indexRailType to show the build toolbar for.
Returns
CallBackFunction::None

Definition at line 902 of file toolbar_gui.cpp.

References _last_built_railtype, None, and ShowBuildRailToolbar().

◆ MenuClickBuildRoad()

CallBackFunction MenuClickBuildRoad ( int index)
static

Handle click on the entry in the Build Road menu.

Parameters
indexRoadType to show the build toolbar for.
Returns
CallBackFunction::None

Definition at line 923 of file toolbar_gui.cpp.

References _last_built_roadtype, None, and ShowBuildRoadToolbar().

◆ MenuClickBuildTram()

CallBackFunction MenuClickBuildTram ( int index)
static

Handle click on the entry in the Build Tram menu.

Parameters
indexRoadType to show the build toolbar for.
Returns
CallBackFunction::None

Definition at line 944 of file toolbar_gui.cpp.

References _last_built_tramtype, None, and ShowBuildRoadToolbar().

◆ MenuClickBuildWater()

CallBackFunction MenuClickBuildWater ( int )
static

Handle click on the entry in the Build Waterways menu.

Returns
CallBackFunction::None

Definition at line 966 of file toolbar_gui.cpp.

References None, and ShowBuildDocksToolbar().

◆ MenuClickCompany()

CallBackFunction MenuClickCompany ( int index)
static

Handle click on the entry in the Company menu.

Parameters
indexMenu entry to handle.
Returns
CallBackFunction::None

Definition at line 594 of file toolbar_gui.cpp.

References _network_server, _networking, CLIENT_ID_SERVER, COMPANY_SPECTATOR, CTMN_CLIENT_LIST, CTMN_SPECTATE, MarkWholeScreenDirty(), NetworkClientRequestMove(), NetworkServerDoMove(), None, and ShowCompany().

◆ MenuClickFinances()

CallBackFunction MenuClickFinances ( int index)
static

Handle click on the entry in the finances overview menu.

Parameters
indexCompanyID to show finances for.
Returns
CallBackFunction::None

Definition at line 574 of file toolbar_gui.cpp.

References None, and ShowCompanyFinances().

◆ MenuClickForest()

CallBackFunction MenuClickForest ( int index)
static

Handle click on the entry in the landscaping menu.

Parameters
indexMenu entry clicked.
Returns
CallBackFunction::None

Definition at line 1011 of file toolbar_gui.cpp.

References None, and ShowTerraformToolbar().

◆ MenuClickGoal()

CallBackFunction MenuClickGoal ( int index)
static

Handle click on the entry in the Goal menu.

Parameters
indexCompanyID to show story book for
Returns
CallBackFunction::None

Definition at line 650 of file toolbar_gui.cpp.

References None, and ShowGoalsList().

◆ MenuClickGraphsOrLeague()

CallBackFunction MenuClickGraphsOrLeague ( int index)
static

◆ MenuClickHelp()

CallBackFunction MenuClickHelp ( int index)
static

Choose the proper callback function for the main toolbar's help menu.

Parameters
indexThe menu index which was selected.
Returns
CallBackFunction::None

Definition at line 1167 of file toolbar_gui.cpp.

References _ctrl_pressed, IConsoleSwitch(), None, ShowFramerateWindow(), ShowScriptDebugWindow(), ShowSpriteAlignerWindow(), ToggleBoundingBoxes(), ToggleDirtyBlocks(), and ToggleWidgetOutlines().

◆ MenuClickIndustry()

CallBackFunction MenuClickIndustry ( int index)
static

Handle click on the entry in the Industry menu.

Parameters
indexMenu entry number.
Returns
CallBackFunction::None

Definition at line 763 of file toolbar_gui.cpp.

References None, ShowIndustryCargoesWindow(), and ShowIndustryDirectory.

◆ MenuClickMap()

CallBackFunction MenuClickMap ( int index)
static

Handle click on one of the entries in the Map menu.

Parameters
indexIndex being clicked.
Returns
CallBackFunction::None

Definition at line 467 of file toolbar_gui.cpp.

References None, ShowExtraViewport, ShowExtraViewportWindow(), ShowIndustryDirectory, ShowLinkGraph, ShowLinkGraphLegend(), ShowSignList, ShowSignList(), ShowSmallMap, ShowSmallMap(), and ShowTownDirectory.

◆ MenuClickMusicWindow()

CallBackFunction MenuClickMusicWindow ( int )
static

Handle click on the entry in the Music menu.

Returns
CallBackFunction::None

Definition at line 1034 of file toolbar_gui.cpp.

References None.

◆ MenuClickNewspaper()

CallBackFunction MenuClickNewspaper ( int index)
static

Handle click on the entry in the Newspaper menu.

Parameters
indexMenu entry clicked.
Returns
CallBackFunction::None

Definition at line 1054 of file toolbar_gui.cpp.

References DeleteAllMessages(), None, ShowLastNewsMessage(), and ShowMessageHistory().

◆ MenuClickSaveLoad()

CallBackFunction MenuClickSaveLoad ( int index = 0)
static

Handle click on one of the entries in the SaveLoad menu.

Parameters
indexIndex being clicked.
Returns
CallBackFunction::None

Definition at line 404 of file toolbar_gui.cpp.

References ExitGame, ExitToMainMenu, FT_HEIGHTMAP, FT_SAVEGAME, FT_SCENARIO, LoadGame, LoadHeightmap, LoadScenario, None, SaveGame, SaveHeightmap, SaveScenario, ShowSaveLoadDialog(), SLO_LOAD, and SLO_SAVE.

Referenced by MainToolbarWindow::OnHotkey(), and ScenarioEditorToolbarWindow::OnHotkey().

◆ MenuClickSettings()

◆ MenuClickShowAir()

CallBackFunction MenuClickShowAir ( int index)
static

Handle click on the entry in the Aircraft menu.

Parameters
indexCompanyID to show aircraft list for.
Returns
CallBackFunction::None

Definition at line 858 of file toolbar_gui.cpp.

References None, and VEH_AIRCRAFT.

◆ MenuClickShowRoad()

CallBackFunction MenuClickShowRoad ( int index)
static

Handle click on the entry in the Road Vehicles menu.

Parameters
indexCompanyID to show road vehicles list for.
Returns
CallBackFunction::None

Definition at line 818 of file toolbar_gui.cpp.

References None, and VEH_ROAD.

◆ MenuClickShowShips()

CallBackFunction MenuClickShowShips ( int index)
static

Handle click on the entry in the Ships menu.

Parameters
indexCompanyID to show ship list for.
Returns
CallBackFunction::None

Definition at line 838 of file toolbar_gui.cpp.

References None, and VEH_SHIP.

◆ MenuClickShowTrains()

CallBackFunction MenuClickShowTrains ( int index)
static

Handle click on the entry in the Train menu.

Parameters
indexCompanyID to show train list for.
Returns
CallBackFunction::None

Definition at line 798 of file toolbar_gui.cpp.

References None, and VEH_TRAIN.

◆ MenuClickStations()

CallBackFunction MenuClickStations ( int index)
static

Handle click on the entry in the Stations menu.

Parameters
indexCompanyID to show station list for
Returns
CallBackFunction::None

Definition at line 554 of file toolbar_gui.cpp.

References None, and ShowCompanyStations().

◆ MenuClickStory()

CallBackFunction MenuClickStory ( int index)
static

Handle click on the entry in the Story menu.

Parameters
indexCompanyID to show story book for
Returns
CallBackFunction::None

Definition at line 630 of file toolbar_gui.cpp.

References None, and ShowStoryBook().

◆ MenuClickSubsidies()

CallBackFunction MenuClickSubsidies ( int )
static

Handle click on the entry in the Subsidies menu.

Returns
CallBackFunction::None

Definition at line 534 of file toolbar_gui.cpp.

References None.

◆ MenuClickTown()

CallBackFunction MenuClickTown ( int index)
static

Handle click on one of the entries in the Town menu.

Parameters
indexIndex being clicked.
Returns
CallBackFunction::None

Definition at line 507 of file toolbar_gui.cpp.

References _settings_game, None, ShowDirectory, ShowFoundTown, ShowPlaceHouses, ShowTownDirectory, and TF_FORBIDDEN.

◆ PlaceLandBlockInfo()

CallBackFunction PlaceLandBlockInfo ( )
static

Definition at line 1066 of file toolbar_gui.cpp.

◆ PopupMainCompanyToolbMenu()

void PopupMainCompanyToolbMenu ( Window * w,
WidgetID widget,
CompanyMask grey = {} )
static

Pop up a generic company list menu.

Parameters
wThe toolbar window.
widgetThe button widget id.
greyA bitmask of which companies to mark as disabled.

Definition at line 168 of file toolbar_gui.cpp.

◆ PopupMainToolbarMenu() [1/2]

void PopupMainToolbarMenu ( Window * w,
WidgetID widget,
const std::initializer_list< StringID > & strings )
static

Pop up a generic text only menu.

Parameters
wToolbar
widgetToolbar button
stringsList of strings for each item in the menu

Definition at line 141 of file toolbar_gui.cpp.

References MakeDropDownListDividerItem(), MakeDropDownListStringItem(), and PopupMainToolbarMenu().

◆ PopupMainToolbarMenu() [2/2]

void PopupMainToolbarMenu ( Window * w,
WidgetID widget,
DropDownList && list,
int def )
static

Pop up a generic text only menu.

Parameters
wToolbar
widgetToolbar button
listList of items
defDefault item

Definition at line 130 of file toolbar_gui.cpp.

References GetToolbarDropDownOptions(), and ShowDropDownList().

Referenced by PopupMainToolbarMenu(), ToolbarSaveClick(), and ToolbarScenSaveOrLoad().

◆ SelectSignTool()

CallBackFunction SelectSignTool ( )
static

Definition at line 202 of file toolbar_gui.cpp.

◆ SetStartingYear()

◆ ToggleBoundingBoxes()

void ToggleBoundingBoxes ( )

Toggle drawing of sprites' bounding boxes.

Note
has only an effect when newgrf_developer_tools are active.

Function is found here and not in viewport.cpp in order to avoid importing the settings structs to there.

Definition at line 1100 of file toolbar_gui.cpp.

References _settings_client, and MarkWholeScreenDirty().

Referenced by MenuClickHelp(), and MainWindow::OnHotkey().

◆ ToggleDirtyBlocks()

void ToggleDirtyBlocks ( )

Toggle drawing of the dirty blocks.

Note
has only an effect when newgrf_developer_tools are active.

Function is found here and not in viewport.cpp in order to avoid importing the settings structs to there.

Definition at line 1117 of file toolbar_gui.cpp.

References _settings_client, and MarkWholeScreenDirty().

Referenced by MenuClickHelp(), and MainWindow::OnHotkey().

◆ ToggleWidgetOutlines()

void ToggleWidgetOutlines ( )

Toggle drawing of widget outlines.

Note
has only an effect when newgrf_developer_tools are active.

Definition at line 1131 of file toolbar_gui.cpp.

References _settings_client, and MarkWholeScreenDirty().

Referenced by MenuClickHelp(), and MainWindow::OnHotkey().

◆ ToolbarAirClick()

CallBackFunction ToolbarAirClick ( Window * w)
static

Definition at line 846 of file toolbar_gui.cpp.

◆ ToolbarBtn_NULL()

CallBackFunction ToolbarBtn_NULL ( Window * )
static

Definition at line 1327 of file toolbar_gui.cpp.

◆ ToolbarBuildAirClick()

CallBackFunction ToolbarBuildAirClick ( Window * w)
static

Definition at line 974 of file toolbar_gui.cpp.

◆ ToolbarBuildRailClick()

CallBackFunction ToolbarBuildRailClick ( Window * w)
static

Definition at line 890 of file toolbar_gui.cpp.

◆ ToolbarBuildRoadClick()

CallBackFunction ToolbarBuildRoadClick ( Window * w)
static

Definition at line 911 of file toolbar_gui.cpp.

◆ ToolbarBuildTramClick()

CallBackFunction ToolbarBuildTramClick ( Window * w)
static

Definition at line 932 of file toolbar_gui.cpp.

◆ ToolbarBuildWaterClick()

CallBackFunction ToolbarBuildWaterClick ( Window * w)
static

Definition at line 953 of file toolbar_gui.cpp.

◆ ToolbarCompaniesClick()

CallBackFunction ToolbarCompaniesClick ( Window * w)
static

Definition at line 582 of file toolbar_gui.cpp.

◆ ToolbarFastForwardClick()

CallBackFunction ToolbarFastForwardClick ( Window * )
static

Toggle fast forward mode.

Returns
CallBackFunction::None

Definition at line 230 of file toolbar_gui.cpp.

References _game_speed, _networking, None, and SndClickBeep().

Referenced by MainToolbarWindow::OnHotkey().

◆ ToolbarFinancesClick()

CallBackFunction ToolbarFinancesClick ( Window * w)
static

Definition at line 562 of file toolbar_gui.cpp.

◆ ToolbarForestClick()

CallBackFunction ToolbarForestClick ( Window * w)
static

Definition at line 995 of file toolbar_gui.cpp.

◆ ToolbarGoalClick()

CallBackFunction ToolbarGoalClick ( Window * w)
static

Definition at line 638 of file toolbar_gui.cpp.

◆ ToolbarGraphsClick()

CallBackFunction ToolbarGraphsClick ( Window * w)
static

Definition at line 687 of file toolbar_gui.cpp.

◆ ToolbarHelpClick()

CallBackFunction ToolbarHelpClick ( Window * w)
static

Definition at line 1077 of file toolbar_gui.cpp.

◆ ToolbarIndustryClick()

CallBackFunction ToolbarIndustryClick ( Window * w)
static

Definition at line 746 of file toolbar_gui.cpp.

◆ ToolbarLeagueClick()

CallBackFunction ToolbarLeagueClick ( Window * w)
static

Definition at line 704 of file toolbar_gui.cpp.

◆ ToolbarMapClick()

CallBackFunction ToolbarMapClick ( Window * w)
static

Definition at line 438 of file toolbar_gui.cpp.

◆ ToolbarMusicClick()

CallBackFunction ToolbarMusicClick ( Window * w)
static

Definition at line 1023 of file toolbar_gui.cpp.

◆ ToolbarNewspaperClick()

CallBackFunction ToolbarNewspaperClick ( Window * w)
static

Definition at line 1042 of file toolbar_gui.cpp.

◆ ToolbarOptionsClick()

◆ ToolbarPauseClick()

CallBackFunction ToolbarPauseClick ( Window * )
static

Definition at line 215 of file toolbar_gui.cpp.

◆ ToolbarRoadClick()

CallBackFunction ToolbarRoadClick ( Window * w)
static

Definition at line 806 of file toolbar_gui.cpp.

◆ ToolbarSaveClick()

CallBackFunction ToolbarSaveClick ( Window * w)
static

Handle click on Save button in toolbar in normal game mode.

Parameters
wparent window the shown save dialogue is attached to.
Returns
CallBackFunction::None

Definition at line 377 of file toolbar_gui.cpp.

References None, PopupMainToolbarMenu(), and WID_TN_SAVE.

◆ ToolbarScenBuildDocks()

CallBackFunction ToolbarScenBuildDocks ( Window * w)
static

Definition at line 1307 of file toolbar_gui.cpp.

◆ ToolbarScenBuildRoad()

CallBackFunction ToolbarScenBuildRoad ( int index)
static

Handle click on the entry in the Build Road menu.

Parameters
indexRoadType to show the build toolbar for.
Returns
CallBackFunction::None

Definition at line 1281 of file toolbar_gui.cpp.

References _last_built_roadtype, None, and ShowBuildRoadScenToolbar().

◆ ToolbarScenBuildRoadClick()

CallBackFunction ToolbarScenBuildRoadClick ( Window * w)
static

Definition at line 1269 of file toolbar_gui.cpp.

◆ ToolbarScenBuildTram()

CallBackFunction ToolbarScenBuildTram ( int index)
static

Handle click on the entry in the Build Tram menu.

Parameters
indexRoadType to show the build toolbar for.
Returns
CallBackFunction::None

Definition at line 1300 of file toolbar_gui.cpp.

References _last_built_tramtype, None, and ShowBuildRoadScenToolbar().

◆ ToolbarScenBuildTramClick()

CallBackFunction ToolbarScenBuildTramClick ( Window * w)
static

Definition at line 1288 of file toolbar_gui.cpp.

◆ ToolbarScenDateBackward()

CallBackFunction ToolbarScenDateBackward ( Window * w)
static

Definition at line 1213 of file toolbar_gui.cpp.

◆ ToolbarScenDateForward()

CallBackFunction ToolbarScenDateForward ( Window * w)
static

Definition at line 1226 of file toolbar_gui.cpp.

◆ ToolbarScenDatePanel()

CallBackFunction ToolbarScenDatePanel ( Window * w)
static

Called when clicking at the date panel of the scenario editor toolbar.

Callback for when a button is clicked in the given window.

Parameters
wThe clicked window.
Returns
The callback function.

Definition at line 1207 of file toolbar_gui.cpp.

References _settings_game, CS_NUMERAL, EnableDefault, GetString(), None, and ShowQueryString().

◆ ToolbarScenGenIndustry()

CallBackFunction ToolbarScenGenIndustry ( Window * w)
static

Definition at line 1262 of file toolbar_gui.cpp.

◆ ToolbarScenGenLand()

CallBackFunction ToolbarScenGenLand ( Window * w)
static

Definition at line 1239 of file toolbar_gui.cpp.

◆ ToolbarScenGenTown()

CallBackFunction ToolbarScenGenTown ( int index)
static

Definition at line 1253 of file toolbar_gui.cpp.

◆ ToolbarScenGenTownClick()

CallBackFunction ToolbarScenGenTownClick ( Window * w)
static

Definition at line 1247 of file toolbar_gui.cpp.

◆ ToolbarScenMapTownDir()

CallBackFunction ToolbarScenMapTownDir ( Window * w)
static

Definition at line 449 of file toolbar_gui.cpp.

◆ ToolbarScenPlaceSign()

CallBackFunction ToolbarScenPlaceSign ( Window * w)
static

Definition at line 1321 of file toolbar_gui.cpp.

◆ ToolbarScenPlantTrees()

CallBackFunction ToolbarScenPlantTrees ( Window * w)
static

Definition at line 1314 of file toolbar_gui.cpp.

◆ ToolbarScenSaveOrLoad()

CallBackFunction ToolbarScenSaveOrLoad ( Window * w)
static

Handle click on SaveLoad button in toolbar in the scenario editor.

Parameters
wparent window the shown save dialogue is attached to.
Returns
CallBackFunction::None

Definition at line 390 of file toolbar_gui.cpp.

References None, PopupMainToolbarMenu(), and WID_TE_SAVE.

◆ ToolbarShipClick()

CallBackFunction ToolbarShipClick ( Window * w)
static

Definition at line 826 of file toolbar_gui.cpp.

◆ ToolbarStationsClick()

CallBackFunction ToolbarStationsClick ( Window * w)
static

Definition at line 542 of file toolbar_gui.cpp.

◆ ToolbarStoryClick()

CallBackFunction ToolbarStoryClick ( Window * w)
static

Definition at line 618 of file toolbar_gui.cpp.

◆ ToolbarSubsidiesClick()

CallBackFunction ToolbarSubsidiesClick ( Window * w)
static

Definition at line 523 of file toolbar_gui.cpp.

◆ ToolbarSwitchClick()

CallBackFunction ToolbarSwitchClick ( Window * w)
static

Definition at line 1187 of file toolbar_gui.cpp.

◆ ToolbarTownClick()

CallBackFunction ToolbarTownClick ( Window * w)
static

Definition at line 489 of file toolbar_gui.cpp.

◆ ToolbarTrainClick()

CallBackFunction ToolbarTrainClick ( Window * w)
static

Definition at line 786 of file toolbar_gui.cpp.

◆ ToolbarVehicleClick()

void ToolbarVehicleClick ( Window * w,
VehicleType veh )
static

Definition at line 775 of file toolbar_gui.cpp.

◆ ToolbarZoomInClick()

CallBackFunction ToolbarZoomInClick ( Window * w)
static

Definition at line 866 of file toolbar_gui.cpp.

◆ ToolbarZoomOutClick()

CallBackFunction ToolbarZoomOutClick ( Window * w)
static

Definition at line 876 of file toolbar_gui.cpp.

Variable Documentation

◆ _last_built_railtype

◆ _last_built_roadtype

◆ _last_built_tramtype

◆ _last_started_action

◆ _menu_clicked_procs

MenuClickedProc* const _menu_clicked_procs[]
static

Definition at line 1334 of file toolbar_gui.cpp.

◆ _nested_toolb_scen_inner_widgets

std::initializer_list<NWidgetPart> _nested_toolb_scen_inner_widgets
staticconstexpr

Definition at line 2558 of file toolbar_gui.cpp.

◆ _nested_toolb_scen_widgets

std::initializer_list<NWidgetPart> _nested_toolb_scen_widgets
staticconstexpr
Initial value:
= {
NWidgetFunction(MakeScenarioToolbar),
}
constexpr NWidgetPart NWidgetFunction(NWidgetFunctionType *func_ptr)
Obtain a nested widget (sub)tree from an external source.

Definition at line 2598 of file toolbar_gui.cpp.

◆ _nested_toolbar_normal_widgets

std::initializer_list<NWidgetPart> _nested_toolbar_normal_widgets
staticconstexpr
Initial value:
= {
}
static std::unique_ptr< NWidgetBase > MakeMainToolbar()
Make widgets for the main toolbar.

Definition at line 2255 of file toolbar_gui.cpp.

◆ _railtype_filter

std::string _railtype_filter
static

Persistent filter text for railtype dropdown menu.

Definition at line 886 of file toolbar_gui.cpp.

◆ _roadtype_filter

std::string _roadtype_filter
static

Persistent filter text for roadtype dropdown menu.

Definition at line 887 of file toolbar_gui.cpp.

◆ _scen_toolbar_button_procs

ToolbarButtonProc* const _scen_toolbar_button_procs[]
static
Initial value:
= {
ToolbarPauseClick,
ToolbarBtn_NULL,
ToolbarScenDateBackward,
ToolbarScenDateForward,
ToolbarScenMapTownDir,
ToolbarZoomInClick,
ToolbarZoomOutClick,
ToolbarScenGenLand,
ToolbarScenGenTownClick,
ToolbarScenGenIndustry,
ToolbarScenBuildRoadClick,
ToolbarScenBuildTramClick,
ToolbarScenBuildDocks,
ToolbarScenPlantTrees,
ToolbarScenPlaceSign,
ToolbarBtn_NULL,
ToolbarMusicClick,
ToolbarHelpClick,
ToolbarSwitchClick,
}
static CallBackFunction ToolbarOptionsClick(Window *w)
Handle click on Options button in toolbar.
static CallBackFunction ToolbarScenSaveOrLoad(Window *w)
Handle click on SaveLoad button in toolbar in the scenario editor.
static CallBackFunction ToolbarFastForwardClick(Window *)
Toggle fast forward mode.
static CallBackFunction ToolbarScenDatePanel(Window *w)
Called when clicking at the date panel of the scenario editor toolbar.

Definition at line 2296 of file toolbar_gui.cpp.

◆ _scen_toolbar_dropdown_procs

MenuClickedProc* const _scen_toolbar_dropdown_procs[]
static
Initial value:
= {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
ToolbarScenGenTown,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
static CallBackFunction MenuClickHelp(int index)
Choose the proper callback function for the main toolbar's help menu.
static CallBackFunction MenuClickSaveLoad(int index=0)
Handle click on one of the entries in the SaveLoad menu.
static CallBackFunction MenuClickMusicWindow(int)
Handle click on the entry in the Music menu.
static CallBackFunction ToolbarScenBuildTram(int index)
Handle click on the entry in the Build Tram menu.
static CallBackFunction ToolbarScenBuildRoad(int index)
Handle click on the entry in the Build Road menu.
static CallBackFunction MenuClickMap(int index)
Handle click on one of the entries in the Map menu.
static CallBackFunction MenuClickSettings(int index)
Handle click on one of the entries in the Options button menu.

Definition at line 2270 of file toolbar_gui.cpp.

◆ _toolbar_button_procs

ToolbarButtonProc* const _toolbar_button_procs[]
static

Definition at line 1963 of file toolbar_gui.cpp.

◆ _toolbar_button_sprites

std::tuple<WidgetID, WidgetType, SpriteID> _toolbar_button_sprites[]
staticconstexpr

Sprites to use for the different toolbar buttons.

Definition at line 2181 of file toolbar_gui.cpp.

Referenced by GetToolbarMaximalImageSize(), and MakeMainToolbar().

◆ _toolbar_mode

ToolbarMode _toolbar_mode
static

Definition at line 200 of file toolbar_gui.cpp.

◆ _toolbar_width

◆ _tramtype_filter

std::string _tramtype_filter
static

Persistent filter text for tramtype dropdown menu.

Definition at line 888 of file toolbar_gui.cpp.

◆ CTMN_CLIENT_LIST

const int CTMN_CLIENT_LIST = MAX_COMPANIES
static

Indicates the "all connected players" entry.

Definition at line 158 of file toolbar_gui.cpp.

Referenced by MenuClickCompany().

◆ CTMN_SPECTATE

const int CTMN_SPECTATE = COMPANY_SPECTATOR.base()
static

Indicates the "become spectator" entry.

Definition at line 159 of file toolbar_gui.cpp.

Referenced by MenuClickCompany().

◆ CTMN_SPECTATOR

const int CTMN_SPECTATOR = CompanyID::Invalid().base()
static

Indicates that a window is being opened for the spectator.

Definition at line 160 of file toolbar_gui.cpp.

◆ GRMN_CARGO_PAYMENT_RATES

const int GRMN_CARGO_PAYMENT_RATES = -6
static

Show cargo payment rates graph.

Definition at line 667 of file toolbar_gui.cpp.

Referenced by MenuClickGraphsOrLeague().

◆ GRMN_COMPANY_VALUE_GRAPH

const int GRMN_COMPANY_VALUE_GRAPH = -5
static

Show company value graph.

Definition at line 666 of file toolbar_gui.cpp.

Referenced by MenuClickGraphsOrLeague().

◆ GRMN_DELIVERED_CARGO_GRAPH

const int GRMN_DELIVERED_CARGO_GRAPH = -3
static

Show delivered cargo graph.

Definition at line 664 of file toolbar_gui.cpp.

Referenced by MenuClickGraphsOrLeague().

◆ GRMN_INCOME_GRAPH

const int GRMN_INCOME_GRAPH = -2
static

Show income graph.

Definition at line 663 of file toolbar_gui.cpp.

Referenced by MenuClickGraphsOrLeague().

◆ GRMN_OPERATING_PROFIT_GRAPH

const int GRMN_OPERATING_PROFIT_GRAPH = -1
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 662 of file toolbar_gui.cpp.

Referenced by MenuClickGraphsOrLeague().

◆ GRMN_PERFORMANCE_HISTORY_GRAPH

const int GRMN_PERFORMANCE_HISTORY_GRAPH = -4
static

Show performance history graph.

Definition at line 665 of file toolbar_gui.cpp.

Referenced by MenuClickGraphsOrLeague().

◆ LTMN_HIGHSCORE

const int LTMN_HIGHSCORE = -9
static

Show highscrore table.

Definition at line 670 of file toolbar_gui.cpp.

Referenced by MenuClickGraphsOrLeague().

◆ LTMN_PERFORMANCE_LEAGUE

const int LTMN_PERFORMANCE_LEAGUE = -7
static

Show default league table.

Definition at line 668 of file toolbar_gui.cpp.

Referenced by MenuClickGraphsOrLeague().

◆ LTMN_PERFORMANCE_RATING

const int LTMN_PERFORMANCE_RATING = -8
static

Show detailed performance rating.

Definition at line 669 of file toolbar_gui.cpp.

Referenced by MenuClickGraphsOrLeague().