map binary data
[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
12 u32 page, /* current page index */
13 page_depth,
14 controls_page_id;
15
16 ent_menuitem *ctr_kbm,
17 *ctr_deck,
18 *ctr_ps,
19 *ctr_steam,
20 *ctr_xbox;
21
22 enum menu_input_mode{
23 k_menu_input_mode_keys,
24 k_menu_input_mode_mouse
25 }
26 input_mode;
27 f32 mouse_track, mouse_dist; /* used for waking up mouse */
28 f32 slider_offset;
29
30 struct page_stack_frame {
31 u32 page;
32 ent_menuitem *loc;
33 ent_camera *cam;
34 }
35 page_stack[ MENU_STACK_SIZE ];
36
37 ent_menuitem *loc;
38 ent_camera *cam;
39 vg_camera view;
40
41 mdl_context model;
42 GLuint *textures;
43 glmesh mesh;
44
45 mdl_array_ptr items, markers, cameras;
46 }
47 extern menu;
48 void menu_close(void);
49 void menu_init(void);
50 void menu_open_page( const char *name,
51 enum ent_menuitem_stack_behaviour stackmode );
52 void menu_link(void);
53 void menu_update(void);
54 void menu_render(void);