mirror of
https://github.com/opentx/opentx.git
synced 2025-07-17 13:25:20 +03:00
Fix CUSTOM_COLOR,… (#3489)
* Fix CUSTOM_COLOR, also change to way setColor work to a more natural : lcd.setColor(CUSTOM_COLOR, RED) * Remove _INDEX from TBS main to match the recent change to setColor
This commit is contained in:
parent
77888ae200
commit
24abad55ca
3 changed files with 31 additions and 27 deletions
|
@ -560,8 +560,8 @@ static int luaLcdDrawCombobox(lua_State *L)
|
|||
static int luaLcdSetColor(lua_State *L)
|
||||
{
|
||||
if (!luaLcdAllowed) return 0;
|
||||
int index = luaL_checkinteger(L, 1);
|
||||
int color = luaL_checkinteger(L, 2);
|
||||
unsigned int index = luaL_checkunsigned(L, 1) >> 16;
|
||||
unsigned int color = luaL_checkunsigned(L, 2);
|
||||
lcdColorTable[index] = color;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue