Removed some unused methods

This commit is contained in:
Joonas Rikkonen
2018-01-25 09:38:04 +02:00
parent 43d48ceb13
commit e55c54b161
3 changed files with 4 additions and 64 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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)