@@ -22,7 +22,8 @@ class Program
2222 private static int _counter = 0 ;
2323 private static int _dragInt = 0 ;
2424 private static Vector3 _clearColor = new Vector3 ( 0.45f , 0.55f , 0.6f ) ;
25- private static bool _showDemoWindow = true ;
25+ private static bool _showImGuiDemoWindow = true ;
26+ private static bool _showImPlotDemoWindow = false ;
2627 private static bool _showAnotherWindow = false ;
2728 private static bool _showMemoryEditor = false ;
2829 private static byte [ ] _memoryEditorData ;
@@ -89,7 +90,8 @@ private static unsafe void SubmitUI()
8990
9091 ImGui . Text ( $ "Mouse position: { ImGui . GetMousePos ( ) } ") ;
9192
92- ImGui . Checkbox ( "Demo Window" , ref _showDemoWindow ) ; // Edit bools storing our windows open/close state
93+ ImGui . Checkbox ( "ImGui Demo Window" , ref _showImGuiDemoWindow ) ; // Edit bools storing our windows open/close state
94+ ImGui . Checkbox ( "ImPlot Demo Window" , ref _showImPlotDemoWindow ) ; // Edit bools storing our windows open/close state
9395 ImGui . Checkbox ( "Another Window" , ref _showAnotherWindow ) ;
9496 ImGui . Checkbox ( "Memory Editor" , ref _showMemoryEditor ) ;
9597 if ( ImGui . Button ( "Button" ) ) // Buttons return true when clicked (NB: most widgets return true when edited/activated)
@@ -114,12 +116,17 @@ private static unsafe void SubmitUI()
114116 }
115117
116118 // 3. Show the ImGui demo window. Most of the sample code is in ImGui.ShowDemoWindow(). Read its code to learn more about Dear ImGui!
117- if ( _showDemoWindow )
119+ if ( _showImGuiDemoWindow )
118120 {
119121 // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway.
120122 // Here we just want to make the demo initial state a bit more friendly!
121123 ImGui . SetNextWindowPos ( new Vector2 ( 650 , 20 ) , ImGuiCond . FirstUseEver ) ;
122- ImGui . ShowDemoWindow ( ref _showDemoWindow ) ;
124+ ImGui . ShowDemoWindow ( ref _showImGuiDemoWindow ) ;
125+ }
126+
127+ if ( _showImPlotDemoWindow )
128+ {
129+ ImPlot . ShowDemoWindow ( ref _showImPlotDemoWindow ) ;
123130 }
124131
125132 if ( ImGui . TreeNode ( "Tabs" ) )
0 commit comments