mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user