Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add popup quit when sitting at heek table #1446

Merged
merged 8 commits into from
Aug 13, 2023

Conversation

Hazado
Copy link
Contributor

@Hazado Hazado commented Aug 2, 2023

Stops the mouse movement keys when sitting at the heek table to prevent misclicking and leaving the game unintentionally.

Keyboard movement still works and allows you to leave the game still.
Closing the KI will also re-enable mouse movement keys.
Mouse movement key is re-enabled after standing back up.

@DamnBriggsy
Copy link
Contributor

If someone exclusively uses the mouse to navigate, it may not be obvious how to stand up again. What about modifying the chat message on sit-down to include the tip to use the movement keys on the keyboard to stand up? Adding hotspots to the heek table itself to allow for standing might work, but I imagine would be considerably more difficult to implement.

@dpogue
Copy link
Member

dpogue commented Aug 2, 2023

From Scharminius in Discord:

What if mouse movement [keys] were disabled for all forms of sitting? I find it likewise annoying when clicking through chatlines or the playerlist, and missing the button by a hair and thus doing a stand-up routine in front of everyone.

@Deledrius
Copy link
Member

Deledrius commented Aug 2, 2023

Maybe this makes sense as a universal preference "Enable Click-to-Stand mouse controls when sitting."?

@DamnBriggsy
Copy link
Contributor

DamnBriggsy commented Aug 2, 2023

Maybe this makes sense as a universal preference "Disable Click-to-Stand mouse controls when sitting."?

This would be ideal, in my opinion.
Edit: to be clear, because adding it as an option is significantly larger in scope, I wouldn't be opposed to a smaller implementation just for Heek.

@Hazado
Copy link
Contributor Author

Hazado commented Aug 2, 2023

This would be ideal, in my opinion.
Edit: to be clear, because adding it as an option is significantly larger in scope, I wouldn't be opposed to a smaller implementation just for Heek.

Yes, I agree its a large scope creep for this request.
I'm not opposed to adding another checkbox in an option GUI somewhere for another pull request.
I will be honest that i am not sure how to implement the disable mouse movement keys, but Im pretty sure it will need to be done in the client and not in the python scripts. Maybe the sitting modifier message?

@Hoikas
Copy link
Member

Hoikas commented Aug 2, 2023

@DamnBriggsy raises a good point. I've always thought it would be better, honestly, for any attempt to leave the heek game, whether via movement keys or mouse clicks, pop up a yes/no confirmation dialog asking something to the effect of "Are you sure you want to leave and forfeit this game?" This will better defeat accidental leaves, which would still be possible with the options menu checkbox and will prevent accidental keypress quits as well.

@Hazado
Copy link
Contributor Author

Hazado commented Aug 2, 2023

@DamnBriggsy raises a good point. I've always thought it would be better, honestly, for any attempt to leave the heek game, whether via movement keys or mouse clicks, pop up a yes/no confirmation dialog asking something to the effect of "Are you sure you want to leave and forfeit this game?" This will better defeat accidental leaves, which would still be possible with the options menu checkbox and will prevent accidental keypress quits as well.

I also wanted this, but I dont see any movement keys being sent to the script
Right now the heek script only gets messages for the sit/stand animation completion

@Hoikas
Copy link
Member

Hoikas commented Aug 2, 2023

We can start off with the incremental improvement for mouse clicking, the, and figure out keypresses in time.

@Deledrius
Copy link
Member

@DamnBriggsy raises a good point. I've always thought it would be better, honestly, for any attempt to leave the heek game, whether via movement keys or mouse clicks, pop up a yes/no confirmation dialog asking something to the effect of "Are you sure you want to leave and forfeit this game?" This will better defeat accidental leaves, which would still be possible with the options menu checkbox and will prevent accidental keypress quits as well.

I was thinking about this, and the main issue here is that it would break one of the deliberate core UX elements of Uru when it comes to keeping nearly everything IC. Of course, there's always a balance of pushing that too far one way or the other. What would the "Uru way" be in this case? All options seem strange and tedious, and hardly more realistic. It might be an instance where a simple confirmation dialog, despite breaking "the rules", would be relatively invisible compared to the more IC alternatives.

@DamnBriggsy
Copy link
Contributor

I was thinking about this, and the main issue here is that it would break one of the deliberate core UX elements of Uru when it comes to keeping nearly everything IC. Of course, there's always a balance of pushing that too far one way or the other. What would the "Uru way" be in this case? All options seem strange and tedious, and hardly more realistic. It might be an instance where a simple confirmation dialog, despite breaking "the rules", would be relatively invisible compared to the more IC alternatives.

One spot I can think of where this confirmation dialog happens is for deleting a book from the Relto bookshelf. While I agree that the gamey-ness should be reduced as often as possible, there's some precedent for this already. I think accidental quits in Heek are pretty common, so this would be a good place to break from realism and enter video game territory.

@Deledrius
Copy link
Member

Deledrius commented Aug 2, 2023

That's the one that came to mind as well. It's exceptionally rare, but worthwhile when preventing loss, IMO.

For most other situations, however, I think a passive preference makes more sense. A confirmation dialog to stand from sitting on a park bench is definitely overkill.

@dgelessus
Copy link
Contributor

dgelessus commented Aug 2, 2023

I just tested a bit. It seems that sitting at a Heek table (or the Teledahn control panel, etc.) handles mouse input a bit differently than "just sitting", e. g. with /sit or on a bench. When you are "just sitting", then any left click will make you stand up immediately. But when sitting at a heek table, a left click alone won't do anything - you also have to drag the mouse a little bit. I wonder if there's an easy way to make that less sensitive, so that you won't get up by accident because you clicked a bit too long, but you can still stand up if you clearly drag the mouse a big enough distance.

That said, perhaps it would be a good idea to make all sitting work like heek tables, etc. and ignore simple mouse clicks. Even though you don't lose anything there, it is annoying to stand up by accident just because you misclicked.

@DamnBriggsy
Copy link
Contributor

Are you sure it's just click and drag? What about click and hold? Everywhere else in the game a click is going to move the avatar forward unless you're on a hotspot. It does make sense to stand up when you click because you are moving forward, though this can be annoying when using the UI and in other situations. I'd hesitate before changing how mouse movement works globally, as it could change the "feel" of the game for those who are used to mouse controls.

@Hazado
Copy link
Contributor Author

Hazado commented Aug 2, 2023

Im going to set this to draft for the moment.
I want to do the popup when you try to stand during an active game.
It currently requires converting all the seats to multibeh instead of the standard sitting modifier.

@Hazado Hazado force-pushed the StopLeavingHeekWhenclicking branch from 90b263a to 551afa0 Compare August 5, 2023 03:45
@Hazado
Copy link
Contributor Author

Hazado commented Aug 5, 2023

Okay, so multibeh plan was causing me headaches.

You get a popup now when you attempt to leave, asking if you want to leave the game.
placeholder text there for the moment.
You can use the mouse to leave as well as the keyboard keys.
Test it a let me know if this is close to what everyone is looking for.

Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
@Hazado Hazado marked this pull request as ready for review August 5, 2023 20:04
@Hazado
Copy link
Contributor Author

Hazado commented Aug 5, 2023

Quit message with localized strings now.
H-uru/moul-assets#240

@Hazado Hazado changed the title Disable mouse movement keys when sitting at heek table Add popup quit when sitting at heek table Aug 5, 2023
Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
@Hazado
Copy link
Contributor Author

Hazado commented Aug 7, 2023

@Hoikas Hoping these changes do what you requested

Set it up so the quit message popup only happens once your playing an active game using the self._round_played variable at line 388
Easy enough to remove that and have the popup quit message happen anytime you sit down instead.

Copy link
Member

@Hoikas Hoikas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really good. I think the last thing that I would like to see is a set of comments explaining what exactly is going on. Even though you explained to me how this works, the disabling/enabling of certain controls is a bit mind-bending.

Scripts/Python/nb01RPSGame.py Show resolved Hide resolved
Scripts/Python/nb01RPSGame.py Show resolved Hide resolved
Scripts/Python/nb01RPSGame.py Show resolved Hide resolved
Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
@Hazado
Copy link
Contributor Author

Hazado commented Aug 9, 2023

Added comments and suggested change.
Let me know if this needs further explanation

Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
@Hazado Hazado requested a review from Hoikas August 11, 2023 16:52
Copy link
Member

@Hoikas Hoikas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick. This should be all that's left.

Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Scripts/Python/nb01RPSGame.py Outdated Show resolved Hide resolved
Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
@Hazado Hazado requested a review from Hoikas August 13, 2023 00:42
@Hoikas Hoikas merged commit 3df3f2c into H-uru:master Aug 13, 2023
15 checks passed
@Hazado Hazado deleted the StopLeavingHeekWhenclicking branch August 16, 2023 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants