summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-12-02 14:29:48 +0000
committerrubidium <rubidium@openttd.org>2007-12-02 14:29:48 +0000
commit527b72749d5160eceb6e5999c0f329701b14ee47 (patch)
treee58f8a4999ff6c34bc01aae8c8c413ceee96650c /src/newgrf_gui.cpp
parent50fced3c66b6af28856e3776ca0e7a0799cb9827 (diff)
downloadopenttd-527b72749d5160eceb6e5999c0f329701b14ee47.tar.xz
(svn r11555) -Codechange: use the new members introduced in r11551.
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index d2ad51ceb..cc731e7c1 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -127,7 +127,7 @@ static void NewGRFAddDlgWndProc(Window *w, WindowEvent *e)
w->vscroll.cap = (w->widget[3].bottom - w->widget[3].top) / 10;
SetVScrollCount(w, n);
- SetWindowWidgetDisabledState(w, 6, WP(w, newgrf_add_d).sel == NULL || WP(w, newgrf_add_d).sel->IsOpenTTDBaseGRF());
+ w->SetWidgetDisabledState(6, WP(w, newgrf_add_d).sel == NULL || WP(w, newgrf_add_d).sel->IsOpenTTDBaseGRF());
DrawWindowWidgets(w);
GfxFillRect(w->widget[3].left + 1, w->widget[3].top + 1, w->widget[3].right, w->widget[3].bottom, 0xD7);
@@ -269,20 +269,20 @@ static void SetupNewGRFState(Window *w)
{
bool disable_all = WP(w, newgrf_d).sel == NULL || !WP(w, newgrf_d).editable;
- SetWindowWidgetDisabledState(w, 3, !WP(w, newgrf_d).editable);
- SetWindowWidgetsDisabledState(w, disable_all,
+ w->SetWidgetDisabledState(3, !WP(w, newgrf_d).editable);
+ w->SetWidgetsDisabledState(disable_all,
SNGRFS_REMOVE,
SNGRFS_MOVE_UP,
SNGRFS_MOVE_DOWN,
WIDGET_LIST_END
);
- SetWindowWidgetDisabledState(w, SNGRFS_SET_PARAMETERS, !WP(w, newgrf_d).show_params || disable_all);
+ w->SetWidgetDisabledState(SNGRFS_SET_PARAMETERS, !WP(w, newgrf_d).show_params || disable_all);
if (!disable_all) {
/* All widgets are now enabled, so disable widgets we can't use */
- if (WP(w, newgrf_d).sel == *WP(w, newgrf_d).list) DisableWindowWidget(w, SNGRFS_MOVE_UP);
- if (WP(w, newgrf_d).sel->next == NULL) DisableWindowWidget(w, SNGRFS_MOVE_DOWN);
- if (WP(w, newgrf_d).sel->IsOpenTTDBaseGRF()) DisableWindowWidget(w, SNGRFS_REMOVE);
+ if (WP(w, newgrf_d).sel == *WP(w, newgrf_d).list) w->DisableWidget(SNGRFS_MOVE_UP);
+ if (WP(w, newgrf_d).sel->next == NULL) w->DisableWidget(SNGRFS_MOVE_DOWN);
+ if (WP(w, newgrf_d).sel->IsOpenTTDBaseGRF()) w->DisableWidget(SNGRFS_REMOVE);
}
}
@@ -296,7 +296,7 @@ static void SetupNewGRFWindow(Window *w)
w->vscroll.cap = (w->widget[SNGRFS_FILE_LIST].bottom - w->widget[SNGRFS_FILE_LIST].top) / 14 + 1;
SetVScrollCount(w, i);
- SetWindowWidgetDisabledState(w, SNGRFS_APPLY_CHANGES, !WP(w, newgrf_d).editable);
+ w->SetWidgetDisabledState(SNGRFS_APPLY_CHANGES, !WP(w, newgrf_d).editable);
}