![]() |
Lysa.ui
0.0
Lysa 3D Engine
|
A color selector with a color wheel and one slider per component. Fires OnColorChange.
Inherits from: Widget
Lua full name: lysa.ui.ColorPicker
Public Member Functions | |
| nil | set_mode_labels (rgb: string, hsv: string, linear: string) |
| Replaces the labels of the three mode tabs, for localization. More... | |
| ColorSlider | get_slider (component: ColorPickerComponent) |
| Returns the gradient slider of a component. More... | |
| Text | get_label (component: ColorPickerComponent) |
| Returns the label of a component. More... | |
| SpinBox | get_value (component: ColorPickerComponent) |
| Returns the spin box of a component. More... | |
| nil | set_resources (res_preview: string) |
| Reloads the visual style of the color preview box. More... | |
| number | component_of (color: lysa.float4, index: integer) |
| Returns the value of the component at the given index of a color. More... | |
| number | to_linear (value: number) |
| Converts a component from the sRGB space to the linear space. More... | |
| number | from_linear (value: number) |
| Converts a component from the linear space to the sRGB space. More... | |
Properties | |
| lysa.float4 | color |
| The currently selected RGBA color. | |
| integer | mode |
| The color space displayed (see lysa.ui.ColorPickerMode): RGB, HSV or LINEAR. | |
| TabBar | tab_bar |
| The bar of tabs selecting the color space. (read-only) | |
| number | tab_height |
| Height of the bar of tabs. | |
| Widget | footer |
| The optional widget displayed under the component rows. (read-only) | |
| number | footer_height |
| Height of the footer, zero to hide it. | |
| number | preview_height |
| Height of the color preview box. | |
| number | wheel_height |
| Height of the color wheel row. | |
| number | brightness_width |
| Width of the brightness slider displayed next to the wheel. | |
| number | row_height |
| Height of one component row. | |
| number | label_width |
| Width of the label of a component row. | |
| number | value_width |
| Width of the spin box of a component row. | |
| number | auto_height |
| The height needed to display the whole picker. (read-only) | |
| Box | preview |
| The box displaying the selected color. (read-only) | |
| ColorWheel | wheel |
| The hue/saturation wheel. (read-only) | |
| ColorSlider | brightness_slider |
| The slider setting the brightness of the wheel. (read-only) | |
|
Replaces the labels of the three mode tabs, for localization.
| rgb | string |
| hsv | string |
| linear | string |
|
Returns the gradient slider of a component.
| component | ColorPickerComponent |
|
|
|
Reloads the visual style of the color preview box.
| res_preview | string |
|
Returns the value of the component at the given index of a color.
| color | lysa.float4 |
| index | integer |
|
Converts a component from the sRGB space to the linear space.
| value | number |
|
Converts a component from the linear space to the sRGB space.
| value | number |
| lysa.float4 color |
The currently selected RGBA color.
| integer mode |
The color space displayed (see lysa.ui.ColorPickerMode): RGB, HSV or LINEAR.
| TabBar tab_bar |
The bar of tabs selecting the color space. (read-only)
| number tab_height |
Height of the bar of tabs.
| Widget footer |
The optional widget displayed under the component rows. (read-only)
| number footer_height |
Height of the footer, zero to hide it.
| number preview_height |
Height of the color preview box.
| number wheel_height |
Height of the color wheel row.
| number brightness_width |
Width of the brightness slider displayed next to the wheel.
| number row_height |
Height of one component row.
| number label_width |
Width of the label of a component row.
| number value_width |
Width of the spin box of a component row.
| number auto_height |
The height needed to display the whole picker. (read-only)
| Box preview |
The box displaying the selected color. (read-only)
| ColorWheel wheel |
The hue/saturation wheel. (read-only)
| ColorSlider brightness_slider |
The slider setting the brightness of the wheel. (read-only)