diff --git a/Barotrauma/BarotraumaClient/Source/GameMain.cs b/Barotrauma/BarotraumaClient/Source/GameMain.cs index 97d243fad..abc15b4e2 100644 --- a/Barotrauma/BarotraumaClient/Source/GameMain.cs +++ b/Barotrauma/BarotraumaClient/Source/GameMain.cs @@ -161,7 +161,7 @@ namespace Barotrauma GraphicsDeviceManager.PreferMultiSampling = false; GraphicsDeviceManager.SynchronizeWithVerticalRetrace = Config.VSyncEnabled; - if (Config.WindowMode == Barotrauma.WindowMode.Windowed) + if (Config.WindowMode == WindowMode.Windowed) { //for whatever reason, window isn't centered automatically //since MonoGame 3.6 (nuget package might be broken), so diff --git a/Barotrauma/BarotraumaClient/Source/GameSettings.cs b/Barotrauma/BarotraumaClient/Source/GameSettings.cs index 730475246..c5feb6697 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSettings.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSettings.cs @@ -164,14 +164,7 @@ namespace Barotrauma textBox.Text = ""; CoroutineManager.StartCoroutine(WaitForKeyPress(textBox)); } - - private bool MarkUnappliedChanges(GUIButton button, object obj) - { - UnsavedSettings = true; - - return true; - } - + private bool SelectResolution(GUIComponent selected, object userData) { DisplayMode mode = selected.UserData as DisplayMode; @@ -187,7 +180,7 @@ namespace Barotrauma return true; } - private bool SelectContentPackage(GUIComponent select,object userData) + private bool SelectContentPackage(GUIComponent select, object userData) { GameMain.Config.SelectedContentPackage = (ContentPackage)userData; UnsavedSettings = true; diff --git a/Barotrauma/BarotraumaClient/Source/Items/Item.cs b/Barotrauma/BarotraumaClient/Source/Items/Item.cs index 9886404bf..9b14eff13 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Item.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Item.cs @@ -329,60 +329,7 @@ namespace Barotrauma } } } - - private bool EnterProperty(GUITickBox tickBox) - { - var property = tickBox.UserData as SerializableProperty; - if (property == null) return false; - - property.TrySetValue(tickBox.Selected); - - return true; - } - - private bool EnterProperty(GUITextBox textBox, string text) - { - textBox.Color = Color.DarkGreen; - - var property = textBox.UserData as SerializableProperty; - if (property == null) return false; - - object prevValue = property.GetValue(); - - textBox.Deselect(); - - if (property.TrySetValue(text)) - { - textBox.Text = text; - - if (GameMain.Server != null) - { - GameMain.Server.CreateEntityEvent(this, new object[] { NetEntityEvent.Type.ChangeProperty, property }); - } - else if (GameMain.Client != null) - { - GameMain.Client.CreateEntityEvent(this, new object[] { NetEntityEvent.Type.ChangeProperty, property }); - } - - return true; - } - else - { - if (prevValue != null) - { - textBox.Text = prevValue.ToString(); - } - return false; - } - } - - private bool PropertyChanged(GUITextBox textBox, string text) - { - textBox.Color = Color.Red; - - return true; - } - + public void ClientRead(ServerNetObject type, NetBuffer msg, float sendingTime) { if (type == ServerNetObject.ENTITY_POSITION)