The '''WorldCloseAction''' component is used to handle the leaving of a world after the user confirms leaving. This component only works on user space.
<!--T:2-->
== Fields ==
== Intoduction ==
{{Table ComponentFields
|Action|'''[[#CloseAction|WorldCloseAction.CloseAction]]'''|TypeAdv0=true| The kind of action this [[Button Events]] recieving Component is doing to a world.
|WaitingConfirm|Bool| Whether the game is waiting on confirmation via double click, which is 2 clicks within a 2 second time frame.
|OnClosed|{{RootFieldType|SyncDelegate`1|[[Type:Action|Action]]}}|TypeAdv2=true| What Action Sync delegate to call when the world finishes closing.
}}
<!--T:3-->
== CloseAction ==
== Usage ==
{{Table EnumValues
{{Table ComponentFields
|LeaveOrOpenCloseScreen|0| This button is set to leave the world or open the save and close screen.
|Action|CloseAction|
|Discard|1| The user has opted to Discard the changes to the world and exit.
|WaitingConfirm|Bool|
|Save|2| The user has opted to save the changes to the world and then exit.
|OnClosed|Action|
|SaveAs|3| The user has opted to save the changes to the world, and specify a place to save the world orb before closing.
}}
}}
<!--T:4-->
== Usage ==
== Behavior ==
{{stub}}
<!--T:5-->
== Examples ==
== Examples ==
Used in the worlds browser for a user to leave a selected world.
<!--T:6-->
== See Also ==
== Related Components ==
[[Category:Components{{#translation:}}|World Close Action]]
</translate>
[[Category:Components With Nested Enums{{#translation:}}|World Close Action]]