add engine settings
[carveJwlIkooP6JGAAIwe30JlM.git] / menu.h
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 };