mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r20931) -Document: Waterways toolbar click functions.
This commit is contained in:
parent
f9c53fc9bb
commit
0a8adab770
@ -111,46 +111,77 @@ enum DockToolbarWidgets {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle a click in the build canal widget.
|
||||||
|
* @param w #Window in which the widget was clicked.
|
||||||
|
*/
|
||||||
static void BuildDocksClick_Canal(Window *w)
|
static void BuildDocksClick_Canal(Window *w)
|
||||||
{
|
{
|
||||||
|
|
||||||
HandlePlacePushButton(w, DTW_CANAL, SPR_CURSOR_CANAL, HT_RECT, PlaceDocks_BuildCanal);
|
HandlePlacePushButton(w, DTW_CANAL, SPR_CURSOR_CANAL, HT_RECT, PlaceDocks_BuildCanal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle a click in the build lock widget.
|
||||||
|
* @param w #Window in which the widget was clicked.
|
||||||
|
*/
|
||||||
static void BuildDocksClick_Lock(Window *w)
|
static void BuildDocksClick_Lock(Window *w)
|
||||||
{
|
{
|
||||||
HandlePlacePushButton(w, DTW_LOCK, SPR_CURSOR_LOCK, HT_RECT, PlaceDocks_BuildLock);
|
HandlePlacePushButton(w, DTW_LOCK, SPR_CURSOR_LOCK, HT_RECT, PlaceDocks_BuildLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle a click in the demolish widget.
|
||||||
|
* @param w #Window in which the widget was clicked.
|
||||||
|
*/
|
||||||
static void BuildDocksClick_Demolish(Window *w)
|
static void BuildDocksClick_Demolish(Window *w)
|
||||||
{
|
{
|
||||||
HandlePlacePushButton(w, DTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT, PlaceProc_DemolishArea);
|
HandlePlacePushButton(w, DTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT, PlaceProc_DemolishArea);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle a click in the build ship depot widget.
|
||||||
|
* @param w #Window in which the widget was clicked.
|
||||||
|
*/
|
||||||
static void BuildDocksClick_Depot(Window *w)
|
static void BuildDocksClick_Depot(Window *w)
|
||||||
{
|
{
|
||||||
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
||||||
if (HandlePlacePushButton(w, DTW_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT, PlaceDocks_Depot)) ShowBuildDocksDepotPicker(w);
|
if (HandlePlacePushButton(w, DTW_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT, PlaceDocks_Depot)) ShowBuildDocksDepotPicker(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle a click in the build dock widget.
|
||||||
|
* @param w #Window in which the widget was clicked.
|
||||||
|
*/
|
||||||
static void BuildDocksClick_Dock(Window *w)
|
static void BuildDocksClick_Dock(Window *w)
|
||||||
{
|
{
|
||||||
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
||||||
if (HandlePlacePushButton(w, DTW_STATION, SPR_CURSOR_DOCK, HT_SPECIAL, PlaceDocks_Dock)) ShowBuildDockStationPicker(w);
|
if (HandlePlacePushButton(w, DTW_STATION, SPR_CURSOR_DOCK, HT_SPECIAL, PlaceDocks_Dock)) ShowBuildDockStationPicker(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle a click in the build buoy widget.
|
||||||
|
* @param w #Window in which the widget was clicked.
|
||||||
|
*/
|
||||||
static void BuildDocksClick_Buoy(Window *w)
|
static void BuildDocksClick_Buoy(Window *w)
|
||||||
{
|
{
|
||||||
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
||||||
HandlePlacePushButton(w, DTW_BUOY, SPR_CURSOR_BOUY, HT_RECT, PlaceDocks_Buoy);
|
HandlePlacePushButton(w, DTW_BUOY, SPR_CURSOR_BOUY, HT_RECT, PlaceDocks_Buoy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle a click in the create river widget.
|
||||||
|
* @param w #Window in which the widget was clicked.
|
||||||
|
*/
|
||||||
static void BuildDocksClick_River(Window *w)
|
static void BuildDocksClick_River(Window *w)
|
||||||
{
|
{
|
||||||
if (_game_mode != GM_EDITOR) return;
|
if (_game_mode != GM_EDITOR) return;
|
||||||
HandlePlacePushButton(w, DTW_RIVER, SPR_CURSOR_RIVER, HT_RECT, PlaceDocks_BuildRiver);
|
HandlePlacePushButton(w, DTW_RIVER, SPR_CURSOR_RIVER, HT_RECT, PlaceDocks_BuildRiver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle a click in the build aqueduct widget.
|
||||||
|
* @param w #Window in which the widget was clicked.
|
||||||
|
*/
|
||||||
static void BuildDocksClick_Aqueduct(Window *w)
|
static void BuildDocksClick_Aqueduct(Window *w)
|
||||||
{
|
{
|
||||||
HandlePlacePushButton(w, DTW_BUILD_AQUEDUCT, SPR_CURSOR_AQUEDUCT, HT_RECT, PlaceDocks_Aqueduct);
|
HandlePlacePushButton(w, DTW_BUILD_AQUEDUCT, SPR_CURSOR_AQUEDUCT, HT_RECT, PlaceDocks_Aqueduct);
|
||||||
|
Loading…
Reference in New Issue
Block a user