feat: Model templates for color radios (update SD card for bundled templates) (#1569)
* Model templates - select and load after Create Model for color radios * Model templates - save model as template, only for color radios * Small fix to drawTextLines(...) to handle consecutive spaces * Change title of button for empty template folder * I found out why "no trailing slash = important" in path names! * Reworked file and path name string manipulation No longer using chdir, as Lua scripts etc. could be messing with the working dir Use buffers more and std::string less * Adjusting the size of buffers I think that I got it right now. Really hard to figure out the right size constants! Also added storageDirty(EE_MODEL) after reading the template file and renaming the model * Added storage checks * Slight simplification - all template buttons are similar * Added "Blank Model" button * Wizard Lua script If there is a Lua script with the same name as the template file in the folder, then it is run after reading the template.
This commit is contained in:
@@ -927,6 +927,12 @@ const char STR_MODELS_PATH[] = MODELS_PATH;
|
||||
const char STR_MODELS_EXT[] = MODELS_EXT;
|
||||
const char STR_BACKUP_PATH[] = BACKUP_PATH;
|
||||
const char STR_YAML_EXT[] = YAML_EXT;
|
||||
const char STR_SELECT_TEMPLATE[] = TR_SELECT_TEMPLATE;
|
||||
const char STR_SELECT_TEMPLATE_FOLDER[] = TR_SELECT_TEMPLATE_FOLDER;
|
||||
const char STR_NO_TEMPLATES[] = TR_NO_TEMPLATES;
|
||||
const char STR_SAVE_TEMPLATE[] = TR_SAVE_TEMPLATE;
|
||||
const char STR_FILE_EXISTS[] = TR_FILE_EXISTS;
|
||||
const char STR_ASK_OVERWRITE[] = TR_ASK_OVERWRITE;
|
||||
|
||||
const char STR_TEST_WARNING[] = TR_TEST_WARNING;
|
||||
const char STR_TEST_NOTSAFE[] = TR_TEST_NOTSAFE;
|
||||
|
||||
Reference in New Issue
Block a user