#include "content/views/view_hex_editor.hpp" #include "content/views/view_pattern_editor.hpp" #include "content/views/view_pattern_data.hpp" #include "content/views/view_information.hpp" #include "content/views/view_about.hpp" #include "content/views/view_tools.hpp" #include "content/views/view_data_inspector.hpp" #include "content/views/view_bookmarks.hpp" #include "content/views/view_patches.hpp" #include "content/views/view_command_palette.hpp" #include "content/views/view_settings.hpp" #include "content/views/view_data_processor.hpp" #include "content/views/view_constants.hpp" #include "content/views/view_store.hpp" #include "content/views/view_provider_settings.hpp" #include "content/views/view_find.hpp" #include "content/views/view_theme_manager.hpp" #include "content/views/view_logs.hpp" #include "content/views/view_achievements.hpp" #include "content/views/view_highlight_rules.hpp" #include "content/views/view_tutorials.hpp" #include namespace hex::plugin::builtin { void registerViews() { ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); ContentRegistry::Views::add(); LayoutManager::registerLoadCallback([](std::string_view line) { for (auto &[name, view] : ContentRegistry::Views::impl::getEntries()) { if (!view->shouldStoreWindowState()) continue; std::string format = hex::format("{}=%d", view->getUnlocalizedName().get()); sscanf(line.data(), format.c_str(), &view->getWindowOpenState()); } }); LayoutManager::registerStoreCallback([](ImGuiTextBuffer *buffer) { for (auto &[name, view] : ContentRegistry::Views::impl::getEntries()) { if (!view->shouldStoreWindowState()) continue; buffer->appendf("%s=%d\n", name.c_str(), view->getWindowOpenState()); } }); } }