Unstable 0.1300.0.7

This commit is contained in:
Markus Isberg
2021-04-07 15:24:22 +03:00
parent 96b2184811
commit 538c3dbfc3
47 changed files with 246 additions and 103 deletions
@@ -111,6 +111,8 @@ namespace Barotrauma
public static bool TransparentWiringMode = true;
public static bool SkipInventorySlotUpdate;
private static object bulkItemBufferinUse;
public static object BulkItemBufferInUse
@@ -4109,6 +4111,7 @@ namespace Barotrauma
/// </summary>
public override void Update(double deltaTime)
{
SkipInventorySlotUpdate = false;
ImageManager.Update((float) deltaTime);
if (GameMain.GraphicsWidth != screenResolution.X || GameMain.GraphicsHeight != screenResolution.Y)
@@ -4222,11 +4225,15 @@ namespace Barotrauma
}
List<Keys> numberKeys = PlayerInput.NumberKeys;
if (numberKeys.Find(PlayerInput.KeyHit) is { } key)
if (numberKeys.Find(PlayerInput.KeyHit) is { } key && key != Keys.None)
{
// treat 0 as the last key instead of first
int index = key == Keys.D0 ? numberKeys.Count : numberKeys.IndexOf(key) - 1;
listBox.Select(index, force: false, autoScroll: true, takeKeyBoardFocus: false);
if (index > -1 && index < listBox.Content.CountChildren)
{
listBox.Select(index, force: false, autoScroll: true, takeKeyBoardFocus: false);
SkipInventorySlotUpdate = true;
}
}
}
}