X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=menu.h;h=73e048f9b17ca1c0f251726a002e42651f5154ef;hb=refs%2Fheads%2Frigidbody;hp=cb823b4ea6208a0291142717bc0cfa3ac2900e1e;hpb=2dbc6f4022802b89c934ba78e7085cc7ee81799b;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/menu.h b/menu.h index cb823b4..73e048f 100644 --- a/menu.h +++ b/menu.h @@ -9,7 +9,7 @@ #include "audio.h" #include "input.h" #include "workshop.h" -#include "respawn.h" +#include "world_map.h" #include "gui.h" #include "ent_miniworld.h" @@ -250,11 +250,9 @@ static void menu_trigger_item( ent_menuitem *item ){ if( MDL_CONST_PSTREQ( &menu.model, q, "quit" ) ){ vg.window_should_close = 1; } - else if( MDL_CONST_PSTREQ( &menu.model, q, "map" ) ){ - menu_close(); - respawn_begin_chooser(); + world_map_enter(); } else if( MDL_CONST_PSTREQ( &menu.model, q, "hub" ) ){ if( world_static.active_instance == k_world_purpose_client ){ @@ -268,6 +266,9 @@ static void menu_trigger_item( ent_menuitem *item ){ else if( MDL_CONST_PSTREQ( &menu.model, q, "workshop" ) ){ workshop_submit_command(0,NULL); } + else if( MDL_CONST_PSTREQ( &menu.model, q, "engine" ) ){ + vg_settings_open(); + } else if( MDL_CONST_PSTREQ( &menu.model, q, "prem_store" ) ){ if( steam_ready ) SteamAPI_ISteamFriends_ActivateGameOverlayToStore( @@ -319,9 +320,12 @@ static void menu_update(void){ } int escape = button_down( k_srbind_mback ); - if( menu.credits_open ){ + if( menu.credits_open || vg.settings_open ){ if( escape ){ menu.credits_open = 0; + + if( vg.settings_open ) + vg_settings_close(); } return; } @@ -607,6 +611,9 @@ static void menu_render(void){ return; } + if( vg.settings_open ) + return; + if( menu.credits_open ){ ui_rect panel = { 0,0, 460, 400 }, screen = { 0,0, vg.window_x,vg.window_y };