[Horus] UI continued

This commit is contained in:
Bertrand Songis
2016-02-16 20:45:25 +01:00
parent e72a049683
commit 33910c8721
35 changed files with 301 additions and 75 deletions
+14
View File
@@ -75,3 +75,17 @@ Layout * loadLayout(const char * name, Layout::PersistentData * persistentData)
}
return NULL;
}
void loadCustomScreens()
{
for (unsigned int i=0; i<MAX_CUSTOM_SCREENS; i++) {
char name[sizeof(g_model.screenData[i].layoutName)+1];
memset(name, 0, sizeof(name));
strncpy(name, g_model.screenData[i].layoutName, sizeof(g_model.screenData[i].layoutName));
customScreens[i] = loadLayout(name, &g_model.screenData[i].layoutData);
}
if (customScreens[0] == NULL) {
customScreens[0] = registeredLayouts[0]->create(&g_model.screenData[0].layoutData);
}
}