public MemberwisePropertyEditor() { this.Hints |= HintFlags.HasButton | HintFlags.ButtonEnabled; this.memberPredicate = DefaultMemberPredicate; this.memberAffectsOthers = DefaultMemberAffectsOthers; this.memberPropertySetter = DefaultPropertySetter; this.memberFieldSetter = DefaultFieldSetter; }
public override void DrawPopupContent() { DrawTable("FieldValueInputTable", varInfo.FieldType, varInfo.Name, errored); if (ImGui.Button("OK")) { errored = !FieldValueSetter.TrySetValue(varInfo, inputText, parentObj); if (errored == false) { doSuccess(); } } }
public override void DrawPopupContent() { if (m_FieldInfo is null) { return; } DrawTableWithSingleRow("FieldValueInputTable", m_FieldInfo.FieldType, m_FieldInfo.Name, m_Errored); if (ImGui.Button("OK##FieldValueInputWindow")) { m_Errored = !FieldValueSetter.SetValue(m_FieldInfo, m_InputText, m_FieldInstance); if (m_Errored == false) { doSuccess(); } } }
/// <summary>Initializes a new instance of the <seealso cref="BoolEditorAction"/> class.</summary> /// <param name="newValue">The new value that will be set to the property.</param> /// <param name="action">The action to perform.</param> public BoolEditorAction(bool newValue, FieldValueSetter <bool> action) : base(newValue, action) { }
/// <summary>Initializes a new instance of the <seealso cref="ColorChanged"/> class.</summary> /// <param name="colorID">The color ID that was changed.</param> /// <param name="affectedObjects">The objects that this action will affect.</param> /// <param name="createObjectsAction">The action that creates the specified objects.</param> /// <param name="changeColor">The action that deletes the created objects.</param> public ColorChanged(int colorID, Color newColor, Color oldColor, FieldValueSetter <int, Color> changeColor) : base(newColor, oldColor, changeColor) { ColorID = ColorID; }
/// <summary>Initiailizes a new instance of the <seealso cref="EditorActionWithInverse{T}"/> class.</summary> /// <param name="newValue">The new value that this action will set.</param> /// <param name="action">The action to be performed.</param> /// <param name="inverse">The inverse action of the action.</param> public EditorActionWithInverse(T newValue, FieldValueSetter <T> action, FieldValueSetter <T> inverse) : base(newValue, action) { Inverse = inverse; }
/// <summary>Initiailizes a new instance of the <seealso cref="EditorAction{T}"/> class.</summary> /// <param name="newValue">The new value that this action will set.</param> /// <param name="action">The action to be performed.</param> public EditorAction(T newValue, FieldValueSetter <T> action) : base() { NewValue = newValue; Action = action; }
/// <summary>Initializes a new instance of the <seealso cref="BlendingChanged"/> class.</summary> /// <param name="affectedObjects">The objects that this action will affect.</param> /// <param name="centralPoint">The central point that was taken into account while flipping the objects horizontally.</param> /// <param name="action">The function that rotates the specified objects.</param> public BlendingChanged(int value, FieldValueSetter <int> action) : base(value, action) { }
/// <summary>Initiailizes a new instance of the <seealso cref="EditorAction{T}"/> class.</summary> /// <param name="newValue">The new value that this action will set.</param> /// <param name="oldValue">The old value of the property before the action was performed.</param> /// <param name="action">The action to be performed</param> public DoubleEditorAction(double newValue, double oldValue, FieldValueSetter <double> action) : base(newValue, oldValue, action) { }
/// <summary>Initializes a new instance of the <seealso cref="GridSnapChanged"/> class.</summary> /// <param name="newValue">The new value that will be set to the Grid Snap property.</param> /// <param name="action">The action that will change the Grid Snap property.</param> public GridSnapChanged(bool newValue, FieldValueSetter <bool> action) : base(newValue, action) { }
/// <summary>Initiailizes a new instance of the <seealso cref="EditorActionNewOldValue{T}"/> class.</summary> /// <param name="newValue">The new value that this action will set.</param> /// <param name="oldValue">The old value of the property before the action was performed.</param> /// <param name="action">The action to be performed.</param> public EditorActionNewOldValue(T newValue, T oldValue, FieldValueSetter <T> action) : base(newValue, action) { OldValue = oldValue; }
/// <summary>Initializes a new instance of the <seealso cref="GridSizeChanged"/> class.</summary> /// <param name="newValue">The new value that will be set to the Grid Size property.</param> /// <param name="oldValue">The old value of the Grid Size property before the action was performed.</param> /// <param name="action">The action that will change the Free Move property.</param> public GridSizeChanged(double newValue, double oldValue, FieldValueSetter <double> action) : base(newValue, oldValue, action) { }
/// <summary>Initializes a new instance of the <seealso cref="SwipeChanged"/> class.</summary> /// <param name="newValue">The new value that will be set to the Swipe property.</param> /// <param name="action">The action that will change the Swipe property.</param> public SwipeChanged(bool newValue, FieldValueSetter <bool> action) : base(newValue, action) { }
/// <summary>Initializes a new instance of the <seealso cref="DualLayerModeChanged"/> class.</summary> /// <param name="newValue">The new value that will be set to the Dual Layer Mode property.</param> /// <param name="action">The action that will change the Dual Layer Mode property.</param> public DualLayerModeChanged(bool newValue, FieldValueSetter <bool> action) : base(newValue, action) { }