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();
}