mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Update to latest ImGuiScene
This commit is contained in:
parent
6535daade7
commit
cb2e2cfe40
2 changed files with 7 additions and 19 deletions
|
|
@ -5,7 +5,6 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using ImGuiNET;
|
||||
using ImGuiScene;
|
||||
using SDL2;
|
||||
|
||||
namespace Dalamud.Interface
|
||||
{
|
||||
|
|
@ -30,27 +29,16 @@ namespace Dalamud.Interface
|
|||
|
||||
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.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.OnBuildUI += DrawUI;
|
||||
scene.Run();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawUI()
|
||||
{
|
||||
ImGui.ShowDemoWindow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit d4fa5d9132dceeeaf447e0b5d5f272b21a423f42
|
||||
Subproject commit 54fbae7b1ad92c0bc16c792794df8646b061b213
|
||||
Loading…
Add table
Add a link
Reference in a new issue