Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Seph authored and Seph committed Sep 11, 2015
1 parent 53610ac commit c4b20ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Menu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public static class MenuGlobals

internal static class MenuSettings
{
internal static bool ShowingMenu;
public static Vector2 BasePosition = new Vector2(10, 10);
private static bool _drawTheMenu;

Expand Down Expand Up @@ -238,11 +239,13 @@ private static void Game_OnWndProc(WndEventArgs args)
if ((args.Msg == (uint) WindowsMessages.WM_KEYUP || args.Msg == (uint) WindowsMessages.WM_KEYDOWN) &&
args.WParam == Config.ShowMenuPressKey)
{
ShowingMenu = true;
DrawMenu = args.Msg == (uint) WindowsMessages.WM_KEYDOWN;
}

if (args.Msg == (uint) WindowsMessages.WM_KEYUP && args.WParam == Config.ShowMenuToggleKey)
{
ShowingMenu = false;
DrawMenu = !DrawMenu;
}
}
Expand Down
5 changes: 5 additions & 0 deletions PermaShow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ private static void DrawingOnPreReset(EventArgs args)

private static void OnWndProc(WndEventArgs args)
{
if (MenuSettings.ShowingMenu)
{
return;
}

if (Dragging)
{
BoxPosition = Utils.GetCursorPos();
Expand Down

0 comments on commit c4b20ed

Please sign in to comment.