Skip to content

Commit 45b7c03

Browse files
Add summaries and tooltips to properties
1 parent b9421b8 commit 45b7c03

File tree

1 file changed

+66
-2
lines changed
  • Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar

1 file changed

+66
-2
lines changed

Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar/AppBar.cs

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public enum AppBarStateEnum
4747
#region Private Serialized Fields with Public Properties
4848

4949
[Header("Target Bounding Box")]
50+
/// <summary>
51+
/// The bounding box this AppBar will use for its placement and control for manipulation
52+
/// </summary>
53+
[Tooltip("The bounding box this AppBar will use for its placement and control for manipulation")]
5054
[SerializeField]
5155
private BoundingBox boundingBox = null;
5256

@@ -56,6 +60,10 @@ public BoundingBox TargetBoundingBox
5660
set { boundingBox = value; }
5761
}
5862

63+
/// <summary>
64+
/// The parent game object for the renderable objects in the AppBar
65+
/// </summary>
66+
[Tooltip("The parent game object for the renderable objects in the app bar")]
5967
[SerializeField]
6068
private GameObject baseRenderer = null;
6169
public GameObject BaseRenderer
@@ -64,6 +72,10 @@ public GameObject BaseRenderer
6472
set => baseRenderer = value;
6573
}
6674

75+
/// <summary>
76+
/// The parent transform for the button collection
77+
/// </summary>
78+
[Tooltip("The parent transform for the button collection")]
6779
[SerializeField]
6880
private Transform buttonParent = null;
6981
public Transform ButtonParent
@@ -72,6 +84,10 @@ public Transform ButtonParent
7284
set => buttonParent = value;
7385
}
7486

87+
/// <summary>
88+
/// The background gameobject, scales to fill area behind buttons
89+
/// </summary>
90+
[Tooltip("The background gameobject, scales to fill area behind buttons")]
7591
[SerializeField]
7692
private GameObject backgroundBar = null;
7793
public GameObject BackgroundBar
@@ -81,6 +97,10 @@ public GameObject BackgroundBar
8197
}
8298

8399
[Header("States")]
100+
/// <summary>
101+
/// The AppBar's display type, default is Manipulation
102+
/// </summary>
103+
[Tooltip("The AppBar's display type, default is Manipulation")]
84104
[SerializeField]
85105
private AppBarDisplayTypeEnum displayType = AppBarDisplayTypeEnum.Manipulation;
86106
public AppBarDisplayTypeEnum DisplayType
@@ -89,6 +109,10 @@ public AppBarDisplayTypeEnum DisplayType
89109
set { displayType = value; }
90110
}
91111

112+
/// <summary>
113+
/// The AppBar's current state
114+
/// </summary>
115+
[Tooltip("The AppBar's current state")]
92116
[SerializeField]
93117
private AppBarStateEnum state = AppBarStateEnum.Default;
94118
public AppBarStateEnum State
@@ -97,7 +121,12 @@ public AppBarStateEnum State
97121
set { state = value; }
98122
}
99123

124+
100125
[Header("Default Button Options")]
126+
/// <summary>
127+
/// Should the AppBar have a Remove button
128+
/// </summary>
129+
[Tooltip("Should the AppBar have a Remove button")]
101130
[SerializeField]
102131
private bool useRemove = true;
103132
public bool UseRemove
@@ -106,6 +135,10 @@ public bool UseRemove
106135
set { useRemove = value; }
107136
}
108137

138+
/// <summary>
139+
/// Should the AppBar have an Adjust button
140+
/// </summary>
141+
[Tooltip("Should the AppBar have an Adjust button")]
109142
[SerializeField]
110143
private bool useAdjust = true;
111144
public bool UseAdjust
@@ -114,6 +147,10 @@ public bool UseAdjust
114147
set { useAdjust = value; }
115148
}
116149

150+
/// <summary>
151+
/// Should the AppBar have a Hide button
152+
/// </summary>
153+
[Tooltip("Should the AppBar have a Hide button")]
117154
[SerializeField]
118155
private bool useHide = true;
119156
public bool UseHide
@@ -123,6 +160,10 @@ public bool UseHide
123160
}
124161

125162
[Header("Default Button Icons")]
163+
/// <summary>
164+
/// The Adjust button texture
165+
/// </summary>
166+
[Tooltip("The Adjust button texture")]
126167
[SerializeField]
127168
private Texture adjustIcon = null;
128169
public Texture AdjustIcon
@@ -131,6 +172,10 @@ public Texture AdjustIcon
131172
set => adjustIcon = value;
132173
}
133174

175+
/// <summary>
176+
/// The Done button texture
177+
/// </summary>
178+
[Tooltip("The Done button texture")]
134179
[SerializeField]
135180
private Texture doneIcon = null;
136181
public Texture DoneIcon
@@ -139,6 +184,10 @@ public Texture DoneIcon
139184
set => doneIcon = value;
140185
}
141186

187+
/// <summary>
188+
/// The Hide button texture
189+
/// </summary>
190+
[Tooltip("The Hide button texture")]
142191
[SerializeField]
143192
private Texture hideIcon = null;
144193
public Texture HideIcon
@@ -147,6 +196,10 @@ public Texture HideIcon
147196
set => hideIcon = value;
148197
}
149198

199+
/// <summary>
200+
/// The Remove button texture
201+
/// </summary>
202+
[Tooltip("The Remove button texture")]
150203
[SerializeField]
151204
private Texture removeIcon = null;
152205
public Texture RemoveIcon
@@ -155,6 +208,10 @@ public Texture RemoveIcon
155208
set => removeIcon = value;
156209
}
157210

211+
/// <summary>
212+
/// The Show button texture
213+
/// </summary>
214+
[Tooltip("The Show button texture")]
158215
[SerializeField]
159216
private Texture showIcon = null;
160217
public Texture ShowIcon
@@ -202,16 +259,23 @@ public float HoverOffsetZ
202259
set { hoverOffsetZ = value; }
203260
}
204261

205-
206262

263+
/// <summary>
264+
/// The button width for each button
265+
/// </summary>
266+
[Tooltip("The button width for each button")]
207267
[SerializeField]
208268
private float buttonWidth = 0.032f;
209269
public float ButtonWidth
210270
{
211271
get => buttonWidth;
212272
set => buttonWidth = value;
213273
}
214-
274+
275+
/// <summary>
276+
/// The button depth for each button
277+
/// </summary>
278+
[Tooltip("The button depth for each button")]
215279
[SerializeField]
216280
private float buttonDepth = 0.016f;
217281
public float ButtonDepth

0 commit comments

Comments
 (0)