Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. void menu::DragMenu(int &menuPosX, int &menuPosY, int x, int y, int w, int h, int MenuWindowIndex, int &DragOffsetX, int &DragOffsetY)
  2. {
  3. if (!CheckForActiveWindowDrag())
  4. {
  5. if (g_Mouse.IsOver(x, y, w, h))
  6. {
  7. if (GetKeyPress(VK_LBUTTON))
  8. {
  9. //if (!CheckForActiveComboBoxes()
  10. // && !CheckForActiveKeyBind()
  11. // && !CheckForActiveSliders()
  12. // && !CheckForActiveCheckBoxes())
  13. //{
  14. // DraggingMenu[MenuWindowIndex] = true;
  15. //}
  16. //else
  17. DraggingMenu[MenuWindowIndex] = true;
  18. }
  19. }
  20. }
  21.  
  22. if (DraggingMenu[MenuWindowIndex])
  23. {
  24. menuPosX = g_Mouse.pHackMouse.x - DragOffsetX;
  25. menuPosY = g_Mouse.pHackMouse.y - DragOffsetY;
  26. }
  27.  
  28. if (g_Mouse.mouse1released)
  29. {
  30. DraggingMenu[MenuWindowIndex] = false;
  31. }
  32.  
  33. DragOffsetX = g_Mouse.pHackMouse.x - menuPosX;
  34. DragOffsetY = g_Mouse.pHackMouse.y - menuPosY;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement