# plugins.core.loupedeckctandlive.prefs

Preferences Panels for Loupedeck CT, Loupedeck Live, Loupedeck Live-S and Razer Stream Controller.


# API Overview

Variables - Configurable values

  • defaultIconPath
  • supportedExtensions

Functions - API calls offered directly by the extension

  • buildIconFromLabel
  • processEncodedIcon
  • updateUI

Constructors - API calls which return an object, typically one that offers API methods

  • new

Methods - API calls which can only be made on an object returned by a constructor

  • generateContent
  • generateKnobImages
  • panelCallback
  • refreshDevice
  • renderPanel
  • setItem

# API Documentation

# Variables

# defaultIconPath

Signature plugins.core.loupedeckctandlive.prefs.defaultIconPath -> string
Type Variable
Description Default Path where built-in icons are stored
Notes None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 90

# supportedExtensions

Signature plugins.core.loupedeckctandlive.prefs.supportedExtensions -> string
Type Variable
Description Table of supported extensions for Icons.
Notes None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 85

# Functions

# buildIconFromLabel

Signature plugins.core.loupedeckctandlive.prefs:buildIconFromLabel(params) -> string
Type Function
Description Creates a new icon image from a string.
Parameters
  • params - A table of parameters.
Returns
  • A new encoded icon as URL string.
Notes None
Examples None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 1297

# processEncodedIcon

Signature plugins.core.loupedeckctandlive.prefs:processEncodedIcon(icon, controlType) -> string
Type Function
Description Processes an encoded icon.
Parameters
  • icon - The encoded icon as URL string or a hs.image object.
  • controlType - The control type as string.
Returns
  • A new encoded icon as URL string.
Notes None
Examples None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 1248

# updateUI

Signature plugins.core.loupedeckctandlive.prefs:updateUI([params]) -> none
Type Function
Description Update the Preferences Panel UI.
Parameters
  • params - A optional table of parameters
Returns
  • None
Notes None
Examples None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 906

# Constructors

# new

Signature plugins.core.loupedeckctandlive.prefs.new() -> Loupedeck
Type Constructor
Description Creates a new Loupedeck Preferences panel.
Parameters
  • deviceType - The device type defined in hs.loupedeck.deviceTypes
Returns
  • None
Notes
  • The deviceType should be either hs.loupedeck.deviceTypes.LIVE
  • or hs.loupedeck.deviceTypes.CT.
Examples None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 110

# Methods

# generateContent

Signature plugins.core.loupedeckctandlive.prefs:generateContent() -> string
Type Method
Description Generates the Preference Panel HTML Content.
Parameters
  • None
Returns
  • HTML content as string
Notes None
Examples None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 631

# generateKnobImages

Signature plugins.core.loupedeckctandlive.prefs:generateKnobImages(app, bank, id) -> none
Type Method
Description Generates a combined image for all the knobs on a single side. Which side is generated is determined by the knob id.
Parameters
  • app - The application bundle ID as a string.
  • bank - The bank as a string.
  • id - The knob ID as a string.
Returns
  • None
Notes None
Examples None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 734

# panelCallback

Signature plugins.core.loupedeckctandlive.prefs:panelCallback(id, params) -> none
Type Method
Description JavaScript Callback for the Preferences Panel
Parameters
  • id - ID as string
  • params - Table of paramaters
Returns
  • None
Notes None
Examples None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 1384

# refreshDevice

Signature plugins.core.loupedeckctandlive.prefs:refreshDevice() -> none
Type Method
Description Refreshes the currently selected Loupedeck Device.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 1370

# renderPanel

Signature plugins.core.loupedeckctandlive.prefs:renderPanel(context) -> none
Type Method
Description Generates the Preference Panel HTML Content.
Parameters
  • context - Table of data that you want to share with the renderer
Returns
  • HTML content as string
Notes None
Examples None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 585

# setItem

Signature plugins.core.loupedeckctandlive.prefs:setItem(app, bank, controlType, id, valueA, valueB) -> none
Type Method
Description Update the Loupedeck CT layout file.
Parameters
  • app - The application bundle ID as a string
  • bank - The bank ID as a string
  • controlType - The control type as a string
  • id - The ID of the item as a string
  • valueA - The value of the item as a string
  • valueB - An optional value
Returns
  • None
Notes None
Examples None
Source src/plugins/core/loupedeckctandlive/prefs/init.lua line 694