8e658dcabc73847ac767e57c0c1857251fa7e544
[carveJwlIkooP6JGAAIwe30JlM.git] / menu.h
1 #pragma once
2
3 #define MENU_STACK_SIZE 8
4
5 #include "vg/vg_engine.h"
6 #include "entity.h"
7
8 enum menu_page
9 {
10 k_menu_page_any,
11 k_menu_page_starter,
12 k_menu_page_premium,
13 k_menu_page_main
14 };
15
16 struct global_menu
17 {
18 int disable_open;
19 i32 skip_starter;
20 enum menu_page page;
21
22 i32 main_index;
23
24 enum menu_input_mode
25 {
26 k_menu_input_mode_keys,
27 k_menu_input_mode_mouse
28 }
29 input_mode;
30 f32 mouse_dist; /* used for waking up mouse */
31
32 f32 repeater;
33 }
34 extern menu;
35
36 void menu_init(void);
37 void menu_at_begin(void);
38 void menu_gui(void);
39 void menu_open( enum menu_page page );
40 bool menu_viewing_map(void);
41
42 #if 0
43 #define MENU_STACK_SIZE 8
44
45 #include "vg/vg_engine.h"
46 #include "entity.h"
47
48 struct global_menu
49 {
50 int credits_open;
51 int disable_open;
52 i32 skip_starter;
53
54 u32 page, /* current page index */
55 page_depth,
56 controls_page_id;
57
58 ent_menuitem *ctr_kbm,
59 *ctr_deck,
60 *ctr_ps,
61 *ctr_steam,
62 *ctr_xbox;
63 f32 slider_offset;
64
65 struct page_stack_frame {
66 u32 page;
67 ent_menuitem *loc;
68 ent_camera *cam;
69 }
70 page_stack[ MENU_STACK_SIZE ];
71
72 ent_menuitem *loc;
73 ent_camera *cam;
74 vg_camera view;
75
76 mdl_context model;
77 GLuint *textures;
78 glmesh mesh;
79
80 mdl_array_ptr items, markers, cameras;
81 }
82 extern menu;
83 void menu_close(void);
84 void menu_open_page( const char *name,
85 enum ent_menuitem_stack_behaviour stackmode );
86 void menu_link(void);
87 void menu_render(void);
88 #endif