2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
#ifndef GUI_H
|
|
|
|
#define GUI_H
|
|
|
|
|
2005-09-27 18:51:04 +00:00
|
|
|
#include "station.h"
|
2004-09-07 19:34:55 +00:00
|
|
|
#include "window.h"
|
2006-08-19 09:31:22 +00:00
|
|
|
#include "string.h"
|
2004-09-07 19:34:55 +00:00
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
/* main_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void SetupColorsAndInitialWindow(void);
|
2005-06-24 12:38:35 +00:00
|
|
|
void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
|
|
|
void CcBuildCanal(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
|
|
|
void CcTerraform(bool success, TileIndex 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);
|
2006-08-02 18:36:53 +00:00
|
|
|
void DrawArrowButtons(int x, int y, int ctab, byte state, bool clickable_left, bool clickable_right);
|
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 */
|
2005-10-16 09:13:04 +00:00
|
|
|
void ShowBuildRailToolbar(RailType railtype, int button);
|
2005-06-24 12:38:35 +00:00
|
|
|
void PlaceProc_BuyLand(TileIndex tile);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* train_gui.c */
|
2005-09-27 18:51:04 +00:00
|
|
|
void ShowPlayerTrains(PlayerID player, StationID station);
|
2005-10-28 20:04:54 +00:00
|
|
|
void ShowTrainViewWindow(const Vehicle *v);
|
2006-07-26 03:33:12 +00:00
|
|
|
void ShowOrdersWindow(const Vehicle *v);
|
2006-08-26 22:28:40 +00:00
|
|
|
void ShowVehWithSharedOrdersTrains(Vehicle *v);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* road_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildRoadToolbar(void);
|
|
|
|
void ShowBuildRoadScenToolbar(void);
|
2005-09-27 18:51:04 +00:00
|
|
|
void ShowPlayerRoadVehicles(PlayerID player, StationID station);
|
2006-08-26 22:28:40 +00:00
|
|
|
void ShowVehWithSharedOrdersRoadVehicles(Vehicle *v);
|
|
|
|
void ShowRoadVehViewWindow(const Vehicle *v);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* dock_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildDocksToolbar(void);
|
2005-09-27 18:51:04 +00:00
|
|
|
void ShowPlayerShips(PlayerID player, StationID station);
|
2006-08-26 22:28:40 +00:00
|
|
|
void ShowVehWithSharedOrdersShips(Vehicle *v);
|
2006-07-26 03:33:12 +00:00
|
|
|
void ShowShipViewWindow(const Vehicle *v);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* aircraft_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildAirToolbar(void);
|
2005-09-27 18:51:04 +00:00
|
|
|
void ShowPlayerAircraft(PlayerID player, StationID station);
|
2006-08-26 22:28:40 +00:00
|
|
|
void ShowVehWithSharedOrdersAircraft(Vehicle *v);
|
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);
|
|
|
|
|
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
- Load heightmaps (either BMP or PNG)
- Progress dialog while generating worlds (no longer a 'hanging' screen)
- New dialogs for NewGame, Create Scenario and Play Heightmap
- Easier to configure your landscape
- More things to configure (tree-placer, ..)
- Speedup of world generation
- New console command 'restart': restart the map EXACTLY as it was when you
first started it (needs a game made after or with this commit)
- New console command 'getseed': get the seed of your map and share it with
others (of course only works with generated maps)
- Many new, world generation related, things
- Many internal cleanups and rewrites
Many tnx to those people who helped making this:
Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
Many tnx to those who helped testing:
Arnau, Bjarni, and tokai (alfabetic)
And to all other people who helped testing and sending comments / bugs
Stats: 673 lines changed, 3534 new lines, 79 new strings
2006-08-19 10:00:30 +00:00
|
|
|
/* tgp_gui.c */
|
|
|
|
void ShowGenerateLandscape(void);
|
|
|
|
void ShowHeightmapLoad(void);
|
|
|
|
|
2005-06-24 12:38:35 +00:00
|
|
|
void PlaceProc_DemolishArea(TileIndex tile);
|
|
|
|
void PlaceProc_LevelLand(TileIndex tile);
|
2006-09-23 02:39:24 +00:00
|
|
|
bool GUIPlaceProcDragXY(const WindowEvent *e);
|
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,
|
2005-11-07 16:19:45 +00:00
|
|
|
GUI_PlaceProc_ConvertRailArea = 4 << 4,
|
|
|
|
GUI_PlaceProc_RockyArea = 5 << 4,
|
(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
|
|
|
};
|
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);
|
2005-09-30 20:37:25 +00:00
|
|
|
void ShowPlayerStations(PlayerID player);
|
|
|
|
void ShowPlayerFinances(PlayerID player);
|
|
|
|
void ShowPlayerCompany(PlayerID 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);
|
2006-07-26 03:33:12 +00:00
|
|
|
void CheckRedrawStationCoverage(const Window *w);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
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);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2006-01-26 16:19:24 +00:00
|
|
|
void DrawEditBox(Window *w, querystr_d *string, int wid);
|
|
|
|
void HandleEditBox(Window *w, querystr_d *string, int wid);
|
2006-08-19 09:31:22 +00:00
|
|
|
int HandleEditBoxKey(Window *w, querystr_d *string, int wid, WindowEvent *we, CharSetFilter afilter);
|
2005-02-21 18:59:54 +00:00
|
|
|
bool HandleCaret(Textbuf *tb);
|
|
|
|
|
2005-05-30 16:03:21 +00:00
|
|
|
void DeleteTextBufferAll(Textbuf *tb);
|
2005-02-21 18:59:54 +00:00
|
|
|
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);
|
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);
|
|
|
|
|
2006-08-28 18:53:03 +00:00
|
|
|
/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */
|
2005-08-01 16:31:19 +00:00
|
|
|
extern const byte _fios_colors[];
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* network gui */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowNetworkGameWindow(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* bridge_gui.c */
|
|
|
|
void ShowBuildBridgeWindow(uint start, uint end, byte type);
|
|
|
|
|
|
|
|
enum {
|
2006-08-22 14:38:37 +00:00
|
|
|
ZOOM_IN = 0,
|
|
|
|
ZOOM_OUT = 1,
|
2004-08-09 17:04:08 +00:00
|
|
|
ZOOM_NONE = 2, // hack, used to update the button status
|
|
|
|
};
|
|
|
|
|
2006-07-26 03:33:12 +00:00
|
|
|
bool DoZoomInOutWindow(int how, Window *w);
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildIndustryWindow(void);
|
2006-08-19 09:31:22 +00:00
|
|
|
void ShowQueryString(StringID str, StringID caption, uint maxlen, uint maxwidth, WindowClass window_class, WindowNumber window_number, CharSetFilter afilter);
|
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
- Load heightmaps (either BMP or PNG)
- Progress dialog while generating worlds (no longer a 'hanging' screen)
- New dialogs for NewGame, Create Scenario and Play Heightmap
- Easier to configure your landscape
- More things to configure (tree-placer, ..)
- Speedup of world generation
- New console command 'restart': restart the map EXACTLY as it was when you
first started it (needs a game made after or with this commit)
- New console command 'getseed': get the seed of your map and share it with
others (of course only works with generated maps)
- Many new, world generation related, things
- Many internal cleanups and rewrites
Many tnx to those people who helped making this:
Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
Many tnx to those who helped testing:
Arnau, Bjarni, and tokai (alfabetic)
And to all other people who helped testing and sending comments / bugs
Stats: 673 lines changed, 3534 new lines, 79 new strings
2006-08-19 10:00:30 +00:00
|
|
|
void ShowQuery(StringID caption, StringID message, void (*ok_cancel_callback)(bool ok_clicked), 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 _station_show_coverage;
|
|
|
|
VARDEF PlaceProc *_place_proc;
|
|
|
|
|
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 */
|