Fixed rebinding keys to mouse2 via the settings menu

This commit is contained in:
Joonas Rikkonen
2017-11-14 19:15:57 +02:00
parent ff926c1da2
commit 05f94c2666
@@ -448,20 +448,11 @@ namespace Barotrauma
GraphicsWidth = mode.Width; GraphicsWidth = mode.Width;
GraphicsHeight = mode.Height; GraphicsHeight = mode.Height;
//GameMain.Graphics.PreferredBackBufferWidth = GraphicsWidth;
//GameMain.Graphics.PreferredBackBufferHeight = GraphicsHeight;
//GameMain.Graphics.ApplyChanges();
//CoroutineManager.StartCoroutine(GameMain.Instance.Load());
UnsavedSettings = true; UnsavedSettings = true;
return true; return true;
} }
private IEnumerable<object> WaitForKeyPress(GUITextBox keyBox) private IEnumerable<object> WaitForKeyPress(GUITextBox keyBox)
{ {
yield return CoroutineStatus.Running; yield return CoroutineStatus.Running;
@@ -483,7 +474,7 @@ namespace Barotrauma
keyMapping[keyIndex] = new KeyOrMouse(0); keyMapping[keyIndex] = new KeyOrMouse(0);
keyBox.Text = "Mouse1"; keyBox.Text = "Mouse1";
} }
else if (PlayerInput.LeftButtonClicked()) else if (PlayerInput.RightButtonClicked())
{ {
keyMapping[keyIndex] = new KeyOrMouse(1); keyMapping[keyIndex] = new KeyOrMouse(1);
keyBox.Text = "Mouse2"; keyBox.Text = "Mouse2";