dumbeau / AutoHotPie

Radial menus in Windows, aka PIE MENYOOS!
MIT License
340 stars 18 forks source link

Feature/Help request: Mouse decouple #52

Closed thatsaxi closed 2 years ago

thatsaxi commented 2 years ago

Hello! I really like the function execution ability of the radial menu, I have looked through the AHK files and cannot find how to decouple the mouse from the menu entirely. A setting that I would like to request is: "menu does not react to and does not influence mouse movement". Counter-intuitive for a radial menu but hyper efficient in certain applications. Particularly those who like to operate or must operate without a mouse. This would be a game-changing feature.

The effect would be this: 1) hotkey is pressed while "menu on center of screen" and "mouse decouple" are enabled 2) menu appears in the center of the screen and pie slices do not respond to and do not influence mouse input 3) function key executes pie slice and menu exits -OR- esc is pressed and menu exits

If this is something commented out in the AHK files somewhere or if I can be pointed to where I could test this, then I would be happy to.

Edit: I have the menu opening in a static position regardless of mouse movement, this is close, I just need to figure out how to make that position at the center.

dumbeau commented 2 years ago

Got it, you want to use a pie menu by using the slice hotkeys only and a "Mouse decouple" checkbox. I'll be able to get this in the next version, but that won't be ready until Tuesday. If you want to test this out, take a look at line 1177 and make this change (duplicate and comment out original lines):

    ; returnObj["midDistance"] := midDist
    returnObj["midDistance"] := 0
    ; returnObj["distance"] := dist
    returnObj["distance"] := 0

This will make the menu think the mouse is always in the center of the menu. Then to prevent AHP from moving your mouse to the center, comment out line 1879:

; MouseMove, p2_dimensions[1]+((p2_dimensions[2]-p2_dimensions[1])/2), p2_dimensions[3]+((p2_dimensions[4]-p2_dimensions[3])/2), 0

Also for AHP to use the AHK files instead of the EXE you just have to check this option: image

Let me know what launch mode you're using this through, this is a way I haven't seen anybody use this.

thatsaxi commented 2 years ago

Thanks a lot! I will absolutely try it. Indeed, I have been using that feature. Much appreciated! I will tinker with that alteration.

Follow-up: It worked LIKE A CHARM!!!! This literally makes all the other alternatives obsolete, making portable copies is so ideal for singular use-cases and hotkeys are so easy to transfer. The offset circular nature of the radial menu and spreading out of pies makes it so visually eye-catching for a center menu even without mouse input.

This will be SO massively important. If I make something pretty with this, I'll post it. Thanks again for taking time out to help me. This also solves the issue that the guy had in the game-issue thread I think.

dumbeau commented 2 years ago

Hell yea! This should be easy to implement, should be able to get to this over the weekend but I'm happy it worked!

UPDATE: Still planning on adding this, work has just delayed my progress here.

dumbeau commented 2 years ago

This has been added in v1.0.20

thatsaxi commented 2 years ago

This has been added in v1.0.20

Fantastic. You literally made a menu for almost any game, congratulations and thank you for adding this.