From 30847b1d2b6f3e29afd098bf0c04484e7b85ae5b Mon Sep 17 00:00:00 2001
From: Zaafar <5079646+zaafar@users.noreply.github.com>
Date: Sun, 19 Nov 2023 18:19:50 -0500
Subject: [PATCH] Upgrade dep lib
- imgui to 1.90.0
- vortice to 3.3.4
- added support for F12-24, browser_back, browser_forward keys
- fixed print screen key issue.
- release new version
---
.../ClickableTransparentOverlay.csproj | 8 ++++----
ClickableTransparentOverlay/ImGuiInputHandler.cs | 9 ++++++++-
README.md | 2 +-
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/ClickableTransparentOverlay/ClickableTransparentOverlay.csproj b/ClickableTransparentOverlay/ClickableTransparentOverlay.csproj
index d364df7..3b1380a 100644
--- a/ClickableTransparentOverlay/ClickableTransparentOverlay.csproj
+++ b/ClickableTransparentOverlay/ClickableTransparentOverlay.csproj
@@ -9,7 +9,7 @@
A library to create transparent overlays on the windows machines.
https://github.com/zaafar/ClickableTransparentOverlay
https://github.com/zaafar/ClickableTransparentOverlay
- 9.0.1
+ 9.1.0
LICENSE
true
snupkg
@@ -24,10 +24,10 @@
-
+
-
-
+
+
diff --git a/ClickableTransparentOverlay/ImGuiInputHandler.cs b/ClickableTransparentOverlay/ImGuiInputHandler.cs
index 0be1da0..1cb4ba3 100644
--- a/ClickableTransparentOverlay/ImGuiInputHandler.cs
+++ b/ClickableTransparentOverlay/ImGuiInputHandler.cs
@@ -88,6 +88,11 @@ public bool ProcessMessage(WindowMessage msg, UIntPtr wParam, IntPtr lParam)
bool is_key_down = msg == WindowMessage.SysKeyDown || msg == WindowMessage.KeyDown;
if ((ulong)wParam < 256 && TryMapKey((VK)wParam, out ImGuiKey imguikey))
{
+ if (imguikey == ImGuiKey.PrintScreen && !is_key_down)
+ {
+ io.AddKeyEvent(imguikey, true);
+ }
+
io.AddKeyEvent(imguikey, is_key_down);
}
@@ -161,7 +166,7 @@ static ImGuiKey KeyToImGuiKeyShortcut(VK keyToConvert, VK startKey1, ImGuiKey st
result = key switch
{
- >= VK.F1 and <= VK.F12 => KeyToImGuiKeyShortcut(key, VK.F1, ImGuiKey.F1),
+ >= VK.F1 and <= VK.F24 => KeyToImGuiKeyShortcut(key, VK.F1, ImGuiKey.F1),
>= VK.NUMPAD0 and <= VK.NUMPAD9 => KeyToImGuiKeyShortcut(key, VK.NUMPAD0, ImGuiKey.Keypad0),
>= VK.KEY_A and <= VK.KEY_Z => KeyToImGuiKeyShortcut(key, VK.KEY_A, ImGuiKey.A),
>= VK.KEY_0 and <= VK.KEY_9 => KeyToImGuiKeyShortcut(key, VK.KEY_0, ImGuiKey._0),
@@ -213,6 +218,8 @@ static ImGuiKey KeyToImGuiKeyShortcut(VK keyToConvert, VK startKey1, ImGuiKey st
VK.RMENU => ImGuiKey.RightAlt,
VK.RWIN => ImGuiKey.RightSuper,
VK.APPS => ImGuiKey.Menu,
+ VK.BROWSER_BACK => ImGuiKey.AppBack,
+ VK.BROWSER_FORWARD => ImGuiKey.AppForward,
_ => ImGuiKey.None
};
diff --git a/README.md b/README.md
index 54f92d5..71689f7 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ https://www.nuget.org/packages/ClickableTransparentOverlay
Lots of classes in this library (e.g. ImGuiRenderer, ImGuiInputHandler and etc) closely
follow (if not identical to) the official example in c++ ImGui library
([here](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_dx11.cpp "Last changelog looked was 2022-10-11")
-and [here](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_win32.cpp "Last changelog looked was 2023-04-04")).
+and [here](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_win32.cpp "Last changelog looked was 2023-10-05")).
This allows us to easily update this library if something changes over there.