volatile char shutter_saveAs(char key, char first) { static char name[MENU_NAME_LEN - 1]; static char newId; if(first) { newId = timer.nextId(); if(newId < 0) { menu.message(TEXT("No Space")); return FN_CANCEL; } } char ret = menu.editText(key, name, TEXT("Save As"), first); if(ret == FN_SAVE) { name[MENU_NAME_LEN - 2] = 0; strcpy((char*)timer.current.Name, name); timer.save(newId); menu.message(TEXT("Saved")); menu.back(); } return ret; }
volatile char timerSaveCurrent(char key, char first) { if(first) timer.save(timer.currentId); menu.message(TEXT("Saved")); menu.back(); return FN_CANCEL; }
volatile char timerSaveDefault(char key, char first) { if(first) timer.save(0); menu.message(TEXT("Saved")); menu.back(); return FN_CANCEL; }