summaryrefslogtreecommitdiff
path: root/intro_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-14 19:48:04 +0000
committertron <tron@openttd.org>2005-11-14 19:48:04 +0000
commitf7abff5f963cddfdd134ac52ffd8e72e3ed88f0c (patch)
treea9ba5d4f3c5c47ab3857060c5f95ed482530ed97 /intro_gui.c
parentd8b56c123eab7f7b48f2af3579130e366f6106ab (diff)
downloadopenttd-f7abff5f963cddfdd134ac52ffd8e72e3ed88f0c.tar.xz
(svn r3181) -Bracing
-Indentation -Whitespace -DeMorgan's Law -Test with NULL or 0 for non-booleans -'\0' instead of 0 for chars -Remove redundantly redundant comments (like DoFoo(); // Do foo) -Join multiple short lines with a single statement -Split single lines with multiple statements -Avoid assignments in if
Diffstat (limited to 'intro_gui.c')
-rw-r--r--intro_gui.c50
1 files changed, 24 insertions, 26 deletions
diff --git a/intro_gui.c b/intro_gui.c
index 08a7fdbfe..1521c7b3e 100644
--- a/intro_gui.c
+++ b/intro_gui.c
@@ -154,8 +154,9 @@ static const Widget _ask_abandon_game_widgets[] = {
{ WIDGETS_END },
};
-static void AskAbandonGameWndProc(Window *w, WindowEvent *e) {
- switch(e->event) {
+static void AskAbandonGameWndProc(Window* w, WindowEvent* e)
+{
+ switch (e->event) {
case WE_PAINT:
DrawWindowWidgets(w);
#if defined(_WIN32)
@@ -173,7 +174,7 @@ static void AskAbandonGameWndProc(Window *w, WindowEvent *e) {
#else
SetDParam(0, STR_0134_UNIX);
#endif
- DrawStringMultiCenter(0x5A, 0x26, STR_00CA_ARE_YOU_SURE_YOU_WANT_TO, 178);
+ DrawStringMultiCenter(90, 38, STR_00CA_ARE_YOU_SURE_YOU_WANT_TO, 178);
return;
case WE_CLICK:
@@ -217,32 +218,29 @@ static const Widget _ask_quit_game_widgets[] = {
{ WIDGETS_END },
};
-static void AskQuitGameWndProc(Window *w, WindowEvent *e) {
- switch(e->event) {
- case WE_PAINT:
- DrawWindowWidgets(w);
- DrawStringMultiCenter(0x5A, 0x26,
- _game_mode != GM_EDITOR ? STR_0160_ARE_YOU_SURE_YOU_WANT_TO :
- STR_029B_ARE_YOU_SURE_YOU_WANT_TO,
- 178);
- return;
-
- case WE_CLICK:
- switch(e->click.widget) {
- case 3:
- DeleteWindow(w);
- break;
- case 4:
- _switch_mode = SM_MENU;
+static void AskQuitGameWndProc(Window* w, WindowEvent* e)
+{
+ switch (e->event) {
+ case WE_PAINT:
+ DrawWindowWidgets(w);
+ DrawStringMultiCenter(
+ 90, 38,
+ _game_mode != GM_EDITOR ?
+ STR_0160_ARE_YOU_SURE_YOU_WANT_TO : STR_029B_ARE_YOU_SURE_YOU_WANT_TO,
+ 178
+ );
break;
- }
- break;
- case WE_KEYPRESS: /* Return to main menu on pressing 'Enter' */
- if (e->keypress.keycode == WKC_RETURN)
- _switch_mode = SM_MENU;
- break;
+ case WE_CLICK:
+ switch (e->click.widget) {
+ case 3: DeleteWindow(w); break;
+ case 4: _switch_mode = SM_MENU; break;
+ }
+ break;
+ case WE_KEYPRESS: /* Return to main menu on pressing 'Enter' */
+ if (e->keypress.keycode == WKC_RETURN) _switch_mode = SM_MENU;
+ break;
}
}