[Horus] Widgets can be written in Lua

This commit is contained in:
Bertrand Songis
2016-02-18 22:10:27 +01:00
parent 01ef176173
commit d1be1b4ea0
12 changed files with 354 additions and 186 deletions
+2 -1
View File
@@ -355,6 +355,7 @@ bool menuScreenSetup(evt_t event)
lcdDrawText(MENUS_MARGIN_LEFT, y + FH / 2, "Layout");
const LayoutFactory * factory = editThemeChoice<const LayoutFactory>(SCREENS_SETUP_2ND_COLUMN, y, registeredLayouts, countRegisteredLayouts, currentScreen->getFactory(), needsOffsetCheck, attr, event);
if (factory) {
delete customScreens[T];
customScreens[T] = factory->create(&g_model.screenData[T].layoutData);
strncpy(g_model.screenData[T].layoutName, factory->getName(), sizeof(g_model.screenData[T].layoutName));
storageDirty(EE_MODEL);
@@ -375,7 +376,7 @@ bool menuScreenSetup(evt_t event)
default:
if (k < linesCount) {
uint8_t index = k - 3;
const ZoneOption *option = &options[index];
const ZoneOption * option = &options[index];
ZoneOptionValue value = currentScreen->getOptionValue(index);
value = editZoneOption(y, option, value, attr, event);
if (attr) {