Panel prop

From Sim Innovations Wiki
Jump to navigation Jump to search

Description

value = panel_prop(property)

panel_prop is used to get the settings from the current panel.

Return value

Argument Type Description
value Object Return the value of the given property. Returns 'nil' when an unknown property is given.

Arguments

# Argument Type Description
1 property String The type of property to fetch. See table below for the options

Properties

# Property Type Description
1 AUTHOR String Panel author
2 NAME String Panel type
3 UUID String Panel UUID (unique value)
4 LAYOUT_UUID String Panel layout UUID (unique value)
5 WIDTH Number Panel width (user definable)
6 HEIGHT Number Panel height (user definable)
7 DESCRIPTION String Panel description
8 VERSION Number Panel version
9 DEVELOPMENT Boolean Has this panel been started in development mode (from edit/create tab)
10 IS_HOME_USE Boolean True when panel is run on a Home use Air Manager or Air Player.
11 IS_PROFESSIONAL Boolean True when panel is run on a Professional Air Manager or Air Player.
12 PLATFORM String Returns the platform the panel is running on. Can be UNKNOWN, WINDOWS, MAC, LINUX, RASPBERRY_PI, ANDROID or IPAD.

Example

-- Print the panel author
print( panel_prop("AUTHOR") )

-- See if we started from the create/edit tab
if panel_prop("DEVELOPMENT") then
  print("We are running in development mode!")
end