summaryrefslogtreecommitdiff
path: root/town_gui.c
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-10-03 02:08:15 +0000
committerbelugas <belugas@openttd.org>2006-10-03 02:08:15 +0000
commit753b5724001079c3352d23a911488044884dcf5b (patch)
treedc2a5593c6d3da96528beb914da8807aea2325e7 /town_gui.c
parente383584988a99dbdfbcd4a63b1f11213a4274355 (diff)
downloadopenttd-753b5724001079c3352d23a911488044884dcf5b.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 'town_gui.c')
-rw-r--r--town_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/town_gui.c b/town_gui.c
index f83b1c077..a523b2b06 100644
--- a/town_gui.c
+++ b/town_gui.c
@@ -106,7 +106,7 @@ static void TownAuthorityWndProc(Window *w, WindowEvent *e)
if (WP(w,def_d).data_1 != -1 && !HASBIT(buttons, WP(w,def_d).data_1))
WP(w,def_d).data_1 = -1;
- w->disabled_state = (WP(w,def_d).data_1 == -1) ? (1 << 6) : 0;
+ SetWindowWidgetDisabledState(w, 6, WP(w, def_d).data_1 == -1);
{
int y;
@@ -234,7 +234,7 @@ static void TownViewWndProc(Window *w, WindowEvent *e)
switch (e->event) {
case WE_PAINT:
// disable renaming town in network games if you are not the server
- if (_networking && !_network_server) SETBIT(w->disabled_state, 8);
+ SetWindowWidgetDisabledState(w, 8, _networking && !_network_server);
SetDParam(0, t->index);
DrawWindowWidgets(w);