add engine settings
authorhgn <hgodden00@gmail.com>
Thu, 4 Jan 2024 13:33:41 +0000 (13:33 +0000)
committerhgn <hgodden00@gmail.com>
Thu, 4 Jan 2024 13:33:41 +0000 (13:33 +0000)
entity.c
input.h
menu.h
models_src/rs_menu.mdl
workshop.h
world_entity.c

index 44b00df235f0f1d9e8ddc4d60f17390abd109c32..2ff0cab4f448241783850eb201a854560acd71a6 100644 (file)
--- 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 275c6a441217d6d3b2e8b66d862e8eb0b2574840..f957ffa211fe6fe931a74b27d053846b60d4fb6a 100644 (file)
--- 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 ca7cec188289979a340f960bffe58bab16525cb6..73e048f9b17ca1c0f251726a002e42651f5154ef 100644 (file)
--- 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 };
index 58cf1266e1888b678672105bd68272e6fedaa3f3..56a1a9f2ce7b26cfa378e8303db4ff63508c4475 100644 (file)
Binary files a/models_src/rs_menu.mdl and b/models_src/rs_menu.mdl differ
index e09faf124d3de0b1467c35fa35a6f02a37e1d92b..7e08781ee9c93f5a78f20e09205d77a40d8af5af 100644 (file)
@@ -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"
index ec7c2fe13426a5cbc0d773ef7711080bee0b0e80..d8f4259dacd67179503656e569c6d415d68a1edb 100644 (file)
@@ -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 );
    }
 }