diff --git a/ClickableTransparentOverlay/ImGuiController.cs b/ClickableTransparentOverlay/ImGuiController.cs
index 8ac8482..6b79a40 100644
--- a/ClickableTransparentOverlay/ImGuiController.cs
+++ b/ClickableTransparentOverlay/ImGuiController.cs
@@ -13,7 +13,7 @@ namespace ClickableTransparentOverlay
/// A modified version of Veldrid.ImGui's ImGuiRenderer.
/// Manages input for ImGui and handles rendering ImGui's DrawLists with Veldrid.
///
- public class ImGuiController : IDisposable
+ internal class ImGuiController : IDisposable
{
private GraphicsDevice _gd;
private bool _frameBegun;
diff --git a/ClickableTransparentOverlay/NativeMethods.cs b/ClickableTransparentOverlay/NativeMethods.cs
index b410533..7aa3800 100644
--- a/ClickableTransparentOverlay/NativeMethods.cs
+++ b/ClickableTransparentOverlay/NativeMethods.cs
@@ -29,7 +29,7 @@ namespace ClickableTransparentOverlay
///
/// Veldrid window handle in IntPtr format.
///
- public static void InitTransparency(IntPtr handle)
+ internal static void InitTransparency(IntPtr handle)
{
GWL_EXSTYLE_CLICKABLE = GetWindowLongPtr(handle, GWL_EXSTYLE);
GWL_EXSTYLE_NOT_CLICKABLE = new IntPtr(
@@ -45,7 +45,7 @@ namespace ClickableTransparentOverlay
///
/// Veldrid window handle in IntPtr format.
/// Set to true if you want to make the window clickable otherwise false.
- public static void SetOverlayClickable(IntPtr handle, bool WantClickable)
+ internal static void SetOverlayClickable(IntPtr handle, bool WantClickable)
{
if (!IsClickable && WantClickable)
{
@@ -63,7 +63,7 @@ namespace ClickableTransparentOverlay
///
/// Allows showing/hiding the console window.
///
- public static void SetConsoleWindow(bool visiable)
+ internal static void SetConsoleWindow(bool visiable)
{
if (visiable)
{
@@ -83,7 +83,7 @@ namespace ClickableTransparentOverlay
///
///
///
- public static Vector2 GetCursorPosition(IntPtr hWnd)
+ internal static Vector2 GetCursorPosition(IntPtr hWnd)
{
if (GetCursorPos(out var lpPoint))
{
@@ -100,23 +100,23 @@ namespace ClickableTransparentOverlay
///
/// key to look for.
/// weather the key is pressed or not.
- public static bool isKeyPressed(int nVirtKey)
+ public static bool IsKeyPressed(int nVirtKey)
{
return Convert.ToBoolean(GetKeyState(nVirtKey) & KEY_PRESSED);
}
[DllImport("USER32.dll")]
- static extern short GetKeyState(int nVirtKey);
+ private static extern short GetKeyState(int nVirtKey);
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- static extern bool GetCursorPos(out POINT lpPoint);
+ private static extern bool GetCursorPos(out POINT lpPoint);
[DllImport("user32.dll")]
- static extern bool ScreenToClient(IntPtr hWnd, ref POINT lpPoint);
+ private static extern bool ScreenToClient(IntPtr hWnd, ref POINT lpPoint);
[DllImport("user32.dll", SetLastError = true)]
- static extern IntPtr SetFocus(IntPtr hWnd);
+ private static extern IntPtr SetFocus(IntPtr hWnd);
[DllImport("dwmapi.dll")]
private static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref Margins pMarInset);
@@ -155,7 +155,7 @@ namespace ClickableTransparentOverlay
}
[StructLayout(LayoutKind.Sequential)]
- public struct POINT
+ internal struct POINT
{
public int X;
public int Y;
diff --git a/DriverProgram/Program.cs b/DriverProgram/Program.cs
index bf4f42a..a2830b9 100644
--- a/DriverProgram/Program.cs
+++ b/DriverProgram/Program.cs
@@ -35,7 +35,7 @@ namespace DriverProgram
{
yield return new WaitEvent(Overlay.OnRender);
- if (NativeMethods.isKeyPressed(0x7B)) //F12.
+ if (NativeMethods.IsKeyPressed(0x7B)) //F12.
{
showClickableMenu = !showClickableMenu;
}
@@ -148,6 +148,8 @@ namespace DriverProgram
ImGui.End();
}
+
+ ImGui.End();
}
}