diff --git a/include/3ds/data/GFXData.hpp b/include/3ds/data/GFXData.hpp index e0ac38780..109510bd7 100644 --- a/include/3ds/data/GFXData.hpp +++ b/include/3ds/data/GFXData.hpp @@ -59,6 +59,8 @@ class GFXData { void DrawCheckbox(const int XPos, const int YPos, const bool Selected); void DrawToggle(const int XPos, const int YPos, const bool Toggled); void DrawSort(const int XPos, const int YPos, const bool Checked); + + bool SpritesDrawn = false; private: C2D_SpriteSheet Sprites = nullptr; C2D_Font Font = nullptr; diff --git a/include/3ds/data/MSGData.hpp b/include/data/MSGData.hpp similarity index 100% rename from include/3ds/data/MSGData.hpp rename to include/data/MSGData.hpp diff --git a/include/nds/data/MSGData.hpp b/include/nds/data/MSGData.hpp deleted file mode 100644 index 3e9044c95..000000000 --- a/include/nds/data/MSGData.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Copyright (c) 2019-2024 Universal-Team - -#ifndef _UNIVERSAL_UPDATER_MSG_DATA_HPP -#define _UNIVERSAL_UPDATER_MSG_DATA_HPP - -#include - -class MSGData { -public: - void DisplayWaitMsg(const std::string &MSG); - bool PromptMsg(const std::string &MSG); -}; - -#endif \ No newline at end of file diff --git a/nds/build/version.hpp b/nds/build/version.hpp index fdd8973bb..e33ca784c 100644 --- a/nds/build/version.hpp +++ b/nds/build/version.hpp @@ -1,6 +1,6 @@ #ifndef VERSION_HPP #define VERSION_HPP -#define VER_NUMBER "-ddfd63e" +#define VER_NUMBER "-c902ddd" #endif diff --git a/source/3ds/data/MSGData.cpp b/source/3ds/data/MSGData.cpp deleted file mode 100644 index 7353bbca7..000000000 --- a/source/3ds/data/MSGData.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Copyright (c) 2019-2024 Universal-Team - -#include "MSGData.hpp" - -#include "gui.hpp" -#include "UniversalUpdater.hpp" - - -void MSGData::DisplayWaitMsg(const std::string &MSG) { - UU::App->GData->StartFrame(); - UU::App->GData->DrawTop(); - Gui::DrawStringCentered(0, 80, 0.5f, TEXT_COLOR, MSG, 390, 80); - UU::App->GData->DrawBottom(); - UU::App->GData->EndFrame(); -}; - - -bool MSGData::PromptMsg(const std::string &MSG) { - bool Result = false; - - while(1) { - UU::App->GData->StartFrame(); - UU::App->GData->DrawTop(); - Gui::DrawStringCentered(0, 80, 0.5f, TEXT_COLOR, MSG, 390, 80); - Gui::DrawStringCentered(0, 210, 0.5f, TEXT_COLOR, "Press \uE000 to continue, \uE001 to cancel.", 390, 80); - UU::App->GData->DrawBottom(); - UU::App->GData->EndFrame(); - - UU::App->ScanInput(); - if (UU::App->Down & KEY_A) { - Result = true; - break; - } - - if (UU::App->Down & KEY_B) { - Result = false; - break; - } - } - - UU::App->ScanInput(); - return Result; -}; \ No newline at end of file diff --git a/source/nds/data/MSGData.cpp b/source/data/MSGData.cpp similarity index 90% rename from source/nds/data/MSGData.cpp rename to source/data/MSGData.cpp index da9ca3cae..93a0a9946 100644 --- a/source/nds/data/MSGData.cpp +++ b/source/data/MSGData.cpp @@ -4,6 +4,8 @@ #include "MSGData.hpp" +#include "gui.hpp" +#include "Platform.hpp" #include "UniversalUpdater.hpp" @@ -31,7 +33,7 @@ bool MSGData::PromptMsg(const std::string &MSG) { bool Result = false; - while(1) { + while(Platform::MainLoop()) { UU::App->GData->StartFrame(); UU::App->GData->DrawTop(); Gui::DrawStringCentered(0, 80, TEXT_MEDIUM, TEXT_COLOR, MSG); @@ -39,10 +41,8 @@ bool MSGData::PromptMsg(const std::string &MSG) { UU::App->GData->DrawBottom(); UU::App->GData->EndFrame(); - do { - swiWaitForVBlank(); - UU::App->ScanInput(); - } while (!(UU::App->Down & (KEY_A | KEY_B))); + Platform::waitForVBlank(); + UU::App->ScanInput(); if (UU::App->Down & KEY_A) { Result = true;