mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-29 23:20:18 +00:00
41 lines
2 KiB
C++
Executable file
41 lines
2 KiB
C++
Executable file
#include <filesystem>
|
|
#include "ui/MainApplication.hpp"
|
|
#include "ui/instPage.hpp"
|
|
#include "util/config.hpp"
|
|
|
|
#define COLOR(hex) pu::ui::Color::FromHex(hex)
|
|
|
|
namespace inst::ui {
|
|
extern MainApplication *mainApp;
|
|
|
|
instPage::instPage() : Layout::Layout() {
|
|
this->SetBackgroundColor(COLOR("#670000FF"));
|
|
if (std::filesystem::exists(inst::config::appDir + "/background.png")) this->SetBackgroundImage(inst::config::appDir + "/background.png");
|
|
else this->SetBackgroundImage("romfs:/images/background.jpg");
|
|
this->topRect = Rectangle::New(0, 0, 1280, 94, COLOR("#170909FF"));
|
|
this->infoRect = Rectangle::New(0, 95, 1280, 60, COLOR("#17090980"));
|
|
this->titleImage = Image::New(0, 0, "romfs:/images/logo.png");
|
|
this->appVersionText = TextBlock::New(480, 49, "v" + inst::config::appVersion, 22);
|
|
this->appVersionText->SetColor(COLOR("#FFFFFFFF"));
|
|
this->pageInfoText = TextBlock::New(10, 109, "", 30);
|
|
this->pageInfoText->SetColor(COLOR("#FFFFFFFF"));
|
|
this->installInfoText = TextBlock::New(15, 568, "", 22);
|
|
this->installInfoText->SetColor(COLOR("#FFFFFFFF"));
|
|
this->installBar = pu::ui::elm::ProgressBar::New(10, 600, 850, 40, 100.0f);
|
|
this->installBar->SetColor(COLOR("#222222FF"));
|
|
if (std::filesystem::exists(inst::config::appDir + "/awoo_inst.png")) this->awooImage = Image::New(410, 190, inst::config::appDir + "/awoo_inst.png");
|
|
else this->awooImage = Image::New(510, 166, "romfs:/images/awoos/7d8a05cddfef6da4901b20d2698d5a71.png");
|
|
this->Add(this->topRect);
|
|
this->Add(this->infoRect);
|
|
this->Add(this->titleImage);
|
|
this->Add(this->appVersionText);
|
|
this->Add(this->pageInfoText);
|
|
this->Add(this->installInfoText);
|
|
this->Add(this->installBar);
|
|
this->Add(this->awooImage);
|
|
if (inst::config::gayMode) this->awooImage->SetVisible(false);
|
|
}
|
|
|
|
void instPage::onInput(u64 Down, u64 Up, u64 Held, pu::ui::Touch Pos) {
|
|
}
|
|
}
|