From: hgn Date: Thu, 4 Jan 2024 13:33:41 +0000 (+0000) Subject: add engine settings X-Git-Url: https://harrygodden.com/git/?p=carveJwlIkooP6JGAAIwe30JlM.git;a=commitdiff_plain;h=403bb2442600b86f50d842ec059eb3f54c8ca5ec add engine settings --- diff --git a/entity.c b/entity.c index 44b00df..2ff0cab 100644 --- a/entity.c +++ b/entity.c @@ -10,7 +10,6 @@ #include "ent_challenge.c" #include "ent_relay.c" #include "ent_route.c" -#include "ent_portal.c" #include "ent_miniworld.c" #include "ent_region.c" #include "ent_traffic.c" diff --git a/input.h b/input.h index 275c6a4..f957ffa 100644 --- a/input.h +++ b/input.h @@ -190,7 +190,7 @@ static srinput; static int input_filter_generic(void){ if( srinput.state != k_input_state_enabled || - vg_ui.wants_mouse || vg_console.enabled ) + vg_ui.wants_mouse || vg_console.enabled || vg.settings_open ) return 1; else return 0; diff --git a/menu.h b/menu.h index ca7cec1..73e048f 100644 --- a/menu.h +++ b/menu.h @@ -266,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( @@ -317,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; } @@ -605,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 }; diff --git a/models_src/rs_menu.mdl b/models_src/rs_menu.mdl index 58cf126..56a1a9f 100644 Binary files a/models_src/rs_menu.mdl and b/models_src/rs_menu.mdl differ diff --git a/workshop.h b/workshop.h index e09faf1..7e08781 100644 --- a/workshop.h +++ b/workshop.h @@ -6,7 +6,6 @@ #include "vg/vg.h" #include "vg/vg_steam_remote_storage.h" #include "skaterift.h" -#include "pointcloud.h" #include "vg/vg_steam_auth.h" #include "vg/vg_steam_ugc.h" #include "vg/vg_steam_friends.h" diff --git a/world_entity.c b/world_entity.c index ec7c2fe..d8f4259 100644 --- a/world_entity.c +++ b/world_entity.c @@ -411,7 +411,8 @@ static void ent_ccmd_call( world_instance *world, ent_call *call ){ if( call->function == k_ent_function_trigger ){ u32 index = mdl_entity_id_id( call->id ); ent_ccmd *ccmd = mdl_arritm( &world->ent_ccmd, index ); - vg_execute_console_input( mdl_pstr(&world->meta, ccmd->pstr_command) ); + vg_execute_console_input( mdl_pstr(&world->meta, ccmd->pstr_command), + 0 ); } }