Пример #1
0
        private void CreateUIElements()
        {
            _container      = AddUIComponent <PanelBase>();
            _container.size = new Vector2(340.0f, 66.0f);
            this.CreateSpace(340.0f, 0.1f);
            _thumbBackground   = _container.AddUIComponent <UIButton>();
            _thumbMiddleGround = _container.AddUIComponent <UIPanel>();
            _thumb             = _container.AddUIComponent <UISprite>();
            _label             = _container.AddUIComponent <UILabel>();
            _slider            = UIUtils.CreateSlider(_container, 165.0f, 1.0f, 2000.0f, 1.0f);
            _textfield         = _container.AddUIComponent <UITextField>();
            string loadTooltip = Translation.Instance.GetTranslation(TranslationID.TOOLTIP_LOADFROMTHEME);

            _loadButton = UIUtils.CreateButton(_container, new Vector2(22.0f, 22.0f), tooltip: loadTooltip, backgroundSprite: "ThemesIcon", atlas: UISprites.Atlas);
            string resetTooltip = Translation.Instance.GetTranslation(TranslationID.TOOLTIP_RESET);

            _resetButton = UIUtils.CreateButton(_container, new Vector2(22.0f, 22.0f), tooltip: resetTooltip, backgroundSprite: "", foregroundSprite: "UndoIcon", atlas: UISprites.Atlas);
            color        = UIColorGrey;
        }
Пример #2
0
        private void CreateUIElements()
        {
            _containerTitle         = AddUIComponent <PanelBase>();
            _containerTitle.size    = new Vector2(340.0f, 22.0f);
            _containerTitle.padding = new RectOffset(5, 0, 5, 0);
            _labelTitle             = _containerTitle.AddUIComponent <UILabel>();
            string loadTooltip = Translation.Instance.GetTranslation(TranslationID.TOOLTIP_LOADFROMTHEME);

            _loadButton = UIUtils.CreateButton(_containerTitle, new Vector2(22.0f, 22.0f), tooltip: loadTooltip, backgroundSprite: "ThemesIcon", atlas: UISprites.Atlas);
            string resetTooltip = Translation.Instance.GetTranslation(TranslationID.TOOLTIP_RESET);

            _resetButton = UIUtils.CreateButton(_containerTitle, new Vector2(22.0f, 22.0f), tooltip: resetTooltip, backgroundSprite: "", foregroundSprite: "UndoIcon", atlas: UISprites.Atlas);

            _containerR         = AddUIComponent <PanelBase>();
            _containerR.size    = new Vector2(340.0f, 22.0f);
            _containerR.padding = new RectOffset(5, 0, 5, 0);
            _labelR             = _containerR.AddUIComponent <UILabel>();
            _sliderR            = UIUtils.CreateSlider(_containerR, 218.0f, -0.1f, 0.1f, 0.0001f);
            _textfieldR         = _containerR.AddUIComponent <UITextField>();

            _containerG         = AddUIComponent <PanelBase>();
            _containerG.size    = new Vector2(340.0f, 22.0f);
            _containerG.padding = new RectOffset(5, 0, 5, 0);
            _labelG             = _containerG.AddUIComponent <UILabel>();
            _sliderG            = UIUtils.CreateSlider(_containerG, 218.0f, -0.1f, 0.1f, 0.0001f);
            _textfieldG         = _containerG.AddUIComponent <UITextField>();

            _containerB         = AddUIComponent <PanelBase>();
            _containerB.size    = new Vector2(340.0f, 22.0f);
            _containerB.padding = new RectOffset(5, 0, 5, 0);
            _labelB             = _containerB.AddUIComponent <UILabel>();
            _sliderB            = UIUtils.CreateSlider(_containerB, 218.0f, -0.1f, 0.1f, 0.0001f);
            _textfieldB         = _containerB.AddUIComponent <UITextField>();

            this.CreateSpace(0.0f, 0.01f);

            color = UIColorGrey;
        }
Пример #3
0
        private void CreateUIElements()
        {
            _containerTitle          = AddUIComponent <PanelBase>();
            _containerTitle.size     = new Vector2(340.0f, 22.0f);
            _containerTitle.padding  = new RectOffset(5, 0, 5, 0);
            _containerSlider         = AddUIComponent <PanelBase>();
            _containerSlider.size    = new Vector2(340.0f, 22.0f);
            _containerSlider.padding = new RectOffset(5, 0, 5, 0);

            _labelTitle = _containerTitle.AddUIComponent <UILabel>();
            string resetTooltip = Translation.Instance.GetTranslation(TranslationID.TOOLTIP_RESET);

            _resetButton = UIUtils.CreateButton(_containerTitle, new Vector2(22.0f, 22.0f), tooltip: resetTooltip, backgroundSprite: "", foregroundSprite: "UndoIcon", atlas: UISprites.Atlas);

            _slider    = UIUtils.CreateSlider(_containerSlider, 240.0f, 0.0f, 1.0f, 1.0f);
            _textfield = _containerSlider.AddUIComponent <UITextField>();

            this.CreateSpace(0.0f, 0.01f);

            color = UIColorGrey;
        }