→Events: OnSnapped, OnModuleInstalled, OnModuleUninstalled, OnSearchUnpackHandler |
→Events: OnBeforeSlotSelected, OnMoveContent, OnTabCreated |
||
(One intermediate revision by the same user not shown) | |||
Line 31: | Line 31: | ||
|- | |- | ||
| <code>Scale</code> || {{Template:TypeColorCard|float3}} || The global scale. | | <code>Scale</code> || {{Template:TypeColorCard|float3}} || The global scale. | ||
|} | |||
==== OnBeforeSlotSelected ==== | |||
Used to confirm that a slot can be picked up by a selection. | |||
{| class="wikitable" | |||
|+Event Data | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Print</code> || {{Template:TypeColorCard|Slot}} || The selection slot. | |||
|- | |||
| <code>Slot</code> || {{Template:TypeColorCard|Slot}} || The slot to be picked up. | |||
|- | |||
| <code>Result</code> || {{Template:TypeColorCard|String}} || <code>Default</code>, <code>Select</code>, <code>Cancel</code>. | |||
|} | |||
==== OnChangeTab ==== | |||
{| class="wikitable" | |||
|+Event Data | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Print</code> || {{Template:TypeColorCard|Slot}} || The print. | |||
|- | |||
| <code>Tab</code> || {{Template:TypeColorCard|Slot}} || The new tab, can be <i>null</i>. | |||
|- | |||
| <code>PreviousTab</code> || {{Template:TypeColorCard|Slot}} || The previous tab, can be <i>null</i>. | |||
|} | |||
==== OnConfirmPackHandler ==== | |||
Used to verify if a pack handler can be used. The allowed flag can be unset to disallow packing. | |||
{| class="wikitable" | |||
|+Event Data | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Print</code> || {{Template:TypeColorCard|Slot}} || The print. | |||
|- | |||
| <code>PackHandler</code> || {{Template:TypeColorCard|Slot}} || The pack handler in question. | |||
|- | |||
| <code>Allowed</code> || {{Template:TypeColorCard|bool}} || Whether it can be used. | |||
|} | |} | ||
Line 65: | Line 111: | ||
|- | |- | ||
| <code>Module</code> || {{Template:TypeColorCard|Slot}} || The module. | | <code>Module</code> || {{Template:TypeColorCard|Slot}} || The module. | ||
|} | |||
==== OnMoveContent ==== | |||
Whenever a tab's content slot is moved (local transform). | |||
{| class="wikitable" | |||
|+Event Data | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Tab</code> || {{Template:TypeColorCard|Slot}} || The tab whose content was moved. | |||
|} | |} | ||
Line 75: | Line 133: | ||
|- | |- | ||
| <code>Print</code> || {{Template:TypeColorCard|Slot}} || The new print. | | <code>Print</code> || {{Template:TypeColorCard|Slot}} || The new print. | ||
|} | |||
==== OnRegistered ==== | |||
Dispatched as <code>OnRegistered.<i>RegistryName</i></code>. | |||
{| class="wikitable" | |||
|+Event Data | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Entry</code> || {{Template:TypeColorCard|Slot}} || The added entry. | |||
|- | |||
| <code>Priority</code> || {{Template:TypeColorCard|long}} || The entry priority. | |||
|} | |} | ||
Line 144: | Line 216: | ||
|- | |- | ||
| <code>WasHandled</code> || {{Template:TypeColorCard|bool}} || If the result of the snapping event was <code>Handled</code>, otherwise it was <code>Default</code>. | | <code>WasHandled</code> || {{Template:TypeColorCard|bool}} || If the result of the snapping event was <code>Handled</code>, otherwise it was <code>Default</code>. | ||
|} | |||
==== OnTabCreated ==== | |||
{| class="wikitable" | |||
|+Event Data | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Tab</code> || {{Template:TypeColorCard|Slot}} || The new tab. | |||
|} | |||
==== OnUnregistered ==== | |||
Dispatched as <code>OnUnregistered.<i>RegistryName</i></code>. | |||
{| class="wikitable" | |||
|+Event Data | |||
|- | |||
! Name !! Type !! Purpose | |||
|- | |||
| <code>Entry</code> || {{Template:TypeColorCard|Slot}} || The removed entry. | |||
|} | |} |
Latest revision as of 19:12, 5 August 2025
Theme
The theme registry is used by the Theming Module to generate Manager/Theme.Key
dynamic variables. It is used for styling the user interface as well as providing the default assets such as sprites or textures. When multiple entries define a key, the highest priority wins.
Each entry has a Theme
Dynamic Variable Space and each child has the name (without namespace) of a key it defines or overrides. A key has the dynamic variables Theme/Key
of any of the supported types.
IAssetProvider<Sprite>
IAssetProvider<ITexture2D>
IAssetProvider<Material>
Rect
float
Events
All events on a manager are defined as Dynamic Reference Variables of the data slot following the naming scheme Manager/EventData.EventName
.
OnBeforePrintCreated
All event data can be modified by events.
Name | Type | Purpose |
---|---|---|
Parent |
Slot |
The parent slot where it should be created. |
Position |
float3 |
The global position. |
Rotation |
floatQ |
The global rotation. |
Scale |
float3 |
The global scale. |
OnBeforeSlotSelected
Used to confirm that a slot can be picked up by a selection.
Name | Type | Purpose |
---|---|---|
Print |
Slot |
The selection slot. |
Slot |
Slot |
The slot to be picked up. |
Result |
String |
Default , Select , Cancel .
|
OnChangeTab
Name | Type | Purpose |
---|---|---|
Print |
Slot |
The print. |
Tab |
Slot |
The new tab, can be null. |
PreviousTab |
Slot |
The previous tab, can be null. |
OnConfirmPackHandler
Used to verify if a pack handler can be used. The allowed flag can be unset to disallow packing.
Name | Type | Purpose |
---|---|---|
Print |
Slot |
The print. |
PackHandler |
Slot |
The pack handler in question. |
Allowed |
bool |
Whether it can be used. |
OnHideTabContent
Name | Type | Purpose |
---|---|---|
Tab |
Slot |
The tab whose content is about to be hidden. |
Intention |
String |
DeleteTab or null.
|
The intention can be used for optimization. When a tab is about to be deleted, some actions may be unnecessary.
OnModuleInstalled
Name | Type | Purpose |
---|---|---|
Module |
Slot |
The module. |
OnModuleUninstalled
Name | Type | Purpose |
---|---|---|
Module |
Slot |
The module. |
OnMoveContent
Whenever a tab's content slot is moved (local transform).
Name | Type | Purpose |
---|---|---|
Tab |
Slot |
The tab whose content was moved. |
OnPrintCreated
Name | Type | Purpose |
---|---|---|
Print |
Slot |
The new print. |
OnRegistered
Dispatched as OnRegistered.RegistryName
.
Name | Type | Purpose |
---|---|---|
Entry |
Slot |
The added entry. |
Priority |
long |
The entry priority. |
OnSearchUnpackHandler
If a module can unpack the target, it should assign an unpack handler. The fallback option is used for vanilla packing because the unpacked slot cannot be confidently identified as a slot containing only packed ProtoFlux. The displayed name can be overridden.
Name | Type | Purpose |
---|---|---|
UnpackTarget |
Slot |
The slot to be unpacked. |
Print |
Slot |
The print onto which it should be unpacked. |
DisplayName |
String |
The displayed name for the unpack option. |
UnpackHandler |
Slot |
The dynamic impulse used for unpacking. |
Fallback |
bool |
If the handler should only be used if no other options are available. |
IsDummy |
bool |
If the handler is not an actual unpacking function and instead performs some other action. |
OnShowTabContent
Name | Type | Purpose |
---|---|---|
Tab |
Slot |
The tab whose content is about to be shown. |
Intention |
String |
or null.
|
OnSnap
Modify the result accordingly. Only the local transform should be changed, the object will be reparented (keeping the transform) based on the result.
Name | Type | Purpose |
---|---|---|
Print |
Slot |
The print onto which something is snapped. |
Target |
Slot |
The object to be snapped. |
Result |
String |
Default , Handled , Drop .
|
OnSnapped
After an object has been snapped.
Name | Type | Purpose |
---|---|---|
Print |
Slot |
The print onto which something was snapped. |
Target |
Slot |
The object that was snapped. |
OriginalPosition |
float3 |
The object's local positoin before it was snapped. |
WasHandled |
bool |
If the result of the snapping event was Handled , otherwise it was Default .
|
OnTabCreated
Name | Type | Purpose |
---|---|---|
Tab |
Slot |
The new tab. |
OnUnregistered
Dispatched as OnUnregistered.RegistryName
.
Name | Type | Purpose |
---|---|---|
Entry |
Slot |
The removed entry. |