VG_STATIC void menu_btn_invert_y( int event );
VG_STATIC mdl_mesh *menu_mesh_fov_slider,
- *menu_mesh_vol_slider;
+ *menu_mesh_vol_slider,
+ *menu_mesh_res_slider;
VG_STATIC ent_marker
*menu_mark_fov_min,
*menu_mark_fov_max,
*menu_mark_vol_min,
- *menu_mark_vol_max;
+ *menu_mark_vol_max,
+ *menu_mark_res_min,
+ *menu_mark_res_max;
struct{
/* state */
VG_STATIC int menu_controller( struct menu_btn_userdata ud )
{
if( (game_menu.page & (k_menu_page_main|k_menu_page_settings))
- && (ud.i == menu_display_controller) )
+ && (ud.i == steam_display_controller) )
return 1;
return 0;
}
VG_STATIC int menu_controller_inf( struct menu_btn_userdata ud )
{
if( (game_menu.page & k_menu_page_settings)
- && (ud.i == menu_display_controller) )
+ && (ud.i == steam_display_controller) )
return 1;
return 0;
}
{
"vol_slider", menu_vis, {k_menu_page_settings},
- .lu="text_blur"
+ .lu="res_slider"
},
{ "vol_info", menu_vis, {k_menu_page_settings} },
{
"text_blur", menu_vis, {k_menu_page_settings},
.fn_press = menu_btn_blur,
- .lu="text_invert_y", .ld="vol_slider"
+ .lu="text_invert_y", .ld="res_slider"
},
{
"text_blur_check", menu_settings_if, {.ptr_generic=&cl_blur}
},
-
-{ "ctr_xbox", menu_controller_inf, {k_menu_controller_type_xbox}},
-{ "ctr_xbox_text", menu_controller_inf, {k_menu_controller_type_xbox}},
-{ "ctr_steam", menu_controller_inf, {k_menu_controller_type_steam}},
-{ "ctr_steam_text", menu_controller_inf, {k_menu_controller_type_steam}},
-{ "ctr_deck", menu_controller_inf, {k_menu_controller_type_steam_deck}},
-{ "ctr_deck_text", menu_controller_inf, {k_menu_controller_type_steam_deck}},
-{ "ctr_ps", menu_controller_inf, {k_menu_controller_type_playstation}},
-{ "ctr_ps_text", menu_controller_inf, {k_menu_controller_type_playstation}},
-{ "ctr_kbm", menu_controller_inf, {k_menu_controller_type_keyboard}},
-{ "ctr_kbm_text", menu_controller_inf, {k_menu_controller_type_keyboard}},
+{
+ "res_slider", menu_vis, {k_menu_page_settings},
+ .ld = "vol_slider", .lu = "text_blur"
+},
+{
+ "res_info", menu_vis, {k_menu_page_settings},
+},
+{ "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}},
+{ "ctr_steam_text", menu_controller_inf, {k_steam_controller_type_steam}},
+{ "ctr_deck", menu_controller_inf, {k_steam_controller_type_steam_deck}},
+{ "ctr_deck_text", menu_controller_inf, {k_steam_controller_type_steam_deck}},
+{ "ctr_ps", menu_controller_inf, {k_steam_controller_type_playstation}},
+{ "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}},
{
"text_paused", menu_vis, {k_menu_page_main}
},
return 0;
}
-VG_STATIC int __respawn( int argc, const char *argv[] );
VG_STATIC void menu_btn_reset( int event )
{
- __respawn(0,NULL);
+ localplayer_cmd_respawn( 0, NULL );
cl_menu_go_away = 1;
game_menu.page = 0;
}
ent_find_marker( &menu_model, &menu_markers, "vol_slider_max" );
menu_mark_vol_min =
ent_find_marker( &menu_model, &menu_markers, "vol_slider_min" );
+ menu_mark_res_max =
+ ent_find_marker( &menu_model, &menu_markers, "res_slider_max" );
+ menu_mark_res_min =
+ ent_find_marker( &menu_model, &menu_markers, "res_slider_min" );
menu_mesh_fov_slider = mdl_find_mesh( &menu_model, "fov_slider" );
menu_mesh_vol_slider = mdl_find_mesh( &menu_model, "vol_slider" );
+ menu_mesh_res_slider = mdl_find_mesh( &menu_model, "res_slider" );
shader_model_menu_register();
menu_mesh_vol_slider, menu_mark_vol_min->transform.co,
menu_mark_vol_max->transform.co );
+ menu_slider( &gpipeline.view_render_scale,
+ (game_menu.loc == menu_get_loc( "res_slider" )),
+ menu_mesh_res_slider, menu_mark_res_min->transform.co,
+ menu_mark_res_max->transform.co );
+
if( menu_page_should_backout() ){
game_menu.page = k_menu_page_main;
game_menu.loc = menu_get_loc( "text_settings" );
}
}
-player_instance *tmp_localplayer(void);
-
VG_STATIC void menu_update(void)
{
vg_input_update( 1, &input_menu_h );
/* Base */
{
- player_instance *player = tmp_localplayer();
+ player_instance *player = &localplayer;
struct player_avatar *av = player->playeravatar;
v3f center_rough;
mdl_transform_m4x3( &btn->mesh->transform, mtx );
m4x3_mul( menu_mdl_mtx, mtx, mtx );
m4x3_identity( mtx_size );
- m4x3_scale( mtx_size, expSustainedImpulse( btn->fsize, 0.5f, 8.7f) );
+ m3x3_scalef( mtx_size, expSustainedImpulse( btn->fsize, 0.5f, 8.7f) );
m4x3_mul( mtx, mtx_size, mtx );
shader_model_menu_uMdl( mtx );