ui: Added license to about page

This commit is contained in:
WerWolv
2022-01-22 23:11:28 +01:00
parent 48aacc0c2e
commit 6c6fe8ad5c
8 changed files with 357 additions and 4 deletions

View File

@@ -4,6 +4,8 @@
#include <hex/helpers/fmt.hpp>
#include <hex/helpers/utils.hpp>
#include <romfs/romfs.hpp>
namespace hex::plugin::builtin {
ViewHelp::ViewHelp() : View("hex.builtin.view.help.about.name") {
@@ -112,6 +114,10 @@ namespace hex::plugin::builtin {
}
}
void ViewHelp::drawLicensePage() {
ImGui::TextFormattedWrapped("{}", romfs::get("LICENSE").string());
}
void ViewHelp::drawAboutPopup() {
ImGui::SetNextWindowSize(scaled(ImVec2(600, 350)), ImGuiCond_Always);
if (ImGui::BeginPopupModal(View::toWindowName("hex.builtin.view.help.about.name").c_str(), &this->m_aboutWindowOpen, ImGuiWindowFlags_NoResize)) {
@@ -145,6 +151,12 @@ namespace hex::plugin::builtin {
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("hex.builtin.view.help.about.license"_lang)) {
ImGui::NewLine();
this->drawLicensePage();
ImGui::EndTabItem();
}
ImGui::EndTabBar();
}

View File

@@ -165,6 +165,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.view.help.about.contributor", "Mitwirkende" },
{ "hex.builtin.view.help.about.libs", "Benutzte Libraries" },
{ "hex.builtin.view.help.about.paths", "ImHex Ordner" },
{ "hex.builtin.view.help.about.license", "Lizenz" },
{ "hex.builtin.view.help.documentation", "ImHex Dokumentation" },
{ "hex.builtin.view.help.pattern_cheat_sheet", "Pattern Language Cheat Sheet"},
{ "hex.builtin.view.help.calc_cheat_sheet", "Rechner Cheat Sheet" },

View File

@@ -167,6 +167,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.view.help.about.contributor", "Contributors" },
{ "hex.builtin.view.help.about.libs", "Libraries used" },
{ "hex.builtin.view.help.about.paths", "ImHex Directories" },
{ "hex.builtin.view.help.about.license", "License" },
{ "hex.builtin.view.help.documentation", "ImHex Documentation" },
{ "hex.builtin.view.help.pattern_cheat_sheet", "Pattern Language Cheat Sheet"},
{ "hex.builtin.view.help.calc_cheat_sheet", "Calculator Cheat Sheet" },

View File

@@ -164,6 +164,7 @@ namespace hex::plugin::builtin {
//{ "hex.builtin.view.help.about.contributor", "Contributors" },
{ "hex.builtin.view.help.about.libs", "Librerie usate" },
{ "hex.builtin.view.help.about.paths", "ImHex cartelle" },
//{ "hex.builtin.view.help.about.license", "License" },
{ "hex.builtin.view.help.documentation", "Documentazione di ImHex" },
{ "hex.builtin.view.help.pattern_cheat_sheet", "Pattern Language Cheat Sheet"},
{ "hex.builtin.view.help.calc_cheat_sheet", "Calcolatrice Cheat Sheet" },

View File

@@ -164,6 +164,7 @@ namespace hex::plugin::builtin {
//{ "hex.builtin.view.help.about.contributor", "Contributors" },
{ "hex.builtin.view.help.about.libs", "使用的库" },
{ "hex.builtin.view.help.about.paths", "ImHex目录" },
// "hex.builtin.view.help.about.license", "License" },
{ "hex.builtin.view.help.documentation", "ImHex文档" },
{ "hex.builtin.view.help.pattern_cheat_sheet", "模式语言帮助"},
{ "hex.builtin.view.help.calc_cheat_sheet", "计算器帮助" },