Exemplo n.º 1
0
        public HandsGui()
        {
            IoCManager.InjectDependencies(this);

            AddChild(_guiContainer = new HBoxContainer
            {
                SeparationOverride = 0,
                Children           =
                {
                    (_rightPanel             = ItemStatusPanel.FromSide(HandLocation.Right)),
                    (_handsColumn            = new VBoxContainer
                    {
                        Children             =
                        {
                            (_topPanel       = ItemStatusPanel.FromSide(HandLocation.Middle)),
                            (_handsContainer = new HBoxContainer())
                        }
                    }),
                    (_leftPanel              = ItemStatusPanel.FromSide(HandLocation.Left))
                }
            });
            _leftHandTexture   = _resourceCache.GetTexture("/Textures/Interface/Inventory/hand_l.png");
            _middleHandTexture = _resourceCache.GetTexture("/Textures/Interface/Inventory/hand_l.png");
            _rightHandTexture  = _resourceCache.GetTexture("/Textures/Interface/Inventory/hand_r.png");
        }
Exemplo n.º 2
0
        public HandsGui()
        {
            IoCManager.InjectDependencies(this);

            _configManager.OnValueChanged(CCVars.HudTheme, UpdateHudTheme, invokeImmediately: true);

            AddChild(_guiContainer = new HBoxContainer
            {
                SeparationOverride  = 0,
                HorizontalAlignment = HAlignment.Center,
                Children            =
                {
                    (_handsColumn                   = new VBoxContainer
                    {
                        Children                    =
                        {
                            (_topPanel              = ItemStatusPanel.FromSide(HandLocation.Middle)),
                            (_handsContainer        = new HBoxContainer {
                                HorizontalAlignment = HAlignment.Center
                            })
                        }
                    }),
                }
            });
            _leftHandTexture   = _gameHud.GetHudTexture("hand_l.png");
            _middleHandTexture = _gameHud.GetHudTexture("hand_l.png");
            _rightHandTexture  = _gameHud.GetHudTexture("hand_r.png");
        }
        public HandsGui(HandsComponent hands, HandsSystem handsSystem)
        {
            _handsComponent = hands;
            _handsSystem    = handsSystem;

            RobustXamlLoader.Load(this);
            IoCManager.InjectDependencies(this);

            StatusPanel = ItemStatusPanel.FromSide(HandLocation.Middle);
            StatusContainer.AddChild(StatusPanel);
            StatusPanel.SetPositionFirst();
        }