mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Show ImGui DemoWindow in EditorLayer
This commit is contained in:
@@ -111,6 +111,10 @@ namespace GlitchyEditor
|
||||
|
||||
private AssetThumbnailManager _thumbnailManager ~ delete _;
|
||||
|
||||
#if GE_EDITOR_IMGUI_DEMO
|
||||
private bool _showImguiDemoWindow;
|
||||
#endif
|
||||
|
||||
[AllowAppend]
|
||||
public this(String[] args, EditorContentManager contentManager) : base("Editor")
|
||||
{
|
||||
@@ -1214,6 +1218,13 @@ namespace GlitchyEditor
|
||||
|
||||
DrawMainMenuBar();
|
||||
|
||||
#if GE_EDITOR_IMGUI_DEMO
|
||||
if (_showImguiDemoWindow)
|
||||
{
|
||||
ImGui.ShowDemoWindow();
|
||||
}
|
||||
#endif
|
||||
|
||||
_editor.SceneViewportWindow.RenderTarget = _editorViewportTarget;
|
||||
_editor.GameViewportWindow.RenderTarget = _gameViewportTarget;
|
||||
|
||||
@@ -1535,6 +1546,10 @@ namespace GlitchyEditor
|
||||
if(ImGui.MenuItem("Reload Scripts"))
|
||||
ScriptEngine.ReloadAssemblies();
|
||||
|
||||
#if GE_EDITOR_IMGUI_DEMO
|
||||
ImGui.Checkbox("Show ImGui Demo", &_showImguiDemoWindow);
|
||||
#endif
|
||||
|
||||
ImGui.EndMenu();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user