Display update notification.

This commit is contained in:
Bartosz Taudul 2020-09-10 21:52:43 +02:00
parent f5073e628d
commit 990ad36ae5

View File

@ -32,6 +32,7 @@
#include "../../server/tracy_pdqsort.h"
#include "../../server/tracy_robin_hood.h"
#include "../../server/TracyBadVersion.hpp"
#include "../../server/TracyFileHeader.hpp"
#include "../../server/TracyFileRead.hpp"
#include "../../server/TracyImGui.hpp"
#include "../../server/TracyMouse.hpp"
@ -617,6 +618,16 @@ static void DrawContents()
{
OpenWebpage( "https://github.com/sponsors/wolfpld/" );
}
if( updateVersion != 0 && updateVersion > tracy::FileVersion( tracy::Version::Major, tracy::Version::Minor, tracy::Version::Patch ) )
{
ImGui::Separator();
ImGui::TextColored( ImVec4( 1, 1, 0, 1 ), ICON_FA_EXCLAMATION_TRIANGLE " Update to %i.%i.%i is available!", ( updateVersion >> 16 ) & 0xFF, ( updateVersion >> 8 ) & 0xFF, updateVersion & 0xFF );
ImGui::SameLine();
if( ImGui::SmallButton( ICON_FA_DOWNLOAD " Get it!" ) )
{
OpenWebpage( "https://github.com/wolfpld/tracy/releases" );
}
}
ImGui::Separator();
ImGui::TextUnformatted( "Client address" );
bool connectClicked = false;