Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
IsMouseHoveringRect has now Rectangle input instead of Min/Max. Forwa…
Browse files Browse the repository at this point in the history
…rded `StyleSnapshot` used in GetStyle query.
  • Loading branch information
antongit committed Oct 11, 2022
1 parent b9472f2 commit 94976ad
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/VL.ImGui/Widgets/Queries/Mouse/IsMouseHoveringRect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
namespace VL.ImGui.Widgets
{
/// <summary>
/// Is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block.
/// Is mouse hovering given bounding rect (in screen space). Clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block.
/// </summary>
[GenerateNode(Category = "ImGui.Queries")]
internal partial class IsMouseHoveringRect : Widget
{

public Vector2 Min { private get; set; }
public Vector2 Max { private get; set; }
public RectangleF Rectangle { private get; set; }

public bool Clip { private get; set; }

public bool Value { get; private set; }

internal override void UpdateCore(Context context)
{
Value = ImGuiNET.ImGui.IsMouseHoveringRect(Min.FromHectoToImGui(), Max.FromHectoToImGui(), Clip);
Value = ImGuiNET.ImGui.IsMouseHoveringRect(Rectangle.TopLeft.FromHectoToImGui(), Rectangle.BottomRight.FromHectoToImGui(), Clip);
}
}
}
29 changes: 28 additions & 1 deletion vl/VL.ImGui/VL.ImGui.vl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Document xmlns:p="property" Id="HGwjAyY9WlcM6EHVoNooQR" LanguageVersion="2022.5.0-0253-c85d53df15" Version="0.128">
<Document xmlns:p="property" Id="HGwjAyY9WlcM6EHVoNooQR" LanguageVersion="2022.5.0-0274-e117370dce" Version="0.128">
<Patch Id="FqV6a8uF6wBNEsSb65h9jq">
<Canvas Id="CiUOvKtIpncPRBZwoQzisM" CanvasType="FullCategory">
<Canvas Id="KTyfvxdYp7wLpquGu2GQq3" Name="ImGui" Position="183,154">
Expand Down Expand Up @@ -1401,6 +1401,33 @@
</Canvas>
<Canvas Id="V6syaQ9XeuWNMbQ9Aan3W7" Name="Styling" Position="323,482">
<Canvas Id="Brb8OYZTemdM4QyNbZC8Po" Name="Immediate" Position="373,312" />
<!--
************************ StyleSnapshot ************************
-->
<Node Name="StyleSnapshot" Bounds="549,312" Id="FZfpsbb40q8MzDsvEnhVam">
<p:NodeReference>
<Choice Kind="ForwardDefinition" Name="Forward" />
<FullNameCategoryReference ID="Primitive" />
</p:NodeReference>
<p:TypeAnnotation LastCategoryFullName="VL.ImGui.Widgets" LastSymbolSource="VL.ImGui.dll">
<Choice Kind="TypeFlag" Name="StyleSnapshot" />
</p:TypeAnnotation>
<Patch Id="STmx7az0xk9PzJvUMgjhRv">
<Canvas Id="OLXvLKZOZTwPZ8IEF6hxcs" BordersChecked="false" CanvasType="Group" />
<ProcessDefinition Id="Hjra5Cz5lmYMKHUvXBrLXX" IsHidden="true" />
</Patch>
</Node>
<Pad Id="GMJhfQr8Vo0OpeIjHAJSWc" Bounds="523,255,86,19" ShowValueBox="true" isIOBox="true" Value="//Forward">
<p:TypeAnnotation>
<Choice Kind="TypeFlag" Name="String" />
</p:TypeAnnotation>
<p:ValueBoxSettings>
<p:fontsize p:Type="Int32">9</p:fontsize>
<p:stringtype p:Assembly="VL.Core" p:Type="VL.Core.StringType">Comment</p:stringtype>
</p:ValueBoxSettings>
</Pad>
</Canvas>
<Canvas Id="NIVmQVW7WQlLjfCwP1vHug" Name="Commands" Position="421,446">
<!--
Expand Down

0 comments on commit 94976ad

Please sign in to comment.