Difference between revisions of "LGUI2:Items"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
An Item in [[LavishGUI 2]] is essentially a Model from which [[LGUI2:itemview|itemview]] elements can be generated. | An Item in [[LavishGUI 2]] is essentially a Model from which [[LGUI2:itemview|itemview]] elements can be generated. | ||
− | Custom | + | Custom [[LGUI2:Item View Generators|Item View Generators]] can be assigned to [[LGUI2:Item Lists|Item Lists]] to handle different types of Items and generate different types of views. |
== Defining an Item == | == Defining an Item == | ||
Line 11: | Line 11: | ||
! itemType | ! itemType | ||
| The type of Item, or "default" if not provided. This indicates what other properties the Item has. Items of the "default" type will be interpreted directly as a LGUI2 Element. | | The type of Item, or "default" if not provided. This indicates what other properties the Item has. Items of the "default" type will be interpreted directly as a LGUI2 Element. | ||
+ | |- | ||
+ | ! itemAs | ||
+ | | For a "default" type of Item, this will specify whether an itemview is to be defined as "content" or "children" within the [[LGUI2:itemview|itemview]]. | ||
|} | |} | ||
== Examples == | == Examples == | ||
+ | {{LGUI2:Topic}} | ||
[[Category:LavishGUI 2]] | [[Category:LavishGUI 2]] | ||
+ | [[Category:LavishGUI 2 Items]] |
Latest revision as of 04:31, 15 July 2018
An Item in LavishGUI 2 is essentially a Model from which itemview elements can be generated.
Custom Item View Generators can be assigned to Item Lists to handle different types of Items and generate different types of views.
Defining an Item
An Item is defined by a JSON object, usually in the "items" Array of an Item List.
Item properties | |
---|---|
itemType | The type of Item, or "default" if not provided. This indicates what other properties the Item has. Items of the "default" type will be interpreted directly as a LGUI2 Element. |
itemAs | For a "default" type of Item, this will specify whether an itemview is to be defined as "content" or "children" within the itemview. |
Examples
LavishGUI 2 Topics