2021-12-07 22:47:41 +01:00
|
|
|
#include "content/views/view_tools.hpp"
|
2020-11-15 00:46:38 +01:00
|
|
|
|
2022-02-01 18:09:40 +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") { }
|
2020-11-15 21:31:04 +01:00
|
|
|
|
2020-12-22 18:10:01 +01:00
|
|
|
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)) {
|
2022-01-24 20:53:17 +01:00
|
|
|
for (const auto &[name, function] : ContentRegistry::Tools::getEntries()) {
|
2021-02-13 15:15:32 +01:00
|
|
|
if (ImGui::CollapsingHeader(LangEntry(name))) {
|
2021-01-13 13:18:03 +01:00
|
|
|
function();
|
|
|
|
}
|
|
|
|
}
|
2020-11-15 00:46:38 +01:00
|
|
|
}
|
|
|
|
ImGui::End();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|