Component:GenericModalDialogSpawner: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add info
 
Line 3: Line 3:
|Name=Generic Modal Dialog Spawner`1
|Name=Generic Modal Dialog Spawner`1
}}
}}
{{stub}}
The '''GenericModalDialogSpawer''' component works in world space. The Generic type it takes has to be a component type. This component activates when on the same slot as a button. When activated, this component attaches a new instance of '''T''' to the world, triggers <code>Initializer</code> with the new Component as an argument, and then positions it in front of the user.


== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|Initializer|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]&lt;T&gt;}}|TypeAdv0=true|
|Initializer|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]&lt;T&gt;}}|TypeAdv0=true| The Sync delegate to call with a
|Size|Float2|
|Size|Float2| The size of the dialog.
|CloseOnClick|Bool|
|CloseOnClick|Bool| Whether to close the Dialog on click.
|CloseOnContextMenu|Bool|
|CloseOnContextMenu|Bool| Whether to close the Dialog when opening the context menu.
}}
}}


== Behavior ==
== Usage ==
This component needs a [[Component:ModalOverlayManager]] above it in order to work.


== Examples ==
== Examples ==
{{stub}}


== See Also ==
== See Also ==
* [[Component:GenericUserspaceDialogSpawner]]


[[Category:Components:Uncategorized{{#translation:}}|Generic Modal Dialog Spawner`1]]
[[Category:Components:Uncategorized{{#translation:}}|Generic Modal Dialog Spawner`1]]
[[Category:Components{{#translation:}}|Generic Modal Dialog Spawner`1]]
[[Category:Components{{#translation:}}|Generic Modal Dialog Spawner`1]]
[[Category:Generic Components{{#translation:}}|Generic Modal Dialog Spawner`1]]
[[Category:Generic Components{{#translation:}}|Generic Modal Dialog Spawner`1]]
[[Category:ComponentStubs]]

Latest revision as of 17:37, 2 March 2025

Component image 
File:GenericModalDialogSpawner`1Component.png
Generic Modal Dialog Spawner`1 component as seen in the Scene Inspector

The GenericModalDialogSpawer component works in world space. The Generic type it takes has to be a component type. This component activates when on the same slot as a button. When activated, this component attaches a new instance of T to the world, triggers Initializer with the new Component as an argument, and then positions it in front of the user.

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
Initializer delegate of identity Action`1<T> The Sync delegate to call with a
Size Float2 The size of the dialog.
CloseOnClick Bool Whether to close the Dialog on click.
CloseOnContextMenu Bool Whether to close the Dialog when opening the context menu.

Usage

This component needs a Component:ModalOverlayManager above it in order to work.

Examples

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

See Also