summaryrefslogtreecommitdiff
path: root/station_gui.c
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-09-23 02:39:24 +0000
committerbelugas <belugas@openttd.org>2006-09-23 02:39:24 +0000
commit98ba395277708f1e1fbddacee1f909fac366e96c (patch)
tree94c5771fcfbd839db8eabe8b14662d04e44ab61c /station_gui.c
parente20c8be1722ab9d1aa23b3b8bfb8207628f8322e (diff)
downloadopenttd-98ba395277708f1e1fbddacee1f909fac366e96c.tar.xz
(svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct
Diffstat (limited to 'station_gui.c')
-rw-r--r--station_gui.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/station_gui.c b/station_gui.c
index 2b2fad1e0..a7d9b1143 100644
--- a/station_gui.c
+++ b/station_gui.c
@@ -327,11 +327,11 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
}
} break;
case WE_CLICK: {
- switch (e->click.widget) {
+ switch (e->we.click.widget) {
case 3: {
const Station* st;
- uint32 id_v = (e->click.pt.y - 41) / 10;
+ uint32 id_v = (e->we.click.pt.y - 41) / 10;
if (id_v >= w->vscroll.cap) return; // click out of bounds
@@ -351,10 +351,10 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
case 9: /* airport */
case 10: /* dock */
if (_ctrl_pressed) {
- TOGGLEBIT(facilities, e->click.widget - 6);
+ TOGGLEBIT(facilities, e->we.click.widget - 6);
} else {
facilities = 0;
- SETBIT(facilities, e->click.widget - 6);
+ SETBIT(facilities, e->we.click.widget - 6);
}
sl->flags |= SL_REBUILD;
SetWindowDirty(w);
@@ -378,12 +378,12 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
ShowDropDownMenu(w, _station_sort_listing, sl->sort_type, 30, 0, 0);
break;
default:
- if (e->click.widget >= 12 && e->click.widget <= 24) { //change cargo_filter
+ if (e->we.click.widget >= 12 && e->we.click.widget <= 24) { //change cargo_filter
if (_ctrl_pressed) {
- TOGGLEBIT(cargo_filter, e->click.widget - 12);
+ TOGGLEBIT(cargo_filter, e->we.click.widget - 12);
} else {
cargo_filter = 0;
- SETBIT(cargo_filter, e->click.widget - 12);
+ SETBIT(cargo_filter, e->we.click.widget - 12);
}
sl->flags |= SL_REBUILD;
SetWindowDirty(w);
@@ -391,9 +391,9 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
}
} break;
case WE_DROPDOWN_SELECT: /* we have selected a dropdown item in the list */
- if (sl->sort_type != e->dropdown.index) {
+ if (sl->sort_type != e->we.dropdown.index) {
// value has changed -> resort
- sl->sort_type = e->dropdown.index;
+ sl->sort_type = e->we.dropdown.index;
sl->flags |= SL_RESORT;
}
SetWindowDirty(w);
@@ -416,7 +416,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
break;
case WE_RESIZE:
- w->vscroll.cap += e->sizing.diff.y / 10;
+ w->vscroll.cap += e->we.sizing.diff.y / 10;
break;
}
}
@@ -652,7 +652,7 @@ static void StationViewWndProc(Window *w, WindowEvent *e)
break;
case WE_CLICK:
- switch (e->click.widget) {
+ switch (e->we.click.widget) {
case 7:
ScrollMainWindowToTile(GetStation(w->window_number)->xy);
break;
@@ -708,8 +708,8 @@ static void StationViewWndProc(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, w->window_number, 0, NULL,
CMD_RENAME_STATION | CMD_MSG(STR_3031_CAN_T_RENAME_STATION));
}