mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-31 05:15:55 -05:00
impr: Merge in script loader structure improvements from python branch
This commit is contained in:
@@ -16,7 +16,7 @@ using namespace hex;
|
||||
using namespace hex::script::loader;
|
||||
|
||||
using ScriptLoaders = std::tuple<
|
||||
#if defined(DOTNET_PLUGINS)
|
||||
#if defined(IMHEX_DOTNET_SCRIPT_SUPPORT)
|
||||
DotNetLoader
|
||||
#endif
|
||||
>;
|
||||
@@ -106,11 +106,11 @@ namespace {
|
||||
}
|
||||
|
||||
for (const auto &script : scripts) {
|
||||
const auto &[name, background, entryPoint] = *script;
|
||||
const auto &[name, background, entryPoint, loader] = *script;
|
||||
if (background)
|
||||
continue;
|
||||
|
||||
if (ImGui::MenuItem(name.c_str())) {
|
||||
if (ImGui::MenuItem(name.c_str(), loader->getTypeName().c_str())) {
|
||||
runnerTask = TaskManager::createTask("Running script...", TaskManager::NoProgress, [entryPoint](auto&) {
|
||||
entryPoint();
|
||||
});
|
||||
@@ -140,4 +140,4 @@ IMHEX_PLUGIN_SETUP("Script Loader", "WerWolv", "Script Loader plugin") {
|
||||
if (initializeAllLoaders()) {
|
||||
addScriptsMenu();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user