Skip to content

Commit

Permalink
Added IMGUI_DISABLE_DEMO_WINDOWS support (#603)
Browse files Browse the repository at this point in the history
Unlike ImGui only ShowDemoWindow of the public implot.h api is actually defined in implot_demo.cpp.

Refrained from moving ShowStyleEditor, ShowStyleSelector, ShowUserGuide, ShowMetricsWindow to implot_demo.cpp like ImGui.
  • Loading branch information
StewMcc authored Dec 24, 2024
1 parent fc3b781 commit 2b2a6e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions implot_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@

#define CHECKBOX_FLAG(flags, flag) ImGui::CheckboxFlags(#flag, (unsigned int*)&flags, flag)

#if !defined(IMGUI_DISABLE_DEMO_WINDOWS)

// Encapsulates examples for customizing ImPlot.
namespace MyImPlot {

Expand Down Expand Up @@ -2479,4 +2481,10 @@ void PlotCandlestick(const char* label_id, const double* xs, const double* opens

} // namespace MyImplot

#else

void ImPlot::ShowDemoWindow(bool* p_open) {}

#endif

#endif // #ifndef IMGUI_DISABLE

0 comments on commit 2b2a6e4

Please sign in to comment.