#pragma once #include #include #include #include #include #include #include namespace hex { class ContentRegistry { public: ContentRegistry() = delete; struct Settings { Settings() = delete; struct Entry { std::string name; std::function callback; }; static void load(); static void store(); static void add(std::string_view category, std::string_view name, s64 defaultValue, const std::function &callback); static void add(std::string_view category, std::string_view name, std::string_view defaultValue, const std::function &callback); static std::map>& getEntries(); static nlohmann::json& getSettingsData(); }; struct Events { Events() = delete; static auto get(std::string_view name); }; struct CommandPaletteCommands { CommandPaletteCommands() = delete; enum class Type : u32 { SymbolCommand, KeywordCommand }; struct Entry { Type type; std::string command; std::string description; std::function callback; }; static void add(Type type, std::string_view command, std::string_view description, const std::function &callback); static std::vector getEntries(); }; }; }