# gui.h File Reference

GUI functions that shouldn't be here. More...

`#include "window_type.h"`
`#include "vehicle_type.h"`
`#include "gfx_type.h"`
`#include "economy_type.h"`
`#include "tile_type.h"`
`#include "strings_type.h"`
`#include "transport_type.h"`

Go to the source code of this file.

## Functions
void | CcPlaySound10 (bool success, TileIndex tile, uint32 p1, uint32 p2)
void | CcBuildCanal (bool success, TileIndex tile, uint32 p1, uint32 p2)
void | HandleOnEditText (const char *str)
void | InitializeGUI ()
void | ShowGameOptions ()
void | ShowGameDifficulty ()
void | ShowGameSettings ()
void | DrawArrowButtons (int x, int y, Colours button_colour, byte state, bool clickable_left, bool clickable_right)
| Draw [<][>] boxes.
void | ShowOperatingProfitGraph ()
void | ShowIncomeGraph ()
void | ShowDeliveredCargoGraph ()
void | ShowPerformanceHistoryGraph ()
void | ShowCompanyValueGraph ()
void | ShowCargoPaymentRates ()
void | ShowCompanyLeagueTable ()
void | ShowPerformanceRatingDetail ()
void | ShowOrdersWindow (const Vehicle *v)
void | ShowBuildDocksToolbar ()
void | ShowBuildDocksScenToolbar ()
void | ShowBuildAirToolbar ()
void | ShowGenerateLandscape ()
void | ShowHeightmapLoad ()
void | PlaceLandBlockInfo ()
void | ShowAboutWindow ()
void | ShowBuildTreesToolbar ()
void | ShowTownDirectory ()
void | ShowIndustryDirectory ()
void | ShowSubsidiesList ()
void | ShowEstimatedCostOrIncome (Money cost, int x, int y)
void | ShowErrorMessage (StringID msg_1, StringID msg_2, int x, int y)
void | ShowSmallMap ()
void | ShowExtraViewPortWindow (TileIndex tile=INVALID_TILE)
void | BuildFileList ()
void | SetFiosType (const byte fiostype)
void | ShowBuildBridgeWindow (TileIndex start, TileIndex end, TransportType transport_type, byte bridge_type)
| Prepare the data for the build a bridge window.
void | ShowBuildIndustryWindow ()
void | ShowBuildTownWindow ()
void | ShowMusicWindow ()
## Variables
const TextColour | _fios_colours []

## Detailed Description

GUI functions that shouldn't be here.

Definition in file gui.h.

## Function Documentation

void DrawArrowButtons | ( | int | x,
|  | int | y,
|  | Colours | button_colour,
|  | byte | state,
|  | bool | clickable_left,
|  | bool | clickable_right |
| ) |  |  |

Draw [<][>] boxes.

Parameters:

  | x | the x position to draw
  | y | the y position to draw
  | button_colour | the colour of the button
  | state | 0 = none clicked, 1 = first clicked, 2 = second clicked
  | clickable_left | is the left button clickable?
  | clickable_right | is the right button clickable?

Definition at line 1451 of file settings_gui.cpp.

References _colour_gradient, DrawFrameRect(), DrawStringCentered(), FILLRECT_CHECKER, FR_LOWERED, and GfxFillRect().

Referenced by SettingEntry::DrawSetting(), AIConfigWindow::OnPaint(), and AISettingsWindow::OnPaint().

void ShowBuildBridgeWindow | ( | TileIndex | start,
|  | TileIndex | end,
|  | TransportType | transport_type,
|  | byte | road_rail_type |
| ) |  |  |

Prepare the data for the build a bridge window.

If we can't build a bridge under the given conditions show an error message.

start The start tile of the bridge

Parameters:

  | end | The end tile of the bridge
  | transport_type | The transport type
  | road_rail_type | The road/rail type

Definition at line 288 of file bridge_gui.cpp.

References _ctrl_pressed, _last_railbridge_type, _last_roadbridge_type, CalcBridgeLenCostFactor(), CcBuildBridge(), CMD_BUILD_BRIDGE, CMD_MSG, CmdFailed(), BuildBridgeData::cost, DC_AUTO, DC_QUERY_COST, DeleteWindowById(), DoCommand(), DoCommandP(), CommandCost::GetCost(), GetTunnelBridgeLength(), BuildBridgeData::index, INVALID_STRING_ID, BridgeSpec::price, BuildBridgeData::spec, TILE_SIZE, TileX(), TileY(), TRANSPORT_RAIL, and TRANSPORT_ROAD.

Referenced by BuildRailToolbarWindow::OnPlaceMouseUp().