Removed audio_rate config variable and changed config screen accordingly.
[neverball] / ball / st_help.c
index 6106086..959f8da 100644 (file)
@@ -66,7 +66,7 @@ static int help_action(int t)
         return goto_state(&st_help);
         break;
     }
-    return 0;
+    return 1;
 }
 
 /* -------------------------------------------------------------------------- */
@@ -85,6 +85,8 @@ static int help_menu(int id)
 {
     int jd;
 
+    gui_space(id);
+
     if ((jd = gui_harray(id)))
     {
         help_button(jd, _("Techniques"), HELP_TECH);
@@ -173,7 +175,7 @@ static int help_controls(int id)
     const char *sC = _("Screenshot");
     const char *sD = _("Toggle Fullscreen");
 
-    const char *k0 = _("Spacebar");
+    const char *k0 = _(SDL_GetKeyName(config_get_d(CONFIG_KEY_PAUSE)));
     const char *k1 = _("Escape");
     const char *k2 = SDL_GetKeyName(config_get_d(CONFIG_KEY_CAMERA_1));
     const char *k3 = SDL_GetKeyName(config_get_d(CONFIG_KEY_CAMERA_2));
@@ -297,15 +299,21 @@ static int help_techniques(int id)
             if ((ld = gui_vstack(kd)))
             {
                 gui_space(ld);
-                gui_multi(ld, s0, GUI_SML, GUI_ALL, gui_wht, gui_wht);
+                gui_image(ld, "gui/help3.jpg", w / 4, h / 4);
+                gui_state(ld, _("Watch demo"), GUI_SML, 0, 0);
                 gui_filler(ld);
+
+                gui_active(ld, HELP_DEMO_1, 0);
             }
 
             if ((ld = gui_vstack(kd)))
             {
                 gui_space(ld);
-                gui_multi(ld, s1, GUI_SML, GUI_ALL, gui_wht, gui_wht);
+                gui_image(ld, "gui/help4.jpg", w / 4, h / 4);
+                gui_state(ld, _("Watch demo"), GUI_SML, 0, 0);
                 gui_filler(ld);
+
+                gui_active(ld, HELP_DEMO_2, 0);
             }
         }
 
@@ -316,24 +324,18 @@ static int help_techniques(int id)
             if ((ld = gui_vstack(kd)))
             {
                 gui_space(ld);
-                gui_image(ld, "gui/help3.jpg", w / 4, h / 4);
-                gui_state(ld, _("Watch demo"), GUI_SML, 0, 0);
+                gui_multi(ld, s0, GUI_SML, GUI_ALL, gui_wht, gui_wht);
                 gui_filler(ld);
-
-                gui_active(ld, HELP_DEMO_1, 0);
             }
 
             if ((ld = gui_vstack(kd)))
             {
                 gui_space(ld);
-                gui_image(ld, "gui/help4.jpg", w / 4, h / 4);
-                gui_state(ld, _("Watch demo"), GUI_SML, 0, 0);
+                gui_multi(ld, s1, GUI_SML, GUI_ALL, gui_wht, gui_wht);
                 gui_filler(ld);
-
-                gui_active(ld, HELP_DEMO_2, 0);
             }
         }
-        
+
         gui_filler(jd);
     }
     return id;
@@ -351,25 +353,15 @@ static int help_enter(void)
 
         switch (tab)
         {
-        case HELP_RULE:
-            help_rules(id);
-            break;
-
-        case HELP_CONT:
-            help_controls(id);
-            break;
-
-        case HELP_MODE:
-            help_modes(id);
-            break;
-
-        case HELP_TECH:
-            help_techniques(id);
-            break;
+        case HELP_RULE: help_rules(id);      break;
+        case HELP_CONT: help_controls(id);   break;
+        case HELP_MODE: help_modes(id);      break;
+        case HELP_TECH: help_techniques(id); break;
 
         default:
             break;
         }
+
         gui_layout(id, 0, +1);
     }
     return id;