瀏覽代碼

Fixed bug in display options UI writing incorrect values.

Marc Chapman 5 年之前
父節點
當前提交
326908aa3d

+ 1 - 1
Templates/BaseGame/game/data/ui/guis/optionsMenu.cs

@@ -367,7 +367,7 @@ function OptionsMenuBackSetting::onClick(%this)
       
       //advance by one
       %newSetting = getToken(%settingsList, ",", %currentSettingIdx);
-      eval(%settingCtrl.qualitySettingGroup@"::set("@%newSetting@");");
+      eval(%settingCtrl.qualitySettingGroup@"::set(\""@%newSetting@"\");");
       %settingCtrl-->SettingText.setText( %newSetting );
       
       if(%currentSettingIdx == %settingsListCount)

+ 8 - 1
Templates/BaseGame/game/data/ui/scripts/displayMenu.cs

@@ -38,7 +38,14 @@ function DisplayMenu::apply(%this)
    }
       
    //Update the display settings now
-   $pref::Video::Resolution = getWord( $pref::Video::Resolution, 0 ) SPC getWord( $pref::Video::Resolution, 2 );
+   if (getWord( $pref::Video::Resolution, 2) == "")
+   {
+      $pref::Video::Resolution = getWord( $pref::Video::Resolution, 0 ) SPC getWord( $pref::Video::Resolution, 1 );
+   }
+   else
+   {
+      $pref::Video::Resolution = getWord( $pref::Video::Resolution, 0 ) SPC getWord( $pref::Video::Resolution, 2 );
+   }
 	
    /*if ( %newFullScreen $= "false" )
 	{