I'm on Windows 10, and I'm not sure if this is an issue elsewhere but sometimes mafia has a popup box appear for one reason or another.
This is normally fine, but sometimes I'm typing in CLI or mafia's chat or sometimes I'm not even using mafia as my active window and I'm typing in another program.
Sometimes I might be playing a game.
This is a bit unreliable but sometimes the popup steals focus, sometimes it doesn't.
But when it does steal focus, chances are fairly high that I was typing something.. And when that happens, I normally press the spacebar before I even realize that the popup has stolen focus.
And now, I've suddenly picked a choice in the popup without knowing what the popup said, or what choice I just picked.
I'm aware that this isn't something mafia itself decided to do and that it's due to the swing implementation in Java itself.
I'm not even sure if it has an easy solution. But it's still an issue at times. Especially when your looping script was asking "You are about to overdrink but have more than 400 adventures remaining. This seems extreme, do you want to do it anyways?"
I'd say this can be separated into two problems.
This is normally fine, but sometimes I'm typing in CLI or mafia's chat or sometimes I'm not even using mafia as my active window and I'm typing in another program.
Sometimes I might be playing a game.
This is a bit unreliable but sometimes the popup steals focus, sometimes it doesn't.
But when it does steal focus, chances are fairly high that I was typing something.. And when that happens, I normally press the spacebar before I even realize that the popup has stolen focus.
And now, I've suddenly picked a choice in the popup without knowing what the popup said, or what choice I just picked.
I'm aware that this isn't something mafia itself decided to do and that it's due to the swing implementation in Java itself.
I'm not even sure if it has an easy solution. But it's still an issue at times. Especially when your looping script was asking "You are about to overdrink but have more than 400 adventures remaining. This seems extreme, do you want to do it anyways?"
I'd say this can be separated into two problems.
- The first is that it steals focus, we should never be stealing focus. Even if we have mafia active, if the window that wants to create a popup is not the active window, it shouldn't steal focus.
- The second is that it should only be accepting "Enter" as a selector. Not spacebar. Or some other measure to ensure we don't accidentally press a button before we are aware of what just happened. Even if you have the main window open, you don't want to be typing in CLI and accidentally pick a surprise option.