public void AddProperties(PropertyOwner owner)
        {
            _color    = new ComboMulti("PropertyPanelCBTX", "PropertyPanelCBBGTX", DrawPriority.LOWEST);
            _txPicker = new FilePicker();
            _alpha    = new InputInfoArea("PropertyPanelCombinedArrowsTX");

            _txPickLb = new Label("Texture:");
            _colorLb  = new Label("Color:");
            _alphaLb  = new Label("Alpha:");

            _color.Initialize();
            _txPicker.Initialize();
            _alpha.Initialize();

            _txPickLb.Initialize();
            _colorLb.Initialize();
            _alphaLb.Initialize();

            _color.AddAuxiliaryInfo();

            _color.AddName("Sprite Color", Color.White, Singleton.Font.GetFont(FontManager.FontType.STANDARD));

            _txPickLb.TextFont = Singleton.Font.GetFont(FontManager.FontType.LUCIDA_CONSOLE);
            _colorLb.TextFont  = Singleton.Font.GetFont(FontManager.FontType.LUCIDA_CONSOLE);
            _alphaLb.TextFont  = Singleton.Font.GetFont(FontManager.FontType.LUCIDA_CONSOLE);


            int lbWidth = (int)_alphaLb.TextSize.X;

            Properties.Add(_alphaLb, new Point(168 - lbWidth, 514));
            Properties.Add(_alpha, new Point(171, 514));

            if (owner != PropertyOwner.LABEL)
            {
                lbWidth = (int)_colorLb.TextSize.X;
                Properties.Add(_colorLb, new Point(168 - lbWidth, 181));
                Properties.Add(_color, new Point(171, 181));

                if (owner != PropertyOwner.SLIDER)
                {
                    lbWidth = (int)_txPickLb.TextSize.X;
                    Properties.Add(_txPickLb, new Point(168 - lbWidth, 240));
                    Properties.Add(_txPicker, new Point(171, 240));
                }
            }
            _alpha.TextColor = Color.White;


            AddEvents();
        }
Ejemplo n.º 2
0
        public void AddProperties(PropertyOwner owner)
        {
            _text      = new TextBox("PropertyPanelTextboxTX", "PropertyPanelTextboxPointerTX", TextBoxType.TEXT, DrawPriority.NORMAL);
            _textColor = new ComboMulti("PropertyPanelCBTX", "PropertyPanelCBBGTX", DrawPriority.LOWEST);
            _name      = new Label("");

            _textColor.AddName("Text Color", Color.White, Singleton.Font.GetFont(FontManager.FontType.STANDARD));
            _textColor.AddAuxiliaryInfo();


            _nameLb     = new Label("Name:");
            _textLb     = new Label("Text:");
            _txtColorLb = new Label("Text Color:");

            _text.Initialize();
            _textColor.Initialize();
            _name.Initialize();

            _textLb.Initialize();
            _nameLb.Initialize();
            _txtColorLb.Initialize();

            _textLb.Setup();
            _nameLb.Setup();
            _txtColorLb.Setup();

            _textLb.TextFont     = Singleton.Font.GetFont(FontManager.FontType.LUCIDA_CONSOLE);
            _txtColorLb.TextFont = Singleton.Font.GetFont(FontManager.FontType.LUCIDA_CONSOLE);
            _name.TextFont       = Singleton.Font.GetFont(FontManager.FontType.ARIAL_BOLD);
            _name.TextColor      = Color.Black;



            int lbWidth = (int)_nameLb.TextSize.X;

            Properties.Add(_nameLb, new Point(160 - lbWidth, 369));
            Properties.Add(_name, new Point(171, 368));

            if (owner != PropertyOwner.MULTITEXTBOX && owner != PropertyOwner.SLIDER && owner != PropertyOwner.TOGGLE)
            {
                _text.FieldWidth = 150;
                _text.TextColor  = Color.White;

                lbWidth = (int)_textLb.TextSize.X;
                Properties.Add(_textLb, new Point(168 - lbWidth, 271));
                Properties.Add(_text, new Point(171, 271));

                lbWidth = (int)_txtColorLb.TextSize.X;
                Properties.Add(_txtColorLb, new Point(168 - lbWidth, 395));
                Properties.Add(_textColor, new Point(171, 395));
            }
            if (owner == PropertyOwner.MULTITEXTBOX)
            {
                lbWidth = (int)_txtColorLb.TextSize.X;
                Properties.Add(_txtColorLb, new Point(168 - lbWidth, 395));
                Properties.Add(_textColor, new Point(171, 395));
            }

            _nameLb.TextFont = Singleton.Font.GetFont(FontManager.FontType.LUCIDA_CONSOLE);

            AddEvents();
        }