예제 #1
0
 /// <summary>
 /// Creates a new instance of the UIAttribute
 /// </summary>
 /// <param name="displayText">The text to display for the UI element associated with this property.</param>
 /// <param name="kind">The kind of UI element to create. If not specified, the engine will attempt to determine the kind based on the property's type.</param>
 /// <param name="enumOptions">Options for UIElementType.Enums. Can be checkboxes or radio buttons. Defaults to radio buttons if not specified.</param>
 /// <param name="enumLayout">Enum toggle button layout - horizontal or vertical. Defaults to vertical.</param>
 /// <param name="getVisible">The name of a parameterless boolean method or boolean property that will be called to determine whether this UI element is visible or not.</param>
 public UIAttribute(string displayText,
                    UIElementType kind        = UIElementType.Auto,
                    UIEnumOptions enumOptions = UIEnumOptions.RadioButtons,
                    UIEnumLayout enumLayout   = UIEnumLayout.Vertical,
                    string getVisible         = null)
 {
     DisplayText = displayText;
     Kind        = kind;
     EnumOptions = enumOptions;
     EnumLayout  = enumLayout;
     GetVisible  = getVisible;
 }
예제 #2
0
 /// <summary>
 /// Creates a new instance of the UIAttribute
 /// </summary>
 /// <param name="displayText">The text to display for the UI element associated with this property.</param>
 /// <param name="kind">The kind of UI element to create. If not specified, the engine will attempt to determine the kind based on the property's type.</param>
 /// <param name="row">The row number to place this UI element in.</param>
 /// <param name="column">The column to place this UI element in. If not specified, defaults to the left column.</param>
 /// <param name="enumOptions">Options for UIElementType.Enums. Can be checkboxes or radio buttons. Defaults to radio buttons if not specified.</param>
 /// <param name="enumLayout">Enum toggle button layout - horizontal or vertical. Defaults to vertical.</param>
 /// <param name="getVisible">The name of a parameterless boolean method or boolean property that will be called to determine whether this UI element is visible or not.</param>
 public UIAttribute(string displayText,
                    UIElementType kind        = UIElementType.Auto,
                    int row                   = 0,
                    Column column             = Column.Left,
                    UIEnumOptions enumOptions = UIEnumOptions.RadioButtons,
                    UIEnumLayout enumLayout   = UIEnumLayout.Vertical,
                    string getVisible         = null)
 {
     GetVisible  = getVisible;
     EnumLayout  = enumLayout;
     EnumOptions = enumOptions;
     Kind        = kind;
     DisplayText = displayText;
     Row         = row;
     Column      = column;
 }