bugfinx - UI Hovered is always false while the mouse is being clicked

This commit is contained in:
ikpil 2023-06-15 00:38:52 +09:00
parent 91cc42b828
commit 4c97468f06
3 changed files with 10 additions and 8 deletions

View File

@ -78,7 +78,7 @@ public class RcLogView : IRcView
if (ImGui.BeginChild("scrolling", Vector2.Zero, false, ImGuiWindowFlags.HorizontalScrollbar))
{
_mouseInside = ImGui.IsWindowHovered();
_mouseInside = ImGui.IsWindowHovered(ImGuiHoveredFlags.RectOnly | ImGuiHoveredFlags.RootAndChildWindows);
ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, Vector2.Zero);

View File

@ -25,11 +25,14 @@ using DotRecast.Core;
using DotRecast.Recast.Demo.Draw;
using DotRecast.Recast.DemoTool;
using ImGuiNET;
using Serilog;
namespace DotRecast.Recast.Demo.UI;
public class RcSettingsView : IRcView
{
private static readonly ILogger Logger = Log.ForContext<RecastDemo>();
private bool buildTriggered;
private long buildTime;
@ -52,7 +55,6 @@ public class RcSettingsView : IRcView
public RcSettingsView()
{
}
public void SetSample(Sample sample)
@ -79,7 +81,7 @@ public class RcSettingsView : IRcView
ImGui.SetNextWindowSize(new Vector2(width, _canvas.Size.Y));
ImGui.Begin("Properties", ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize);
_mouseInside = ImGui.IsWindowHovered();
_mouseInside = ImGui.IsWindowHovered(ImGuiHoveredFlags.RectOnly | ImGuiHoveredFlags.RootAndChildWindows);
ImGui.Text("Input Mesh");
ImGui.Separator();

View File

@ -59,7 +59,7 @@ public class RcToolsetView : IRcView
ImGui.SetNextWindowPos(new Vector2(0, 0));
ImGui.SetNextWindowSize(new Vector2(width, _canvas.Size.Y));
ImGui.Begin("Tools", ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize);
_mouseInside = ImGui.IsWindowHovered();
_mouseInside = ImGui.IsWindowHovered(ImGuiHoveredFlags.RectOnly | ImGuiHoveredFlags.RootAndChildWindows);
for (int i = 0; i < tools.Length; ++i)
{