Window mode can be changed mid-game, fixed "apply" button not becoming active in the settings menu when changing the window mode
This commit is contained in:
@@ -90,7 +90,12 @@ namespace Barotrauma
|
||||
|
||||
displayModeDD.SelectItem(GameMain.Config.WindowMode);
|
||||
|
||||
displayModeDD.OnSelected = (guiComponent, obj) => { GameMain.Config.WindowMode = (WindowMode)guiComponent.UserData; return true; };
|
||||
displayModeDD.OnSelected = (guiComponent, obj) =>
|
||||
{
|
||||
UnsavedSettings = true;
|
||||
GameMain.Config.WindowMode = (WindowMode)guiComponent.UserData;
|
||||
return true;
|
||||
};
|
||||
|
||||
y += 70;
|
||||
|
||||
@@ -130,7 +135,6 @@ namespace Barotrauma
|
||||
foreach (ContentPackage contentPackage in ContentPackage.list)
|
||||
{
|
||||
contentPackageDD.AddItem(contentPackage.Name, contentPackage);
|
||||
|
||||
if (SelectedContentPackage == contentPackage) contentPackageDD.SelectItem(contentPackage);
|
||||
}
|
||||
|
||||
@@ -237,6 +241,11 @@ namespace Barotrauma
|
||||
Save("config.xml");
|
||||
|
||||
settingsFrame.Flash(Color.Green);
|
||||
|
||||
if (GameMain.WindowMode != GameMain.Config.WindowMode)
|
||||
{
|
||||
GameMain.Instance.SetWindowMode(GameMain.Config.WindowMode);
|
||||
}
|
||||
|
||||
if (GameMain.GraphicsWidth != GameMain.Config.GraphicsWidth || GameMain.GraphicsHeight != GameMain.Config.GraphicsHeight)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user