1
0
mirror of synced 2024-11-30 10:24:30 +01:00
ImHex/plugins/builtin/source/content/views/view_tools.cpp

20 lines
623 B
C++
Raw Normal View History

2021-12-07 22:47:41 +01:00
#include "content/views/view_tools.hpp"
2020-11-15 00:46:38 +01:00
#include <hex/api/content_registry.hpp>
2021-12-07 22:47:41 +01:00
namespace hex::plugin::builtin {
2020-11-15 00:46:38 +01:00
2021-12-07 22:47:41 +01:00
ViewTools::ViewTools() : View("hex.builtin.view.tools.name") { }
void ViewTools::drawContent() {
2021-12-07 22:47:41 +01:00
if (ImGui::Begin(View::toWindowName("hex.builtin.view.tools.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
for (const auto &[name, function] : ContentRegistry::Tools::getEntries()) {
if (ImGui::CollapsingHeader(LangEntry(name))) {
function();
}
}
2020-11-15 00:46:38 +01:00
}
ImGui::End();
}
}