A rule in the layout toolkit. A rule defines how some layout operation will occur. The primary rules are the horizontal and vertical rules, which function similar to Unity's GUILayout.BeginHorizontal and BeginVertical. However, rules are much more flexible; there is also a rule for centering items vertically, among other things.
 public void Add(string sectionId, fiLayout rule)
 {
     _items.Add(new SectionItem {
         Id = sectionId,
         Rule = rule
     });
 }
 public void Add(string sectionId, fiLayout rule)
 {
     _items.Add(new SectionItem {
         Id   = sectionId,
         Rule = rule
     });
 }
Beispiel #3
0
 private void ActualAdd(string id, float width, fiExpandMode expandMode, fiLayout rule)
 {
     _items.Add(new SectionItem {
         Id         = id,
         MinWidth   = width,
         ExpandMode = expandMode,
         Rule       = rule
     });
 }
Beispiel #4
0
 /// <summary>
 /// Create a rule with the specified width and label.
 /// </summary>
 public void Add(string id, float width, fiLayout rule)
 {
     ActualAdd(id, width, fiExpandMode.Fixed, rule);
 }
Beispiel #5
0
 /// <summary>
 /// Create a rule with the specific width.
 /// </summary>
 public void Add(float width, fiLayout rule)
 {
     ActualAdd(string.Empty, width, fiExpandMode.Fixed, rule);
 }
Beispiel #6
0
 /// <summary>
 /// Create a labeled rule that has auto width.
 /// </summary>
 public void Add(string id, fiLayout rule)
 {
     ActualAdd(id, 0, fiExpandMode.Expand, rule);
 }
Beispiel #7
0
 /// <summary>
 /// Create an rule with auto width.
 /// </summary>
 public void Add(fiLayout rule)
 {
     ActualAdd(string.Empty, 0, fiExpandMode.Expand, rule);
 }
Beispiel #8
0
 public fiHorizontalLayout(fiLayout defaultRule)
 {
     _defaultRule = defaultRule;
 }
 public fiCenterVertical(string id, fiLayout centered)
 {
     _id = id;
     _centered = centered;
 }
 private void ActualAdd(string id, float width, fiExpandMode expandMode, fiLayout rule)
 {
     _items.Add(new SectionItem {
         Id = id,
         MinWidth = width,
         ExpandMode = expandMode,
         Rule = rule
     });
 }
 /// <summary>
 /// Create a rule with the specified width and label.
 /// </summary>
 public void Add(string id, float width, fiLayout rule)
 {
     ActualAdd(id, width, fiExpandMode.Fixed, rule);
 }
 /// <summary>
 /// Create a rule with the specific width.
 /// </summary>
 public void Add(float width, fiLayout rule)
 {
     ActualAdd(string.Empty, width, fiExpandMode.Fixed, rule);
 }
 /// <summary>
 /// Create a labeled rule that has auto width.
 /// </summary>
 public void Add(string id, fiLayout rule)
 {
     ActualAdd(id, 0, fiExpandMode.Expand, rule);
 }
 /// <summary>
 /// Create an rule with auto width.
 /// </summary>
 public void Add(fiLayout rule)
 {
     ActualAdd(string.Empty, 0, fiExpandMode.Expand, rule);
 }
 public void Add(fiLayout rule)
 {
     Add(string.Empty, rule);
 }
Beispiel #16
0
 public fiCenterVertical(string id, fiLayout centered)
 {
     _id       = id;
     _centered = centered;
 }
Beispiel #17
0
 public fiCenterVertical(fiLayout centered)
     : this(string.Empty, centered)
 {
 }
 public fiHorizontalLayout(fiLayout defaultRule)
 {
     _defaultRule = defaultRule;
 }
 public fiCenterVertical(fiLayout centered)
     : this(string.Empty, centered)
 {
 }
 public void Add(fiLayout rule)
 {
     Add(string.Empty, rule);
 }