- May 24, 2020
- 160
- 79
Hey there everyone,
I already asked about this problem in another thread, but the headline was a completely different one and I decided instead of bumping it, to start a new thread with the correct headline.
I have a screen with are cards, that you can rightclick.
But if you rightclick right next to the card, you're opening up the game menu.
I want to deactivate that feature, while still allowing the player enter the game menu via the escape button (It's only a minor inconvenience, but an inconvenience nonetheless)
Here's what I tried so far with all the corresponding problems.
The problem in detail:
1) $ config.keymap['game_menu'].remove('mouseup_3')
Would be the perfect solution, however it only works in the init. I can't change it in-game.
2) $_game_menu_screen = None doesn't work, cuz it also disables the esc button to open up the menu - User should be able to save during the cardgame -> Probably not an option for me
3) create a screen with key ("mouseup_3") action NullAction(): Disallows rightclick on the cards -> Probably not an option
4) create a zorder -20 screen with a transparent fullscreen imagebutton and alternate NullAction(), doesn't work either, because the cards aren't considered a screen, so the fullscreen transparent imagebutton will stop all rightclicks and even all leftclicks on the cards (because you are technically clicking on the imagebutton).
5) remove the original rightclick with
$ config.keymap['game_menu'].remove('mouseup_3') in the init
and then create a screen with:
key ("mouseup_3") action ShowMenu('save')
works fine, until I realized, that the ShowMenu('save') isn't the equivalent for game_menu.
Before, using the rightclick also closed all modal screens, which was really handy for the player.
TLDR: Two questions to everyone here:
1) What's the correct action for key ("mouseup_3") action to simulate the original game_menu action, so it also closes the modal screens.
or even better:
2) How would any of you implement, the rightclick disable?
Thank you all in advance and sorry, if I'm bothering you with my walls of text and stupid questions.
I already asked about this problem in another thread, but the headline was a completely different one and I decided instead of bumping it, to start a new thread with the correct headline.
I have a screen with are cards, that you can rightclick.
But if you rightclick right next to the card, you're opening up the game menu.
I want to deactivate that feature, while still allowing the player enter the game menu via the escape button (It's only a minor inconvenience, but an inconvenience nonetheless)
Here's what I tried so far with all the corresponding problems.
The problem in detail:
1) $ config.keymap['game_menu'].remove('mouseup_3')
Would be the perfect solution, however it only works in the init. I can't change it in-game.
2) $_game_menu_screen = None doesn't work, cuz it also disables the esc button to open up the menu - User should be able to save during the cardgame -> Probably not an option for me
3) create a screen with key ("mouseup_3") action NullAction(): Disallows rightclick on the cards -> Probably not an option
4) create a zorder -20 screen with a transparent fullscreen imagebutton and alternate NullAction(), doesn't work either, because the cards aren't considered a screen, so the fullscreen transparent imagebutton will stop all rightclicks and even all leftclicks on the cards (because you are technically clicking on the imagebutton).
5) remove the original rightclick with
$ config.keymap['game_menu'].remove('mouseup_3') in the init
and then create a screen with:
key ("mouseup_3") action ShowMenu('save')
works fine, until I realized, that the ShowMenu('save') isn't the equivalent for game_menu.
Before, using the rightclick also closed all modal screens, which was really handy for the player.
TLDR: Two questions to everyone here:
1) What's the correct action for key ("mouseup_3") action to simulate the original game_menu action, so it also closes the modal screens.
or even better:
2) How would any of you implement, the rightclick disable?
Thank you all in advance and sorry, if I'm bothering you with my walls of text and stupid questions.
Last edited: