1
0
mirror of synced 2025-02-17 18:59:21 +01:00

Improved about page

This commit is contained in:
WerWolv 2021-01-23 00:46:50 +01:00
parent b0b9ce0cf8
commit 8e46751e98
2 changed files with 27 additions and 4 deletions

View File

@ -24,6 +24,10 @@ namespace hex {
bool hasViewMenuItemEntry() override { return false; }
ImVec2 getMinSize() override {
return ImVec2(400, 300);
}
private:
bool m_aboutWindowOpen = false;
bool m_patternHelpWindowOpen = false;

View File

@ -29,15 +29,34 @@ namespace hex {
void ViewHelp::drawAboutPopup() {
if (ImGui::BeginPopupModal("About", &this->m_aboutWindowOpen, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::Text("ImHex Hex Editor v%s by WerWolv", IMHEX_VERSION);
ImGui::Text("ImHex Hex Editor v%s by WerWolv -", IMHEX_VERSION);
#if defined(GIT_BRANCH) && defined(GIT_COMMIT_HASH)
ImGui::Text("%s@%s", GIT_BRANCH, GIT_COMMIT_HASH);
ImGui::SameLine();
ImGui::TextColored(ImVec4(0.4F, 0.8F, 0.4F, 1.0F), "%s@%s", GIT_BRANCH, GIT_COMMIT_HASH);
#endif
ImGui::NewLine();
ImGui::Text("Source code available on GitHub:"); ImGui::SameLine();
ImGui::TextUnformatted("Source code available on GitHub:"); ImGui::SameLine();
ImGui::TextColored(ImVec4(0.4F, 0.4F, 0.8F, 1.0F), "WerWolv/ImHex ");
ImGui::NewLine();
ImGui::Text("Donations");
ImGui::Separator();
constexpr const char* Links[] = { "https://werwolv.net/donate", "https://www.patreon.com/werwolv", "https://github.com/sponsors/WerWolv" };
ImGui::TextWrapped("If you like my work, please consider donating to keep the project going. Thanks a lot <3");
ImGui::NewLine();
for (auto &link : Links) {
ImGui::TextColored(ImVec4(0.4F, 0.4F, 0.8F, 1.0F), link); ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetWindowWidth() - ImGui::CalcTextSize(" Copy ").x);
if (ImGui::Button((std::string("Copy##") + link).c_str()))
ImGui::SetClipboardText(link);
}
ImGui::NewLine();
ImGui::Text("Libraries used");
ImGui::Separator();
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.2F, 0.2F, 0.2F, 0.3F));