Add startup splash on first boot of U-U.

This commit is contained in:
StackZ
2020-06-21 12:46:32 +02:00
parent 83656cff2e
commit 984d363533
9 changed files with 155 additions and 18 deletions
+42
View File
@@ -0,0 +1,42 @@
/*
* This file is part of Universal-Updater
* Copyright (C) 2019-2020 DeadPhoenix8091, Epicpkmn11, Flame, RocketRobz, StackZ, TotallyNotGuy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
* * Requiring preservation of specified reasonable legal notices or
* author attributions in that material or in the Appropriate Legal
* Notices displayed by works containing it.
* * Prohibiting misrepresentation of the origin of that material,
* or requiring that modified versions of such material be marked in
* reasonable ways as different from the original version.
*/
#ifndef STARTUP_HPP
#define STARTUP_HPP
#include "common.hpp"
class Startup : public Screen {
public:
void Draw(void) const override;
void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
Startup(int mode = 0, std::string file = "NOT_USED");
private:
int mode = 0, delay = 150;
std::string file = "NOT_USED";
};
#endif
+4 -1
View File
@@ -113,6 +113,9 @@ public:
// Language.
std::string language() { return this->v_language; }
void language(std::string v) { this->v_language = v; if (!this->changesMade) this->changesMade = true; }
// First startup.
bool firstStartup() { return this->v_firstStartup; }
void firstStartup(bool v) { this->v_firstStartup = v; if (!this->changesMade) this->changesMade = true; }
// Mainly helper.
bool getBool(const std::string &key);
@@ -130,7 +133,7 @@ private:
v_outdatedColor, v_uptodateColor, v_notfoundColor, v_futureColor;
std::string v_scriptPath, v_musicPath, v_storePath, v_autobootFile, v_language;
int v_langPath, v_viewMode, v_autoboot, v_keyDelay;
bool v_logging, v_useBars, v_screenFade, v_progressDisplay;
bool v_logging, v_useBars, v_screenFade, v_progressDisplay, v_firstStartup;
};
#endif