2021-12-07 21:47:41 +00:00
|
|
|
#include "content/views/view_tools.hpp"
|
2020-11-14 23:46:38 +00:00
|
|
|
|
2022-02-01 17:09:40 +00:00
|
|
|
#include <hex/api/content_registry.hpp>
|
|
|
|
|
2021-12-07 21:47:41 +00:00
|
|
|
namespace hex::plugin::builtin {
|
2020-11-14 23:46:38 +00:00
|
|
|
|
2021-12-07 21:47:41 +00:00
|
|
|
ViewTools::ViewTools() : View("hex.builtin.view.tools.name") { }
|
2020-11-15 20:31:04 +00:00
|
|
|
|
2020-12-22 17:10:01 +00:00
|
|
|
void ViewTools::drawContent() {
|
2021-12-07 21:47:41 +00:00
|
|
|
if (ImGui::Begin(View::toWindowName("hex.builtin.view.tools.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
|
2022-01-24 19:53:17 +00:00
|
|
|
for (const auto &[name, function] : ContentRegistry::Tools::getEntries()) {
|
2021-02-13 14:15:32 +00:00
|
|
|
if (ImGui::CollapsingHeader(LangEntry(name))) {
|
2021-01-13 12:18:03 +00:00
|
|
|
function();
|
|
|
|
}
|
|
|
|
}
|
2020-11-14 23:46:38 +00:00
|
|
|
}
|
|
|
|
ImGui::End();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|