imgui stuff
[carveJwlIkooP6JGAAIwe30JlM.git] / menu.h
diff --git a/menu.h b/menu.h
index 7e6649a2ca5bf71cd9ca0a1d36757c9498402eca..6612494a8492a899c8733878b68d32a4599459ec 100644 (file)
--- a/menu.h
+++ b/menu.h
@@ -31,12 +31,14 @@ VG_STATIC const char *playermodels[] = { "ch_new", "ch_jordan", "ch_outlaw" };
 
 GLuint tex_menu;
 
+#if 0
 VG_STATIC struct input_binding input_menu_h,
                                input_menu_v,
                                input_menu_press,
                                input_menu_back,
                                input_menu_toggle,
                                input_menu_toggle_kbm;
+#endif
 
 VG_STATIC void menu_btn_quit( int event );
 VG_STATIC void menu_btn_skater( int event );
@@ -106,6 +108,7 @@ VG_STATIC int menu_vis( struct menu_btn_userdata ud )
       return 0;
 }
 
+#if 0
 VG_STATIC int menu_controller( struct menu_btn_userdata ud )
 {
    if( (game_menu.page & (k_menu_page_main|k_menu_page_settings)) 
@@ -121,6 +124,7 @@ VG_STATIC int menu_controller_inf( struct menu_btn_userdata ud )
       return 1;
    return 0;
 }
+#endif
 
 struct menu_button
 {
@@ -217,6 +221,7 @@ VG_STATIC menu_buttons[] =
 {
    "res_info", menu_vis, {k_menu_page_settings},
 },
+#if 0
 { "ctr_xbox",       menu_controller_inf, {k_steam_controller_type_xbox}},
 { "ctr_xbox_text",  menu_controller_inf, {k_steam_controller_type_xbox}},
 { "ctr_steam",      menu_controller_inf, {k_steam_controller_type_steam}},
@@ -227,6 +232,7 @@ VG_STATIC menu_buttons[] =
 { "ctr_ps_text",    menu_controller_inf, {k_steam_controller_type_playstation}},
 { "ctr_kbm",        menu_controller_inf, {k_steam_controller_type_keyboard}},
 { "ctr_kbm_text",   menu_controller_inf, {k_steam_controller_type_keyboard}},
+#endif
 {
    "text_paused", menu_vis, {k_menu_page_main} 
 },
@@ -314,6 +320,7 @@ VG_STATIC void menu_btn_map( int event )
 
 VG_STATIC void menu_crap_ui(void)
 {
+#if 0
    if( cl_menu && (game_menu.page == k_menu_page_map) ){
       ui_rect box;
       box[0] = vg.window_x/2 - 150;
@@ -342,6 +349,7 @@ VG_STATIC void menu_crap_ui(void)
          }
       }
    }
+#endif
 }
 
 VG_STATIC void steam_on_game_overlay( CallbackMsg_t *msg )
@@ -358,13 +366,7 @@ VG_STATIC void steam_on_game_overlay( CallbackMsg_t *msg )
 
 VG_STATIC void menu_init(void)
 {
-   vg_create_unnamed_input( &input_menu_h, k_input_type_axis );
-   vg_create_unnamed_input( &input_menu_v, k_input_type_axis );
-   vg_create_unnamed_input( &input_menu_back, k_input_type_button );
-   vg_create_unnamed_input( &input_menu_press, k_input_type_button );
-   vg_create_unnamed_input( &input_menu_toggle, k_input_type_button );
-   vg_create_unnamed_input( &input_menu_toggle_kbm, k_input_type_button );
-
+#if 0
    vg_apply_bind_str( &input_menu_h, "", "gp-ls-h" );
    vg_apply_bind_str( &input_menu_h, "+", "right" );
    vg_apply_bind_str( &input_menu_h, "-", "left" );
@@ -377,6 +379,7 @@ VG_STATIC void menu_init(void)
    vg_apply_bind_str( &input_menu_back, "", "\2escape" );
    vg_apply_bind_str( &input_menu_toggle_kbm, "", "\2escape" );
    vg_apply_bind_str( &input_menu_toggle, "", "\2gp-menu" );
+#endif
 
    vg_linear_clear( vg_mem.scratch );
 
@@ -428,6 +431,7 @@ VG_STATIC void menu_init(void)
 
 VG_STATIC void menu_run_directional(void)
 {
+#if 0
    struct menu_button *btn = &menu_buttons[ game_menu.loc ];
 
    if( vg_input_button_down( &input_menu_press ) ){
@@ -463,11 +467,15 @@ VG_STATIC void menu_run_directional(void)
          }
       }
    }
+#endif
 }
 
 VG_STATIC int menu_page_should_backout(void)
 {
+   return 0;
+#if 0
    return vg_input_button_down( &input_menu_back );
+#endif
 }
 
 VG_STATIC void menu_close(void)
@@ -497,6 +505,7 @@ VG_STATIC void menu_page_map(void)
    }
 
    if( game_menu.map_count > 0 ){
+#if 0 
       float v = input_menu_v.axis.value;
       if( (fabsf(v) > 0.7f) && (menu_input_cooldown <= 0.0f) ){
          audio_lock();
@@ -532,6 +541,7 @@ VG_STATIC void menu_page_map(void)
          menu_close();
 #endif
       }
+#endif
    }
 
    menu_fov_target = 80.0f;
@@ -551,6 +561,7 @@ VG_STATIC void menu_page_quit(void)
 void temp_update_playermodel(void);
 VG_STATIC void menu_page_skater(void)
 {
+#if 0
    float h = input_menu_h.axis.value;
    menu_fov_target = 97.0f;
 
@@ -594,11 +605,13 @@ VG_STATIC void menu_page_skater(void)
 
       temp_update_playermodel();
    }
+#endif
 }
 
 VG_STATIC void menu_slider( float *value, int set_value,
                             mdl_mesh *slider, v3f co_min, v3f co_max )
 {
+#if 0
    if( set_value ){
       float h = input_menu_h.axis.value;
       if( fabsf(h) > 0.04f )
@@ -607,6 +620,7 @@ VG_STATIC void menu_slider( float *value, int set_value,
    }
 
    v3_lerp( co_min, co_max, *value, slider->transform.co );
+#endif
 }
 
 VG_STATIC void menu_page_settings(void)
@@ -640,13 +654,18 @@ VG_STATIC void menu_page_settings(void)
 
 VG_STATIC void menu_update(void)
 {
+#if 0
    vg_input_update( 1, &input_menu_h );
    vg_input_update( 1, &input_menu_v );
    vg_input_update( 1, &input_menu_back );
    vg_input_update( 1, &input_menu_press );
    vg_input_update( 1, &input_menu_toggle );
    vg_input_update( 1, &input_menu_toggle_kbm );
+#endif
+   return;
 
+
+#if 0
    int toggle_gp = vg_input_button_down( &input_menu_toggle ),
        toggle_kb = vg_input_button_down( &input_menu_toggle_kbm ),
        wait_for_a_sec = 0;
@@ -761,6 +780,7 @@ VG_STATIC void menu_update(void)
    if( cl_menu ){
       menu_input_cooldown -= vg.time_frame_delta;
    }
+#endif
 }
 
 /* https://iquilezles.org/articles/functions/ */