ui: Added API to add custom layouts, imhex application and api cleanup

This commit is contained in:
WerWolv
2022-01-18 00:10:10 +01:00
parent c4cbcc7232
commit ee8b665472
28 changed files with 310 additions and 143 deletions

View File

@@ -32,8 +32,8 @@ namespace hex::init {
}
WindowSplash::~WindowSplash() {
this->deinitImGui();
this->deinitGLFW();
this->exitImGui();
this->exitGLFW();
}
@@ -235,12 +235,12 @@ namespace hex::init {
io.Fonts->SetTexID(reinterpret_cast<ImTextureID>(tex));
}
void WindowSplash::deinitGLFW() {
void WindowSplash::exitGLFW() {
glfwDestroyWindow(this->m_window);
glfwTerminate();
}
void WindowSplash::deinitImGui() {
void WindowSplash::exitImGui() {
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
ImGui::DestroyContext();

View File

@@ -176,7 +176,7 @@ namespace hex::init {
SharedData::commandPaletteCommands.clear();
SharedData::patternLanguageFunctions.clear();
for (auto &view : SharedData::views)
for (auto &[name, view] : ContentRegistry::Views::getEntries())
delete view;
SharedData::views.clear();