impr: Clean up old layout stuff

This commit is contained in:
WerWolv
2023-05-11 23:21:52 +02:00
parent 0b21e30e44
commit 0649e0dcd3
8 changed files with 18 additions and 73 deletions

View File

@@ -581,12 +581,6 @@ namespace hex {
impl::getTitleBarButtons().push_back({ icon, unlocalizedTooltip, function });
}
void addLayout(const std::string &unlocalizedName, const impl::LayoutFunction &function) {
log::debug("Added new layout: {}", unlocalizedName);
impl::getLayouts().push_back({ unlocalizedName, function });
}
namespace impl {
std::multimap<u32, impl::MainMenuItem> &getMainMenuItems() {
@@ -626,12 +620,6 @@ namespace hex {
return buttons;
}
std::vector<impl::Layout> &getLayouts() {
static std::vector<impl::Layout> layouts;
return layouts;
}
}
}

View File

@@ -5,6 +5,8 @@
#include <imgui.h>
#include <fmt/format.h>
namespace hex {
std::optional<std::fs::path> LayoutManager::s_layoutPathToLoad;
@@ -72,4 +74,10 @@ namespace hex {
}
}
void LayoutManager::reset() {
s_layoutPathToLoad.reset();
s_layoutStringToLoad.reset();
s_layouts.clear();
}
}