libopenui latest updates

This commit is contained in:
Bertrand Songis
2019-10-10 13:58:15 +02:00
parent 7fcd657b68
commit 887616091b
53 changed files with 784 additions and 135 deletions
@@ -97,7 +97,7 @@ local function run(event)
lcd.clear()
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5,"CROSSFIRE SETUP", MENU_TITLE_COLOR)
lcd.drawText(1, 5,"CROSSFIRE SETUP", MENU_COLOR)
if #devices == 0 then
@@ -470,7 +470,7 @@ local function runDevicePage(event)
lcd.clear()
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5,deviceName, MENU_TITLE_COLOR)
lcd.drawText(1, 5,deviceName, MENU_COLOR)
for y = 1, 11 do
local field = getField(pageOffset+y)
@@ -47,8 +47,8 @@ local function drawScreenTitle(title,page, pages)
end
if LCD_W == 480 then
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_COLOR)
else
lcd.drawScreenTitle(title, page, pages)
end
@@ -39,8 +39,8 @@ local function drawScreenTitle(title,page, pages)
end
if LCD_W == 480 then
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_COLOR)
else
lcd.drawScreenTitle(title, page, pages)
end
@@ -86,8 +86,8 @@ local function drawScreenTitle(title, page, pages)
end
if LCD_W == 480 then
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W - 40, 5, page .. "/" .. pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W - 40, 5, page .. "/" .. pages, MENU_COLOR)
else
lcd.drawScreenTitle(title, page, pages)
end
@@ -77,8 +77,8 @@ local calibrationFields = {
local function drawScreenTitle(title,page, pages)
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_COLOR)
end
-- Change display attribute to current field
+1 -1
View File
@@ -97,7 +97,7 @@ local function run(event)
lcd.clear()
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5,"CROSSFIRE SETUP", MENU_TITLE_COLOR)
lcd.drawText(1, 5,"CROSSFIRE SETUP", MENU_COLOR)
if #devices == 0 then
+1 -1
View File
@@ -471,7 +471,7 @@ local function runDevicePage(event)
lcd.clear()
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5,deviceName, MENU_TITLE_COLOR)
lcd.drawText(1, 5,deviceName, MENU_COLOR)
for y = 1, 11 do
local field = getField(pageOffset+y)
+2 -2
View File
@@ -75,8 +75,8 @@ local calibrationFields = {
local function drawScreenTitle(title,page, pages)
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_COLOR)
end
-- Change display attribute to current field
+2 -2
View File
@@ -77,8 +77,8 @@ local calibrationFields = {
local function drawScreenTitle(title,page, pages)
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_COLOR)
end
-- Change display attribute to current field
@@ -47,8 +47,8 @@ local function drawScreenTitle(title,page, pages)
end
if LCD_W == 480 then
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_COLOR)
else
lcd.drawScreenTitle(title, page, pages)
end
@@ -39,8 +39,8 @@ local function drawScreenTitle(title,page, pages)
end
if LCD_W == 480 then
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_COLOR)
else
lcd.drawScreenTitle(title, page, pages)
end
@@ -86,8 +86,8 @@ local function drawScreenTitle(title, page, pages)
end
if LCD_W == 480 then
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W - 40, 5, page .. "/" .. pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W - 40, 5, page .. "/" .. pages, MENU_COLOR)
else
lcd.drawScreenTitle(title, page, pages)
end
@@ -47,8 +47,8 @@ local function drawScreenTitle(title,page, pages)
end
if LCD_W == 480 then
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_COLOR)
else
lcd.drawScreenTitle(title, page, pages)
end
@@ -39,8 +39,8 @@ local function drawScreenTitle(title,page, pages)
end
if LCD_W == 480 then
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W-40, 5, page.."/"..pages, MENU_COLOR)
else
lcd.drawScreenTitle(title, page, pages)
end
@@ -86,8 +86,8 @@ local function drawScreenTitle(title, page, pages)
end
if LCD_W == 480 then
lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
lcd.drawText(1, 5, title, MENU_TITLE_COLOR)
lcd.drawText(LCD_W - 40, 5, page .. "/" .. pages, MENU_TITLE_COLOR)
lcd.drawText(1, 5, title, MENU_COLOR)
lcd.drawText(LCD_W - 40, 5, page .. "/" .. pages, MENU_COLOR)
else
lcd.drawScreenTitle(title, page, pages)
end