Add menu exit transition animation

Part of which was removed in commit 04d72cb.
This commit is contained in:
Alvin Wong
2021-05-03 18:23:30 +08:00
parent 9cccac68fc
commit 9e40449c64
2 changed files with 82 additions and 42 deletions

View File

@@ -754,6 +754,7 @@ void startGUITask(void const *argument __unused) {
bool buttonLockout = false;
bool tempOnDisplay = false;
bool tipDisconnectedDisplay = false;
bool showExitMenuTransition = false;
{
// Generate the flipped screen into ram for later use
// flipped is generated by flipping each row
@@ -820,6 +821,10 @@ void startGUITask(void const *argument __unused) {
break;
case BUTTON_B_SHORT:
enterSettingsMenu(); // enter the settings menu
{
OLED::useSecondaryFramebuffer(true);
showExitMenuTransition = true;
}
buttonLockout = true;
break;
default:
@@ -921,7 +926,13 @@ void startGUITask(void const *argument __unused) {
}
}
OLED::refresh();
GUIDelay();
if (showExitMenuTransition) {
OLED::useSecondaryFramebuffer(false);
OLED::transitionSecondaryFramebuffer(false);
showExitMenuTransition = false;
} else {
OLED::refresh();
GUIDelay();
}
}
}