Inventory Input (#503)
* Create ItemSlotButton * Refactor inventory buttons Refactor so that KeyBind handling of inventory and hands are the same. * Refactor InventoryInterfaceController to call ItemSlotManager with entities This change allows HandsGUI and InventoryInterfaceController to just call ItemSlotManager.OnButtonPressed with an entity instead of a slot. * Add CooldownCircle to ItemSlotButton This allows Hands and Inventory to have cooldown circles on their ItemSlots. * Refactor HandsGUI to use ItemSlots This allows functionality and GUI to be the same between Inventory and Hands. Added clicking empty hand to switch ActiveHand to clicked hand. * Implement CooldownCircle in ItemSlotManager Reorganize files
This commit is contained in:
committed by
Pieter-Jan Briers
parent
c20ba98a1e
commit
d03da83fda
@@ -1,17 +0,0 @@
|
||||
using Content.Client.UserInterface;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Content.Tests.Client.UserInterface
|
||||
{
|
||||
[TestFixture]
|
||||
public class HandsGuiTest
|
||||
{
|
||||
[Test]
|
||||
public void TestCalculateCooldownLevel()
|
||||
{
|
||||
Assert.AreEqual(HandsGui.CalculateCooldownLevel(0.5f), 4);
|
||||
Assert.AreEqual(HandsGui.CalculateCooldownLevel(1), 8);
|
||||
Assert.AreEqual(HandsGui.CalculateCooldownLevel(0), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
17
Content.Tests/Client/UserInterface/ItemSlotTest.cs
Normal file
17
Content.Tests/Client/UserInterface/ItemSlotTest.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Content.Client.UserInterface;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Content.Tests.Client.UserInterface
|
||||
{
|
||||
[TestFixture]
|
||||
public class ItemSlotTest
|
||||
{
|
||||
[Test]
|
||||
public void TestCalculateCooldownLevel()
|
||||
{
|
||||
Assert.AreEqual(ItemSlotManager.CalculateCooldownLevel(0.5f), 4);
|
||||
Assert.AreEqual(ItemSlotManager.CalculateCooldownLevel(1), 8);
|
||||
Assert.AreEqual(ItemSlotManager.CalculateCooldownLevel(0), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user