Warn about applet mode

This commit is contained in:
Huntereb 2019-12-12 12:21:08 -05:00
parent 787e6f4ed9
commit b5e4b0f75b
2 changed files with 11 additions and 0 deletions

View File

@ -17,6 +17,7 @@ namespace inst::ui {
void onInput(u64 Down, u64 Up, u64 Held, pu::ui::Touch Pos);
Image::Ref awooImage;
private:
bool dialogAck;
TextBlock::Ref butText;
Rectangle::Ref topRect;
Rectangle::Ref botRect;

View File

@ -1,4 +1,5 @@
#include <filesystem>
#include <switch.h>
#include "ui/MainApplication.hpp"
#include "ui/mainPage.hpp"
#include "util/util.hpp"
@ -9,6 +10,14 @@
namespace inst::ui {
extern MainApplication *mainApp;
bool dialogAck = false;
void warnAboutAppletMode() {
if (!dialogAck && mainApp->IsShown() && appletGetAppletType() == AppletType_LibraryApplet) {
inst::ui::dialogAck = true;
mainApp->CreateShowDialog("Applet Mode not supported", "You may experience issues using Awoo Installer in Applet Mode. If you do\nhave problems, please switch to running Awoo Installer over an installed\ntitle or forwarder!", {"OK"}, true);
}
}
MainPage::MainPage() : Layout::Layout() {
this->SetBackgroundColor(COLOR("#670000FF"));
@ -61,6 +70,7 @@ namespace inst::ui {
this->Add(this->eggImage);
this->awooImage->SetVisible(!inst::config::gayMode);
this->eggImage->SetVisible(false);
this->AddThread(warnAboutAppletMode);
}
void MainPage::installMenuItem_Click() {