예제 #1
0
 public TimeLimitAccessKeyField(SharedAccessKeysEditor editor)
     : base(editor)
 {
     this._TimeIntervalField = new Skill.Editor.UI.FloatField()
     {
         Margin = new Thickness(4, 2)
     };
     this._TimeIntervalField.Label.text = "Time Interval";
     this.Controls.Add(_TimeIntervalField);
     this._TimeIntervalField.ValueChanged += _TimeIntervalField_ValueChanged;
 }
예제 #2
0
        void OnEnable()
        {
            _ScreenShot = base.serializedObject.targetObject as ScreenShot;

            _Frame = new Skill.Framework.UI.Frame("Frame");
            _Frame.Grid.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);
            _Frame.Grid.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);
            _Frame.Grid.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);

            _BtnCustomSize = new Skill.Editor.UI.ToggleButton()
            {
                Row = 0, Column = 0, IsChecked = _ScreenShot.CustomSize
            };
            _BtnCustomSize.Label.text = "Custom size";

            Skill.Framework.UI.Thickness margin = new Skill.Framework.UI.Thickness(20, 0, 0, 0);

            _IFieldWidth = new Skill.Editor.UI.IntField()
            {
                Row = 1, Column = 0, Value = _ScreenShot.Width, Margin = margin
            };
            _IFieldWidth.Label.text = "Width";

            _IFieldHeight = new Skill.Editor.UI.IntField()
            {
                Row = 2, Column = 0, Value = _ScreenShot.Height, Margin = margin
            };
            _IFieldHeight.Label.text = "Height";

            _FFieldScale = new Skill.Editor.UI.FloatField()
            {
                Row = 1, Column = 0, Value = _ScreenShot.Scale, Margin = margin
            };
            _FFieldScale.Label.text = "Scale";

            _Frame.Grid.Controls.Add(_BtnCustomSize);
            _Frame.Grid.Controls.Add(_IFieldWidth);
            _Frame.Grid.Controls.Add(_IFieldHeight);
            _Frame.Grid.Controls.Add(_FFieldScale);

            _BtnCustomSize.Changed     += _BtnCustomSize_Changed;
            _IFieldWidth.ValueChanged  += _Width_ValueChanged;
            _IFieldHeight.ValueChanged += _Height_ValueChanged;
            _FFieldScale.ValueChanged  += _Scale_ValueChanged;

            ManageControls();
        }
예제 #3
0
                public SubtitleEventProperties(SubtitleEvent se)
                    : base(se)
                {
                    _Event = se;


                    _BtnPickTitle = new Skill.Framework.UI.Button()
                    {
                        Margin = ControlMargin
                    };
                    _BtnPickTitle.Content.text = "Select Subtitle";
                    this.Controls.Add(_BtnPickTitle);

                    _TimeField = new Skill.Editor.UI.FloatField()
                    {
                        Margin = ControlMargin
                    };
                    _TimeField.Label.text = "Time";
                    this.Controls.Add(_TimeField);

                    _DurationField = new Skill.Editor.UI.FloatField()
                    {
                        Margin = ControlMargin
                    };
                    _DurationField.Label.text = "Duration";
                    this.Controls.Add(_DurationField);


                    _TbOverrideStyle = new Skill.Editor.UI.ToggleButton()
                    {
                        Margin = ControlMargin
                    };
                    _TbOverrideStyle.Label.text = "Override Style";
                    this.Controls.Add(_TbOverrideStyle);

                    _ColorField = new Skill.Editor.UI.ColorField()
                    {
                        Margin = ControlMargin
                    };
                    _ColorField.Label.text = "Font Color";
                    this.Controls.Add(_ColorField);

                    _FontStyleField = new Skill.Editor.UI.EnumPopup()
                    {
                        Margin = ControlMargin
                    };
                    _FontStyleField.Label.text = "Font Style";
                    this.Controls.Add(_FontStyleField);

                    _AlignmentField = new Skill.Editor.UI.EnumPopup()
                    {
                        Margin = ControlMargin
                    };
                    _AlignmentField.Label.text = "Alignment";
                    this.Controls.Add(_AlignmentField);

                    _BtnPickTitle.Click          += _BtnPickTitle_Click;
                    _TimeField.ValueChanged      += _TimeField_ValueChanged;
                    _DurationField.ValueChanged  += _DurationField_ValueChanged;
                    _TbOverrideStyle.Changed     += _TbOverrideStyle_Changed;
                    _ColorField.ColorChanged     += _ColorField_ColorChanged;
                    _FontStyleField.ValueChanged += _FontStyleField_ValueChanged;
                    _AlignmentField.ValueChanged += _AlignmentField_ValueChanged;
                }
예제 #4
0
        private void CreateUI()
        {
            _ObjectField = new CacheObjectField(this)
            {
                Row = 2, Column = 1
            };

            _MainPanel = new ChangeCheck()
            {
                Row = 1, Column = 0
            };
            _MainPanel.RowDefinitions.Add(ButtonRowHeight, GridUnitType.Pixel);           // _BtnAdd
            _MainPanel.RowDefinitions.Add(1, GridUnitType.Star);                          // _ItemsList
            _MainPanel.RowDefinitions.Add(_ObjectField.LayoutHeight, GridUnitType.Pixel); // _ObjectField

            _BtnAdd = new Skill.Framework.UI.Button()
            {
                Row = 0, Column = 0, Margin = new Thickness(2)
            };
            _BtnAdd.Content.text = "Add";
            _BtnAdd.Click       += new System.EventHandler(_BtnAdd_Click);

            _ItemsList = new ListBox()
            {
                Row = 1, Column = 0, Margin = new Thickness(2)
            };
            _ItemsList.BackgroundVisible = true;
            _ItemsList.DisableFocusable();

            _MainPanel.Controls.Add(new Box()
            {
                Row = 2, Column = 1
            });
            _MainPanel.Controls.Add(_BtnAdd);
            _MainPanel.Controls.Add(_ItemsList);
            _MainPanel.Controls.Add(_ObjectField);


            _PnlControls = new StackPanel()
            {
                Row = 0, Column = 0
            };
            _BtnInitializeOnAwake = new UI.ToggleButton()
            {
                Height = 18
            };
            _BtnInitializeOnAwake.Label.text    = "Initialize On Awake";
            _BtnInitializeOnAwake.Label.tooltip = "create all cached objects on awake";
            _BtnInitializeOnAwake.IsChecked     = _Data.InitializeOnAwake;

            _BtnMakeAsChild = new UI.ToggleButton()
            {
                Height = 18
            };
            _BtnMakeAsChild.Label.text    = "Make as Child";
            _BtnMakeAsChild.Label.tooltip = "create all cached objects as childs of group";
            _BtnMakeAsChild.IsChecked     = _Data.MakeAsChild;

            _FlCleanInterval = new FloatField()
            {
                Height = 18
            };
            _FlCleanInterval.Label.text    = "Clean Interval";
            _FlCleanInterval.Label.tooltip = "Clean Interval of this group";
            _FlCleanInterval.Value         = _Data.CleanInterval;

            _PnlControls.Controls.Add(_BtnInitializeOnAwake);
            _PnlControls.Controls.Add(_BtnMakeAsChild);
            _PnlControls.Controls.Add(_FlCleanInterval);

            _Frame = new Frame("MainFrame");

            _Frame.Grid.RowDefinitions.Add(56, GridUnitType.Pixel); // _PnlControls
            _Frame.Grid.RowDefinitions.Add(1, GridUnitType.Star);   // _MainPanel

            _Frame.Grid.Controls.Add(_PnlControls);
            _Frame.Grid.Controls.Add(_MainPanel);

            _MainPanel.Changed          += new EventHandler(_ChangeCheck_Changed);
            _ItemsList.SelectionChanged += _ItemsPanel_SelectionChanged;

            _BtnInitializeOnAwake.Changed += Properties_Changed;
            _BtnMakeAsChild.Changed       += Properties_Changed;
            _FlCleanInterval.ValueChanged += Properties_Changed;
        }