Skip to content

Commit

Permalink
Add commit number next to version in "About" window
Browse files Browse the repository at this point in the history
  • Loading branch information
Benualdo committed Nov 12, 2024
1 parent c0dd451 commit bc0af12
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/editor/ImGui/Window/About/ImGuiAbout.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "ImguiAbout.h"
#include "renderer/ImGui_consts.h"
#include "version.h"
#include "commit.h"

namespace vg::editor
{
Expand Down Expand Up @@ -59,8 +60,14 @@ namespace vg::editor
{
ImGui::PushDefaultFont();

string title = fmt::sprintf("VG Framework %u.%u.%u", VG_FRAMEWORK_VERSION_MAJOR, VG_FRAMEWORK_VERSION_MINOR, VG_FRAMEWORK_VERSION_PATCH);

#ifdef GIT_REVISION
title += fmt::sprintf(" (commit %s)", GIT_REVISION);
#endif

ImGui::PushStyle(renderer::FontStyle::Bold);
Text("VG Framework %u.%u.%u", VG_FRAMEWORK_VERSION_MAJOR, VG_FRAMEWORK_VERSION_MINOR, VG_FRAMEWORK_VERSION_PATCH);
Text(title.c_str());
Text("");
ImGui::PopStyle();

Expand Down

0 comments on commit bc0af12

Please sign in to comment.