🎨 Refactor Host Actions as singleton
This commit is contained in:
committed by
Scott Lahteine
parent
1ead7ce681
commit
f80bcdcc5c
@ -242,7 +242,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
|
||||
if (ExtUI::isPrintingFromMedia())
|
||||
ExtUI::pausePrint();
|
||||
#ifdef ACTION_ON_PAUSE
|
||||
else host_action_pause();
|
||||
else hostui.pause();
|
||||
#endif
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
break;
|
||||
@ -251,7 +251,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
|
||||
if (ExtUI::isPrintingFromMedia())
|
||||
ExtUI::resumePrint();
|
||||
#ifdef ACTION_ON_RESUME
|
||||
else host_action_resume();
|
||||
else hostui.resume();
|
||||
#endif
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
break;
|
||||
|
@ -41,7 +41,7 @@ bool ConfirmAbortPrintDialogBox::onTouchEnd(uint8_t tag) {
|
||||
if (ExtUI::isPrintingFromMedia())
|
||||
ExtUI::stopPrint();
|
||||
#ifdef ACTION_ON_CANCEL
|
||||
else host_action_cancel();
|
||||
else hostui.cancel();
|
||||
#endif
|
||||
return true;
|
||||
default:
|
||||
|
@ -138,7 +138,7 @@ void TuneMenu::pausePrint() {
|
||||
if (ExtUI::isPrintingFromMedia())
|
||||
ExtUI::pausePrint();
|
||||
#ifdef ACTION_ON_PAUSE
|
||||
else host_action_pause();
|
||||
else hostui.pause();
|
||||
#endif
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
}
|
||||
@ -150,7 +150,7 @@ void TuneMenu::resumePrint() {
|
||||
else if (ExtUI::isPrintingFromMedia())
|
||||
ExtUI::resumePrint();
|
||||
#ifdef ACTION_ON_RESUME
|
||||
else host_action_resume();
|
||||
else hostui.resume();
|
||||
#endif
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
}
|
||||
|
@ -918,7 +918,7 @@ namespace ExtUI {
|
||||
#endif // HAS_LEVELING
|
||||
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
void setHostResponse(const uint8_t response) { host_response_handler(response); }
|
||||
void setHostResponse(const uint8_t response) { hostui.handle_response(response); }
|
||||
#endif
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
|
Reference in New Issue
Block a user