Incari Studio
2024.1
2024.1
  • Incari HMI Development Platform
  • Getting Started
    • Overview
    • Requirements
    • What's New
    • Installation
    • First Steps
      • Incari Hub
      • Creating a Project
      • Incari Studio
  • Objects and Types
    • Overview
    • Project Objects
      • Scene
      • Scene2D
      • Screen
      • HMD
    • Scene Objects
      • Audio
      • Camera
      • Group
      • Image Sequence Sprite
      • Label
      • Light
      • List
      • Lottie Sprite
      • Mesh
      • On-Screen Keyboard
      • Overlay
      • Primitives
      • Sprite
      • Svg
      • Text
      • Vector
      • Video
      • Web Sprite
    • Scene2D Objects
      • Audio
      • Camera
      • Frame
      • GUI
        • Button
        • Dropdown
        • List
        • Slider
        • Text Area
        • Text Input
        • Toggle
      • Group
      • Image
      • Overlay
      • Vector
        • Boolean Operation
        • Ellipse
        • Line
        • Rectangle
        • Text
      • Video
      • Vector (old)
    • Prefabs
      • Creating and Using Prefabs
        • Prefabs in Scenes
        • Prefabs in Scene2Ds
      • Logic in Prefabs
      • Nested Prefabs
    • Attributes
      • Attribute Types
        • Asset/Object Attribute
        • Boolean Attribute
        • Color Attribute
        • Numerical Attribute
      • Common Attributes
        • Object
        • Sprite
        • Transformation
          • Global Transformations
          • Local Transformations
        • Tag
        • Debug ID
    • Data Types
      • Bool
      • Byte
      • Float
      • Int
      • String
      • Vector2
      • Vector3
      • Vector4
    • Terminology
  • Modules
    • Overview
    • Animation Editor
    • Asset Database
    • Asset Manager
    • Attribute Editor
    • Code Editor
    • Console
    • Exporter
    • Figma Importer
      • Current Limitations
    • Image Sequence Editor
    • Logic Editor
      • AI Logic Generation
      • Logic Debugging
    • Global Preferences
    • Material Editor
      • Car Paint Model
      • Custom Shading Model
      • Phong Model
      • Glass Model
      • Extended PBR Model
      • PBR Model
      • Shadeless Model
    • Model Editor
    • Plugins
      • Communication
        • Bluetooth
        • CANopen
        • MAVLink
        • Serial
        • Socket.IO
        • TCP
        • UDP
        • WebSocket
    • Profiler View
    • Project Outliner
    • Project Settings
      • CAN
      • CANopen
      • Fonts
      • HTTP
      • Keyboard
      • Localization
      • MAVLink
      • MQTT
      • Profiler
      • Scene Separation
      • Serial
      • Socket.IO
      • Styles
      • TCP
      • UDP
      • WebSocket
    • Scene Outliner
  • Toolbox
    • Overview
    • Actions
      • Delay Action
      • FadeFromTo Action
      • FadeTo Action
      • MoveBy Action
      • MoveTo Action
      • RotateBy Action
      • RotateTo Action
      • RotateFromTo Action
      • ScaleBy Action
      • ScaleTo Action
    • Array
      • Array Value
      • Clear Array
      • Concat Arrays
      • Get Array Element
      • Insert Array Element
      • Length of Array
      • Pop Array Element
      • Push Array Element
      • Remove Array Element
      • Set Array Element
    • Binary
      • Binary Value
      • Binary to Byte Array
      • Concat Binaries
      • Verify Checksum
    • Communication
      • Bluetooth
        • Events
          • On Bluetooth Device Paired
          • On Bluetooth Device Unpaired
        • Is Bluetooth Device Paired
        • Pair Bluetooth Device
        • Retrieve Call History
        • Retrieve Phonebook
        • Scan For Bluetooth Devices
        • Unpair Bluetooth Device
      • CAN
        • CAN Send Packet
        • CAN Start
        • CAN Stop
        • Events
          • On CAN Packet Received
          • On CAN Start
          • On CAN Stop
      • CANopen
        • CANopen Send
        • CANopen Start
        • CANopen Stop
        • Events
          • On CANopen Receive
          • On CANopen Start
          • On CANopen Stop
      • HTTP
        • Events
          • On HTTP Route
          • On HTTP Server Start
          • On HTTP Server Stop
        • HTTP Client
        • HTTP Response
        • HTTP Server Start
        • HTTP Server Stop
      • MAVLink
        • Events
          • On MAVLink Packet Received
          • On MAVLink Start
          • On MAVLink Stop
        • MAVLink Decode
        • MAVLink Start
        • MAVLink Stop
      • MQTT
        • Events
          • On MQTT Start
          • On MQTT Stop
          • On MQTT Topic
        • MQTT Publish
        • MQTT Start
        • MQTT Stop
        • MQTT Subscribe
      • Serial
        • Events
          • On Serial Error
          • On Serial Packet Receive
          • On Serial Start
          • On Serial Stop
        • Serial Send Packet
        • Serial Start
        • Serial Stop
      • Socket.IO
        • Events
          • On Socket.IO Error
          • On Socket.IO Receive
          • On Socket.IO Start
          • On Socket.IO Stop
        • Socket.IO Send
        • Socket.IO Start
        • Socket.IO Stop
        • Socket.IO Subscribe
        • Socket.IO Unsubscribe
      • TCP
        • Events
          • On TCP Error
          • On TCP Packet Receive
          • On TCP Start
          • On TCP Stop
        • TCP Send
        • TCP Start
        • TCP Stop
      • UDP
        • Events
          • On UDP Error
          • On UDP Packet Receive
          • On UDP Start
          • On UDP Stop
        • UDP Send
        • UDP Start
        • UDP Stop
      • WebSocket
        • Events
          • On WebSocket Error
          • On WebSocket Receive
          • On WebSocket Start
          • On Websocket Stop
        • WebSocket Client Send
        • WebSocket Client Start
        • WebSocket Client Stop
    • DateTime
      • Date Time Formatter
      • Now (UTC)
      • System Time
      • Timezone Value
    • Development
      • Assert
      • Benchmark Get
      • Benchmark Start
      • Benchmark Stop
      • Clear Console
      • Console
      • Profiler Start
      • Profiler Stop
    • Dictionary
      • Clear Dictionary
      • Dictionary Value
      • Erase Dictionary Element
      • Get Dictionary Element
      • Get Dictionary Keys
      • Get Dictionary Values
      • Merge Dictionaries
      • Set Dictionary Element
      • Size of Dictionary
    • Events
      • Custom
        • Event Listener
        • Event Trigger
      • Gestures
        • On Swipe
        • On Tap
      • ImageSequence
        • On ImageSequence Frame Changed
        • On ImageSequence Pause
        • On ImageSequence Play
        • On ImageSequence Stop
      • Input
        • On Text Change
      • Keyboard
        • On Key Press
        • On Key Release
      • Leap Motion
        • On Leap Motion Frame Update
        • On Leap Motion Grab End
        • On Leap Motion Grab Start
        • On Leap Motion Grab Update
        • On Leap Motion Pinch End
        • On Leap Motion Pinch Start
        • On Leap Motion Pinch Update
        • On Leap Motion Swipe Left
        • On Leap Motion Swipe Right
        • XR Position
      • List
        • On List Current Index Change
        • On List Entry Select
        • On List Load
      • List 2D
        • On List Active Index Change
      • Localization
        • On Localization Language Change
      • Lottie
        • On Lottie Finish
        • On Lottie Pause
        • On Lottie Play
        • On Lottie Stop
      • Media
        • On Media Finish
        • On Media Play
      • Mouse
        • On Hover Enter
        • On Hover Leave
        • On Mouse Button Down
        • On Mouse Button Up
        • On Mouse Click
        • On Mouse Double Click
        • On Mouse Enter
        • On Mouse Leave
        • On Mouse Move
        • On Mouse Scroll
      • Object
        • On CheckBox Value Change
        • On Dropdown Active Value Change
        • On Opacity Change
        • On Position Change
        • On Rotation Change
        • On Scale Change
        • On Slider Value Change
        • On Visibility Change
      • On-Screen Keyboard
        • On On-Screen Keyboard Arrow Down Pressed
        • On On-Screen Keyboard Arrow Up Pressed
        • On On-Screen Keyboard Enter Pressed
        • On On-Screen Keyboard Input Changed
        • On On-Screen Keyboard Key Pressed
      • Scene
        • On Scene Loaded
      • Unsubscribe
      • Screen
        • On Screen Scene Change
      • Variables
        • On Variable Change
        • On Variable Set
      • Web
        • On JavaScript Callback
      • WebSprite
        • On WebSprite Load
        • On WebSprite Remote URL Change
    • Flow Control
      • Branch
      • For Each Loop
      • For Loop
      • Index Switch
      • Is Equal
      • Is Greater Equal
      • Is Less Equal
      • Select Data
      • Sequential
      • Switch
      • Toggle
    • Functions
      • Function
        • Function Input
        • Function Output
    • IO
      • Create File
      • Get Current Directory
      • Get File Extension
      • List Directory Content
      • Load File
      • Remove
      • Save File
      • Set Current Directory
    • Incari
      • Animation
        • Pause Animation
        • Play Animation
        • Stop Animation
      • Asset
        • Add to Asset Database
        • Remove from Asset Database
      • Camera
        • Get Active Camera
        • Get All Cameras
        • Set Active Camera
      • ImageSequence
        • Get Current ImageSequence Frame
        • Get ImageSequence Duration
        • Get ImageSequence FPS
        • Get ImageSequence Total Frames
        • Go To Next ImageSequence Frame
        • Go To Previous ImageSequence Frame
        • Pause ImageSequence
        • Play ImageSequence
        • Resume ImageSequence
        • Show ImageSequence Frame
        • Stop ImageSequence
      • List
        • Generate List
        • Get Selected Item
        • Next List Entry
        • Previous List Entry
        • Select List Entry
        • Set Active
        • Set Current Index
      • List 2D
        • Add List Element
        • Get Active Index
        • Get List Data
        • Get List Element
        • Insert List Element
        • Remove List Element
        • Set Active Index
        • Set List Data
        • Set List Element
      • Lottie
        • Pause Lottie
        • Play Lottie
        • Stop Lottie
      • Material
        • Get Material Property
        • Set Material Property
      • Media
        • Get Media
        • Get Media Length
        • Get Media Loop
        • Get Media Metadata
        • Get Media Progress
        • Get Volume
        • Is Media Playing
        • Pause Media
        • Play Media
        • Set Media
        • Set Media Loop
        • Set Media Progress
        • Set Volume
        • Stop Media
      • Object
        • Add Tag
        • Create Object
        • Destroy Object
        • Get CSS Property
        • Get Ellipse Arc Sector
        • Get Ellipse Start Angle
        • Get Inner Radius
        • Get CheckBox Value
        • Get Children
        • Get Material
        • Get Name
        • Get Objects By Tag
        • Get Opacity
        • Get Parent
        • Get Position
        • Get Root
        • Get Rotation
        • Get Scale
        • Get Size
        • Get Slider Value
        • Get Sort Index
        • Get Tag
        • Get Text
        • Get Text Color
        • Get Tint
        • Get Visibility
        • Has Children
        • Instantiate Object
        • Remove Tag
        • Set CSS Property
        • Set Ellipse Arc Sector
        • Set Ellipse Start Angle
        • Set Inner Radius
        • Set CheckBox Value
        • Set Mask
        • Set Material
        • Set Opacity
        • Set Overlay Scene
        • Set Position
        • Set Rotation
        • Set Scale
        • Set Size
        • Set Slider Value
        • Set Sort Index
        • Set Stylesheet
        • Set Text
        • Set Text Color
        • Set Texture
        • Set Tint
        • Set Visibility
        • Use Mask
      • Object 2D
        • Add CSS Class Name
        • Get Active Dropdown Value
        • Get CSS Class Names
        • Get Dropdown Options
        • Get Paint
        • Get Paint Opacity
        • Get Stroke Width
        • Remove CSS Class Name
        • Set Active Dropdown Index
        • Set Active Dropdown Value
        • Set Blend Mode
        • Set CSS Class Names
        • Set Dropdown Options
        • Set Paint
        • Set Paint Opacity
        • Set Stroke Width
      • On-Screen Keyboard
        • Get Screen Keyboard Layout
        • On-Screen Keyboard Clear Input
        • On-Screen Keyboard Get Input
        • On-Screen Keyboard Move Selection
        • On-Screen Keyboard Press Button
        • Set Screen Keyboard Layout
      • Scene
        • Set Scene Environment Color
        • Set Scene Environment Map
        • This Scene
      • Scene 2D
        • Get Stylesheet
        • Merge To Stylesheet
        • Set Stylesheet
      • Ultrahaptics
        • Ultrahaptics Play
        • Ultrahaptics Stop
      • Scenes
        • Scene
      • Screen
        • Get Scene
        • Load Scene
        • Set Background
        • Set Scene
        • Unload Scene
      • Screens
        • Screen
      • Vector
        • Arc
          • Get ArcEnd
          • Get ArcStart
          • Set ArcEnd
          • Set ArcStart
        • Get FillColor
        • Get StrokeWidth
        • Line
          • Get LineWidth
          • Set LineWidth
        • Pie
          • Get PieEnd
          • Get PieStart
          • Set PieEnd
          • Set PieStart
        • Rectangle
          • Get RectangleCorners
          • Set RectangleCorners
        • Set FillColor
        • Set StrokeWidth
      • WebSprite
        • Get Remote URL
        • Set Remote URL
        • Web Sprite Reload
    • Localization
      • Get All Languages
      • Get Language
      • Get Translation
      • Get Translation Key
      • Set Language
      • Set Translation Attribute
      • Set Translation Key
    • Math
      • Absolute
      • Add
      • Average
      • Boolean
        • AND
        • Bool Value
        • Negate
        • OR
      • Ceil
      • Clamp
      • Decrement
      • Divide
      • Floor
      • Increment
      • Interpolate
      • Logarithm
      • Math Constant
      • Maximum
      • Minimum
      • Modulo
      • Multiply
      • Numerical Value
      • Power
      • Random
      • Range Mapper
      • Root
      • Rotation Matrix
      • Round
      • Subtract
      • Trigonometry
        • Arc Cosine
        • Arc Sine
        • Arc Tangent
        • Arc Tangent 2
        • Cosine
        • Radian-Degree Converter
        • Sine
        • Tangent
      • Vector Value
    • Plugins
      • (JSON) Scale Vector
    • Prefab
      • This Prefab
    • String
      • Capitalize
      • CharCodeAt
      • Compare
      • Concat Strings
      • Contains
      • CryptoHash
      • EndsWith
      • Format
      • FormatArray
      • IndexOf
      • IsLower
      • IsUpper
      • JSON Parse
      • JSON Stringify
      • Join
      • LastIndexOf
      • Length
      • Lower
      • MatchRegex
      • PaddingLeft
      • PaddingRight
      • RandomString
      • RemoveCharacters
      • Replace
      • ReplaceRegex
      • Reverse
      • Split
      • StartsWith
      • String Value
      • Substring
      • Trim
      • TrimLeft
      • TrimRight
      • Upper
    • Transition
      • CrossFade
      • Fade
      • MoveInFromBottom
      • MoveInFromLeft
      • MoveInFromRight
      • MoveInFromTop
      • SlideInFromBottom
      • SlideInFromLeft
      • SlideInFromRight
      • SlideInFromTop
    • Utilities
      • Color Value
      • Conversion
      • Create CustomID
      • Get Command Line Option
      • Group
      • Interval
        • Reset Interval
        • Start Interval
      • Is Data Type
      • Is Object Type
      • Mouse
        • Get Mouse Position
        • Get Mouse Position Delta
      • System Call
      • Timeout
        • Cancel Timeout
        • Start Timeout
    • Variables
      • Variable Getter
      • Variable Setter
    • Web
      • Call JavaScript Function
  • Demo Projects
    • Overview
    • 4 Methods of Animation
    • Using APIs to Pull Dynamic Data
    • An Analog Clock
    • Image Sequence Button Animation
    • Prefabs
    • Project Initialization
    • On-Screen Keyboard
    • Skinnable Speedometer
    • Python Testing API
Powered by GitBook
On this page
  • Overview
  • List
  • Title
  • List Entry File
  • Incari Model File
  • Style File
  • Js File
  • Font
  • Generate List
  • Simulation
  • Prev
  • Next
  • Select
  • Style
  • Background color
  • Effects
  • Tint
  • Web Resource
  • Size
  • Sprite
  • Advanced
  • Link resolution to size
  • Resolution

Was this helpful?

  1. Objects and Types
  2. Scene Objects

List

PreviousLightNextLottie Sprite

Last updated 5 months ago

Was this helpful?

Overview

List Objects model data as single-level list items in a Scene. It utilizes a model/view architecture whereby data added to an Incari Model File is presented as a List in the Scene.

Like any other Scene Object, we can manipulate its Transformation Attributes and adjust its Rotation Pivot.

List

Title

This is the optional text that you wish to appear as a header for your list. It works like an <h1> tag in HTML.

List Entry File

This takes a local .html file, which defines a template for how each list item is displayed. You can create one by right-clicking in the Asset Manager and selecting Create asset > List Entry. This method will create a new .html file, containing some example HTML text.

The way that we populate our list with content from our Model file is by creating placeholders, with the name of the corresponding Field, surrounded by double curly braces.

For example, let's say that we have a list of audio-books, with two fields: title and author.

In our List Entry File, we would have the following:

<h2><i>{{ title }}</i> by {{ author }}</h2>

This would make our list items look something like this:

Incari Model File

A Model File is where you define all the data for your list. Physically, a book has many different properties. It has weight, size, number of pages etc., but when thinking in terms of a Model, we are thinking of what properties we need to represent in our data. Going back to the audio-book example above, if we want to display two properties; the author and title of each audio-book, we create Fields for title and author.

Fields define a single aspect of each Record in a table and are displayed in columns. By double-clicking on the Field's header / label we can define the name that will be used as a placeholder in the List Entry File.

Records are entries in the table and contain the data itself. By adding Records, we add more rows to the Model, and therefore, the List.

Style File

Style File references a .css file, which contains style data for our List. The best way to create this file is by right-clicking in the Asset Manager and selecting Create asset > List Style. This creates a file, with all of the relevant IDs and classes already inside and ready to edit.

Here are the pre-defined classes and IDs, to be used for styling Lists in Incari. As with all CSS, style attributes follow the "box model" principle, meaning that each element can be thought of as a box, in a box, in a box, etc.

  • body - The tag which encompasses all of the elements.

  • #list - The ID for the container that contains the list elements, excluding the title.

  • .list-title - The class for the list's title.

  • .list-not-active - Like #list, except that it adjusts the styling if the List is set to inactive.

  • .entry - Individual rows generated from each of the Model's Records.

    • .entry-current - Adds or overwrites attributes of the standard .entry class if it is the current list item.

    • .entry-selected - Adds or overwrites attributes of the standard .entry class if it is the selected list item.

By adding a few CSS attributes, we can easily customize the appearance of the audio-book example.

body {
    color: white;    
    text-align: center;
}

.entry {
    opacity: 0.8;
}

.entry-selected, .entry-current {
    color: black;
    opacity: 1;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.25), -1px -1px 1px rgba(0, 0, 0, 0.25);
}

.entry-current {
    background-color: rgb(189, 7, 7); 
}

.entry-selected {
    background-color: rgb(136, 136, 136); 
}

* {
    transition-property: none !important;
}

Js File

The Js File Attribute is a JavaScript programming language file that allows us to add complex features and create dynamic experiences for List Objects.

In the illustration below, we replace a book in our audio-book List example using the Js File Attribute.

function replaceBook(index){
    const item = document.getElementById('list').children[index];
    const newItem = "<h2> The Gods Are Not to Blame by Ola Rotimi </h2>";

    if (item) {
      item.innerHTML = newItem;
      item.style.color = "#FF0000";
    }
} 

replaceBook(3);

In the JavaScript code above, the replaceBook function allows us to replace any book in the audio-book List example by using its index. Furthermore, the color of the new audio-book entry is changed to red.

Font

Generate List

Generate List button automatically creates all internal .html, .css, .js needed to render a List in a Scene. The rendered List can then be updated with a List Entry File, Model File, Style File and JavaScript File in the Attribute Editor.

Also, clicking the Generate List button renders any update made to the Attribute files to the Scene.

Simulation

Prev

Prev highlights the previous item in the List.

Next

Next highlights the next item in the List.

Select

Select selects an item highlighted in the List.

Style

Background color

Effects

Tint

Web Resource

Size

Size determines the dimensions of the rendered List in the Scene.

Sprite

Advanced

Link resolution to size

The value of the Resolution Attribute would be updated to be equal to that of the size Attribute if the toggle is activated.

Resolution

The resolution of the displayed List.

To read more about basic HTML, take a look at by Mozilla.

How to write CSS won't be discussed here, but there is an abundance of information online, such as by Mozilla.

The Js File can be created by right-clicking in the Asset Manager and selecting Create asset > JavaScript File. For more information about JavaScript, please visit the following website: .

The Font Attributes control customizable settings of the List's font. Font Family allows one to select a generic font family (Manrope or Source Code Pro) or a custom font that has been added in .

List Objects are capable of handling and let the user configure certain aspects, called Parameters.

The Background color can be set by manually adjusting the HSB / RGBA values or input a Hex Code, using their corresponding .

The Tint Attribute applies a color overlay to the List Object, thereby changing its appearance. The color overlay can be set by manually adjusting the HSB / RGBA values or inserting a Hex Code, using their corresponding .

Sprite Attributes are documented in .

HTML basics
Learn to style HTML using CSS
JavaScript programming language
Color Attribute
Color Attribute
Sprite Object
Project Settings
variable fonts