File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change 11
11
#include " Shared.h"
12
12
#include " Consts.h"
13
13
#include " Branch.h"
14
+ #include " Version.h"
14
15
15
16
#include " Mumble/Mumble.h"
16
17
40
41
#include " resource.h"
41
42
#include " Textures/Texture.h"
42
43
44
+ #ifndef STRINGIFY
45
+ #define STRINGIFY (x ) #x
46
+ #endif
47
+ #ifndef TOSTRING
48
+ #define TOSTRING (x ) STRINGIFY(x)
49
+ #endif
50
+
51
+ #ifndef WATERMARK
52
+ #define WATERMARK __DATE__ " " __TIME__ " (v" TOSTRING(V_MAJOR) " ." TOSTRING(V_MINOR) " ." TOSTRING(V_BUILD) " ." TOSTRING(V_REVISION) " ) [" BRANCH_NAME " ]"
53
+ #endif
54
+
43
55
namespace GUI
44
56
{
45
57
/* internal forward declarations */
@@ -285,26 +297,14 @@ namespace GUI
285
297
/* draw overlay end */
286
298
287
299
#ifdef _DEBUG
288
- std::string watermark = " Debug Build " ;
289
- watermark.append (__DATE__);
290
- watermark.append (" " );
291
- watermark.append (__TIME__);
292
- watermark.append (" (v" );
293
- watermark.append (Version.ToString ());
294
- watermark.append (" )" );
295
- watermark.append (" [" );
296
- watermark.append (BRANCH_NAME);
297
- watermark.append (" ]" );
298
-
299
300
ImGui::PushFont (MonospaceFont);
300
- ImVec2 sz = ImGui::CalcTextSize (watermark. c_str () );
301
+ ImVec2 sz = ImGui::CalcTextSize (WATERMARK );
301
302
302
303
ImGui::PushStyleVar (ImGuiStyleVar_WindowPadding, ImVec2 (0 .0f , 0 .0f ));
303
304
ImGui::SetNextWindowPos (ImVec2 ((Renderer::Width - sz.x ) / 2 , 0 ));
304
305
if (ImGui::Begin (" NEXUS_BUILDINFO" , (bool *)0 , WindowFlags_Watermark))
305
306
{
306
- ImGui::SetCursorPos (ImVec2 (0 , 0 ));
307
- ImGui::TextOutlined (watermark.c_str ());
307
+ ImGui::TextOutlined (WATERMARK);
308
308
};
309
309
ImGui::End ();
310
310
ImGui::PopStyleVar ();
You can’t perform that action at this time.
0 commit comments