a mess but stable
[carveJwlIkooP6JGAAIwe30JlM.git] / menu.h
diff --git a/menu.h b/menu.h
index 8e658dcabc73847ac767e57c0c1857251fa7e544..5a6dbc452f41f731c2f66c9f8b6f3f9e96334185 100644 (file)
--- a/menu.h
+++ b/menu.h
@@ -10,7 +10,17 @@ enum menu_page
    k_menu_page_any,
    k_menu_page_starter,
    k_menu_page_premium,
-   k_menu_page_main
+   k_menu_page_main,
+   k_menu_page_credits,
+   k_menu_page_help,
+};
+
+enum menu_main_subpage
+{
+   k_menu_main_main = 0,
+   k_menu_main_map  = 1,
+   k_menu_main_settings = 2,
+   k_menu_main_guide = 3
 };
 
 struct global_menu
@@ -18,71 +28,29 @@ struct global_menu
    int disable_open;
    i32 skip_starter;
    enum menu_page page;
-
-   i32 main_index;
-
-   enum menu_input_mode
-   {
-      k_menu_input_mode_keys,
-      k_menu_input_mode_mouse
-   }
-   input_mode;
+   i32 main_index, 
+       main_row,
+       settings_row,
+       guides_row,
+       intro_row,
+       guide_sel,
+       prem_row;
    f32 mouse_dist;  /* used for waking up mouse */
 
    f32 repeater;
+
+   bool bg_blur;
+   ent_camera *bg_cam;
+
+   const char *web_link;   /* if set; modal */
+   i32 web_choice;
+
+   GLuint prem_tex;
 }
 extern menu;
 
 void menu_init(void);
 void menu_at_begin(void);
-void menu_gui(void);
+void menu_gui( ui_context *ctx );
 void menu_open( enum menu_page page );
 bool menu_viewing_map(void);
-
-#if 0
-#define MENU_STACK_SIZE 8
-
-#include "vg/vg_engine.h"
-#include "entity.h"
-
-struct global_menu
-{
-   int credits_open;
-   int disable_open;
-   i32 skip_starter;
-
-   u32 page, /* current page index */
-       page_depth,
-       controls_page_id;
-
-   ent_menuitem *ctr_kbm,
-                *ctr_deck,
-                *ctr_ps,
-                *ctr_steam,
-                *ctr_xbox;
-   f32 slider_offset;
-
-   struct page_stack_frame {
-      u32 page;
-      ent_menuitem *loc;
-      ent_camera *cam;
-   }
-   page_stack[ MENU_STACK_SIZE ];
-   
-   ent_menuitem *loc;
-   ent_camera   *cam;
-   vg_camera     view;
-
-   mdl_context model;
-   GLuint *textures;
-   glmesh mesh;
-
-   mdl_array_ptr items, markers, cameras;
-}
-extern menu;
-void menu_close(void);
-void menu_open_page( const char *name, 
-                     enum ent_menuitem_stack_behaviour stackmode );
-void menu_link(void);
-void menu_render(void);
-#endif