@@ -561,6 +561,54 @@ static int luaLcdDrawCombobox(lua_State *L)
|
||||
#endif
|
||||
|
||||
#if defined(COLORLCD)
|
||||
/*luadoc
|
||||
@function lcd.setColor(area, color)
|
||||
|
||||
Set a color for specific area
|
||||
|
||||
@param area (unsigned number) specific screen area in the list bellow
|
||||
* `CUSTOM_COLOR`
|
||||
* `TEXT_COLOR`
|
||||
* `TEXT_BGCOLOR`
|
||||
* `TEXT_INVERTED_COLOR`
|
||||
* `TEXT_INVERTED_BGCOLOR`
|
||||
* `LINE_COLOR`
|
||||
* `SCROLLBOX_COLOR`
|
||||
* `MENU_TITLE_BGCOLOR`
|
||||
* `MENU_TITLE_COLOR`
|
||||
* `MENU_TITLE_DISABLE_COLOR`
|
||||
* `HEADER_COLOR`
|
||||
* `ALARM_COLOR`
|
||||
* `WARNING_COLOR`
|
||||
* `TEXT_DISABLE_COLOR`
|
||||
* `HEADER_COLOR`
|
||||
* `CURVE_AXIS_COLOR`
|
||||
* `CURVE_CURSOR_COLOR`
|
||||
* `TITLE_BGCOLOR`
|
||||
* `TRIM_BGCOLOR`
|
||||
* `TRIM_SHADOW_COLOR`
|
||||
* `MAINVIEW_PANES_COLOR`
|
||||
* `MAINVIEW_GRAPHICS_COLOR`
|
||||
* `HEADER_BGCOLOR`
|
||||
* `HEADER_ICON_BGCOLOR`
|
||||
* `HEADER_CURRENT_BGCOLOR`
|
||||
* `OVERLAY_COLOR`
|
||||
|
||||
@param color (number) color in 5/6/5 rgb format. The following prefined colors are available
|
||||
* `WHITE`
|
||||
* `GREY`
|
||||
* `LIGHTGREY`
|
||||
* `DARKGREY`
|
||||
* `BLACK`
|
||||
* `YELLOW`
|
||||
* `BLUE`
|
||||
* `RED`
|
||||
* `DARKRED`
|
||||
|
||||
@notice Only available on Horus
|
||||
|
||||
@status current Introduced in 2.2.0
|
||||
*/
|
||||
static int luaLcdSetColor(lua_State *L)
|
||||
{
|
||||
if (!luaLcdAllowed) return 0;
|
||||
@@ -570,6 +618,21 @@ static int luaLcdSetColor(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*luadoc
|
||||
@function lcd.RGB(r, g, b)
|
||||
|
||||
Returns a 5/6/5 rgb color code, that can be used with lcd.setColor
|
||||
|
||||
@param r (integer) a number between 0x00 and 0xff that expresses te amount of red in the color
|
||||
|
||||
@param g (integer) a number between 0x00 and 0xff that expresses te amount of green in the color
|
||||
|
||||
@param b (integer) a number between 0x00 and 0xff that expresses te amount of blue in the color
|
||||
|
||||
@retval number (integer) rgb color expressed in 5/6/5 format
|
||||
|
||||
@status current Introduced in 2.2.0
|
||||
*/
|
||||
static int luaRGB(lua_State *L)
|
||||
{
|
||||
if (!luaLcdAllowed) return 0;
|
||||
|
||||
Reference in New Issue
Block a user