diff options
author | belugas <belugas@openttd.org> | 2006-10-03 20:16:20 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2006-10-03 20:16:20 +0000 |
commit | 17eb65050b29b84e1a5b452d302c1a40931764cb (patch) | |
tree | 22b881cad1fc846e1fe14182d37c8f6e6261f820 /intro_gui.c | |
parent | bdaab39e648891f3e86a290ade9b02fe4d215f45 (diff) | |
download | openttd-17eb65050b29b84e1a5b452d302c1a40931764cb.tar.xz |
(svn r6631) -Codechange: Use accessors for click_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 'intro_gui.c')
-rw-r--r-- | intro_gui.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intro_gui.c b/intro_gui.c index c386feb59..84851a365 100644 --- a/intro_gui.c +++ b/intro_gui.c @@ -47,8 +47,10 @@ static inline void SetNewLandscapeType(byte landscape) static void SelectGameWndProc(Window *w, WindowEvent *e) { switch (e->event) { + case WE_CREATE: LowerWindowWidget(w, _opt_newgame.landscape + 8); break; + case WE_PAINT: - w->click_state = (w->click_state & ~(0xF << 8)) | (1 << (_opt_newgame.landscape + 8)); + LowerWindowWidget(w, _opt_newgame.landscape + 8); // All buttons get automagically unclicked SetDParam(0, STR_6801_EASY + _opt_newgame.diff_level); DrawWindowWidgets(w); break; @@ -72,6 +74,7 @@ static void SelectGameWndProc(Window *w, WindowEvent *e) #endif break; case 8: case 9: case 10: case 11: + RaiseWindowWidget(w, _opt_newgame.landscape + 8); SetNewLandscapeType(e->we.click.widget - 8); break; case 12: ShowGameOptions(); break; |