2020-11-14 21:16:03 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <hex.hpp>
|
|
|
|
|
2021-01-13 17:28:27 +01:00
|
|
|
#include <imgui.h>
|
2022-02-01 18:09:40 +01:00
|
|
|
#include <hex/ui/view.hpp>
|
2023-11-05 19:57:29 +01:00
|
|
|
#include <hex/helpers/http_requests.hpp>
|
2020-11-14 21:16:03 +01:00
|
|
|
|
2021-12-07 22:47:41 +01:00
|
|
|
namespace hex::plugin::builtin {
|
2020-11-14 21:16:03 +01:00
|
|
|
|
2022-03-04 19:06:29 +01:00
|
|
|
class ViewAbout : public View {
|
2020-11-14 21:16:03 +01:00
|
|
|
public:
|
2022-03-04 19:06:29 +01:00
|
|
|
ViewAbout();
|
2020-11-14 21:16:03 +01:00
|
|
|
|
2020-12-22 18:10:01 +01:00
|
|
|
void drawContent() override;
|
2020-11-14 21:16:03 +01:00
|
|
|
|
2022-03-04 20:52:39 +01:00
|
|
|
[[nodiscard]] bool isAvailable() const override { return true; }
|
|
|
|
[[nodiscard]] bool hasViewMenuItemEntry() const override { return false; }
|
2020-11-28 22:01:50 +01:00
|
|
|
|
2022-03-04 20:52:39 +01:00
|
|
|
[[nodiscard]] ImVec2 getMinSize() const override {
|
2023-11-05 19:57:29 +01:00
|
|
|
return scaled({ 700, 400 });
|
2021-01-23 00:46:50 +01:00
|
|
|
}
|
|
|
|
|
2020-11-14 21:16:03 +01:00
|
|
|
private:
|
|
|
|
bool m_aboutWindowOpen = false;
|
|
|
|
|
|
|
|
void drawAboutPopup();
|
2021-12-12 13:35:07 +01:00
|
|
|
|
|
|
|
void drawAboutMainPage();
|
|
|
|
void drawContributorPage();
|
|
|
|
void drawLibraryCreditsPage();
|
|
|
|
void drawPathsPage();
|
2023-11-05 19:57:29 +01:00
|
|
|
void drawReleaseNotesPage();
|
|
|
|
void drawCommitHistoryPage();
|
2022-01-22 23:11:28 +01:00
|
|
|
void drawLicensePage();
|
2022-01-23 20:46:19 +01:00
|
|
|
|
2023-11-16 22:24:06 +01:00
|
|
|
ImGuiExt::Texture m_logoTexture;
|
2023-11-05 19:57:29 +01:00
|
|
|
|
|
|
|
std::future<HttpRequest::Result<std::string>> m_releaseNoteRequest, m_commitHistoryRequest;
|
|
|
|
u32 m_clickCount = 0;
|
2020-11-14 21:16:03 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|