Update to latest ImGuiScene

This commit is contained in:
meli 2019-12-21 08:58:26 -08:00
parent 6535daade7
commit cb2e2cfe40
2 changed files with 7 additions and 19 deletions

View file

@ -5,7 +5,6 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using ImGuiNET; using ImGuiNET;
using ImGuiScene; using ImGuiScene;
using SDL2;
namespace Dalamud.Interface namespace Dalamud.Interface
{ {
@ -30,27 +29,16 @@ namespace Dalamud.Interface
private void Display() private void Display()
{ {
using (var scene = new SimpleImGuiScene("Debug", fullscreen: true)) using (var scene = SimpleImGuiScene.CreateOverlay(RendererFactory.RendererBackend.DirectX11))
{ {
scene.Window.MakeTransparent(SimpleSDLWindow.CreateColorKey(0, 0, 0)); scene.OnBuildUI += DrawUI;
scene.Window.OnSDLEvent += (ref SDL.SDL_Event sdlEvent) =>
{
if (sdlEvent.type == SDL.SDL_EventType.SDL_KEYDOWN && sdlEvent.key.keysym.scancode == SDL.SDL_Scancode.SDL_SCANCODE_ESCAPE)
{
scene.ShouldQuit = true;
}
return true;
};
scene.OnBuildUI += () =>
{
ImGui.ShowDemoWindow();
};
scene.Run(); scene.Run();
} }
} }
private void DrawUI()
{
ImGui.ShowDemoWindow();
}
} }
} }

@ -1 +1 @@
Subproject commit d4fa5d9132dceeeaf447e0b5d5f272b21a423f42 Subproject commit 54fbae7b1ad92c0bc16c792794df8646b061b213