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