Skip to content

Commit

Permalink
LibGUI + EventDemo Nested UI updates
Browse files Browse the repository at this point in the history
Nested GUIs
  • Loading branch information
pfeerick authored Jan 10, 2022
2 parents bbfc51d + fb370a6 commit eea33eb
Show file tree
Hide file tree
Showing 3 changed files with 528 additions and 329 deletions.
15 changes: 6 additions & 9 deletions sdcard/horus/WIDGETS/EventDemo/loadable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
-- screen mode. --
-- --
-- Author: Jesper Frickmann --
-- Date: 2021-XX-XX --
-- Version: 0.9 --
-- Date: 2021-01-03 --
-- Version: 1.0 --
-- --
-- Copyright (C) EdgeTX --
-- --
Expand Down Expand Up @@ -107,13 +107,10 @@ function widget.refresh(event, touchState)

if event == nil then -- Widget mode; event == nil
-- Draw a border using zone.w and zone.h
for i = 0, 2 do
lcd.drawRectangle(zone.x + i, zone.y + i, zone.w - 2 * i, zone.h - 2 * i)
end

lcd.drawText(10, 10, "Event Demo");
lastEvent = 0

lcd.drawRectangle(0, 0, zone.w, zone.h, COLOR_THEME_PRIMARY3)
lcd.drawText(zone.w / 2, zone.h / 2, "Event Demo", DBLSIZE + CENTER + VCENTER + COLOR_THEME_PRIMARY3)

lastEvent = 0
else -- Full screen mode. If no event happened then event == 0
-- Draw a border using the full screen with LCD_W and LCD_H instead of zone.w and zone.h
for i = 0, 2 do
Expand Down
Loading

0 comments on commit eea33eb

Please sign in to comment.