From 1484c902262f1a5ab50d473dd2b394bb529ceff3 Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 4 Jan 2022 22:45:34 +0100 Subject: [PATCH] refactor(GUI): Simplified calls to windows --- BigBaseV2/src/gui.cpp | 4 ++-- BigBaseV2/src/gui/gui_main.cpp | 20 -------------------- BigBaseV2/src/gui/gui_main.hpp | 12 ------------ BigBaseV2/src/gui/window.hpp | 18 +++++++++++++++++- 4 files changed, 19 insertions(+), 35 deletions(-) delete mode 100644 BigBaseV2/src/gui/gui_main.cpp delete mode 100644 BigBaseV2/src/gui/gui_main.hpp diff --git a/BigBaseV2/src/gui.cpp b/BigBaseV2/src/gui.cpp index 414b2692..f610fb01 100644 --- a/BigBaseV2/src/gui.cpp +++ b/BigBaseV2/src/gui.cpp @@ -13,7 +13,7 @@ #include -#include "gui/gui_main.hpp" +#include "gui/window.hpp" #include "util/notify.hpp" namespace big @@ -105,7 +105,7 @@ namespace big { TRY_CLAUSE { - main_gui::draw(); + window::draw_all(); } EXCEPT_CLAUSE } diff --git a/BigBaseV2/src/gui/gui_main.cpp b/BigBaseV2/src/gui/gui_main.cpp deleted file mode 100644 index c3d3ff01..00000000 --- a/BigBaseV2/src/gui/gui_main.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "gui_main.hpp" -#include "window.hpp" - -namespace big -{ - void main_gui::draw() - { - window::top_bar(); - - window::log(); - - window::debug(); - - window::main(); - window::handling(); - - window::player(); - window::users(); - } -} \ No newline at end of file diff --git a/BigBaseV2/src/gui/gui_main.hpp b/BigBaseV2/src/gui/gui_main.hpp deleted file mode 100644 index 1919dbe6..00000000 --- a/BigBaseV2/src/gui/gui_main.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include "common.hpp" -#include "natives.hpp" - -namespace big -{ - class main_gui { - public: - static void draw(); - }; -} \ No newline at end of file diff --git a/BigBaseV2/src/gui/window.hpp b/BigBaseV2/src/gui/window.hpp index a7abfd40..c7eeadb3 100644 --- a/BigBaseV2/src/gui/window.hpp +++ b/BigBaseV2/src/gui/window.hpp @@ -1,9 +1,9 @@ #pragma once +#include "natives.hpp" namespace big { class window { - public: static void debug(); static void top_bar(); static void handling(); @@ -11,5 +11,21 @@ namespace big static void main(); static void player(); static void users(); + + public: + static void draw_all() + { + window::top_bar(); + + window::log(); + + window::debug(); + + window::main(); + window::handling(); + + window::player(); + window::users(); + } }; } \ No newline at end of file