SaveTool::drawAbout(): update for cpr removal, add a link, fix various issues.
That function was in _dire_ need of an update...
This commit is contained in:
parent
a36d9134bf
commit
94979907b1
2 changed files with 28 additions and 18 deletions
|
@ -58,6 +58,16 @@ void SaveTool::drawAbout() {
|
||||||
ImGui::TextWrapped("This application, made for the M.A.S.S. Builder community by Guillaume Jacquemin (aka William JCM), "
|
ImGui::TextWrapped("This application, made for the M.A.S.S. Builder community by Guillaume Jacquemin (aka William JCM), "
|
||||||
"is a rewrite of the wxWidgets-powered M.A.S.S. Builder Save Tool (formerly known as wxMASSManager).");
|
"is a rewrite of the wxWidgets-powered M.A.S.S. Builder Save Tool (formerly known as wxMASSManager).");
|
||||||
|
|
||||||
|
auto website = "https://williamjcm.ovh/coding/mbst";
|
||||||
|
drawAlignedText(ICON_FA_GLOBE " %s", website);
|
||||||
|
ImGui::SameLine();
|
||||||
|
if(ImGui::Button("Copy to clipboard")) {
|
||||||
|
ImGui::SetClipboardText(website);
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if(ImGui::Button("Open in browser")) {
|
||||||
|
openUri(website);
|
||||||
|
}
|
||||||
auto repo = "https://williamjcm.ovh/git/williamjcm/MassBuilderSaveTool";
|
auto repo = "https://williamjcm.ovh/git/williamjcm/MassBuilderSaveTool";
|
||||||
drawAlignedText(ICON_FA_GIT_ALT " %s", repo);
|
drawAlignedText(ICON_FA_GIT_ALT " %s", repo);
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -77,7 +87,7 @@ void SaveTool::drawAbout() {
|
||||||
if(ImGui::BeginChild("##GPL", {0.0f, windowSize().y() * 0.3f}, true)) {
|
if(ImGui::BeginChild("##GPL", {0.0f, windowSize().y() * 0.3f}, true)) {
|
||||||
static auto licence = _rs.getRaw("COPYING");
|
static auto licence = _rs.getRaw("COPYING");
|
||||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
||||||
ImGui::TextUnformatted(licence);
|
ImGui::TextEx(licence.data(), licence.data() + licence.size(), ImGuiTextFlags_None);
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
@ -106,7 +116,7 @@ void SaveTool::drawAbout() {
|
||||||
static auto corrade_licence = _rs.getRaw("COPYING.Corrade");
|
static auto corrade_licence = _rs.getRaw("COPYING.Corrade");
|
||||||
if(ImGui::BeginChild("##CorradeLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
if(ImGui::BeginChild("##CorradeLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
||||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
||||||
ImGui::TextUnformatted(corrade_licence);
|
ImGui::TextEx(corrade_licence.data(), corrade_licence.data() + corrade_licence.size(), ImGuiTextFlags_None);
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
@ -134,7 +144,7 @@ void SaveTool::drawAbout() {
|
||||||
static auto magnum_licence = _rs.getRaw("COPYING.Magnum");
|
static auto magnum_licence = _rs.getRaw("COPYING.Magnum");
|
||||||
if(ImGui::BeginChild("##MagnumLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
if(ImGui::BeginChild("##MagnumLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
||||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
||||||
ImGui::TextUnformatted(magnum_licence);
|
ImGui::TextEx(magnum_licence.data(), magnum_licence.data() + magnum_licence.size(), ImGuiTextFlags_None);
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
@ -160,7 +170,7 @@ void SaveTool::drawAbout() {
|
||||||
static auto imgui_licence = _rs.getRaw("LICENSE.ImGui");
|
static auto imgui_licence = _rs.getRaw("LICENSE.ImGui");
|
||||||
if(ImGui::BeginChild("##ImGuiLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
if(ImGui::BeginChild("##ImGuiLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
||||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
||||||
ImGui::TextUnformatted(imgui_licence);
|
ImGui::TextEx(imgui_licence.data(), imgui_licence.data() + imgui_licence.size(), ImGuiTextFlags_None);
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
@ -186,7 +196,7 @@ void SaveTool::drawAbout() {
|
||||||
static auto sdl_licence = _rs.getRaw("LICENSE.SDL");
|
static auto sdl_licence = _rs.getRaw("LICENSE.SDL");
|
||||||
if(ImGui::BeginChild("##SDLLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
if(ImGui::BeginChild("##SDLLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
||||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
||||||
ImGui::TextUnformatted(sdl_licence);
|
ImGui::TextEx(sdl_licence.data(), sdl_licence.data() + sdl_licence.size(), ImGuiTextFlags_None);
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
@ -212,7 +222,7 @@ void SaveTool::drawAbout() {
|
||||||
static auto libzip_licence = _rs.getRaw("LICENSE.libzip");
|
static auto libzip_licence = _rs.getRaw("LICENSE.libzip");
|
||||||
if(ImGui::BeginChild("##libzipLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
if(ImGui::BeginChild("##libzipLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
||||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
||||||
ImGui::TextUnformatted(libzip_licence);
|
ImGui::TextEx(libzip_licence.data(), libzip_licence.data() + libzip_licence.size(), ImGuiTextFlags_None);
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
@ -237,7 +247,7 @@ void SaveTool::drawAbout() {
|
||||||
static auto efsw_licence = _rs.getRaw("LICENSE.efsw");
|
static auto efsw_licence = _rs.getRaw("LICENSE.efsw");
|
||||||
if(ImGui::BeginChild("##efswLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
if(ImGui::BeginChild("##efswLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
||||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
||||||
ImGui::TextUnformatted(efsw_licence);
|
ImGui::TextEx(efsw_licence.data(), efsw_licence.data() + efsw_licence.size(), ImGuiTextFlags_None);
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
@ -245,24 +255,24 @@ void SaveTool::drawAbout() {
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ImGui::TreeNodeEx("C++ Requests (cpr)", ImGuiTreeNodeFlags_SpanAvailWidth)) {
|
if(ImGui::TreeNodeEx("libcurl", ImGuiTreeNodeFlags_SpanAvailWidth)) {
|
||||||
auto cpr_website = "https://whoshuu.github.io/cpr/";
|
auto curl_website = "https://curl.se/libcurl";
|
||||||
drawAlignedText(ICON_FA_GLOBE " %s", cpr_website);
|
drawAlignedText(ICON_FA_GLOBE " %s", curl_website);
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if(ImGui::Button("Copy to clipboard")) {
|
if(ImGui::Button("Copy to clipboard")) {
|
||||||
ImGui::SetClipboardText(cpr_website);
|
ImGui::SetClipboardText(curl_website);
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if(ImGui::Button("Open in browser")) {
|
if(ImGui::Button("Open in browser")) {
|
||||||
openUri(cpr_website);
|
openUri(curl_website);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::TextUnformatted("Licence: MIT");
|
ImGui::TextUnformatted("Licence: MIT/X derivative");
|
||||||
|
|
||||||
static auto cpr_licence = _rs.getRaw("LICENSE.cpr");
|
static auto curl_licence = _rs.getRaw("LICENSE.curl");
|
||||||
if(ImGui::BeginChild("##cprLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
if(ImGui::BeginChild("##libcurlLicence", {0.0f, windowSize().y() * 0.3f}, true)) {
|
||||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
||||||
ImGui::TextUnformatted(cpr_licence);
|
ImGui::TextEx(curl_licence.data(), curl_licence.data() + curl_licence.size(), ImGuiTextFlags_None);
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
|
|
@ -45,5 +45,5 @@ filename=../third-party/efsw/LICENSE
|
||||||
alias=LICENSE.efsw
|
alias=LICENSE.efsw
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
filename=../third-party/cpr/LICENSE
|
filename=../third-party/curl/COPYING
|
||||||
alias=LICENSE.cpr
|
alias=LICENSE.curl
|
||||||
|
|
Loading…
Reference in a new issue