(9a7f4893d) Don't select the chatbox when pressing R/T while another textbox is selected.

This commit is contained in:
Joonas Rikkonen
2019-05-03 13:49:57 +03:00
parent a445911665
commit dedc9b5083
4 changed files with 256 additions and 33 deletions
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework.Input;
using System.Collections.Generic;
namespace Barotrauma
{
@@ -87,7 +88,7 @@ namespace Barotrauma
public override bool Equals(object obj)
{
if (obj is KeyOrMouse keyOrMouse )
if (obj is KeyOrMouse keyOrMouse)
{
if (MouseButton.HasValue)
{
@@ -128,6 +129,14 @@ namespace Barotrauma
return "None";
}
public override int GetHashCode()
{
var hashCode = int.MinValue;
hashCode = hashCode * -1521134295 + Key.GetHashCode();
hashCode = hashCode * -1521134295 + EqualityComparer<int?>.Default.GetHashCode(MouseButton);
return hashCode;
}
}
class Key
@@ -147,6 +156,7 @@ namespace Barotrauma
{
get { return GameMain.Config.KeyBind(inputType); }
}
#endif
public KeyOrMouse State
{