Skip to content

Commit 2b2a6e4

Browse files
authored
Added IMGUI_DISABLE_DEMO_WINDOWS support (#603)
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.
1 parent fc3b781 commit 2b2a6e4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

implot_demo.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444

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

47+
#if !defined(IMGUI_DISABLE_DEMO_WINDOWS)
48+
4749
// Encapsulates examples for customizing ImPlot.
4850
namespace MyImPlot {
4951

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

24802482
} // namespace MyImplot
24812483

2484+
#else
2485+
2486+
void ImPlot::ShowDemoWindow(bool* p_open) {}
2487+
2488+
#endif
2489+
24822490
#endif // #ifndef IMGUI_DISABLE

0 commit comments

Comments
 (0)