summaryrefslogtreecommitdiff
path: root/ship_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'ship_gui.c')
-rw-r--r--ship_gui.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/ship_gui.c b/ship_gui.c
index 9b31190c2..3853200dd 100644
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -104,9 +104,9 @@ static void ShipRefitWndProc(Window *w, WindowEvent *e)
} break;
case WE_CLICK:
- switch (e->click.widget) {
+ switch (e->we.click.widget) {
case 2: { /* listbox */
- int y = e->click.pt.y - 25;
+ int y = e->we.click.pt.y - 25;
if (y >= 0) {
WP(w,refit_d).sel = y / 10;
SetWindowDirty(w);
@@ -234,7 +234,7 @@ static void ShipDetailsWndProc(Window *w, WindowEvent *e)
case WE_CLICK: {
int mod;
const Vehicle *v;
- switch (e->click.widget) {
+ switch (e->we.click.widget) {
case 2: /* rename */
v = GetVehicle(w->window_number);
SetDParam(0, v->unitnumber);
@@ -257,8 +257,8 @@ do_change_service_int:
} break;
case WE_ON_EDIT_TEXT:
- if (e->edittext.str[0] != '\0') {
- _cmd_text = e->edittext.str;
+ if (e->we.edittext.str[0] != '\0') {
+ _cmd_text = e->we.edittext.str;
DoCommandP(0, w->window_number, 0, NULL,
CMD_NAME_VEHICLE | CMD_MSG(STR_9832_CAN_T_NAME_SHIP));
}
@@ -363,9 +363,9 @@ static void NewShipWndProc(Window *w, WindowEvent *e)
}
case WE_CLICK:
- switch (e->click.widget) {
+ switch (e->we.click.widget) {
case 2: { /* listbox */
- uint i = (e->click.pt.y - 14) / 24;
+ uint i = (e->we.click.pt.y - 14) / 24;
if (i < w->vscroll.cap) {
WP(w,buildtrain_d).sel_index = i + w->vscroll.pos;
SetWindowDirty(w);
@@ -389,15 +389,15 @@ static void NewShipWndProc(Window *w, WindowEvent *e)
break;
case WE_ON_EDIT_TEXT:
- if (e->edittext.str[0] != '\0') {
- _cmd_text = e->edittext.str;
+ if (e->we.edittext.str[0] != '\0') {
+ _cmd_text = e->we.edittext.str;
DoCommandP(0, WP(w, buildtrain_d).rename_engine, 0, NULL,
CMD_RENAME_ENGINE | CMD_MSG(STR_9839_CAN_T_RENAME_SHIP_TYPE));
}
break;
case WE_RESIZE:
- w->vscroll.cap += e->sizing.diff.y / 24;
+ w->vscroll.cap += e->we.sizing.diff.y / 24;
w->widget[2].data = (w->vscroll.cap << 8) + 1;
break;
@@ -516,7 +516,7 @@ static void ShipViewWndProc(Window *w, WindowEvent *e)
case WE_CLICK: {
const Vehicle *v = GetVehicle(w->window_number);
- switch (e->click.widget) {
+ switch (e->we.click.widget) {
case 5: /* start stop */
DoCommandP(v->tile, v->index, 0, NULL, CMD_START_STOP_SHIP | CMD_MSG(STR_9818_CAN_T_STOP_START_SHIP));
break;
@@ -543,10 +543,10 @@ static void ShipViewWndProc(Window *w, WindowEvent *e)
} break;
case WE_RESIZE:
- w->viewport->width += e->sizing.diff.x;
- w->viewport->height += e->sizing.diff.y;
- w->viewport->virtual_width += e->sizing.diff.x;
- w->viewport->virtual_height += e->sizing.diff.y;
+ w->viewport->width += e->we.sizing.diff.x;
+ w->viewport->height += e->we.sizing.diff.y;
+ w->viewport->virtual_width += e->we.sizing.diff.x;
+ w->viewport->virtual_height += e->we.sizing.diff.y;
break;
case WE_DESTROY:
@@ -751,9 +751,9 @@ static void ShipDepotWndProc(Window *w, WindowEvent *e)
break;
case WE_CLICK:
- switch (e->click.widget) {
+ switch (e->we.click.widget) {
case 5:
- ShipDepotClick(w, e->click.pt.x, e->click.pt.y);
+ ShipDepotClick(w, e->we.click.pt.x, e->we.click.pt.y);
break;
case 7:
@@ -802,7 +802,7 @@ static void ShipDepotWndProc(Window *w, WindowEvent *e)
break;
case WE_DRAGDROP:
- switch (e->click.widget) {
+ switch (e->we.click.widget) {
case 5: {
Vehicle *v;
VehicleID sel = WP(w,traindepot_d).sel;
@@ -810,7 +810,7 @@ static void ShipDepotWndProc(Window *w, WindowEvent *e)
WP(w,traindepot_d).sel = INVALID_VEHICLE;
SetWindowDirty(w);
- if (GetVehicleFromShipDepotWndPt(w, e->dragdrop.pt.x, e->dragdrop.pt.y, &v) == 0 &&
+ if (GetVehicleFromShipDepotWndPt(w, e->we.dragdrop.pt.x, e->we.dragdrop.pt.y, &v) == 0 &&
v != NULL &&
sel == v->index) {
ShowShipViewWindow(v);
@@ -841,8 +841,8 @@ static void ShipDepotWndProc(Window *w, WindowEvent *e)
break;
case WE_RESIZE:
- w->vscroll.cap += e->sizing.diff.y / 24;
- w->hscroll.cap += e->sizing.diff.x / 90;
+ w->vscroll.cap += e->we.sizing.diff.y / 24;
+ w->hscroll.cap += e->we.sizing.diff.x / 90;
w->widget[5].data = (w->vscroll.cap << 8) + w->hscroll.cap;
break;
}