(fdc038d5d) Keymapping and UX test: - Map use to "E" and Select to "Left Mouse". - Introduce a dedicated key for deselecting ("Right Mouse"). - Introduce a dedicated key for shooting ("Left Mouse"). - Define certain objects as shootables, which simply means that they use the "Shoot" key instead of using the "Use" key. This required the least amount of refactoring the existing code. - TODO: don't register the "Select" input when aiming or when an interface is open -> should prevent interacting through UI elements. - TODO: sync the new input types with the server.

This commit is contained in:
Joonas Rikkonen
2019-04-04 11:06:12 +03:00
parent 2290645bc9
commit 5f05322fdb
51 changed files with 444 additions and 525 deletions
@@ -219,9 +219,9 @@ namespace Barotrauma
//spacing
new GUIFrame(new RectTransform(new Vector2(0.01f, 0.0f), optionHolder.RectTransform), style: null);
var optionButtons = new GUILayoutGroup(new RectTransform(new Vector2(0.8f, 1.0f), parent: optionHolder.RectTransform) { RelativeOffset = new Vector2(0.0f, 0.05f) });
var optionButtons = new GUILayoutGroup(new RectTransform(new Vector2(0.8f, 1.0f), parent: optionHolder.RectTransform) { RelativeOffset = new Vector2(0.0f, 0.15f) });
var optionList = new GUILayoutGroup(new RectTransform(new Vector2(0.8f, 0.3f), parent: optionButtons.RectTransform))
var optionList = new GUILayoutGroup(new RectTransform(new Vector2(0.8f, 0.15f), parent: optionButtons.RectTransform))
{
Stretch = false,
RelativeSpacing = 0.035f
@@ -688,7 +688,7 @@ namespace Barotrauma
if (backgroundSprite == null)
{
backgroundSprite = (LocationType.List.Where(l => l.UseInMainMenu).GetRandom())?.GetPortrait(0);
backgroundSprite = (LocationType.List.Where(l => l.UseInMainMenu).GetRandom()).GetPortrait(0);
}
if (backgroundSprite != null)