update helpers/location to 'frosted' ui
[carveJwlIkooP6JGAAIwe30JlM.git] / menu.h
1 #pragma once
2 #define MENU_STACK_SIZE 8
3
4 #include "vg/vg_engine.h"
5 #include "entity.h"
6
7 struct global_menu
8 {
9 int credits_open;
10 int disable_open;
11 i32 skip_starter;
12
13 u32 page, /* current page index */
14 page_depth,
15 controls_page_id;
16
17 ent_menuitem *ctr_kbm,
18 *ctr_deck,
19 *ctr_ps,
20 *ctr_steam,
21 *ctr_xbox;
22
23 enum menu_input_mode{
24 k_menu_input_mode_keys,
25 k_menu_input_mode_mouse
26 }
27 input_mode;
28 f32 mouse_track, mouse_dist; /* used for waking up mouse */
29 f32 slider_offset;
30
31 struct page_stack_frame {
32 u32 page;
33 ent_menuitem *loc;
34 ent_camera *cam;
35 }
36 page_stack[ MENU_STACK_SIZE ];
37
38 ent_menuitem *loc;
39 ent_camera *cam;
40 vg_camera view;
41
42 mdl_context model;
43 GLuint *textures;
44 glmesh mesh;
45
46 mdl_array_ptr items, markers, cameras;
47 }
48 extern menu;
49 void menu_close(void);
50 void menu_init(void);
51 void menu_open_page( const char *name,
52 enum ent_menuitem_stack_behaviour stackmode );
53 void menu_link(void);
54 void menu_update(void);
55 void menu_render(void);
56 void menu_at_begin(void);