diff --git a/plugins/builtin/include/content/views/view_about.hpp b/plugins/builtin/include/content/views/view_about.hpp index 8ed4f1c68..8ee08ad79 100644 --- a/plugins/builtin/include/content/views/view_about.hpp +++ b/plugins/builtin/include/content/views/view_about.hpp @@ -27,6 +27,7 @@ namespace hex::plugin::builtin { void drawAboutMainPage(); void drawContributorPage(); void drawLibraryCreditsPage(); + void drawLoadedPlugins(); void drawPathsPage(); void drawReleaseNotesPage(); void drawCommitHistoryPage(); diff --git a/plugins/builtin/romfs/lang/de_DE.json b/plugins/builtin/romfs/lang/de_DE.json index 4ddf753aa..e4ead7f71 100644 --- a/plugins/builtin/romfs/lang/de_DE.json +++ b/plugins/builtin/romfs/lang/de_DE.json @@ -820,6 +820,10 @@ "hex.builtin.view.help.about.license": "Lizenz", "hex.builtin.view.help.about.name": "Über ImHex", "hex.builtin.view.help.about.paths": "ImHex Ordner", + "hex.builtin.view.help.about.plugins": "Plugins", + "hex.builtin.view.help.about.plugins.author": "Autor", + "hex.builtin.view.help.about.plugins.desc": "Beschreibung", + "hex.builtin.view.help.about.plugins.plugin": "Plugin", "hex.builtin.view.help.about.source": "Quellcode auf GitHub verfügbar:", "hex.builtin.view.help.about.thanks": "Wenn dir meine Arbeit gefällt, bitte ziehe eine Spende in Betracht, um das Projekt am Laufen zu halten. Vielen Dank <3", "hex.builtin.view.help.about.translator": "Von WerWolv übersetzt", @@ -1044,9 +1048,6 @@ "hex.builtin.welcome.learn.plugins.desc": "Erweitere ImHex mit neuen Funktionen mit Plugins", "hex.builtin.welcome.learn.plugins.link": "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide", "hex.builtin.welcome.learn.plugins.title": "Plugins API", - "hex.builtin.welcome.plugins.author": "Autor", - "hex.builtin.welcome.plugins.desc": "Beschreibung", - "hex.builtin.welcome.plugins.plugin": "Plugin", "hex.builtin.popup.safety_backup.delete": "Nein, entfernen", "hex.builtin.popup.safety_backup.desc": "Oh nein, ImHex ist letztes Mal abgestürzt.\nWillst du das vorherige Projekt wiederherstellen?", "hex.builtin.popup.safety_backup.log_file": "", diff --git a/plugins/builtin/romfs/lang/en_US.json b/plugins/builtin/romfs/lang/en_US.json index e3b79b6cf..4328ffd77 100644 --- a/plugins/builtin/romfs/lang/en_US.json +++ b/plugins/builtin/romfs/lang/en_US.json @@ -925,10 +925,14 @@ "hex.builtin.view.help.about.commits": "Commit History", "hex.builtin.view.help.about.contributor": "Contributors", "hex.builtin.view.help.about.donations": "Donations", - "hex.builtin.view.help.about.libs": "Libraries used", + "hex.builtin.view.help.about.libs": "Libraries", "hex.builtin.view.help.about.license": "License", "hex.builtin.view.help.about.name": "About", - "hex.builtin.view.help.about.paths": "ImHex Directories", + "hex.builtin.view.help.about.paths": "Directories", + "hex.builtin.view.help.about.plugins": "Plugins", + "hex.builtin.view.help.about.plugins.author": "Author", + "hex.builtin.view.help.about.plugins.desc": "Description", + "hex.builtin.view.help.about.plugins.plugin": "Plugin", "hex.builtin.view.help.about.release_notes": "Release Notes", "hex.builtin.view.help.about.source": "Source code available on GitHub:", "hex.builtin.view.help.about.thanks": "If you like my work, please consider donating to keep the project going. Thanks a lot <3", @@ -1190,9 +1194,6 @@ "hex.builtin.welcome.learn.plugins.desc": "Extend ImHex with additional features using plugins", "hex.builtin.welcome.learn.plugins.link": "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide", "hex.builtin.welcome.learn.plugins.title": "Plugins API", - "hex.builtin.welcome.plugins.author": "Author", - "hex.builtin.welcome.plugins.desc": "Description", - "hex.builtin.welcome.plugins.plugin": "Plugin", "hex.builtin.popup.create_workspace.title": "Create new Workspace", "hex.builtin.popup.create_workspace.desc": "Enter a name for the new Workspace", "hex.builtin.popup.safety_backup.delete": "No, Delete", diff --git a/plugins/builtin/romfs/lang/es_ES.json b/plugins/builtin/romfs/lang/es_ES.json index ebfb24364..8a77551b9 100644 --- a/plugins/builtin/romfs/lang/es_ES.json +++ b/plugins/builtin/romfs/lang/es_ES.json @@ -819,6 +819,9 @@ "hex.builtin.view.help.about.license": "Licencia", "hex.builtin.view.help.about.name": "Acerca de", "hex.builtin.view.help.about.paths": "Carpetas de ImHex", + "hex.builtin.view.help.plugins.author": "Autor", + "hex.builtin.view.help.plugins.desc": "Descripción", + "hex.builtin.view.help.plugins.plugin": "Plugin", "hex.builtin.view.help.about.source": "El código fuente está disponible en GitHub:", "hex.builtin.view.help.about.thanks": "Si te gusta mi trabajo, considera por favor realizar una donación para mantener el proyecto en marcha. Muchas gracias <3", "hex.builtin.view.help.about.translator": "Traducido por XorTroll", @@ -1043,9 +1046,6 @@ "hex.builtin.welcome.learn.plugins.desc": "Extienda ImHex con características adicionales mediante plugins", "hex.builtin.welcome.learn.plugins.link": "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide", "hex.builtin.welcome.learn.plugins.title": "API de Plugins", - "hex.builtin.welcome.plugins.author": "Autor", - "hex.builtin.welcome.plugins.desc": "Descripción", - "hex.builtin.welcome.plugins.plugin": "Plugin", "hex.builtin.popup.safety_backup.delete": "No, Borrar", "hex.builtin.popup.safety_backup.desc": "Oh no, ImHex se cerró de forma inesperada la última vez.\n¿Le gustaría restaurar su trabajo anterior?", "hex.builtin.popup.safety_backup.log_file": "", diff --git a/plugins/builtin/romfs/lang/it_IT.json b/plugins/builtin/romfs/lang/it_IT.json index 87b32826e..abeaca8e7 100644 --- a/plugins/builtin/romfs/lang/it_IT.json +++ b/plugins/builtin/romfs/lang/it_IT.json @@ -819,6 +819,9 @@ "hex.builtin.view.help.about.license": "Licenza", "hex.builtin.view.help.about.name": "Riguardo ImHex", "hex.builtin.view.help.about.paths": "ImHex cartelle", + "hex.builtin.view.help.plugins.author": "Autore", + "hex.builtin.view.help.plugins.desc": "Descrizione", + "hex.builtin.view.help.plugins.plugin": "Plugin", "hex.builtin.view.help.about.source": "Codice Sorgente disponibile su GitHub:", "hex.builtin.view.help.about.thanks": "Se ti piace il mio lavoro, per favore considera di fare una donazione. Grazie mille <3", "hex.builtin.view.help.about.translator": "Tradotto da CrustySeanPro", @@ -1043,9 +1046,6 @@ "hex.builtin.welcome.learn.plugins.desc": "Espandi l'utilizzo di ImHex con i Plugin", "hex.builtin.welcome.learn.plugins.link": "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide", "hex.builtin.welcome.learn.plugins.title": "Plugins API", - "hex.builtin.welcome.plugins.author": "Autore", - "hex.builtin.welcome.plugins.desc": "Descrizione", - "hex.builtin.welcome.plugins.plugin": "Plugin", "hex.builtin.popup.safety_backup.delete": "No, Elimina", "hex.builtin.popup.safety_backup.desc": "Oh no, l'ultima volta ImHex è crashato.\nVuoi ripristinare il tuo lavoro?", "hex.builtin.popup.safety_backup.log_file": "", diff --git a/plugins/builtin/romfs/lang/ja_JP.json b/plugins/builtin/romfs/lang/ja_JP.json index c8776bdaa..5eeaaf7fe 100644 --- a/plugins/builtin/romfs/lang/ja_JP.json +++ b/plugins/builtin/romfs/lang/ja_JP.json @@ -819,6 +819,9 @@ "hex.builtin.view.help.about.license": "ライセンス", "hex.builtin.view.help.about.name": "このソフトについて", "hex.builtin.view.help.about.paths": "ImHexのディレクトリ", + "hex.builtin.view.help.plugins.author": "作者", + "hex.builtin.view.help.plugins.desc": "詳細", + "hex.builtin.view.help.plugins.plugin": "プラグイン", "hex.builtin.view.help.about.source": "GitHubからソースコードを入手できます:", "hex.builtin.view.help.about.thanks": "ご使用いただきありがとうございます。もし気に入って頂けたなら、プロジェクトを継続するための寄付をご検討ください。", "hex.builtin.view.help.about.translator": "Translated by gnuhead-chieb", @@ -1043,9 +1046,6 @@ "hex.builtin.welcome.learn.plugins.desc": "ImHexの機能を拡張する", "hex.builtin.welcome.learn.plugins.link": "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide", "hex.builtin.welcome.learn.plugins.title": "プラグインAPI", - "hex.builtin.welcome.plugins.author": "作者", - "hex.builtin.welcome.plugins.desc": "詳細", - "hex.builtin.welcome.plugins.plugin": "プラグイン", "hex.builtin.popup.safety_backup.delete": "破棄する", "hex.builtin.popup.safety_backup.desc": "ImHexがクラッシュしました。\n前のデータを復元しますか?", "hex.builtin.popup.safety_backup.log_file": "", diff --git a/plugins/builtin/romfs/lang/ko_KR.json b/plugins/builtin/romfs/lang/ko_KR.json index 5063c8af0..894b63efb 100644 --- a/plugins/builtin/romfs/lang/ko_KR.json +++ b/plugins/builtin/romfs/lang/ko_KR.json @@ -833,6 +833,9 @@ "hex.builtin.view.help.about.license": "라이선스", "hex.builtin.view.help.about.name": "정보", "hex.builtin.view.help.about.paths": "ImHex 디렉터리", + "hex.builtin.view.help.plugins.author": "작성자", + "hex.builtin.view.help.plugins.desc": "설명", + "hex.builtin.view.help.plugins.plugin": "플러그인", "hex.builtin.view.help.about.source": "GitHub에서 소스 코드를 확인할 수 있습니다:", "hex.builtin.view.help.about.thanks": "이 작업물이 마음에 든다면 프로젝트가 계속 진행될 수 있도록 후원해주세요. 감사합니다 <3", "hex.builtin.view.help.about.translator": "Translated by mirusu400", @@ -1057,9 +1060,6 @@ "hex.builtin.welcome.learn.plugins.desc": "플러그인을 사용하여 추가 기능으로 ImHex를 확장하세요", "hex.builtin.welcome.learn.plugins.link": "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide", "hex.builtin.welcome.learn.plugins.title": "플러그인 API", - "hex.builtin.welcome.plugins.author": "작성자", - "hex.builtin.welcome.plugins.desc": "설명", - "hex.builtin.welcome.plugins.plugin": "플러그인", "hex.builtin.popup.safety_backup.delete": "아니요, 삭제", "hex.builtin.popup.safety_backup.desc": "이전에 ImHex가 비정상적으로 종료된 것 같습니다.\n이전 작업을 복구하시겠습니까?", "hex.builtin.popup.safety_backup.log_file": "로그 파일: ", diff --git a/plugins/builtin/romfs/lang/pt_BR.json b/plugins/builtin/romfs/lang/pt_BR.json index 9f34eecc9..7ec9ed35b 100644 --- a/plugins/builtin/romfs/lang/pt_BR.json +++ b/plugins/builtin/romfs/lang/pt_BR.json @@ -819,6 +819,9 @@ "hex.builtin.view.help.about.license": "Licença", "hex.builtin.view.help.about.name": "Sobre", "hex.builtin.view.help.about.paths": "Diretórios do ImHex", + "hex.builtin.view.help.plugins.author": "Autor", + "hex.builtin.view.help.plugins.desc": "Descrição", + "hex.builtin.view.help.plugins.plugin": "Plugin", "hex.builtin.view.help.about.source": "Código Fonte disponível no GitHub:", "hex.builtin.view.help.about.thanks": "Se você gosta do meu trabalho, considere doar para manter o projeto em andamento. Muito obrigado <3", "hex.builtin.view.help.about.translator": "Traduzido por Douglas Vianna", @@ -1043,9 +1046,6 @@ "hex.builtin.welcome.learn.plugins.desc": "Estenda o ImHex com recursos adicionais usando plugins", "hex.builtin.welcome.learn.plugins.link": "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide", "hex.builtin.welcome.learn.plugins.title": "Plugins API", - "hex.builtin.welcome.plugins.author": "Autor", - "hex.builtin.welcome.plugins.desc": "Descrição", - "hex.builtin.welcome.plugins.plugin": "Plugin", "hex.builtin.popup.safety_backup.delete": "Não, Apagar", "hex.builtin.popup.safety_backup.desc": "Ah não, ImHex crashou na ultima vez.\nDeseja restaurar seu trabalho anterior?", "hex.builtin.popup.safety_backup.log_file": "", diff --git a/plugins/builtin/romfs/lang/zh_CN.json b/plugins/builtin/romfs/lang/zh_CN.json index 426db4cf9..79fc0cc0b 100644 --- a/plugins/builtin/romfs/lang/zh_CN.json +++ b/plugins/builtin/romfs/lang/zh_CN.json @@ -833,6 +833,9 @@ "hex.builtin.view.help.about.license": "许可证", "hex.builtin.view.help.about.name": "关于", "hex.builtin.view.help.about.paths": "ImHex 目录", + "hex.builtin.view.help.plugins.author": "作者", + "hex.builtin.view.help.plugins.desc": "描述", + "hex.builtin.view.help.plugins.plugin": "插件", "hex.builtin.view.help.about.source": "源代码位于 GitHub:", "hex.builtin.view.help.about.thanks": "如果您喜欢我的工作,请赞助以帮助此项目继续前进。非常感谢 <3", "hex.builtin.view.help.about.translator": "由 xtexChooser 翻译", @@ -1057,9 +1060,6 @@ "hex.builtin.welcome.learn.plugins.desc": "通过插件扩展 ImHex 获得更多功能", "hex.builtin.welcome.learn.plugins.link": "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide", "hex.builtin.welcome.learn.plugins.title": "插件 API", - "hex.builtin.welcome.plugins.author": "作者", - "hex.builtin.welcome.plugins.desc": "描述", - "hex.builtin.welcome.plugins.plugin": "插件", "hex.builtin.popup.safety_backup.delete": "删除", "hex.builtin.popup.safety_backup.desc": "糟糕,ImHex 上次崩溃了!\n您想从异常转储中恢复之前的数据吗?", "hex.builtin.popup.safety_backup.log_file": "日志文件: ", diff --git a/plugins/builtin/romfs/lang/zh_TW.json b/plugins/builtin/romfs/lang/zh_TW.json index 415d175bb..af6188d3e 100644 --- a/plugins/builtin/romfs/lang/zh_TW.json +++ b/plugins/builtin/romfs/lang/zh_TW.json @@ -833,6 +833,9 @@ "hex.builtin.view.help.about.license": "授權條款", "hex.builtin.view.help.about.name": "關於", "hex.builtin.view.help.about.paths": "ImHex 目錄", + "hex.builtin.view.help.plugins.author": "作者", + "hex.builtin.view.help.plugins.desc": "說明", + "hex.builtin.view.help.plugins.plugin": "外掛程式", "hex.builtin.view.help.about.source": "原始碼存放於 GitHub:", "hex.builtin.view.help.about.thanks": "如果您喜歡 ImHex,請考慮贊助使專案能夠永續運營。感謝您 <3", "hex.builtin.view.help.about.translator": "由 5idereal 翻譯", @@ -1057,9 +1060,6 @@ "hex.builtin.welcome.learn.plugins.desc": " 使用外掛程式來拓展 ImHex 的功能", "hex.builtin.welcome.learn.plugins.link": "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide", "hex.builtin.welcome.learn.plugins.title": "外掛程式 API", - "hex.builtin.welcome.plugins.author": "作者", - "hex.builtin.welcome.plugins.desc": "說明", - "hex.builtin.welcome.plugins.plugin": "外掛程式", "hex.builtin.popup.safety_backup.delete": "不用,請刪除", "hex.builtin.popup.safety_backup.desc": "喔不,ImHex 上次崩潰了。\n您要復原您的工作階段嗎?", "hex.builtin.popup.safety_backup.log_file": "記錄檔:", diff --git a/plugins/builtin/source/content/views/view_about.cpp b/plugins/builtin/source/content/views/view_about.cpp index 65a0282bb..fdc59bf98 100644 --- a/plugins/builtin/source/content/views/view_about.cpp +++ b/plugins/builtin/source/content/views/view_about.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -188,7 +189,6 @@ namespace hex::plugin::builtin { DonationPage { ImGuiExt::Texture(romfs::get("assets/common/donation/patreon.png").span(), ImGuiExt::Texture::Filter::Linear), "https://patreon.com/werwolv" }, }; - ImGui::NewLine(); if (ImGui::BeginTable("DonationLinks", 5, ImGuiTableFlags_SizingStretchSame)) { ImGui::TableNextRow(); ImGui::TableNextColumn(); @@ -261,7 +261,6 @@ namespace hex::plugin::builtin { } void ViewAbout::drawLibraryCreditsPage() { - struct Library { const char *name; const char *author; @@ -336,6 +335,53 @@ namespace hex::plugin::builtin { drawTable("Third Party", ThirdPartyLibraries); } + void ViewAbout::drawLoadedPlugins() { + const auto &plugins = PluginManager::getPlugins(); + + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2()); + ImGuiExt::BeginSubWindow("hex.builtin.view.help.about.plugins"_lang); + ImGui::PopStyleVar(); + { + if (ImGui::BeginTable("plugins", 4, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY | ImGuiTableFlags_SizingFixedFit)) { + ImGui::TableSetupScrollFreeze(0, 1); + ImGui::TableSetupColumn("hex.builtin.view.help.about.plugins.plugin"_lang); + ImGui::TableSetupColumn("hex.builtin.view.help.about.plugins.author"_lang); + ImGui::TableSetupColumn("hex.builtin.view.help.about.plugins.desc"_lang, ImGuiTableColumnFlags_WidthStretch, 0.5); + ImGui::TableSetupColumn("##loaded", ImGuiTableColumnFlags_WidthFixed, ImGui::GetTextLineHeight()); + + ImGui::TableHeadersRow(); + + ImGuiListClipper clipper; + clipper.Begin(plugins.size()); + + while (clipper.Step()) { + for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) { + const auto &plugin = plugins[i]; + + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + ImGuiExt::TextFormattedColored( + plugin.isBuiltinPlugin() ? ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_Highlight) : ImGui::GetStyleColorVec4(ImGuiCol_Text), + "{}", plugin.getPluginName().c_str() + ); + ImGui::TableNextColumn(); + ImGui::TextUnformatted(plugin.getPluginAuthor().c_str()); + ImGui::TableNextColumn(); + ImGui::TextUnformatted(plugin.getPluginDescription().c_str()); + ImGui::TableNextColumn(); + ImGui::TextUnformatted(plugin.isLoaded() ? ICON_VS_CHECK : ICON_VS_CLOSE); + } + } + + clipper.End(); + + ImGui::EndTable(); + } + } + ImGuiExt::EndSubWindow(); + } + + void ViewAbout::drawPathsPage() { constexpr static std::array, size_t(fs::ImHexPath::END)> PathTypes = { { @@ -651,6 +697,7 @@ namespace hex::plugin::builtin { Tab { "ImHex", &ViewAbout::drawAboutMainPage }, Tab { "hex.builtin.view.help.about.contributor", &ViewAbout::drawContributorPage }, Tab { "hex.builtin.view.help.about.libs", &ViewAbout::drawLibraryCreditsPage }, + Tab { "hex.builtin.view.help.about.plugins", &ViewAbout::drawLoadedPlugins }, Tab { "hex.builtin.view.help.about.paths", &ViewAbout::drawPathsPage }, Tab { "hex.builtin.view.help.about.release_notes", &ViewAbout::drawReleaseNotesPage }, Tab { "hex.builtin.view.help.about.commits", &ViewAbout::drawCommitHistoryPage }, diff --git a/plugins/builtin/source/content/welcome_screen.cpp b/plugins/builtin/source/content/welcome_screen.cpp index e6d9ff5d2..5c86789ad 100644 --- a/plugins/builtin/source/content/welcome_screen.cpp +++ b/plugins/builtin/source/content/welcome_screen.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include