How do you remove Keybindings?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Trachmyr
Newbie
Posts: 19
Joined: Fri Dec 24, 2004 2:16 am
Location: Miami, FL
Contact:

How do you remove Keybindings?

#1 Post by Trachmyr »

I plan on removing the right-mouse button keybinding of calling up the game menu, but the tutorial only mentions how to append. What is the correct command to remove a Keybinding?

Additionally, there is a function "hide_windows" listed in the tutorial, what exactly does it do (or does it not work?), as I can't see any effect when it's used.

Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

#2 Post by Tage »

1. I can't help you there, I don't know Python or underlying Ren'Py script.
2. If you're talking about the "hide_windows" that is inside the keymap listing, it hides the dialog window in the game when you use the middle mouse button or assigned key.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#3 Post by PyTom »

Well, first, let me point out that there's a significant benefit in having a standard set of key/mouse bindings for all Ren'Py games. Specifically, it makes it easier for a user to learn a new game, since he/she doesn't have to re-learn the interface. So I'd ask that you reconsider removing keybindings, or at least explain why you plan to do it.

Anyway, the way to do it is:

Code: Select all

init:
     $ config.keymap['game_menu'].remove('mouse_3')

Trachmyr
Newbie
Posts: 19
Joined: Fri Dec 24, 2004 2:16 am
Location: Miami, FL
Contact:

#4 Post by Trachmyr »

The reason I'm removing that particular keybinding is so that section of the game run more similar to games already on the market.

Much of the narrative will be done outside of a window... Kana/D.O. style, in which case "Right-Click" is used to Hide the window/text.

The game will feature a small widget that has time/status/etc. calling upon this widget will bring up a Status Menu, the Game Menu can be accessed through here (or using Esc).

I hope that eases things a bit... and thank you for your reply and more making RenPy... it's a truely amazing piece of software.

Trachmyr
Newbie
Posts: 19
Joined: Fri Dec 24, 2004 2:16 am
Location: Miami, FL
Contact:

#5 Post by Trachmyr »

I have another question...

Is there a way to allow rollback but disallow the user from selecting different menu choices than they previously made?

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#6 Post by PyTom »

Trachmyr wrote:I have another question...

Is there a way to allow rollback but disallow the user from selecting different menu choices than they previously made?
Right now, there's no such way. To implement it would require that the system keep some sort of memory of what happened on the first pass through, while rollback as it exists now resets everything to as it was before.

I've had a few requests for it in the past, but my big argument against it is that there have been times when I've accidentally clicked the wrong menu choice, and it would have been nice to be able to go back and pick a different one.

There are also a bunch of edge cases that would need to be gotten right. Not too hard, but somewhat annoying.

Trachmyr
Newbie
Posts: 19
Joined: Fri Dec 24, 2004 2:16 am
Location: Miami, FL
Contact:

#7 Post by Trachmyr »

Not a problem, thanks for the response.

Post Reply

Who is online

Users browsing this forum: akakyouryuu, Bing [Bot], GetOutOfMyLab, Google [Bot]