Class InspectorUIHelper
- Namespace
- MonkeyLoader.Resonite.UI.Inspectors
- Assembly
- MonkeyLoader.Resonite.Integration.dll
Contains helper methods to generate common elements of FrooxEngine.WorkerInspectors.
public static class InspectorUIHelper
- Inheritance
-
InspectorUIHelper
- Inherited Members
Methods
BuildHeaderOpenParentButtons<TReference>(UIBuilder, TReference)
Constructs a reference editor field's open target's parent FrooxEngine.Slot and open target('s parent) FrooxEngine.Worker buttons in the context of the inspector header.
public static ReferenceField<TReference> BuildHeaderOpenParentButtons<TReference>(this UIBuilder ui, TReference reference) where TReference : class, IWorldElement
Parameters
ui
UIBuilderThe FrooxEngine.UIX.UIBuilder used to construct the buttons.
reference
TReferenceThe reference who's parents to open.
Returns
- ReferenceField<TReference>
The modifiable FrooxEngine.ReferenceField<T> constructed to hold the
reference
.
Type Parameters
TReference
The reference target type.
Exceptions
- ArgumentNullException
When the
reference
isnull
.
BuildOneWayReference<TReference>(UIBuilder, string, ISyncRef<TReference>)
Constructs a reference editor field that shows the given FrooxEngine.ISyncRef<T>'s target.
public static void BuildOneWayReference<TReference>(this UIBuilder ui, string name, ISyncRef<TReference> syncRef) where TReference : class, IWorldElement
Parameters
ui
UIBuilderThe FrooxEngine.UIX.UIBuilder used to construct the editor field.
name
stringThe name to label the field with.
syncRef
ISyncRef<TReference>The reference who's target to display.
Type Parameters
TReference
The reference target's type.
BuildOneWayReference<TReference>(UIBuilder, string, TReference?)
Constructs a reference editor field that shows the given reference
.
public static ReferenceField<TReference> BuildOneWayReference<TReference>(this UIBuilder ui, string name, TReference? reference = null) where TReference : class, IWorldElement
Parameters
ui
UIBuilderThe FrooxEngine.UIX.UIBuilder used to construct the editor field.
name
stringThe name to label the field with.
reference
TReferenceThe reference to display.
Returns
- ReferenceField<TReference>
The modifiable FrooxEngine.ReferenceField<T> constructed to hold the
reference
.
Type Parameters
TReference
The reference target type.
BuildOneWayValue<TValue>(UIBuilder, string, IField<TValue>)
Constructs a value editor field that shows the given FrooxEngine.IField<T>'s value.
public static void BuildOneWayValue<TValue>(this UIBuilder ui, string name, IField<TValue> field)
Parameters
ui
UIBuilderThe FrooxEngine.UIX.UIBuilder used to construct the editor field.
name
stringThe name to label the field with.
field
IField<TValue>The field who's value to display.
Type Parameters
TValue
The value target.
BuildOneWayValue<TValue>(UIBuilder, string, TValue?)
Constructs a value editor field that shows the given value
.
public static ValueField<TValue> BuildOneWayValue<TValue>(this UIBuilder ui, string name, TValue? value = default)
Parameters
ui
UIBuilderThe FrooxEngine.UIX.UIBuilder used to construct the editor field.
name
stringThe name to label the field with.
value
TValueThe value to display.
Returns
- ValueField<TValue>
The modifiable FrooxEngine.ValueField<T> constructed to hold the
value
.
Type Parameters
TValue
The value type.
BuildTwoWayReference<TReference>(UIBuilder, string, ISyncRef<TReference>)
Constructs a reference editor field that is linked with the given FrooxEngine.ISyncRef<T>.
public static void BuildTwoWayReference<TReference>(this UIBuilder ui, string name, ISyncRef<TReference> syncRef) where TReference : class, IWorldElement
Parameters
ui
UIBuilderThe FrooxEngine.UIX.UIBuilder used to construct the editor field.
name
stringThe name to label the field with.
syncRef
ISyncRef<TReference>The reference to link with.
Type Parameters
TReference
The reference target's type.
BuildTwoWayValue<TValue>(UIBuilder, string, IField<TValue>)
Constructs a value editor field that is linked with the given FrooxEngine.IField<T>.
public static void BuildTwoWayValue<TValue>(this UIBuilder ui, string name, IField<TValue> field)
Parameters
ui
UIBuilderThe FrooxEngine.UIX.UIBuilder used to construct the editor field.
name
stringThe name to label the field with.
field
IField<TValue>The field to link with.
Type Parameters
TValue
The value target.