Moduprint/API/Methods: Difference between revisions

From Resonite Wiki
< Moduprint‎ | API
SetTabActive, NewPrint, NewPrintAt
Show/HideTabContent
Line 1: Line 1:
All methods listed here are accessible through slot [[Component:DynamicReferenceVariable|Dynamic Reference Variables]] named <code>Manager/Method.<i>name</i></code>.
All methods listed here are accessible through slot [[Component:DynamicReferenceVariable|Dynamic Reference Variables]] named <code>Manager/Method.<i>name</i></code>.
=== HideTabContent ===
Hides the tab's content. To set a tab active, use <code>SetTabActive</code> instead. This method is only useful for unpacking flux into multiple tabs.
{| class="wikitable"
|+Context
|-
! Name !! Type !! !! Purpose
|-
| <code>Tab</code> || {{Template:TypeColorCard|Slot}} || Required || Tab whose content should be hidden.
|}


=== NewPrint ===
=== NewPrint ===
Line 89: Line 101:
|-
|-
| <code>Tab</code>/<code>Print</code> || {{Template:TypeColorCard|Slot}} || Required || The tab to set active or the print itself to set no tab active.
| <code>Tab</code>/<code>Print</code> || {{Template:TypeColorCard|Slot}} || Required || The tab to set active or the print itself to set no tab active.
|}
=== ShowTabContent ===
Shows the tab's content. To set a tab active, use <code>SetTabActive</code> instead. This method is only useful for unpacking flux into multiple tabs.
{| class="wikitable"
|+Context
|-
! Name !! Type !! !! Purpose
|-
| <code>Tab</code> || {{Template:TypeColorCard|Slot}} || Required || Tab whose content should be shown.
|}
|}



Revision as of 16:15, 4 August 2025

All methods listed here are accessible through slot Dynamic Reference Variables named Manager/Method.name.

HideTabContent

Hides the tab's content. To set a tab active, use SetTabActive instead. This method is only useful for unpacking flux into multiple tabs.

Context
Name Type Purpose
Tab Slot Required Tab whose content should be hidden.

NewPrint

Creates a new print under the local user's space. Use NewPrintTab if you need the print to be created at a specific location.

Result
Name Type Purpose
Manager/Local.Result Slot The created print.

NewPrintAt

Creates a new print.

Context
Name Type Purpose
Parent Slot Optional The parent of the print, defaults to local user space.
Position float3 Optional Global Position.
Rotation floatQ Optional Global Rotation.
Scale float3 Optional Global Scale, defaults to 1.
Result
Name Type Purpose
Manager/Local.Result Slot The created print.

NewTab, NewActiveTab

Context
Name Type Purpose
Print Slot Required The print to create a new tab on.
Result
Name Type Purpose
Manager/Local.Result Slot The created tab.

NewTabWithContent

The tab content holder is created directly under the provided pack target slot.

Context
Name Type Purpose
Print Slot Required The print to create a new tab on.
Content Slot Required The content slot of the tab.
PackTarget Slot Optional Where the tab is parented to.
Result
Name Type Purpose
Manager/Local.Result Slot The created tab.

SetTabActive

Context
Name Type Purpose
Tab/Print Slot Required The tab to set active or the print itself to set no tab active.

ShowTabContent

Shows the tab's content. To set a tab active, use SetTabActive instead. This method is only useful for unpacking flux into multiple tabs.

Context
Name Type Purpose
Tab Slot Required Tab whose content should be shown.

Snap

Context
Name Type Purpose
Print Slot Required The print to snap to.
Target Slot Required Object to snap to the print.
Result
Name Type Purpose
Manager/Local.Result String Default, Drop, Handled.