class
GUIResourceField
Public
Methods
staticGetGuiTypeName
Returns type name of the GUI element used for finding GUI element styles.
GetValue
SetValueReference
Equivalent to , but accessed through a resource reference.
GetValueReference
GetUuid
Returns the UUID of the resource referenced by the field.
Returns empty UUID if no resource is referenced.
staticCreate
Creates a new GUI element.
- contents
- Structure describing the contents of the GUI element to create.
- styleClass
- Style class that will be used for determining GUI element visuals from the current style sheet. If no class is provided, default style is determined based on GUI element type.
- options
- Additional options that control GUI element size and position. This will override options set in the style sheet.
Fields
OnValueChanged
Triggered whenever the referenced resource changes.
Internal
Constructors
GUIResourceField
Methods
UpdateLayoutForChildren
Calculates sizes and relative positions for all child elements.
Should be preceded with a call to UpdateOptimalLayoutSizes().
CalculateUnconstrainedOptimalSize
Calculates the optimal size for the GUI element, ignoring size constraints.
Private
Methods
~GUIResourceField
SetUuid
Sets the resource referenced by the field by finding the resource with the provided UUID.
- uuid
- Unique resource identifier of the resource to show, or empty string if no resource.
- triggerEvent
- Determines should the onValueChanged() event be triggered if the new UUID is different from the previous one.
DataDropped
Triggered when a drag and drop operation finishes over this element.
OnDropButtonClicked
Triggered when the drop button that displays the game object label is clicked.
OnClearButtonClicked
Triggered when the clear button is clicked.