Component:AlwaysOnFacetModule: Difference between revisions

From Resonite Wiki
m minor spelling error
m remove introduction header
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!--T:1-->
{{Infobox Component
{{stub}}
|Image=AlwaysOnFacetModule.png
|Name=Always On Facet Module
}}The AlwaysOnFacetModule component allows apart of a [[Facets|facet]] to remain active while the [[Dash Menu|dashboard]] is closed.
 




<!--T:2-->
<!--T:2-->
== Introduction ==
{{stub}}
{{stub}}


Line 10: Line 12:
== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|_targets (list)|Slot List| The list of slots currently reparented into the active root.
|_targets|{{RootFieldType|SyncRefList`1|[[Type:Slot|Slot]]}}|TypeAdv0=true|
}}
}}


Line 17: Line 19:
This component only applies to [[Facets]].
This component only applies to [[Facets]].


When a [[facet]] is installed in a [[dashboard]], all of the children of a slot containing a AlwaysOnFacetModule are reparented to a [[slot]] outside of the dashboard. This slot is active when the [[dashboard]] is closed, otherwise the facet is inactive due to being under an inactive [[slot]].
When a [[Facets]] is installed in a [[Dash Menu|dashboard]], all of the children of a slot containing a AlwaysOnFacetModule are reparented to a [[Slot]] outside of the dashboard. This slot is active when the [[Dash Menu|dashboard]] is closed, otherwise the facet is inactive due to being under an inactive [[Slot]].


Do not manually modify the _targets list, as it is managed during the normal lifetime of the component. Manually modifying the list may cause unexpected behavior.
Do not manually modify the _targets list, as it is managed during the normal lifetime of the component. Manually modifying the list may cause unexpected behavior.


This will change the hierarchy of the [[facet]], if you rely on your facet using [[dynamic variables]] they may disconnect due to reparenting (many parts of facets are re-parented, be warned).
This will change the hierarchy of the [[Facets]], if you rely on your facet using [[Dynamic Variables|dynamic variables]] they may disconnect due to reparenting (many parts of facets are re-parented, be warned).


Avoid putting this above the [[UIX elements]] of the [[facet]], as it will reparent them and they will no longer show up or may break the canvas.
Avoid putting this above the [[UIX|UIX elements]] of the [[Facets]], as it will reparent them and they will no longer show up or may break the canvas.


<!--T:5-->
<!--T:5-->
== Examples ==
== Examples ==
For creating a taco facet that reports live taco statistics from a [[WebSockets]], and plays an audio clip when a new taco deal is available.
For creating a taco facet that reports live taco statistics from a [[WebSocket|WebSockets]], and plays an audio clip when a new taco deal is available.
In this example the [[WebSockets]] and audio output are active sensitive, and will not work when the dashboard is closed without an AlwaysOnFacetModule.
In this example the [[WebSocket|WebSockets]] and audio output are active sensitive, and will not work when the dashboard is closed without an AlwaysOnFacetModule.


   Taco Facet
   Taco Facet
Line 35: Line 37:
     Logic - (with AlwaysOnFacetModule)
     Logic - (with AlwaysOnFacetModule)
       Taco Facet Logic - (Having the same name helps when debugging)
       Taco Facet Logic - (Having the same name helps when debugging)
         [[ProtoFlux]], [[WebSockets]], audio, and other active sensitive content
         [[ProtoFlux]], [[WebSocket|WebSockets]], audio, and other active sensitive content


When installed, the facet is pulled apart into the following, the exact hierarchy is prone to change but this is the general structure.
When installed, the facet is pulled apart into the following, the exact hierarchy is prone to change but this is the general structure.
Line 51: Line 53:
<!--T:6-->
<!--T:6-->
== Related Components ==
== Related Components ==
[[Category:Components:Radiant UI|Facet (Component)]]
[[Category:Components:Radiant UI:Utility{{#translation:}}|Always On Facet Module]]
[[Category:Components:Radiant UI:Utility|AlwaysOnFacetModule(Component)]]
[[Category:Components{{#translation:}}|Always On Facet Module]]

Latest revision as of 01:18, 20 April 2024

Component image 
Always On Facet Module component as seen in the Scene Inspector

The AlwaysOnFacetModule component allows apart of a facet to remain active while the dashboard is closed.



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


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.
_targets list of Slot

Behavior

This component only applies to Facets.

When a Facets is installed in a dashboard, all of the children of a slot containing a AlwaysOnFacetModule are reparented to a Slot outside of the dashboard. This slot is active when the dashboard is closed, otherwise the facet is inactive due to being under an inactive Slot.

Do not manually modify the _targets list, as it is managed during the normal lifetime of the component. Manually modifying the list may cause unexpected behavior.

This will change the hierarchy of the Facets, if you rely on your facet using dynamic variables they may disconnect due to reparenting (many parts of facets are re-parented, be warned).

Avoid putting this above the UIX elements of the Facets, as it will reparent them and they will no longer show up or may break the canvas.

Examples

For creating a taco facet that reports live taco statistics from a WebSockets, and plays an audio clip when a new taco deal is available. In this example the WebSockets and audio output are active sensitive, and will not work when the dashboard is closed without an AlwaysOnFacetModule.

 Taco Facet
   Canvas - (Having the same name helps when debugging)
     Background and Taco pictures
   Logic - (with AlwaysOnFacetModule)
     Taco Facet Logic - (Having the same name helps when debugging)
       ProtoFlux, WebSockets, audio, and other active sensitive content

When installed, the facet is pulled apart into the following, the exact hierarchy is prone to change but this is the general structure.

 Dashboard Root
   AlwaysOnFacetRoot
     Taco Facet Logic
   DashOffset
     ...Many other slots, some of which go inactive when the dashboard is closed...
       Facets
         Taco Facet
           Canvas
             Background and Taco pictures

Related Components