From 9d7222eb4a70e48ce5feba3618982d475e11d5bf Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 8 Jun 2024 12:33:26 +0200 Subject: [PATCH] Add unfinished instrumentation achievement and category. --- profiler/src/profiler/TracyAchievementData.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/profiler/src/profiler/TracyAchievementData.cpp b/profiler/src/profiler/TracyAchievementData.cpp index 9474d109..529163c2 100644 --- a/profiler/src/profiler/TracyAchievementData.cpp +++ b/profiler/src/profiler/TracyAchievementData.cpp @@ -6,6 +6,15 @@ namespace tracy::data { +AchievementItem ai_instrumentationIntro = { "instrumentationIntro", "Instrumentation", [](const ctx&){ + ImGui::TextWrapped( "Instrumentation is a powerful feature that allows you to see the exact runtime of each call to the selected set of functions. The downside is that it takes a bit of manual work to get it set up." ); + ImGui::TextWrapped( "To get started, open a source file and include the Tracy.hpp header. This will give you access to a variety of macros provided by Tracy. Next, add the ZoneScoped macro to the beginning of one of your functions, like this:" ); +} }; + +AchievementItem* ac_instrumentationItems[] = { &ai_instrumentationIntro, nullptr }; +AchievementCategory ac_instrumentation = { "instrumentation", "Instrumentation", ac_instrumentationItems }; + + AchievementItem ai_loadTrace = { "loadTrace", "Load a trace", [](const ctx&){ ImGui::TextWrapped( "You can open a previously saved trace file (or one received from a friend) with the '" ICON_FA_FOLDER_OPEN " Open saved trace' button on the welcome screen." ); } };