2022-02-06 21:02:31 +01:00
|
|
|
#include "content/views/view_hex_editor.hpp"
|
2021-12-07 22:47:41 +01:00
|
|
|
#include "content/views/view_pattern_editor.hpp"
|
|
|
|
#include "content/views/view_pattern_data.hpp"
|
|
|
|
#include "content/views/view_information.hpp"
|
2022-03-04 19:06:29 +01:00
|
|
|
#include "content/views/view_about.hpp"
|
2021-12-07 22:47:41 +01:00
|
|
|
#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"
|
2021-12-12 00:41:44 +01:00
|
|
|
#include "content/views/view_provider_settings.hpp"
|
2022-07-29 13:59:57 +02:00
|
|
|
#include "content/views/view_find.hpp"
|
2023-02-16 18:06:40 +01:00
|
|
|
#include "content/views/view_theme_manager.hpp"
|
2023-07-23 23:37:47 +02:00
|
|
|
#include "content/views/view_logs.hpp"
|
2023-08-06 21:33:15 +02:00
|
|
|
#include "content/views/view_achievements.hpp"
|
2023-12-02 11:09:32 +01:00
|
|
|
#include "content/views/view_highlight_rules.hpp"
|
2023-12-13 13:04:59 +01:00
|
|
|
#include "content/views/view_tutorials.hpp"
|
2021-12-07 22:47:41 +01:00
|
|
|
|
2024-02-10 23:31:05 +01:00
|
|
|
#include <hex/api/layout_manager.hpp>
|
|
|
|
|
2021-12-07 22:47:41 +01:00
|
|
|
namespace hex::plugin::builtin {
|
|
|
|
|
|
|
|
void registerViews() {
|
|
|
|
ContentRegistry::Views::add<ViewHexEditor>();
|
|
|
|
ContentRegistry::Views::add<ViewPatternEditor>();
|
|
|
|
ContentRegistry::Views::add<ViewPatternData>();
|
|
|
|
ContentRegistry::Views::add<ViewDataInspector>();
|
|
|
|
ContentRegistry::Views::add<ViewInformation>();
|
|
|
|
ContentRegistry::Views::add<ViewBookmarks>();
|
|
|
|
ContentRegistry::Views::add<ViewPatches>();
|
|
|
|
ContentRegistry::Views::add<ViewTools>();
|
|
|
|
ContentRegistry::Views::add<ViewCommandPalette>();
|
2022-03-04 19:06:29 +01:00
|
|
|
ContentRegistry::Views::add<ViewAbout>();
|
2021-12-07 22:47:41 +01:00
|
|
|
ContentRegistry::Views::add<ViewSettings>();
|
|
|
|
ContentRegistry::Views::add<ViewDataProcessor>();
|
|
|
|
ContentRegistry::Views::add<ViewConstants>();
|
|
|
|
ContentRegistry::Views::add<ViewStore>();
|
2021-12-12 00:41:44 +01:00
|
|
|
ContentRegistry::Views::add<ViewProviderSettings>();
|
2022-07-29 13:59:57 +02:00
|
|
|
ContentRegistry::Views::add<ViewFind>();
|
2023-02-16 18:06:40 +01:00
|
|
|
ContentRegistry::Views::add<ViewThemeManager>();
|
2023-07-23 23:37:47 +02:00
|
|
|
ContentRegistry::Views::add<ViewLogs>();
|
2023-08-06 21:33:15 +02:00
|
|
|
ContentRegistry::Views::add<ViewAchievements>();
|
2023-12-02 11:09:32 +01:00
|
|
|
ContentRegistry::Views::add<ViewHighlightRules>();
|
2023-12-13 13:04:59 +01:00
|
|
|
ContentRegistry::Views::add<ViewTutorials>();
|
2024-02-10 23:31:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
LayoutManager::registerLoadCallback([](std::string_view line) {
|
|
|
|
for (auto &[name, view] : ContentRegistry::Views::impl::getEntries()) {
|
|
|
|
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()) {
|
|
|
|
buffer->appendf("%s=%d\n", name.c_str(), view->getWindowOpenState());
|
|
|
|
}
|
|
|
|
});
|
2021-12-07 22:47:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|