mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
ui: Added license to about page
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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" },
|
||||
|
||||
@@ -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" },
|
||||
|
||||
@@ -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" },
|
||||
|
||||
@@ -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", "计算器帮助" },
|
||||
|
||||
Reference in New Issue
Block a user