dumbeau / AutoHotPie

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

Feature request: radial wheel open in centre of screen for games #28

Open ACCESSDENIIED opened 2 years ago

ACCESSDENIIED commented 2 years ago

Hey so I'm trying to use this program to use in games. I grew up on consoles and around 2 years ago switched to pc so while I am relatively used to the keyboard by now certain keys are hard to use mid game without looking directly at the keyboard. This is why I absolutely love this program!

It's very similar to gw2radial for guild wars 2 which I viewed as an essential addon!

The issue I'm facing though is that the radial menu is popping up wherever the current mouse location is at the time. So turning left or right in game and then trying to use the radial results in half of the menu being cut off from use.

Gw2radial has an 'always open in centre of screen' feature which completely fixes this issue but it is a .dll file that injects into the application itself and therefore is not universal which is why this application is one I hope to use for all games.

Tldr; Is there a way to have the radial menu always open in the centre of the screen with the mouse at the centre of the radial alongside it?

Thanks!

dumbeau commented 2 years ago

Very cool! Happy to see people figuring out how nifty pie menus are.

Fortunately, this sounds easy to implement code-wise, so I should be able to make this a built-in option. Thanks for the specificity. I'd see this as maybe problematic for games where mouse movement always controls look direction, just because that mouse movement to the center might get read by the game. I may also add an sub-option where the pie menu just uses the change-in-direction and displays the visual in the center, but we can see how your idea works first.

I'm thinking I'll add a 'Open menu in center of screen' checkbox in the 'Launch Settings' tab that can work with all the Launch Modes. image

ACCESSDENIIED commented 2 years ago

Yeah I have always found games that have these menus SUPER relieving as i prefer to spend my time being immersed rather than breaking that immersion by looking down for a key placement. Especially in pvp games where even so much as a blink at the wrong time can get you sniped to the face lol

Thanks for the speedy response too! I really appreciate you taking the feedback on board and actually preparing to implement it at some point.

I'm not entirely sure how you would go about implementing the action as I only have a very basic understanding of code and scripts, but if there is an issue with the game reading the mouse input to the centre of the screen and therefore reacting to it by turning in-game, I wonder if you would be able to tell the script to grab the current mouse location and instantly 'relocate' it, so to speak. Kind of difficult to explain, sort of reset the mouse to the centre of the screen rather than taking the current location and then dragging it instantly?

I hope that makes sense, I have definitely never won any awards for the best verbal communicator lol

But In any case, I thank you again for this incredible tool! It truly breathes new life and opportunity Into a lot of scenarios that I can personally think of, let alone productivity power users.

Hope you have a great day, Cheers!

Edit: Grammar

dumbeau commented 2 years ago

This checkbox is now in v1.0.17-alpha. Give it a try and lmk how it works.

I'm not entirely sure how you would go about implementing the action as I only have a very basic understanding of code and scripts, but if there is an issue with the game reading the mouse input to the centre of the screen and therefore reacting to it by turning in-game, I wonder if you would be able to tell the script to grab the current mouse location and instantly 'relocate' it, so to speak. Kind of difficult to explain, sort of reset the mouse to the centre of the screen rather than taking the current location and then dragging it instantly?

This is exactly how it is working right now. The mouse is instantly relocated to the center of the screen and the menu opens. What I'm thinking though, is that any relocation at all might not be a good idea, however I can always just put the pie menu visual in the middle and just use the relative position of the mouse, might be problematic still at the edges so I'm hoping this way will work.

Especially in pvp games where even so much as a blink at the wrong time can get you sniped to the face lol

this reminded me of how trash I am at PUBG, I feel this.

dumbeau commented 2 years ago

This checkbox is now in v1.0.17-alpha.

@ACCESSDENIIED Checking in again, has this solution worked for you?

ACCESSDENIIED commented 2 years ago

Hi! Sorry for not getting back sooner, only just seen the email.

So it seems to work in certain scenarios, factors that i could find included: Game anti-cheat (Allowed overlays or not) - Destiny 2 is a prime example, although bungie is so tight with overlays that that literally anything other than geforce experience overlay will not work haha. For the most part though i could get it working in most games i've tried, but the mouse does snap the look direction to the same place every time, unless the camera is already in motion, in which case the functionality is near perfect!

Fullcreen vs borderless/windowed also seems to be a factor in certain games, which, again, should be expected. Even gw2radial suggests to go windowed fullscreen to ensure full functionality and to avoid fullscreen.

Other games, though, have a weird interaction with the menu, it seems to pop up for a split second and then disappear If i had to put a number i would say maybe 20 milliseconds the menu is visible before disappearing.

I also tried this in cyberpunk and while the menu displayed perfectly with no tweaks to screen type (fullscreen, windowed etc), the selection of items in the menu did not trigger in-game events like i thought it would, the game allowed the overlay, but did not register the input.

To reiterate, in games where the menu would display correctly and work, the mouse had to be in motion before activating the menu to maintain it's original look direction and work as you would expect. If the menu was triggered without any mouse/camera movement in motion, the camera/look direction would 'snap' to a specific area every time. (In case this helps any further in the troubleshooting stage) It's worth noting that no matter which direction i turn the camera to before activating the menu, the activation of the menu would always snap the camera to the exact same point in-game. For example, if my character is pointing north and the crosshair is in the centre of the screen facing north, if i turn west, east or south, either looking straight, up or down with any variation in-between, the camera will always snap back to north at the centre of the screen (this logic applies to any point the crosshair 'snaps' to but i used north at the centre as a simpler reference point).

In case you have the game the above 'snapping' issue can be found in 'Borderlands 3' if at any point that was hard to follow, again, i am not the best verbal communicator haha!

I'm really grateful for the work you've put into this and cannot thank you enough!

Hope this helps :)

dumbeau commented 2 years ago

Thanks for the descriptive feedback! So in order to make this work I should add an option where the pie menu can be used wherever the mouse already is, but put the visual in the center without moving the mouse there. This may mean I'd have to add a pseudo-cursor when this center menu is used. There could still be problems with this if the menu is opened too close to the edge of the screen, but I'm thinking it would still be usable.