summaryrefslogtreecommitdiff
path: root/dock_gui.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-04-02 23:05:09 +0000
committerDarkvater <darkvater@openttd.org>2005-04-02 23:05:09 +0000
commitf35b59adedd9c2e3008fd57f4f73f0ebee08cbae (patch)
treea3c43533eb0b67e41d490acab241a6fb4eb30cf6 /dock_gui.c
parent3bfda758dbdca55ff9d0b628743caed5a61255a7 (diff)
downloadopenttd-f35b59adedd9c2e3008fd57f4f73f0ebee08cbae.tar.xz
(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
Diffstat (limited to 'dock_gui.c')
-rw-r--r--dock_gui.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dock_gui.c b/dock_gui.c
index ae7ee3b46..33de7e516 100644
--- a/dock_gui.c
+++ b/dock_gui.c
@@ -47,7 +47,7 @@ static void PlaceDocks_Buoy(uint tile)
static void PlaceDocks_DemolishArea(uint tile)
{
- VpStartPlaceSizing(tile, VPM_X_AND_Y);
+ VpStartPlaceSizing(tile, VPM_X_AND_Y | GUI_PlaceProc_DemolishArea);
}
static void PlaceDocks_BuildCanal(uint tile)
@@ -145,9 +145,9 @@ static void BuildDocksToolbWndProc(Window *w, WindowEvent *e)
case WE_PLACE_MOUSEUP:
if (e->click.pt.x != -1) {
- if (e->place.userdata == VPM_X_AND_Y)
- DoCommandP(e->place.tile, e->place.starttile, 0, CcPlaySound10, CMD_CLEAR_AREA | CMD_MSG(STR_00B5_CAN_T_CLEAR_THIS_AREA));
- else if(e->place.userdata == VPM_X_OR_Y)
+ if ((e->place.userdata & 0xF) == VPM_X_AND_Y) { // dragged actions
+ GUIPlaceProcDragXY(e);
+ } else if(e->place.userdata == VPM_X_OR_Y)
DoCommandP(e->place.tile, e->place.starttile, 0, CcBuildCanal, CMD_BUILD_CANAL | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_CANALS));
}
break;
@@ -182,8 +182,8 @@ static const Widget _build_docks_toolb_widgets[] = {
{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
{ WWT_CAPTION, RESIZE_NONE, 7, 11, 145, 0, 13, STR_9801_DOCK_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},
{ WWT_STICKYBOX, RESIZE_NONE, 7, 146, 157, 0, 13, 0x0, STR_STICKY_BUTTON},
-{ WWT_PANEL, RESIZE_NONE, 7, 0, 21, 14, 35, SPR_OPENTTD_BASE+65, STR_BUILD_CANALS_TIP},
-{ WWT_PANEL, RESIZE_NONE, 7, 22, 43, 14, 35, SPR_CANALS_BASE+69, STR_BUILD_LOCKS_TIP},
+{ WWT_PANEL, RESIZE_NONE, 7, 0, 21, 14, 35, SPR_IMG_BUILD_CANAL, STR_BUILD_CANALS_TIP},
+{ WWT_PANEL, RESIZE_NONE, 7, 22, 43, 14, 35, SPR_IMG_BUILD_LOCK, STR_BUILD_LOCKS_TIP},
{ WWT_PANEL, RESIZE_NONE, 7, 44, 47, 14, 35, 0x0, STR_NULL},