tes3uiColorPicker⚓︎
A widget containing properties specific to color pickers.
This type inherits the following: tes3uiWidget.
Properties⚓︎
alphaBar⚓︎
Read-only. The image used by the alpha bar.
Returns:
result(Image)
alphaCheckerboard⚓︎
Read-only. The image used by the alpha bar.
Returns:
result(Image)
currentAlpha⚓︎
The currently selected alpha in the color picker.
Returns:
result(number)
currentColor⚓︎
The currently selected color in the color picker.
Returns:
result(ffiImagePixel)
element⚓︎
Access back to the element this widget interface is for.
Returns:
result(tes3uiElement)
height⚓︎
Read-only. The height of the main, hue, and optionally alpha and saturation, pickers.
Returns:
result(integer)
hueBar⚓︎
Read-only. The image used by the hue bar.
Returns:
result(Image)
hueWidth⚓︎
Read-only. The width of pickers for hue, and optionally alpha and saturation.
Returns:
result(integer)
initialAlpha⚓︎
Read-only. The initial alpha value.
Returns:
result(number)
initialColor⚓︎
Read-only. The initial color for the picker.
Returns:
result(mwseColorTable)
mainImage⚓︎
Read-only. The image used by the main picker.
Returns:
result(Image)
mainWidth⚓︎
Read-only. The width of the main picker.
Returns:
result(integer)
saturationBar⚓︎
Read-only. The image used by the saturation bar.
Returns:
result(Image)
textures⚓︎
A table with the textures used in the UI image elements that comprise the picker.
Returns:
result(tes3uiColorPickerTextureTable)
Methods⚓︎
colorSelected⚓︎
Changes the currently selected color. Updates current preview color, text input, saturation bar image and indicator positions.
myObject:colorSelected(newColor, alpha)
Parameters:
newColor(mwseColorTable, ffiImagePixel): The new color to set.alpha(number): Default:1. Alpha value to set.
getAlpha⚓︎
Gets the current alpha value.
local alpha = myObject:getAlpha()
Returns:
alpha(number)
getColor⚓︎
Gets the currently selected color.
local color = myObject:getColor()
Returns:
color(mwseColorTable)
getColorAlpha⚓︎
Gets the current color and alpha.
local color, alpha = myObject:getColorAlpha()
Returns:
color(mwseColorTable)alpha(number)
getColorArray⚓︎
Gets the current RGB color in an array. Usually used to feed the color from the color picker straight to another UI element, e.g. myElement.color = pickerElement.widget:getColorArray().
local arrayRGB = myObject:getColorArray()
Returns:
arrayRGB(number[])
getRGBA⚓︎
Gets the current color and alpha in a single table.
local color = myObject:getRGBA()
Returns:
color(mwseColorATable)
hueChanged⚓︎
Changes the currently selected color. It calls self:colorSelected and then updates the main picker image. Because of that, it's more expensive.
myObject:hueChanged(newColor, alpha)
Parameters:
newColor(mwseColorTable, ffiImagePixel): The new color to set.alpha(number): Default:1. Alpha value to set.