Files
tbd-station-14/Content.Client/UserInterface/Systems/Hotbar/Widgets/HotbarGui.xaml.cs
Nemanja cc8984d096 Grid Inventory (#21931)
* Grid Inventory

* oh boy we keep cracking on

* auto insertion is kinda working? gross, too!

* pieces and proper layouts

* fix the sprites

* mousing over grid pieces... finally

* dragging deez nuts all over the screen

* eek!

* dragging is 90% less horrendous

* auto-rotating

* flatten

* Rotation at last

* fix rotation and change keybind for removing items.

* rebinding and keybinding

* wow! look at that! configurable with a button! cool!

* dragging is a bit cooler, eh?

* hover insert, my beloved

* add some grids for storage, fix 1x1 storages, fix multiple inputs at once

* el navigation

* oh yeah some stuff i forgor

* more fixes and QOL stuff

* the griddening

* the last of it (yippee)

* sloth review :)
2023-12-04 16:04:39 -07:00

32 lines
891 B
C#

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);
StatusPanel.Update(null);
var hotbarController = UserInterfaceManager.GetUIController<HotbarUIController>();
hotbarController.Setup(HandContainer, InventoryHotbar, StatusPanel, StoragePanel);
LayoutContainer.SetGrowVertical(this, LayoutContainer.GrowDirection.Begin);
}
public void UpdatePanelEntity(EntityUid? entity)
{
StatusPanel.Update(entity);
if (entity == null)
{
StatusPanel.Visible = false;
return;
}
StatusPanel.Visible = true;
}
}