Skip to main content

ValueMember

A class in Root.Township, the global namespace.

Inspector entry for one field or property marked with BubbleInspectorFieldAttribute, shown in an InteractableInspector bubble.

Constructors​

MemberWhat it is
ValueMember(FieldInfo field)Creates a ValueMember from property.
ValueMember(PropertyInfo property)Creates a ValueMember from property.

Fields​

5 private and internal fields
MemberWhat it is
private static InteractableInspector currentInteractorThe knob or other control currently spawned by any value entry; shared, so opening one releases the last.
private InteractableInspector currentInteractorInternalControl spawned by this entry, cleaned up in Clean if it is still the current one.
private Func<object, object> valueGetterReads the field or property from a target object.
private string valueNameThe field or property name shown in the bubble.
private Action<object, object> valueSetterWrites the field or property on a target object.

Properties​

MemberWhat it is
override InspectorType InspectorType { get; }Always InspectorType.Value.
InteractionType InteractionType { get; }How the value can be edited, from the attribute.
override string Name { get; }The member name followed by a colon.

Methods​

MemberWhat it is
override void Clean()Cleans up its knob bubble if it is the one open.
object GetValue(object target)Reads the value from the target.
override void Interact(Component target, InteractableInspector interactable)Shows the current value, and for knob fields opens a knob bubble to change it.
void SetNumericValue(float value, object target)Writes a float to the target and updates the label.

Used in​

Members of other types that take, return or hold a ValueMember: