mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
ui/api: Added loaded plugin information to welcome screen
This commit is contained in:
@@ -24,6 +24,10 @@ namespace hex::plugin::builtin {
|
||||
{ "hex.welcome.help.repo.link", "https://github.com/WerWolv/ImHex" },
|
||||
{ "hex.welcome.help.gethelp", "Get Help" },
|
||||
{ "hex.welcome.help.gethelp.link", "https://github.com/WerWolv/ImHex/discussions/categories/get-help" },
|
||||
{ "hex.welcome.header.plugins", "Loaded Plugins" },
|
||||
{ "hex.welcome.plugins.plugin", "Plugin" },
|
||||
{ "hex.welcome.plugins.author", "Author" },
|
||||
{ "hex.welcome.plugins.desc", "Description" },
|
||||
{ "hex.welcome.header.customize", "Customize" },
|
||||
{ "hex.welcome.customize.settings.title", "Settings" },
|
||||
{ "hex.welcome.customize.settings.desc", "Change preferences of ImHex" },
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
}
|
||||
|
||||
IMHEX_PLUGIN_SETUP {
|
||||
IMHEX_PLUGIN_SETUP("Built-in", "WerWolv", "Default ImHex functionality") {
|
||||
|
||||
using namespace hex::plugin::builtin;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
IMHEX_PLUGIN_SETUP {
|
||||
IMHEX_PLUGIN_SETUP("Example", "WerWolv", "Example plugin used as template for plugin devs") {
|
||||
|
||||
ContentRegistry::Views::add<ViewExample>();
|
||||
|
||||
|
||||
@@ -11,9 +11,14 @@
|
||||
#include <hex/helpers/shared_data.hpp>
|
||||
#include <hex/data_processor/node.hpp>
|
||||
|
||||
#define IMHEX_PLUGIN_SETUP IMHEX_PLUGIN_SETUP_IMPL(IMHEX_PLUGIN_NAME)
|
||||
#define IMHEX_PLUGIN_SETUP(name, author, description) IMHEX_PLUGIN_SETUP_IMPL(IMHEX_PLUGIN_NAME, name, author, description)
|
||||
|
||||
#define IMHEX_PLUGIN_SETUP_IMPL(name) namespace hex::plugin::name::internal { \
|
||||
[[gnu::visibility("default")]] void initializePlugin(); \
|
||||
} \
|
||||
void hex::plugin::name::internal::initializePlugin()
|
||||
#define IMHEX_PLUGIN_SETUP_IMPL(namespaceName, name, author, description) \
|
||||
namespace hex::plugin::namespaceName::internal { \
|
||||
[[gnu::visibility("default")]] void initializePlugin(); \
|
||||
\
|
||||
[[gnu::visibility("default")]] const char* getPluginName() { return name; } \
|
||||
[[gnu::visibility("default")]] const char* getPluginAuthor() { return author; } \
|
||||
[[gnu::visibility("default")]] const char* getPluginDescription() { return description; } \
|
||||
} \
|
||||
void hex::plugin::namespaceName::internal::initializePlugin()
|
||||
|
||||
Reference in New Issue
Block a user