ProtoFlux:Create Field Undo Step: Difference between revisions

From Resonite Wiki
create undo field step
 
Added links. Style.
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{#Invoke:ProtoFlux|GenerateUI
{{#Invoke:ProtoFlux|GenerateUI
|Name=Create Field Undo Step
|Name=Create Field Undo Step
|Category=Wiki
|Category=Undo
|Inputs=
|Inputs=
[
[
{"Name":"*", "Type":"Impulse"},
{"Name":"*", "Type":"Call"},
{"Name":"Target", "Type":"IField"},
{"Name":"Target", "Type":"IField"},
{"Name":"ForceNew", "Type":"bool"}
{"Name":"ForceNew", "Type":"bool"}
Line 15: Line 15:




The node will create an undo step in the context menu of the person who the impulse came from. The node will then send to the undo manager in the world the value that the field provided into Target should revert to. Or in more simpler terms, the current value the provided Target ([[Type:IField`1|IField]]) contains is what it will be reset to when undone via the context menu.
The '''Create Field Undo Step''' node will create an [[Undo|undo]] step in the [[Context Menu]] of the person who the [[Impulses|impulse]] came from. The node will then send to the [[Component:UndoManager|UndoManager]] component in the [[World|world]] the value that the field provided into Target should revert to. Or in more simpler terms, the current value the provided Target ([[Type:IField`1|IField]]) contains is what it will be reset to when undone via the context menu.


when this node is paired with an [[ProtoFlux:Begin Undo Batch|Undo Batch]], it's description if has one, will be ignored, and will be part of the [[ProtoFlux:Begin Undo Batch|Undo Batch]]'s undo step instead.  
When this node is paired with an [[ProtoFlux:Begin Undo Batch|Undo Batch]], it's description if has one, will be ignored, and will be part of the [[ProtoFlux:Begin Undo Batch|Undo Batch]]'s undo step instead.  




== Inputs ==
== Inputs ==


=== Input (Call) ===  
=== Input ([[Impulses|Call]]) ===  
Create the undo step and set the revert to value to the current value in the provided Target ([[Type:IField`1|IField]])
Create the undo step and set the revert to value to the current value in the provided Target ([[Type:IField`1|IField]])


Line 36: Line 36:
== Outputs ==
== Outputs ==


=== Output (Continuation) ===
=== Output ([[Impulses|Continuation]]) ===
The undo steps to batch with this undo batch followed by an [[ProtoFlux:End Undo Batch|End Undo Batch]].
Continues to More undo steps, continues to code that eventually ends, or an [[ProtoFlux:End Undo Batch|End Undo Batch]] that continues to eventually ended code.


== Examples ==
== Examples ==


{{Stub}}
<gallery widths=480px heights=480px>
File:ProtoFlux_example_undo_node_settup|This node being used in a set of nodes that undoes a bunch of actions that was done by a previous button
</gallery>


[[Category:ProtoFlux:Undo]]
[[Category:ProtoFlux:Undo]]

Latest revision as of 13:21, 5 March 2025

Create Field Undo Step
*
Next
Target
ForceNew
Undo


The Create Field Undo Step node will create an undo step in the Context Menu of the person who the impulse came from. The node will then send to the UndoManager component in the world the value that the field provided into Target should revert to. Or in more simpler terms, the current value the provided Target (IField) contains is what it will be reset to when undone via the context menu.

When this node is paired with an Undo Batch, it's description if has one, will be ignored, and will be part of the Undo Batch's undo step instead.


Inputs

Input (Call)

Create the undo step and set the revert to value to the current value in the provided Target (IField)

ForceNew (Bool)

This article or section is a Stub. You can help the Resonite Wiki by expanding it.

Target (IField)

The IField to undo for this undo step.


Outputs

Output (Continuation)

Continues to More undo steps, continues to code that eventually ends, or an End Undo Batch that continues to eventually ended code.

Examples