diff options
author | belugas <belugas@openttd.org> | 2006-10-03 02:08:15 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2006-10-03 02:08:15 +0000 |
commit | cf210fdf6b68f3ae0fd45c063d9f292bdf62faac (patch) | |
tree | dc2a5593c6d3da96528beb914da8807aea2325e7 /station_gui.c | |
parent | bab116f6847f46360b0732f63a7e6f52c8287aff (diff) | |
download | openttd-cf210fdf6b68f3ae0fd45c063d9f292bdf62faac.tar.xz |
(svn r6619) -Codechange: Use accessors for disabled_state.
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
Diffstat (limited to 'station_gui.c')
-rw-r--r-- | station_gui.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/station_gui.c b/station_gui.c index 4c4dad665..c687e5b2e 100644 --- a/station_gui.c +++ b/station_gui.c @@ -541,13 +541,11 @@ static void DrawStationViewWindow(Window *w) } SetVScrollCount(w, num); - w->disabled_state = st->owner == _local_player ? 0 : (1 << 9); - - if (!(st->facilities & FACIL_TRAIN)) SETBIT(w->disabled_state, 10); - if (!(st->facilities & FACIL_TRUCK_STOP) && - !(st->facilities & FACIL_BUS_STOP)) SETBIT(w->disabled_state, 11); - if (!(st->facilities & FACIL_AIRPORT)) SETBIT(w->disabled_state, 12); - if (!(st->facilities & FACIL_DOCK)) SETBIT(w->disabled_state, 13); + SetWindowWidgetDisabledState(w, 9, st->owner != _local_player); + SetWindowWidgetDisabledState(w, 10, !(st->facilities & FACIL_TRAIN)); + SetWindowWidgetDisabledState(w, 11, !(st->facilities & FACIL_TRUCK_STOP) && !(st->facilities & FACIL_BUS_STOP)); + SetWindowWidgetDisabledState(w, 12, !(st->facilities & FACIL_AIRPORT)); + SetWindowWidgetDisabledState(w, 13, !(st->facilities & FACIL_DOCK)); SetDParam(0, st->index); SetDParam(1, st->facilities); |