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 "vehicle_gui.h"
#include "rail_gui.h"
#include "road_gui.h"
#include "date_func.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 "tilehighlight_func.h"
#include "smallmap_gui.h"
#include "graph_gui.h"
#include "textbuf_gui.h"
#include "linkgraph_gui.h"
#include "newgrf_debug.h"
#include "hotkeys.h"
#include "engine_base.h"
#include "highscore.h"
#include "widgets/toolbar_widget.h"
#include "network/network.h"
#include "network/network_gui.h"
#include "network/network_func.h"
Go to the source code of this file.
Data Structures | |
class | DropDownListCheckedItem |
Drop down list entry for showing a checked/unchecked toggle item. More... | |
class | DropDownListCompanyItem |
Drop down list entry for showing a company entry, with companies 'blob'. 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 { TB_NORMAL, TB_UPPER, TB_LOWER } |
Toobar modes. | |
enum | CallBackFunction { CBF_NONE, CBF_PLACE_SIGN, CBF_PLACE_LANDINFO } |
Callback functions. More... | |
enum | OptionMenuEntries { OME_GAMEOPTIONS, OME_SETTINGS, OME_SCRIPT_SETTINGS, OME_NEWGRFSETTINGS, OME_TRANSPARENCIES, OME_SHOW_TOWNNAMES, OME_SHOW_STATIONNAMES, 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. | |
enum | SaveLoadEditorMenuEntries { SLEME_SAVE_SCENARIO = 0, SLEME_LOAD_SCENARIO, SLEME_SAVE_HEIGHTMAP, SLEME_LOAD_HEIGHTMAP, SLEME_EXIT_TOINTRO, SLEME_EXIT_GAME = 6, SLEME_MENUCOUNT } |
SaveLoad entries in scenario editor mode. | |
enum | SaveLoadNormalMenuEntries { SLNME_SAVE_GAME = 0, SLNME_LOAD_GAME, SLNME_EXIT_TOINTRO, SLNME_EXIT_GAME = 4, SLNME_MENUCOUNT } |
SaveLoad entries in normal game mode. | |
enum | MapMenuEntries { MME_SHOW_SMALLMAP = 0, MME_SHOW_EXTRAVIEWPORTS, MME_SHOW_LINKGRAPH, MME_SHOW_SIGNLISTS, MME_SHOW_TOWNDIRECTORY, MME_MENUCOUNT_NORMAL = 4, MME_MENUCOUNT_EDITOR = 5 } |
enum | MainToolbarHotkeys { MTHK_PAUSE, MTHK_FASTFORWARD, MTHK_SETTINGS, MTHK_SAVEGAME, MTHK_LOADGAME, MTHK_SMALLMAP, MTHK_TOWNDIRECTORY, MTHK_SUBSIDIES, MTHK_STATIONS, MTHK_FINANCES, MTHK_COMPANIES, MTHK_GRAPHS, MTHK_LEAGUE, MTHK_INDUSTRIES, MTHK_TRAIN_LIST, MTHK_ROADVEH_LIST, MTHK_SHIP_LIST, MTHK_AIRCRAFT_LIST, MTHK_ZOOM_IN, MTHK_ZOOM_OUT, MTHK_BUILD_RAIL, MTHK_BUILD_ROAD, MTHK_BUILD_DOCKS, MTHK_BUILD_AIRPORT, MTHK_BUILD_TREES, MTHK_MUSIC, MTHK_AI_DEBUG, MTHK_SMALL_SCREENSHOT, MTHK_ZOOMEDIN_SCREENSHOT, MTHK_DEFAULTZOOM_SCREENSHOT, MTHK_GIANT_SCREENSHOT, MTHK_CHEATS, MTHK_TERRAFORM, MTHK_EXTRA_VIEWPORT, MTHK_CLIENT_LIST, MTHK_SIGN_LIST } |
enum | MainToolbarEditorHotkeys { MTEHK_PAUSE, MTEHK_FASTFORWARD, MTEHK_SETTINGS, MTEHK_SAVEGAME, MTEHK_GENLAND, MTEHK_GENTOWN, MTEHK_GENINDUSTRY, MTEHK_BUILD_ROAD, 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 void | PopupMainToolbMenu (Window *w, int widget, StringID string, int count) |
Pop up a generic text only menu. | |
static void | PopupMainCompanyToolbMenu (Window *w, int widget, int grey=0) |
Pop up a generic company list menu. | |
static CallBackFunction | SelectSignTool () |
static CallBackFunction | ToolbarPauseClick (Window *w) |
static CallBackFunction | ToolbarFastForwardClick (Window *w) |
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 index) |
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 | ToolbarGraphsClick (Window *w) |
static CallBackFunction | MenuClickGraphs (int index) |
Handle click on the entry in the Graphs menu. | |
static CallBackFunction | ToolbarLeagueClick (Window *w) |
static CallBackFunction | MenuClickLeague (int index) |
Handle click on the entry in the CompanyLeague menu. | |
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 | ToolbarBuildWaterClick (Window *w) |
static CallBackFunction | MenuClickBuildWater (int index) |
Handle click on the entry in the Build Waterways menu. | |
static CallBackFunction | ToolbarBuildAirClick (Window *w) |
static CallBackFunction | MenuClickBuildAir (int index) |
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 index) |
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) |
static void | MenuClickSmallScreenshot () |
static void | ScreenshotConfirmCallback (Window *w, bool confirmed) |
Callback on the confirmation window for huge screenshots. | |
static void | MenuClickLargeWorldScreenshot (ScreenshotType t) |
Make a screenshot of the world. | |
void | ToggleBoundingBoxes () |
Toggle drawing of sprites' bounding boxes. | |
void | ToggleDirtyBlocks () |
Toggle drawing of the dirty blocks. | |
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 | ToolbarScenGenTown (Window *w) |
static CallBackFunction | ToolbarScenGenIndustry (Window *w) |
static CallBackFunction | ToolbarScenBuildRoad (Window *w) |
static CallBackFunction | ToolbarScenBuildDocks (Window *w) |
static CallBackFunction | ToolbarScenPlantTrees (Window *w) |
static CallBackFunction | ToolbarScenPlaceSign (Window *w) |
static CallBackFunction | ToolbarBtn_NULL (Window *w) |
static NWidgetBase * | MakeMainToolbar (int *biggest_index) |
static NWidgetBase * | MakeScenarioToolbar (int *biggest_index) |
void | AllocateToolbar () |
Allocate the toolbar. | |
Variables | |
RailType | _last_built_railtype |
RoadType | _last_built_roadtype |
static ScreenshotType | _confirmed_screenshot_type |
Screenshot type the current query is about to confirm. | |
static const int | CTMN_CLIENT_LIST = -1 |
Enum for the Company Toolbar's network related buttons. | |
static const int | CTMN_NEW_COMPANY = -2 |
Create a new company. | |
static const int | CTMN_SPECTATE = -3 |
Become spectator. | |
static ToolbarMode | _toolbar_mode |
static MenuClickedProc *const | _menu_clicked_procs [] |
int16 * | _preferred_toolbar_size = NULL |
Pointer to the default size for the main toolbar. | |
static ToolbarButtonProc *const | _toolbar_button_procs [] |
const uint16 | _maintoolbar_pause_keys [] = {WKC_F1, WKC_PAUSE, 0} |
const uint16 | _maintoolbar_zoomin_keys [] = {WKC_NUM_PLUS, WKC_EQUALS, WKC_SHIFT | WKC_EQUALS, WKC_SHIFT | WKC_F5, 0} |
const uint16 | _maintoolbar_zoomout_keys [] = {WKC_NUM_MINUS, WKC_MINUS, WKC_SHIFT | WKC_MINUS, WKC_SHIFT | WKC_F6, 0} |
const uint16 | _maintoolbar_smallmap_keys [] = {WKC_F4, 'M', 0} |
Hotkey< MainToolbarWindow > * | _maintoolbar_hotkeys = MainToolbarWindow::maintoolbar_hotkeys |
static const NWidgetPart | _nested_toolbar_normal_widgets [] |
static WindowDesc | _toolb_normal_desc (WDP_MANUAL, 640, 22, WC_MAIN_TOOLBAR, WC_NONE, WDF_NO_FOCUS, _nested_toolbar_normal_widgets, lengthof(_nested_toolbar_normal_widgets)) |
static ToolbarButtonProc *const | _scen_toolbar_button_procs [] |
Hotkey < ScenarioEditorToolbarWindow > * | _scenedit_maintoolbar_hotkeys = ScenarioEditorToolbarWindow::scenedit_maintoolbar_hotkeys |
static const NWidgetPart | _nested_toolb_scen_inner_widgets [] |
static const NWidgetPart | _nested_toolb_scen_widgets [] |
static WindowDesc | _toolb_scen_desc (WDP_MANUAL, 640, 22, WC_MAIN_TOOLBAR, WC_NONE, WDF_NO_FOCUS, _nested_toolb_scen_widgets, lengthof(_nested_toolb_scen_widgets)) |
Code related to the (main) toolbar.
Definition in file toolbar_gui.cpp.
enum CallBackFunction |
Callback functions.
Definition at line 67 of file toolbar_gui.cpp.
enum MapMenuEntries |
Definition at line 410 of file toolbar_gui.cpp.
void AllocateToolbar | ( | ) |
Allocate the toolbar.
Definition at line 2108 of file toolbar_gui.cpp.
References WindowDesc::default_width.
Referenced by ShowVitalWindows().
static NWidgetBase* MakeMainToolbar | ( | int * | biggest_index | ) | [static] |
Sprites to use for the different toolbar buttons
Definition at line 1741 of file toolbar_gui.cpp.
References NWidgetContainer::Add(), WID_TN_SAVE, WWT_IMGBTN, and WWT_IMGBTN_2.
static CallBackFunction MenuClickBuildAir | ( | int | index | ) | [static] |
Handle click on the entry in the Build Air menu.
index | Unused. |
Definition at line 870 of file toolbar_gui.cpp.
References ShowBuildAirToolbar().
static CallBackFunction MenuClickBuildRail | ( | int | index | ) | [static] |
Handle click on the entry in the Build Rail menu.
index | RailType to show the build toolbar for. |
Definition at line 792 of file toolbar_gui.cpp.
References ShowBuildRailToolbar().
static CallBackFunction MenuClickBuildRoad | ( | int | index | ) | [static] |
Handle click on the entry in the Build Road menu.
index | RoadType to show the build toolbar for. |
Definition at line 829 of file toolbar_gui.cpp.
References ShowBuildRoadToolbar().
static CallBackFunction MenuClickBuildWater | ( | int | index | ) | [static] |
Handle click on the entry in the Build Waterways menu.
index | Unused. |
Definition at line 850 of file toolbar_gui.cpp.
References ShowBuildDocksToolbar().
static CallBackFunction MenuClickCompany | ( | int | index | ) | [static] |
Handle click on the entry in the Company menu.
index | Menu entry to handle. |
Definition at line 552 of file toolbar_gui.cpp.
References _local_company, _network_own_client_id, _network_server, _networking, CLIENT_ID_SERVER, CMD_COMPANY_CTRL, COMPANY_SPECTATOR, CTMN_CLIENT_LIST, CTMN_NEW_COMPANY, CTMN_SPECTATE, DoCommandP(), MarkWholeScreenDirty(), NetworkClientRequestMove(), NetworkSendCommand(), NetworkServerDoMove(), and ShowCompany().
static CallBackFunction MenuClickFinances | ( | int | index | ) | [static] |
Handle click on the entry in the finances overview menu.
index | CompanyID to show finances for. |
Definition at line 532 of file toolbar_gui.cpp.
References ShowCompanyFinances().
static CallBackFunction MenuClickForest | ( | int | index | ) | [static] |
Handle click on the entry in the landscaping menu.
index | Menu entry clicked. |
Definition at line 890 of file toolbar_gui.cpp.
References ShowTerraformToolbar().
static CallBackFunction MenuClickGraphs | ( | int | index | ) | [static] |
Handle click on the entry in the Graphs menu.
index | Graph to show. |
Definition at line 598 of file toolbar_gui.cpp.
static CallBackFunction MenuClickHelp | ( | int | index | ) | [static] |
Choose the proper callback function for the main toolbar's help menu.
index | The menu index which was selected. |
Definition at line 1037 of file toolbar_gui.cpp.
References IConsoleSwitch(), MenuClickLargeWorldScreenshot(), SC_DEFAULTZOOM, SC_WORLD, SC_ZOOMEDIN, ShowAIDebugWindow(), ShowSpriteAlignerWindow(), ToggleBoundingBoxes(), and ToggleDirtyBlocks().
static CallBackFunction MenuClickIndustry | ( | int | index | ) | [static] |
Handle click on the entry in the Industry menu.
index | Menu entry number. |
Definition at line 653 of file toolbar_gui.cpp.
References ShowIndustryCargoesWindow().
static void MenuClickLargeWorldScreenshot | ( | ScreenshotType | t | ) | [static] |
Make a screenshot of the world.
Ask for confirmation if the screenshot will be huge.
t | Screenshot type: World or viewport screenshot |
Definition at line 982 of file toolbar_gui.cpp.
References _confirmed_screenshot_type, ViewPort::height, MakeScreenshot(), ScreenshotConfirmCallback(), SetDParam(), SetupScreenshotViewport(), ShowQuery(), and ViewPort::width.
Referenced by MenuClickHelp(), ScenarioEditorToolbarWindow::OnKeyPress(), and MainToolbarWindow::OnKeyPress().
static CallBackFunction MenuClickLeague | ( | int | index | ) | [static] |
Handle click on the entry in the CompanyLeague menu.
index | Menu entry number. |
Definition at line 628 of file toolbar_gui.cpp.
References ShowHighscoreTable().
static CallBackFunction MenuClickMap | ( | int | index | ) | [static] |
Handle click on one of the entries in the Map menu.
index | Index being clicked. |
Definition at line 438 of file toolbar_gui.cpp.
References MME_SHOW_TOWNDIRECTORY, ShowExtraViewPortWindow(), ShowLinkGraphLegend(), ShowSignList(), and ShowSmallMap().
static CallBackFunction MenuClickMusicWindow | ( | int | index | ) | [static] |
Handle click on the entry in the Music menu.
index | Unused. |
Definition at line 914 of file toolbar_gui.cpp.
static CallBackFunction MenuClickNewspaper | ( | int | index | ) | [static] |
Handle click on the entry in the Newspaper menu.
index | Menu entry clicked. |
Definition at line 934 of file toolbar_gui.cpp.
References ShowLastNewsMessage(), and ShowMessageHistory().
static CallBackFunction MenuClickSaveLoad | ( | int | index = 0 |
) | [static] |
Handle click on one of the entries in the SaveLoad menu.
index | Index being clicked. |
Definition at line 386 of file toolbar_gui.cpp.
References ShowSaveLoadDialog(), SLD_LOAD_GAME, SLD_LOAD_HEIGHTMAP, SLD_LOAD_SCENARIO, SLD_SAVE_GAME, SLD_SAVE_HEIGHTMAP, and SLD_SAVE_SCENARIO.
Referenced by ScenarioEditorToolbarWindow::OnKeyPress(), and MainToolbarWindow::OnKeyPress().
static CallBackFunction MenuClickSettings | ( | int | index | ) | [static] |
Handle click on one of the entries in the Options button menu.
index | Index being clicked. |
Definition at line 306 of file toolbar_gui.cpp.
References _display_opt, _grfconfig, _networking, _settings_client, 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, ClientSettings::gui, InvalidateWindowClassesData(), MarkWholeScreenDirty(), ShowAIConfigWindow(), ShowGameOptions(), ShowGameSettings(), ShowNewGRFSettings(), ShowTransparencyToolbar(), TO_HOUSES, TO_SIGNS, ToggleBit(), ToggleTransparency(), GUISettings::UserIsAllowedToChangeNewGRFs(), and WC_SIGN_LIST.
static CallBackFunction MenuClickShowAir | ( | int | index | ) | [static] |
Handle click on the entry in the Aircraft menu.
index | CompanyID to show aircraft list for. |
Definition at line 749 of file toolbar_gui.cpp.
References VEH_AIRCRAFT.
static CallBackFunction MenuClickShowRoad | ( | int | index | ) | [static] |
Handle click on the entry in the Road Vehicles menu.
index | CompanyID to show road vehicles list for. |
Definition at line 709 of file toolbar_gui.cpp.
References VEH_ROAD.
static CallBackFunction MenuClickShowShips | ( | int | index | ) | [static] |
Handle click on the entry in the Ships menu.
index | CompanyID to show ship list for. |
Definition at line 729 of file toolbar_gui.cpp.
References VEH_SHIP.
static CallBackFunction MenuClickShowTrains | ( | int | index | ) | [static] |
Handle click on the entry in the Train menu.
index | CompanyID to show train list for. |
Definition at line 689 of file toolbar_gui.cpp.
References VEH_TRAIN.
static CallBackFunction MenuClickStations | ( | int | index | ) | [static] |
Handle click on the entry in the Stations menu.
index | CompanyID to show station list for |
Definition at line 512 of file toolbar_gui.cpp.
References ShowCompanyStations().
static CallBackFunction MenuClickSubsidies | ( | int | index | ) | [static] |
Handle click on the entry in the Subsidies menu.
index | Unused. |
Definition at line 489 of file toolbar_gui.cpp.
static CallBackFunction MenuClickTown | ( | int | index | ) | [static] |
Handle click on one of the entries in the Town menu.
index | Index being clicked. |
Definition at line 464 of file toolbar_gui.cpp.
References _settings_game, GameSettings::economy, EconomySettings::found_town, and TF_FORBIDDEN.
static void ScreenshotConfirmCallback | ( | Window * | w, | |
bool | confirmed | |||
) | [static] |
Callback on the confirmation window for huge screenshots.
w | Window with viewport | |
confirmed | true on confirmation |
Definition at line 972 of file toolbar_gui.cpp.
References _confirmed_screenshot_type, and MakeScreenshot().
Referenced by MenuClickLargeWorldScreenshot().
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 1005 of file toolbar_gui.cpp.
References _settings_client, ClientSettings::gui, MarkWholeScreenDirty(), and GUISettings::newgrf_developer_tools.
Referenced by MenuClickHelp(), and MainWindow::OnKeyPress().
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 1022 of file toolbar_gui.cpp.
References _settings_client, ClientSettings::gui, MarkWholeScreenDirty(), and GUISettings::newgrf_developer_tools.
Referenced by MenuClickHelp(), and MainWindow::OnKeyPress().
static CallBackFunction ToolbarFastForwardClick | ( | Window * | w | ) | [static] |
Toggle fast forward mode.
w | Unused. |
Definition at line 240 of file toolbar_gui.cpp.
References _settings_client, SoundSettings::click_beep, and ClientSettings::sound.
Referenced by ScenarioEditorToolbarWindow::OnKeyPress(), and MainToolbarWindow::OnKeyPress().
static CallBackFunction ToolbarOptionsClick | ( | Window * | w | ) | [static] |
Handle click on Options button in toolbar.
w | parent window the shown Drop down list is attached to. |
Definition at line 273 of file toolbar_gui.cpp.
References _display_opt, _network_server, _networking, _settings_client, SoundSettings::click_beep, 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, HasBit(), IsTransparencySet(), ShowDropDownList(), ClientSettings::sound, TO_HOUSES, TO_SIGNS, and WID_TN_SETTINGS.
static CallBackFunction ToolbarSaveClick | ( | Window * | w | ) | [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 362 of file toolbar_gui.cpp.
References PopupMainToolbMenu(), and WID_TN_SAVE.
static CallBackFunction ToolbarScenSaveOrLoad | ( | Window * | w | ) | [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 374 of file toolbar_gui.cpp.
References PopupMainToolbMenu(), and WID_TE_SAVE.
MenuClickedProc* const _menu_clicked_procs[] [static] |
{ NULL, NULL, MenuClickSettings, MenuClickSaveLoad, MenuClickMap, MenuClickTown, MenuClickSubsidies, MenuClickStations, MenuClickFinances, MenuClickCompany, MenuClickGraphs, MenuClickLeague, MenuClickIndustry, MenuClickShowTrains, MenuClickShowRoad, MenuClickShowShips, MenuClickShowAir, MenuClickMap, NULL, MenuClickBuildRail, MenuClickBuildRoad, MenuClickBuildWater, MenuClickBuildAir, MenuClickForest, MenuClickMusicWindow, MenuClickNewspaper, MenuClickHelp, }
Definition at line 1176 of file toolbar_gui.cpp.
const NWidgetPart _nested_toolb_scen_widgets[] [static] |
{ NWidgetFunction(MakeScenarioToolbar), }
Definition at line 2096 of file toolbar_gui.cpp.
const NWidgetPart _nested_toolbar_normal_widgets[] [static] |
Definition at line 1787 of file toolbar_gui.cpp.
ToolbarButtonProc* const _scen_toolbar_button_procs[] [static] |
{ ToolbarPauseClick, ToolbarFastForwardClick, ToolbarOptionsClick, ToolbarScenSaveOrLoad, ToolbarBtn_NULL, ToolbarScenDatePanel, ToolbarScenDateBackward, ToolbarScenDateForward, ToolbarScenMapTownDir, ToolbarZoomInClick, ToolbarZoomOutClick, ToolbarScenGenLand, ToolbarScenGenTown, ToolbarScenGenIndustry, ToolbarScenBuildRoad, ToolbarScenBuildDocks, ToolbarScenPlantTrees, ToolbarScenPlaceSign, ToolbarBtn_NULL, NULL, NULL, NULL, NULL, NULL, ToolbarMusicClick, NULL, ToolbarHelpClick, ToolbarSwitchClick, }
Definition at line 1801 of file toolbar_gui.cpp.
ToolbarButtonProc* const _toolbar_button_procs[] [static] |
{ ToolbarPauseClick, ToolbarFastForwardClick, ToolbarOptionsClick, ToolbarSaveClick, ToolbarMapClick, ToolbarTownClick, ToolbarSubsidiesClick, ToolbarStationsClick, ToolbarFinancesClick, ToolbarCompaniesClick, ToolbarGraphsClick, ToolbarLeagueClick, ToolbarIndustryClick, ToolbarTrainClick, ToolbarRoadClick, ToolbarShipClick, ToolbarAirClick, ToolbarZoomInClick, ToolbarZoomOutClick, ToolbarBuildRailClick, ToolbarBuildRoadClick, ToolbarBuildWaterClick, ToolbarBuildAirClick, ToolbarForestClick, ToolbarMusicClick, ToolbarNewspaperClick, ToolbarHelpClick, ToolbarSwitchClick, }
Definition at line 1481 of file toolbar_gui.cpp.
const int CTMN_CLIENT_LIST = -1 [static] |
Enum for the Company Toolbar's network related buttons.
Show the client list
Definition at line 175 of file toolbar_gui.cpp.
Referenced by MenuClickCompany(), and PopupMainCompanyToolbMenu().