mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Updated imgui
This commit is contained in:
@@ -160,7 +160,7 @@ namespace GlitchyEditor.EditWindows
|
|||||||
|
|
||||||
if(ImGui.BeginDragDropTarget())
|
if(ImGui.BeginDragDropTarget())
|
||||||
{
|
{
|
||||||
ImGui.Payload* payload = &ImGui.AcceptDragDropPayload("DND_Entity");
|
ImGui.Payload* payload = ImGui.AcceptDragDropPayload("DND_Entity");
|
||||||
|
|
||||||
if(payload != null)
|
if(payload != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace GlitchyEngine.ImGui
|
|||||||
ImGui.CreateContext();
|
ImGui.CreateContext();
|
||||||
ImGui.StyleColorsDark();
|
ImGui.StyleColorsDark();
|
||||||
|
|
||||||
ref ImGui.IO io = ref ImGui.GetIO();
|
ImGui.IO* io = ImGui.GetIO();
|
||||||
io.ConfigFlags |= .NavEnableKeyboard;
|
io.ConfigFlags |= .NavEnableKeyboard;
|
||||||
io.ConfigFlags |= .DockingEnable;
|
io.ConfigFlags |= .DockingEnable;
|
||||||
io.ConfigFlags |= .ViewportsEnable;
|
io.ConfigFlags |= .ViewportsEnable;
|
||||||
@@ -27,7 +27,7 @@ namespace GlitchyEngine.ImGui
|
|||||||
//io.ConfigFlags |= .DpiEnableScaleViewports;
|
//io.ConfigFlags |= .DpiEnableScaleViewports;
|
||||||
|
|
||||||
// When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
|
// When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
|
||||||
ref ImGui.Style style = ref ImGui.GetStyle();
|
ImGui.Style* style = ImGui.GetStyle();
|
||||||
if(io.ConfigFlags.HasFlag(.ViewportsEnable))
|
if(io.ConfigFlags.HasFlag(.ViewportsEnable))
|
||||||
{
|
{
|
||||||
style.WindowRounding = 0.0f;
|
style.WindowRounding = 0.0f;
|
||||||
@@ -36,13 +36,12 @@ namespace GlitchyEngine.ImGui
|
|||||||
|
|
||||||
#if GE_WINDOWS
|
#if GE_WINDOWS
|
||||||
// Todo: temporary, needs to be platform independent
|
// Todo: temporary, needs to be platform independent
|
||||||
ImGuiImplWin32.Init((Windows.HWnd)(int)Application.Get().Window.NativeWindow);
|
ImGuiImplWin32.Init((void*)(uint)(Windows.HWnd)(int)Application.Get().Window.NativeWindow);
|
||||||
|
|
||||||
var context = Application.Get().Window.Context;
|
var context = Application.Get().Window.Context;
|
||||||
|
|
||||||
ImGuiImplDX11.Init(context.[Friend]nativeDevice, context.[Friend]nativeContext);
|
ImGuiImplDX11.Init(context.[Friend]nativeDevice, context.[Friend]nativeContext);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnDetach()
|
public override void OnDetach()
|
||||||
@@ -200,13 +199,13 @@ namespace GlitchyEngine.ImGui
|
|||||||
|
|
||||||
public void End()
|
public void End()
|
||||||
{
|
{
|
||||||
ref ImGui.IO io = ref ImGui.GetIO();
|
ImGui.IO* io = ImGui.GetIO();
|
||||||
|
|
||||||
let window = Application.Get().Window;
|
let window = Application.Get().Window;
|
||||||
io.DisplaySize = .(window.Width, window.Height);
|
io.DisplaySize = .(window.Width, window.Height);
|
||||||
|
|
||||||
ImGui.Render();
|
ImGui.Render();
|
||||||
ImGuiImplDX11.RenderDrawData(ref ImGui.GetDrawData());
|
ImGuiImplDX11.RenderDrawData(ImGui.GetDrawData());
|
||||||
|
|
||||||
if(io.ConfigFlags.HasFlag(.ViewportsEnable))
|
if(io.ConfigFlags.HasFlag(.ViewportsEnable))
|
||||||
{
|
{
|
||||||
|
|||||||
Vendored
+1
-1
Submodule GlitchyEngine/vendor/imgui-beef updated: 5d3d175be9...38808d5aab
Reference in New Issue
Block a user