feat: add version to update menu
This commit is contained in:
@@ -44,9 +44,20 @@ void UpdateMenu::render() {
|
||||
}
|
||||
} else {
|
||||
ImGui::Text("An update is available!");
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Current version : %s", m_Updater.getCurrentVersion().c_str());
|
||||
ImGui::Text("Last version : %s", m_Updater.getLastVersion().c_str());
|
||||
|
||||
bool canDownloadFile = m_Updater.canUpdate();
|
||||
|
||||
if(!canDownloadFile) ImGui::BeginDisabled();
|
||||
|
||||
if (ImGui::Button("Download")) {
|
||||
m_Updater.downloadUpdate();
|
||||
}
|
||||
|
||||
if(!canDownloadFile) ImGui::EndDisabled();
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Cancel")) {
|
||||
m_Opened = false;
|
||||
@@ -55,6 +66,9 @@ void UpdateMenu::render() {
|
||||
}
|
||||
} else {
|
||||
ImGui::Text("No update available!");
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Current version : %s", m_Updater.getCurrentVersion().c_str());
|
||||
ImGui::Text("Last version : %s", m_Updater.getLastVersion().c_str());
|
||||
}
|
||||
} else {
|
||||
ImGui::Text("Checking updates ...");
|
||||
|
||||
Reference in New Issue
Block a user