Ejemplo n.º 1
0
        public GhostTargetWindow(GhostComponent owner)
        {
            Title  = "Ghost Warp";
            _owner = owner;
            _owner.GhostRequestWarpPoint();
            _owner.GhostRequestPlayerNames();

            var margin = new MarginContainer()
            {
                SizeFlagsVertical   = SizeFlags.FillExpand,
                SizeFlagsHorizontal = SizeFlags.FillExpand,
            };

            _buttonContainer = new VBoxContainer()
            {
                SizeFlagsVertical   = SizeFlags.FillExpand,
                SizeFlagsHorizontal = SizeFlags.Fill,
                SeparationOverride  = 5,
            };

            var scrollBarContainer = new ScrollContainer()
            {
                SizeFlagsVertical   = SizeFlags.FillExpand,
                SizeFlagsHorizontal = SizeFlags.FillExpand
            };

            margin.AddChild(scrollBarContainer);
            scrollBarContainer.AddChild(_buttonContainer);

            Contents.AddChild(margin);
        }
Ejemplo n.º 2
0
        public GhostTargetWindow(GhostComponent owner)
        {
            MinSize = SetSize = (300, 450);
            Title   = "Ghost Warp";
            _owner  = owner;
            _owner.GhostRequestWarpPoint();
            _owner.GhostRequestPlayerNames();

            _buttonContainer = new VBoxContainer()
            {
                VerticalExpand     = true,
                SeparationOverride = 5,
            };

            var scrollBarContainer = new ScrollContainer()
            {
                VerticalExpand   = true,
                HorizontalExpand = true
            };

            scrollBarContainer.AddChild(_buttonContainer);

            Contents.AddChild(scrollBarContainer);
        }