diff --git a/gui.cpp b/gui.cpp index 7674506..8f7caf2 100644 --- a/gui.cpp +++ b/gui.cpp @@ -259,11 +259,6 @@ void Gui::ScreenLogic(u32 hDown, u32 hHeld, touchPosition touch, bool waitFade) } } -// Calls the current screen's constructor. -void Gui::CallConstructor() { - if (usedScreen != nullptr) usedScreen->callConstructor(); -} - // Move's the tempScreen to the used one. void Gui::transferScreen() { if (tempScreen != nullptr) usedScreen = std::move(tempScreen); @@ -298,7 +293,6 @@ void Gui::fadeEffects(int fadeoutFrames, int fadeinFrames) { if (fadealpha > 255) { fadealpha = 255; Gui::transferScreen(); // Transfer Temp screen to the used one. - Gui::CallConstructor(); // Here we call the constructor for the current screen. fadein = true; fadeout = false; } diff --git a/gui.hpp b/gui.hpp index bc6b9e0..319dc4f 100644 --- a/gui.hpp +++ b/gui.hpp @@ -142,11 +142,6 @@ namespace Gui { * waitFade: Wheter to wait until the fade ends. */ void ScreenLogic(u32 hDown, u32 hHeld, touchPosition touch, bool waitFade = true); - - /* Used for the current Screen's Constructor call. (Optional!) - * This is useful if you need to call the screen's constructor. - */ - void CallConstructor(); /* Transfer the Temp Screen to the used one. (Optional!) * It will check, if the tempScreen variable is not nullptr, so don't worry. diff --git a/screen.hpp b/screen.hpp index c3d1dc8..f67b6c5 100644 --- a/screen.hpp +++ b/screen.hpp @@ -35,7 +35,6 @@ public: virtual ~Screen() {} virtual void Logic(u32 hDown, u32 hHeld, touchPosition touch) = 0; virtual void Draw() const = 0; - virtual void callConstructor() = 0; }; #endif \ No newline at end of file