Component:PagingControl: Difference between revisions

From Resonite Wiki
m ProbablePrime moved page PagingControl (Component) to Component:PagingControl: Creating component Namespace
Automated: update Replace
 
(3 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=PagingControlComponent.png
|Image=PagingControlComponent.png
|Name=Paging Control
|Name=Paging Control
}}
}}
The '''PagingControl''' component allows for counting up a number of items specified, then outputs it to either a [[Component:Text|Text]] or [[Component:TextRenderer|TextRenderer]] component.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|ItemsPerPage|Int|
|ItemsPerPage|Int| The increment to count up by.
|TotalItems|Int|
|TotalItems|Int| The total amount of items.
|HasMoreItems|Bool|
|HasMoreItems|Bool| Allows to count beyond the max set of items.
|SkipItems|Int|
|SkipItems|Int| Skips items that are listed here.
|NoItemsLabel|String|
|NoItemsLabel|String| Shows the output as this when there are no items.
|PagingInfoLabel|String|
|PagingInfoLabel|String| The structure of how the items will be shown to the user.
|TotalPages|Int|
|TotalPages|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv6=true| The total amount of items.
|RemainingItems|Int|
|RemainingItems|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv7=true| Shows how many items are remaining.
|_label|IField`1|TypeString8=IField<string>|
|_label|{{RootFieldType|FieldDrive`1|[[Type:String|String]]}}|TypeAdv8=true| The text to output.
|_previousEnabled|IField`1|TypeString9=IField<bool>|
|_previousEnabled|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv9=true| Becomes false if the minimum is currently reached.
|_nextEnabled|IField`1|TypeString10=IField<bool>|
|_nextEnabled|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv10=true| Becomes false if the maximum is currently reached.
}}
 
== Sync Delegates ==
{{Table ComponentTriggers
|NextPage()|[[Type:Delegate|Delegate]]&lt;[[Type:IButton|IButton]]: button, [[Type:ButtonEventData|ButtonEventData]]: eventData&gt;|
|PreviousPage()|[[Type:Delegate|Delegate]]&lt;[[Type:IButton|IButton]]: button, [[Type:ButtonEventData|ButtonEventData]]: eventData&gt;|
|NextPage()|[[Type:Action|Action]]|
|PreviousPage()|[[Type:Action|Action]]|
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Great for counting items.


<!--T:4-->
<!--T:4-->
Line 33: Line 43:
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:Components{{#translation:}}|Paging Control]]
[[Category:ComponentStubs]]
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Paging Control]]
[[Category:Components:Common UI:General{{#translation:}}|Paging Control]]
[[Category:Components:Common UI:General{{#translation:}}|Paging Control]]

Latest revision as of 21:06, 6 November 2024

Component image 
Paging Control component as seen in the Scene Inspector


The PagingControl component allows for counting up a number of items specified, then outputs it to either a Text or TextRenderer component.

Fields

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.
ItemsPerPage Int The increment to count up by.
TotalItems Int The total amount of items.
HasMoreItems Bool Allows to count beyond the max set of items.
SkipItems Int Skips items that are listed here.
NoItemsLabel String Shows the output as this when there are no items.
PagingInfoLabel String The structure of how the items will be shown to the user.
TotalPages raw output of Int The total amount of items.
RemainingItems raw output of Int Shows how many items are remaining.
_label field drive of String The text to output.
_previousEnabled field drive of Bool Becomes false if the minimum is currently reached.
_nextEnabled field drive of Bool Becomes false if the maximum is currently reached.

Sync Delegates

Triggers
Method Name Method type and Arguments. Description
NextPage() Delegate<IButton: button, ButtonEventData: eventData>
PreviousPage() Delegate<IButton: button, ButtonEventData: eventData>
NextPage() Action
PreviousPage() Action

Usage

Great for counting items.

Examples

Related Components