Exemplo n.º 1
0
        //public IPropertyBinding<bool, ILabel> Bold { get { return boldProperty; } }
        //public IPropertyBinding<int, ILabel> Width { get { return widthProperty; } }
        //public IPropertyBinding<int, ILabel> Height { get { return heightProperty; } }

        internal Label(ILayout parent) : base(parent)
        {
            textProperty = new PropertyBinding <string, ILabel>(
                this,
                value => text = value
                );

            tooltipProperty = new PropertyBinding <string, ILabel>(
                this,
                value => tooltip = value
                );

            //boldProperty = new PropertyBinding<bool, ILabel>(
            //    this,
            //    value => bold = value
            //);

            //widthProperty = new PropertyBinding<int, ILabel>(
            //    this,
            //    value => width = value
            //);

            //heightProperty = new PropertyBinding<int, ILabel>(
            //    this,
            //    value => height = value
            //);
        }
Exemplo n.º 2
0
 internal Spacer(ILayout parent) : base(parent)
 {
     mPixelsProperty = new PropertyBinding <float, ISpacer>(
         this,
         value => mPixels = value
         );
 }
Exemplo n.º 3
0
        internal LayoutButton(ILayout parent) : base(parent)
        {
            textProperty = new PropertyBinding <string, ILayoutButton>(
                this,
                value => text = value
                );

            tooltipProperty = new PropertyBinding <string, ILayoutButton>(
                this,
                value => tooltip = value
                );

            widthProperty = new PropertyBinding <int, ILayoutButton>(
                this,
                value => width = value
                );

            heightProperty = new PropertyBinding <int, ILayoutButton>(
                this,
                value => height = value
                );

            mTexture2DProperty = new PropertyBinding <Texture2D, ILayoutButton>(
                this,
                value => mTexture2D = value
                );

            mClickEvent = new EventBinding <ILayoutButton>(this);
        }
Exemplo n.º 4
0
        internal Label(ILayout parent) : base(parent)
        {
            textProperty = new PropertyBinding <string, ILabel>(
                this,
                value => this.text = value
                );

            tooltipProperty = new PropertyBinding <string, ILabel>(
                this,
                value => this.tooltip = value
                );

            boldProperty = new PropertyBinding <bool, ILabel>(
                this,
                value => this.bold = value
                );

            widthProperty = new PropertyBinding <int, ILabel>(
                this,
                value => this.width = value
                );

            heightProperty = new PropertyBinding <int, ILabel>(
                this,
                value => this.height = value
                );
        }
Exemplo n.º 5
0
        internal DropdownBox(ILayout parent) : base(parent)
        {
            itemsProperty = new PropertyBinding <object[], IDropdownBox>(
                this,
                value => this.items = value
                );

            selectedItemProperty = new PropertyBinding <object, IDropdownBox>(
                this,
                value =>
            {
                selectedItem = value;
                if (items != null)
                {
                    selectedIndex = Array.IndexOf(items, value);
                }
            }
                );

            labelProperty = new PropertyBinding <string, IDropdownBox>(
                this,
                value => this.label = value
                );

            tooltipProperty = new PropertyBinding <string, IDropdownBox>(
                this,
                value => this.tooltip = value
                );
        }
Exemplo n.º 6
0
 protected AbstractLayout(ILayout parent) :
     base(parent)
 {
     mEnabledProperty = new PropertyBinding <bool, ILayout>(
         this,
         value => this.enabled = value
         );
 }
Exemplo n.º 7
0
        internal Toggle(ILayout parent) : base(parent)
        {
            textProperty = new PropertyBinding <string, IToggle>(
                this,
                value => text = value
                );

            onProperty = new PropertyBinding <bool, IToggle>(
                this,
                value => on = value
                );
        }
Exemplo n.º 8
0
        internal LayerPicker(ILayout parent) : base(parent)
        {
            labelProperty = new PropertyBinding <string, ILayerPicker>(
                this,
                value => this.label = value
                );

            selectedLayersProperty = new PropertyBinding <string[], ILayerPicker>(
                this,
                value => this.selectedLayerMask.value = LayerNamesToMask(value)
                );
        }
Exemplo n.º 9
0
        internal Checkbox(ILayout parent) : base(parent)
        {
            boxCheckedProperty = new PropertyBinding <bool, ICheckbox>(
                this,
                value => this.boxChecked = value
                );

            labelProperty = new PropertyBinding <string, ICheckbox>(
                this,
                value => this.label = value
                );
        }
Exemplo n.º 10
0
        internal TextBox(ILayout parent) : base(parent)
        {
            textProperty = new PropertyBinding <string, ITextBox>(
                this,
                value => text = value == null ? String.Empty : value
                );

            widthProperty = new PropertyBinding <int, ITextBox>(
                this,
                value => this.width = value
                );

            heightProperty = new PropertyBinding <int, ITextBox>(
                this,
                value => this.height = value
                );
        }
Exemplo n.º 11
0
        internal Vector3Field(ILayout parent) : base(parent)
        {
            vectorProperty = new PropertyBinding <Vector3, IVector3Field>(
                this,
                value => this.vector = value
                );

            labelProperty = new PropertyBinding <string, IVector3Field>(
                this,
                value => this.label = value
                );

            tooltipProperty = new PropertyBinding <string, IVector3Field>(
                this,
                value => this.tooltip = value
                );
        }
Exemplo n.º 12
0
        internal Label(ILayout parent, int width) : base(parent)
        {
            textProperty = new PropertyBinding <string, ILabel>(
                this,
                value => text = value
                );

            tooltipProperty = new PropertyBinding <string, ILabel>(
                this,
                value => tooltip = value
                );

            if (width != -1)
            {
                mGuiLayoutOptions = new List <GUILayoutOption>()
                {
                    GUILayout.Width(width)
                }.ToArray();
            }
        }
Exemplo n.º 13
0
        internal DateTimePicker(ILayout parent) : base(parent)
        {
            culture = CultureInfo.CreateSpecificCulture("en-AU");

            dateProperty = new PropertyBinding <DateTime, IDateTimePicker>(
                this,
                value =>
            {
                this.date = value;
                this.text = date.ToString(culture);
            }
                );

            widthProperty = new PropertyBinding <int, IDateTimePicker>(
                this,
                value => this.width = value
                );

            heightProperty = new PropertyBinding <int, IDateTimePicker>(
                this,
                value => this.height = value
                );
        }
Exemplo n.º 14
0
        internal Button(ILayout parent) : base(parent)
        {
            textProperty = new PropertyBinding <string, IButton>(
                this,
                value => this.text = value
                );

            tooltipProperty = new PropertyBinding <string, IButton>(
                this,
                value => this.tooltip = value
                );

            widthProperty = new PropertyBinding <int, IButton>(
                this,
                value => this.width = value
                );

            heightProperty = new PropertyBinding <int, IButton>(
                this,
                value => this.height = value
                );

            clickEvent = new EventBinding <IButton>(this);
        }