示例#1
0
        public GhostGui(GhostComponent owner)
        {
            IoCManager.InjectDependencies(this);

            _owner = owner;

            MouseFilter = MouseFilterMode.Ignore;

            ReturnToBody.OnPressed += (args) => { owner.SendReturnToBodyMessage(); };

            AddChild(ReturnToBody);

            Update();
        }
示例#2
0
        public GhostGui(GhostComponent owner)
        {
            IoCManager.InjectDependencies(this);

            _owner = owner;

            var targetMenu = new GhostTargetWindow(owner);

            MouseFilter = MouseFilterMode.Ignore;

            _ghostWarp.OnPressed    += args => targetMenu.Populate();
            _returnToBody.OnPressed += args => owner.SendReturnToBodyMessage();

            AddChild(new HBoxContainer
            {
                Children =
                {
                    _returnToBody,
                    _ghostWarp
                }
            });

            Update();
        }