* Borg hands & hand whitelisting * yaml linted * yaml linted (x2) * yaml linted (x3) * my storage tests so pass * no need for SetCount * ok new stuff you can get fixed too * oops * staque * what if we addressed feedback * my place so holder * what if we addresesd feedback * what if i did it correctly * terminating or deleted
44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using Content.Shared.Hands.Components;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
namespace Content.Client.UserInterface.Systems.Hotbar.Widgets;
|
|
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class HotbarGui : UIWidget
|
|
{
|
|
public HotbarGui()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
StatusPanelRight.SetSide(HandUILocation.Right);
|
|
StatusPanelLeft.SetSide(HandUILocation.Left);
|
|
var hotbarController = UserInterfaceManager.GetUIController<HotbarUIController>();
|
|
|
|
hotbarController.Setup(HandContainer);
|
|
LayoutContainer.SetGrowVertical(this, LayoutContainer.GrowDirection.Begin);
|
|
}
|
|
|
|
public void UpdatePanelEntityLeft(EntityUid? entity, Hand? hand)
|
|
{
|
|
StatusPanelLeft.Update(entity, hand);
|
|
}
|
|
|
|
public void UpdatePanelEntityRight(EntityUid? entity, Hand? hand)
|
|
{
|
|
StatusPanelRight.Update(entity, hand);
|
|
}
|
|
|
|
public void SetHighlightHand(HandUILocation? hand)
|
|
{
|
|
StatusPanelLeft.UpdateHighlight(hand is HandUILocation.Left);
|
|
StatusPanelRight.UpdateHighlight(hand is HandUILocation.Right);
|
|
}
|
|
|
|
public void UpdateStatusVisibility(bool left, bool right)
|
|
{
|
|
StatusPanelLeft.Visible = left;
|
|
StatusPanelRight.Visible = right;
|
|
}
|
|
}
|