summaryrefslogtreecommitdiff
path: root/ship_gui.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-11 00:24:27 +0000
committerdarkvater <darkvater@openttd.org>2005-01-11 00:24:27 +0000
commit2d023f9c0b2fb33747505e8b135026d9e16c46eb (patch)
tree9cf6f972eeb8747ac28a93dd174c27b9117bde54 /ship_gui.c
parenta2a26db615e7e762a3ce16e723528191ede3ff87 (diff)
downloadopenttd-2d023f9c0b2fb33747505e8b135026d9e16c46eb.tar.xz
(svn r1478) -Fix: [1099195] mouse-wheel in train replace window. Scrollbar1 and Scrollbar2 now work independently. You can only scroll on list and scrollbar itself; scrollbar must be next widget of the list.
-Fix: updated the few gui's that didn't have the scrollbar right after the listbox.
Diffstat (limited to 'ship_gui.c')
-rw-r--r--ship_gui.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/ship_gui.c b/ship_gui.c
index 3495a1652..f7c54a10f 100644
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -755,7 +755,7 @@ static void ShipDepotWndProc(Window *w, WindowEvent *e) {
case WE_CLICK:
switch(e->click.widget) {
- case 3:
+ case 5:
ShipDepotClick(w, e->click.pt.x, e->click.pt.y);
break;
@@ -775,7 +775,7 @@ static void ShipDepotWndProc(Window *w, WindowEvent *e) {
case WE_DRAGDROP: {
switch(e->click.widget) {
- case 3: {
+ case 5: {
Vehicle *v;
VehicleID sel = WP(w,traindepot_d).sel;
@@ -789,12 +789,12 @@ static void ShipDepotWndProc(Window *w, WindowEvent *e) {
}
} break;
- case 5:
- if (!HASBIT(w->disabled_state, 5) &&
+ case 4:
+ if (!HASBIT(w->disabled_state, 4) &&
WP(w,traindepot_d).sel != INVALID_VEHICLE) {
Vehicle *v;
- HandleButtonClick(w, 5);
+ HandleButtonClick(w, 4);
v = GetVehicle(WP(w,traindepot_d).sel);
WP(w,traindepot_d).sel = INVALID_VEHICLE;
@@ -817,7 +817,7 @@ static void ShipDepotWndProc(Window *w, WindowEvent *e) {
case WE_RESIZE:
w->vscroll.cap += e->sizing.diff.y / 24;
w->hscroll.cap += e->sizing.diff.x / 90;
- w->widget[3].unkA = (w->vscroll.cap << 8) + w->hscroll.cap;
+ w->widget[5].unkA = (w->vscroll.cap << 8) + w->hscroll.cap;
break;
}
}
@@ -826,9 +826,10 @@ static const Widget _ship_depot_widgets[] = {
{ WWT_TEXTBTN, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
{ WWT_CAPTION, RESIZE_RIGHT, 14, 11, 292, 0, 13, STR_9803_SHIP_DEPOT, STR_018C_WINDOW_TITLE_DRAG_THIS},
{ WWT_STICKYBOX, RESIZE_LR, 14, 293, 304, 0, 13, 0x0, STR_STICKY_BUTTON},
-{ WWT_MATRIX, RESIZE_RB, 14, 0, 269, 14, 61, 0x203, STR_981F_SHIPS_CLICK_ON_SHIP_FOR},
-{ WWT_PANEL, RESIZE_LRB, 14, 270, 292, 14, 13, 0x0, STR_NULL},
+{ WWT_PANEL, RESIZE_LRB, 14, 270, 292, 14, 13, 0x0, STR_NULL},
{ WWT_IMGBTN, RESIZE_LRTB, 14, 270, 292, 14, 61, 0x2A9, STR_9821_DRAG_SHIP_TO_HERE_TO_SELL},
+
+{ WWT_MATRIX, RESIZE_RB, 14, 0, 269, 14, 61, 0x203, STR_981F_SHIPS_CLICK_ON_SHIP_FOR},
{ WWT_SCROLLBAR, RESIZE_LRB, 14, 293, 304, 14, 61, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST},
{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 146, 62, 73, STR_9804_NEW_SHIPS, STR_9820_BUILD_NEW_SHIP},
{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 147, 292, 62, 73, STR_00E4_LOCATION, STR_9822_CENTER_MAIN_VIEW_ON_SHIP},