Rearranging structure

This commit is contained in:
Justin Scofield
2022-06-10 01:09:41 -04:00
parent b065142a8c
commit d8af0138bf
6 changed files with 10 additions and 65 deletions

View File

@@ -20,10 +20,14 @@ void Editor::UpdateScreen() {
return; return;
} }
DrawYazeMenu(); DrawYazeMenu();
if (ImGui::BeginTabBar("##TabBar")) { if (ImGui::BeginTabBar("##TabBar")) {
DrawOverworldEditor(); DrawOverworldEditor();
ImGui::EndTabBar(); ImGui::EndTabBar();
} }
ImGui::ShowDemoWindow();
ImGui::End(); ImGui::End();
} }

View File

@@ -3,6 +3,7 @@
#include <memory> #include <memory>
#include "Data/Overworld.h"
#include "ImGuiFileDialog/ImGuiFileDialog.h" #include "ImGuiFileDialog/ImGuiFileDialog.h"
#include "Utils/ROM.h" #include "Utils/ROM.h"
#include "imgui/backends/imgui_impl_sdl.h" #include "imgui/backends/imgui_impl_sdl.h"
@@ -26,6 +27,7 @@ class Editor {
void DrawOverworldEditor(); void DrawOverworldEditor();
Data::Overworld overworld;
Utils::ROM rom; Utils::ROM rom;
}; };

View File

@@ -1,9 +1,6 @@
#ifndef YAZE_APPLICATION_UTILS_BITMAP_H #ifndef YAZE_APPLICATION_UTILS_BITMAP_H
#define YAZE_APPLICATION_UTILS_BITMAP_H #define YAZE_APPLICATION_UTILS_BITMAP_H
#include <GL/gl.h>
#include <GL/glu.h>
namespace yaze { namespace yaze {
namespace Application { namespace Application {
namespace Utils { namespace Utils {
@@ -11,7 +8,6 @@ class Bitmap {
}; };
} // namespace Utils } // namespace Utils
} // namespace Application } // namespace Application
} // namespace yaze } // namespace yaze

View File

@@ -1,29 +0,0 @@
#include "Debug.h"
namespace yaze {
namespace Application {
namespace View {
void Debug::UpdateScreen() const
{
const ImGuiIO& io = ImGui::GetIO();
ImGui::NewFrame();
ImGui::SetNextWindowPos(ImVec2(0, 0));
ImVec2 dimensions(io.DisplaySize.x, io.DisplaySize.y);
ImGui::SetNextWindowSize(dimensions, ImGuiCond_Always);
if (!ImGui::Begin("Main", nullptr, flags)) {
ImGui::End();
return;
}
ImGui::ShowDemoWindow();
ImGui::End();
}
}
}
}

View File

@@ -1,28 +0,0 @@
#ifndef YAZE_APPLICATION_DEBUG_DEBUG_H
#define YAZE_APPLICATION_DEBUG_DEBUG_H
#include "imgui/backends/imgui_impl_sdl.h"
#include "imgui/backends/imgui_impl_sdlrenderer.h"
#include "imgui/imgui.h"
#include "imgui/imgui_internal.h"
#include "imgui/misc/cpp/imgui_stdlib.h"
namespace yaze {
namespace Application {
namespace View {
class Debug {
public:
Debug()=default;
void UpdateScreen() const;
private:
ImGuiWindowFlags flags =
ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse |
ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoScrollbar;
};
}
}
}
#endif