Removed unnecessarily complicated popup

This commit is contained in:
CommanderRedYT
2022-05-25 01:56:20 +02:00
parent c90ad518c5
commit 30832a42f7

View File

@@ -24,42 +24,13 @@ constexpr char TEXT_POPUP[] = "Feature flags have been changed. Please restart t
bool isDirty{false}; bool isDirty{false};
class SpecialPopupDisplay : public BobbyPopupDisplay
{
using Base = BobbyPopupDisplay;
using Base::Base;
public:
void buttonPressed(espgui::Button button) override
{
//Base::buttonPressed(button);
switch (button)
{
using espgui::Button;
case Button::Left:
case Button::Right:
espgui::popScreen();
break;
default:;
}
}
};
void exitFeatureFlagsMenu() void exitFeatureFlagsMenu()
{ {
espgui::popScreen();
if (isDirty) if (isDirty)
{ {
using namespace espgui; BobbyErrorHandler{}.errorOccured(TEXT_POPUP);
// auto newDisplay = std::make_unique<BobbyPopupDisplay>(, std::move(espgui::displayStack.top()));
// newDisplay->initOverlay();
// espgui::currentDisplay = std::move(newDisplay);
auto newDisplay = std::make_unique<SpecialPopupDisplay>(TEXT_POPUP, std::move(espgui::displayStack.top()));
newDisplay->initOverlay();
espgui::currentDisplay = std::move(newDisplay);
} }
else
espgui::popScreen();
} }
class ExitFeatureFlagsMenuAction : public virtual espgui::ActionInterface class ExitFeatureFlagsMenuAction : public virtual espgui::ActionInterface