Ejemplo n.º 1
0
        public ScrollableListBox(int width = 200, int height = 200)
            : base(width, height)
        {
            ScrollArea            = new GuiScrollableArea(Width, Height);
            ScrollArea.Align      = GuiAlignment.Full;
            ScrollArea.ScrollMode = ScrollMode.VerticalOnly;

            ListBox          = new GuiListBox <T>(0, 0, width - (int)GUI.skin.verticalScrollbar.fixedWidth);
            ListBox.AutoSize = true;

            Add(ScrollArea);
            ScrollArea.Add(ListBox);
        }
Ejemplo n.º 2
0
        public FramedListBox(int width = 200, int height = 200, string title = "")
            : base(width, height)
        {
            this.WindowStyle = title == "" ? GuiWindowStyle.Normal : GuiWindowStyle.Titled;
            Title            = title;

            var scrollArea = new GuiScrollableArea(Width, Height);

            scrollArea.Align      = GuiAlignment.Full;
            scrollArea.ScrollMode = ScrollMode.None;

            ListBox       = new GuiListBox <T>(0, 0);
            ListBox.Align = GuiAlignment.Full;

            Add(scrollArea);
            scrollArea.Add(ListBox);
        }