From e4c5e5c097748e728aa7fecf40b13bf8e2de08b2 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 30 Sep 2017 14:56:09 +0200 Subject: [PATCH] Save trace file selector. --- server/TracyView.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index b80f26b9..e6061dd2 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -16,6 +16,10 @@ #include "TracyImGui.hpp" #include "TracyView.hpp" +#ifdef TRACY_FILESELECTOR +# include "../nfd/nfd.h" +#endif + namespace tracy { @@ -757,6 +761,20 @@ void View::DrawConnection() } } + if( ImGui::Button( "Save trace" ) ) + { +#ifdef TRACY_FILESELECTOR + nfdchar_t* fn; + auto res = NFD_SaveDialog( "tracy", nullptr, &fn ); + if( res == NFD_OKAY ) +#else + const char* fn = "trace.tracy"; +#endif + { + + } + } + ImGui::End(); }