Lysa.ui  0.0
Lysa 3D Engine
ColorPickerButton Class Referenceabstract

Detailed Description

A button displaying a color, opening a ColorPicker dialog when clicked. Fires OnColorChange.

Inherits from: Widget

Lua full name: lysa.ui.ColorPickerButton

Public Member Functions

nil set_dialog (title: string, buttons: string[])
 Sets the title and the button labels of the dialog opened when clicking. More...
 
nil set_dialog (title: string, buttons: string[], width: number, row_height: number, footer_height: number, resource: string)
 Sets the title, the button labels and the geometry of the dialog. More...
 
nil set_resources (res_button: string)
 Reloads the visual style of the button. More...
 

Properties

lysa.float4 color
 The currently selected RGBA color.
 
string label
 The text displayed at the left of the color swatch.
 
number swatch_width
 Width of the color swatch drawn inside the button.
 
Button button
 The clickable button displaying the color. (read-only)
 
Text label_widget
 The text widget displaying the label. (read-only)
 

Member Function Documentation

nil set_dialog ( string  title,
string[]  buttons)

Sets the title and the button labels of the dialog opened when clicking.

Parameters
titlestring
buttonsstring[]
nil set_dialog ( string  title,
string[]  buttons,
number  width,
number  row_height,
number  footer_height,
string  resource)

Sets the title, the button labels and the geometry of the dialog.

Parameters
titlestring
buttonsstring[]
widthnumber
row_heightnumber
footer_heightnumber
resourcestring
nil set_resources ( string  res_button)

Reloads the visual style of the button.

Parameters
res_buttonstring

Property Documentation

lysa.float4 color

The currently selected RGBA color.

string label

The text displayed at the left of the color swatch.

number swatch_width

Width of the color swatch drawn inside the button.

Button button

The clickable button displaying the color. (read-only)

Text label_widget

The text widget displaying the label. (read-only)