Exemple #1
0
        private void AddItemsPanel()
        {
            ItemsPanel                      = AddUIComponent <UIScrollablePanel>();
            ItemsPanel.autoLayout           = true;
            ItemsPanel.autoLayoutDirection  = LayoutDirection.Vertical;
            ItemsPanel.autoLayoutPadding    = new RectOffset(0, 0, 0, 0);
            ItemsPanel.scrollWheelDirection = UIOrientation.Vertical;
            ItemsPanel.builtinKeyNavigation = true;
            ItemsPanel.clipChildren         = true;
            ItemsPanel.eventSizeChanged    += ItemsPanelSizeChanged;
            ItemsPanel.atlas                = TextureUtil.InGameAtlas;
            ItemsPanel.backgroundSprite     = "ScrollbarTrack";

            UIUtils.AddScrollbar(this, ItemsPanel);

            ItemsPanel.verticalScrollbar.eventVisibilityChanged += ItemsScrollbarVisibilityChanged;
        }
Exemple #2
0
        private void AddSettingPanel()
        {
            SettingsPanel                      = AddUIComponent <UIScrollablePanel>();
            SettingsPanel.autoLayout           = true;
            SettingsPanel.autoLayoutDirection  = LayoutDirection.Vertical;
            SettingsPanel.autoLayoutPadding    = new RectOffset(10, 10, 10, 10);
            SettingsPanel.scrollWheelDirection = UIOrientation.Vertical;
            SettingsPanel.builtinKeyNavigation = true;
            SettingsPanel.clipChildren         = true;
            SettingsPanel.atlas                = TextureUtil.InGameAtlas;
            SettingsPanel.backgroundSprite     = "UnlockingItemBackground";
            SettingsPanel.eventSizeChanged    += SettingsPanelSizeChanged;

            UIUtils.AddScrollbar(this, SettingsPanel);

            SettingsPanel.verticalScrollbar.eventVisibilityChanged += SettingsScrollbarVisibilityChanged;
        }