2004-08-09 17:04:08 +00:00
|
|
|
#ifndef GUI_H
|
|
|
|
#define GUI_H
|
|
|
|
|
2004-09-07 19:34:55 +00:00
|
|
|
#include "window.h"
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
/* main_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void SetupColorsAndInitialWindow(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
void CcPlaySound10(bool success, uint tile, uint32 p1, uint32 p2);
|
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
2005-04-02 23:05:09 +00:00
|
|
|
void CcBuildCanal(bool success, uint tile, uint32 p1, uint32 p2);
|
|
|
|
void CcTerraform(bool success, uint tile, uint32 p1, uint32 p2);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* settings_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowGameOptions(void);
|
|
|
|
void ShowGameDifficulty(void);
|
|
|
|
void ShowPatchesSelection(void);
|
|
|
|
void ShowNewgrf(void);
|
|
|
|
void ShowCustCurrency(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* graph_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowOperatingProfitGraph(void);
|
|
|
|
void ShowIncomeGraph(void);
|
|
|
|
void ShowDeliveredCargoGraph(void);
|
|
|
|
void ShowPerformanceHistoryGraph(void);
|
|
|
|
void ShowCompanyValueGraph(void);
|
|
|
|
void ShowCargoPaymentRates(void);
|
|
|
|
void ShowCompanyLeagueTable(void);
|
|
|
|
void ShowPerformanceRatingDetail(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* news_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowLastNewsMessage(void);
|
|
|
|
void ShowMessageOptions(void);
|
|
|
|
void ShowMessageHistory(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* traintoolb_gui.c */
|
|
|
|
void ShowBuildRailToolbar(int index, int button);
|
|
|
|
void PlaceProc_BuyLand(uint tile);
|
|
|
|
|
|
|
|
/* train_gui.c */
|
2004-12-10 18:16:08 +00:00
|
|
|
void ShowPlayerTrains(int player, int station);
|
2004-08-09 17:04:08 +00:00
|
|
|
void ShowTrainViewWindow(Vehicle *v);
|
|
|
|
void ShowTrainDetailsWindow(Vehicle *v);
|
|
|
|
void ShowOrdersWindow(Vehicle *v);
|
|
|
|
|
|
|
|
void ShowRoadVehViewWindow(Vehicle *v);
|
|
|
|
|
|
|
|
/* road_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildRoadToolbar(void);
|
|
|
|
void ShowBuildRoadScenToolbar(void);
|
2004-12-10 18:16:08 +00:00
|
|
|
void ShowPlayerRoadVehicles(int player, int station);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* dock_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildDocksToolbar(void);
|
2004-12-10 18:16:08 +00:00
|
|
|
void ShowPlayerShips(int player, int station);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
void ShowShipViewWindow(Vehicle *v);
|
|
|
|
|
|
|
|
/* aircraft_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildAirToolbar(void);
|
2004-12-10 18:16:08 +00:00
|
|
|
void ShowPlayerAircraft(int player, int station);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* terraform_gui.c */
|
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
2005-04-02 23:05:09 +00:00
|
|
|
void ShowTerraformToolbar(void);
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
void PlaceProc_DemolishArea(uint tile);
|
|
|
|
void PlaceProc_LowerLand(uint tile);
|
|
|
|
void PlaceProc_RaiseLand(uint tile);
|
|
|
|
void PlaceProc_LevelLand(uint tile);
|
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
2005-04-02 23:05:09 +00:00
|
|
|
bool GUIPlaceProcDragXY(const WindowEvent *we);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
2005-04-02 23:05:09 +00:00
|
|
|
enum { // max 32 - 4 = 28 types
|
|
|
|
GUI_PlaceProc_DemolishArea = 0 << 4,
|
|
|
|
GUI_PlaceProc_LevelArea = 1 << 4,
|
|
|
|
GUI_PlaceProc_DesertArea = 2 << 4,
|
|
|
|
GUI_PlaceProc_WaterArea = 3 << 4,
|
|
|
|
GUI_PlaceProc_ConvertRailArea = 4 << 4
|
|
|
|
};
|
2005-02-22 14:52:20 +00:00
|
|
|
|
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
2005-04-02 23:05:09 +00:00
|
|
|
/* misc_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void PlaceLandBlockInfo(void);
|
|
|
|
void ShowAboutWindow(void);
|
|
|
|
void ShowBuildTreesToolbar(void);
|
|
|
|
void ShowBuildTreesScenToolbar(void);
|
|
|
|
void ShowTownDirectory(void);
|
|
|
|
void ShowIndustryDirectory(void);
|
|
|
|
void ShowSubsidiesList(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
void ShowPlayerStations(int player);
|
|
|
|
void ShowPlayerFinances(int player);
|
|
|
|
void ShowPlayerCompany(int player);
|
2005-03-26 21:22:29 +00:00
|
|
|
void ShowSignList(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
void ShowEstimatedCostOrIncome(int32 cost, int x, int y);
|
|
|
|
void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y);
|
|
|
|
|
2004-12-08 15:46:13 +00:00
|
|
|
void DrawStationCoverageAreaText(int sx, int sy, uint mask,int rad);
|
2004-08-09 17:04:08 +00:00
|
|
|
void CheckRedrawStationCoverage(Window *w);
|
|
|
|
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowSmallMap(void);
|
|
|
|
void ShowExtraViewPortWindow(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
void SetVScrollCount(Window *w, int num);
|
2005-01-02 17:23:04 +00:00
|
|
|
void SetVScroll2Count(Window *w, int num);
|
2004-08-09 17:04:08 +00:00
|
|
|
void SetHScrollCount(Window *w, int num);
|
|
|
|
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowCheatWindow(void);
|
|
|
|
void AskForNewGameToStart(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
void DrawEditBox(Window *w, int wid);
|
|
|
|
void HandleEditBox(Window *w, int wid);
|
2005-02-21 18:59:54 +00:00
|
|
|
int HandleEditBoxKey(Window *w, int wid, WindowEvent *we);
|
|
|
|
bool HandleCaret(Textbuf *tb);
|
|
|
|
|
|
|
|
bool DeleteTextBufferChar(Textbuf *tb, int delmode);
|
|
|
|
bool InsertTextBufferChar(Textbuf *tb, byte key);
|
|
|
|
bool InsertTextBufferClipboard(Textbuf *tb);
|
|
|
|
bool MoveTextBufferPos(Textbuf *tb, int navmode);
|
|
|
|
void UpdateTextBufferSize(Textbuf *tb);
|
|
|
|
/* IS_INT_INSIDE = filter for ascii-function codes like BELL and so on [we need an special filter here later] */
|
|
|
|
static inline bool IsValidAsciiChar(byte key) {return IS_INT_INSIDE(key, ' ', 256);}
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2005-01-22 20:23:18 +00:00
|
|
|
void BuildFileList(void);
|
2004-12-04 17:54:56 +00:00
|
|
|
void SetFiosType(const byte fiostype);
|
|
|
|
|
|
|
|
/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */
|
|
|
|
static const byte _fios_colors[] = {13, 9, 9, 6, 5, 6, 5};
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* network gui */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowNetworkGameWindow(void);
|
2004-12-14 16:53:38 +00:00
|
|
|
void ShowChatWindow(StringID str, StringID caption, int maxlen, int maxwidth, byte window_class, uint16 window_number);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* bridge_gui.c */
|
|
|
|
void ShowBuildBridgeWindow(uint start, uint end, byte type);
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ZOOM_IN = 0,
|
|
|
|
ZOOM_OUT = 1,
|
|
|
|
ZOOM_NONE = 2, // hack, used to update the button status
|
|
|
|
};
|
|
|
|
|
2004-09-03 19:59:05 +00:00
|
|
|
bool DoZoomInOutWindow(int how, Window * w);
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildIndustryWindow(void);
|
2005-02-19 14:40:32 +00:00
|
|
|
void ShowQueryString(StringID str, StringID caption, uint maxlen, uint maxwidth, WindowClass window_class, WindowNumber window_number);
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowMusicWindow(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* main_gui.c */
|
|
|
|
VARDEF byte _construct_mode;
|
|
|
|
VARDEF byte _station_show_coverage;
|
|
|
|
VARDEF PlaceProc *_place_proc;
|
|
|
|
VARDEF bool _no_button_sound;
|
|
|
|
|
2005-01-31 11:03:23 +00:00
|
|
|
/* vehicle_gui.c */
|
|
|
|
void InitializeGUI(void);
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
#endif /* GUI_H */
|