fish-station/Content.Client/UserInterface/Systems/Hotbar/Widgets/HotbarGui.xaml.cs
Vigers Ray 3cf56cd5b3 Merge remote-tracking branch 'space-wizards/master'
# Conflicts:
#	Content.Server/Access/Systems/AgentIDCardSystem.cs
#	Content.Server/GameTicking/Rules/ChangelingRuleSystem.cs
#	Content.Server/GameTicking/Rules/ThiefRuleSystem.cs
#	Content.Server/Medical/SuitSensors/SuitSensorSystem.cs
#	Content.Server/Zombies/ZombieSystem.cs
#	Content.Shared/Clothing/EntitySystems/SharedChameleonClothingSystem.cs
#	Content.Shared/Standing/StandingStateComponent.cs
#	Content.Shared/Standing/StandingStateSystem.cs
#	Content.Shared/Stunnable/SharedStunSystem.Knockdown.cs
#	Content.Shared/Stunnable/SharedStunSystem.cs
#	Resources/Locale/en-US/_strings/game-ticking/game-presets/preset-changeling.ftl
#	Resources/Locale/en-US/_strings/ghost/observer-role.ftl
#	Resources/Locale/en-US/_strings/robotics/borg_modules.ftl
#	Resources/Prototypes/Entities/Clothing/Ears/specific.yml
#	Resources/Prototypes/Entities/Clothing/Eyes/specific.yml
#	Resources/Prototypes/Entities/Clothing/Hands/specific.yml
#	Resources/Prototypes/Entities/Clothing/Head/specific.yml
#	Resources/Prototypes/Entities/Clothing/Neck/specific.yml
#	Resources/Prototypes/Entities/Clothing/OuterClothing/specific.yml
#	Resources/Prototypes/Entities/Clothing/Shoes/specific.yml
#	Resources/Prototypes/Entities/Clothing/Uniforms/specific.yml
#	Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
#	Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml
#	Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml
#	Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml
#	Resources/Prototypes/Entities/Objects/Materials/parts.yml
#	Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml
2025-08-13 14:13:30 +03:00

43 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, FunctionalHandContainer);
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;
}
}