Skip to content

Commit

Permalink
Example: Reintegrate Widgets example from @crolando (#77) (fixup)
Browse files Browse the repository at this point in the history
  • Loading branch information
thedmd committed Dec 7, 2020
1 parent 86e0961 commit efd75ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/widgets-example/widgets-example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ namespace ed = ax::NodeEditor;

# ifdef _MSC_VER
# define portable_strcpy strcpy_s
# define portable_sprintf sprintf_s
# else
# define portable_strcpy strcpy
# define portable_sprintf sprintf
# endif

struct Example:
Expand Down Expand Up @@ -349,7 +351,7 @@ struct Example:

float progress_saturated = (progress < 0.0f) ? 0.0f : (progress > 1.0f) ? 1.0f : progress;
char buf[32];
sprintf_s(buf, "%d/%d", (int)(progress_saturated * 1753), 1753);
portable_sprintf(buf, "%d/%d", (int)(progress_saturated * 1753), 1753);
ImGui::ProgressBar(progress, ImVec2(0.f, 0.f), buf);

ImGui::PopItemWidth();
Expand Down

0 comments on commit efd75ef

Please sign in to comment.