Class EditorGUILayoutWrapper
UI library used to display the High Precision Component fields.
Namespace: Unity.Geospatial.HighPrecision.Editor
Assembly: solution.dll
Syntax
public class EditorGUILayoutWrapper
Methods
BeginFoldoutHeaderGroup(Boolean, String)
Make a label with a foldout arrow to the left of it. This is useful for folder-like structures, where child objects only appear if you've unfolded the parent folder. This control cannot be nested in another BeginFoldoutHeaderGroup. To use multiple of these foldouts, you must end each method with EndFoldoutHeaderGroup().
Declaration
public virtual bool BeginFoldoutHeaderGroup(bool foldout, string content)
Parameters
Type | Name | Description |
---|---|---|
Boolean | foldout | The shown foldout state. |
String | content | The label to show. |
Returns
Type | Description |
---|---|
Boolean | The foldout state selected by the user. true if you should render sub-objects.; false otherwise. |
Double3Field(String, double3, String, String, String)
Make a text field for entering 3 fields containing each a double value.
Declaration
public virtual double3 Double3Field(string label, double3 value, string labelX = "X", string labelY = "Y", string labelZ = "Z")
Parameters
Type | Name | Description |
---|---|---|
String | label | Optional label to display in front of the fields. |
double3 | value | The value to edit. |
String | labelX | Text to display in front of the first float field. |
String | labelY | Text to display in front of the second float field. |
String | labelZ | Text to display in front of the third float field. |
Returns
Type | Description |
---|---|
double3 | The value entered by the user. |
EndFoldoutHeaderGroup()
Closes a group started with BeginFoldoutHeaderGroup(Boolean, String).
Declaration
public virtual void EndFoldoutHeaderGroup()
Float1Field(String, Single)
Make a text field for entering a single float value.
Declaration
public virtual float Float1Field(string label, float value)
Parameters
Type | Name | Description |
---|---|---|
String | label | Optional label to display in front of the fields. |
Single | value | The value to edit. |
Returns
Type | Description |
---|---|
Single | The value entered by the user. |
Float3Field(String, float3, String, String, String)
Make a text field for entering 3 fields containing each a float value.
Declaration
public virtual float3 Float3Field(string label, float3 value, string labelX = "X", string labelY = "Y", string labelZ = "Z")
Parameters
Type | Name | Description |
---|---|---|
String | label | Optional label to display in front of the fields. |
float3 | value | The value to edit. |
String | labelX | Text to display in front of the first float field. |
String | labelY | Text to display in front of the second float field. |
String | labelZ | Text to display in front of the third float field. |
Returns
Type | Description |
---|---|
float3 | The value entered by the user. |
HelpBox(String, MessageType, Boolean)
Make a help box with a message to the user.
Declaration
public virtual void HelpBox(string message, MessageType type, bool wide = true)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message text. |
MessageType | type | The type of message. |
Boolean | wide | true the box will cover the whole width of the window; false otherwise it will cover the controls part only. |
Label(String)
Make an auto-layout label. Labels have no user interaction, do not catch mouse clicks and are always rendered in normal style.
Declaration
public virtual void Label(string str)
Parameters
Type | Name | Description |
---|---|---|
String | str | Text to display on the label. |
Popup(String, Int32, String[])
Make a generic popup selection field.
Declaration
public virtual int Popup(string label, int selectedIndex, string[] displayedOptions)
Parameters
Type | Name | Description |
---|---|---|
String | label | Optional label in front of the field. |
Int32 | selectedIndex | The index of the option the field shows. |
String[] | displayedOptions | An array with the options shown in the popup. |
Returns
Type | Description |
---|---|
Int32 | The index of the option that has been selected by the user. |