Changing what happens when you right click on the mouse

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
Guest

Changing what happens when you right click on the mouse

#1 Post by Guest »

Is there a way to change what happens when a player right clicks the mouse while in the game, instead of having right click bring you to the game menu I's like to have it make the text invisible so that you can view the bg image with out text infront of it...and then when the mouse is right clicked again make the text visible again, this is done on alot in japanese visuals novels.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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:

Re: Changing what happens when you right click on the mouse

#2 Post by PyTom »

You get that behavior with center-click.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Guest

Re: Changing what happens when you right click on the mouse

#3 Post by Guest »

oh kool, and thanks for that fast reply.
i didnt know that was even there, but is there a way to chnage it to right click, I just dont want right click to bring the player to that menu...I have overlay buttons for that, and not all mouses have center click.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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:

Re: Changing what happens when you right click on the mouse

#4 Post by PyTom »

It's really a bad idea to change that, since people by now expect the right click to bring them to the game menu. Most of the Japanese games I've played have this behavior as well.

For people without the center mouse button, the 'h' key has the same behavior.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Guest

Re: Changing what happens when you right click on the mouse

#5 Post by Guest »

well i have an overlay with access to save and load and main menu, so players wouldnt need the right click for that, i want to test it out, i could always change it back, but i don't know how to control settings like that I couldn't find it anywhere...

eezergoode
Regular
Posts: 58
Joined: Tue Aug 29, 2006 10:55 am
Contact:

Re: Changing what happens when you right click on the mouse

#6 Post by eezergoode »

Definition - Threadomancy: Raising a thread from the dead, in a fashion resembling Necromancy

It's really a bad idea to change that, since people by now expect the right click to bring them to the game menu. Most of the Japanese games I've played have this behavior as well.
In most of the Japanese VN type games I've played (at least the ones with a text box at the bottom), the right-click is a dual-function type of thing... When over the text box, right click will clear the box off the screen, but elsewhere, a right-click will either take you to a game menu, or call a pop-up menu. Would there be any way to incorporate that dual-function setup into Ren'Py?
Eezergoode - AKA Rabid Penguin
Team Lead

It does not matter how slowly you go so long as you do not stop.
Confucius
Chinese philosopher & reformer (551 BC - 479 BC)

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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:

Re: Changing what happens when you right click on the mouse

#7 Post by PyTom »

At least in most of the games I've played, it's been center-click that clears the text box, with right click always bringing you to the game menu. That's the standard that I've coded Ren'Py to.

While it would be possible to implement this, I don't really see much need, as I think the current behavior is fine.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

rohin
Newbie
Posts: 7
Joined: Fri Sep 14, 2007 7:07 am
Contact:

Re: Changing what happens when you right click on the mouse

#8 Post by rohin »

Anyway, the following code will change the behavior of the right mouse button from displaying the menu to hiding the dialog text.

Code: Select all

init:
    $ config.keymap['game_menu'].remove('mouseup_3')
    $ config.keymap['hide_windows'].append('mouseup_3')

eezergoode
Regular
Posts: 58
Joined: Tue Aug 29, 2006 10:55 am
Contact:

Re: Changing what happens when you right click on the mouse

#9 Post by eezergoode »

hehe, the center-click may actually clear the text box in most of the games I've played as well, but I don't think I have ever actually used that. I've always just right-clicked while over the text box... But regardless, as long as there is some way to clear the text box away, all is good.

And PyTom.. Since I've been lurking around for more than a year, but have NEVER made a post before the other day, I'd like to say... WOW, you have a fantastic set of tools here with Ren'Py. I've played around with it, cranked out a few little kids games with it, but am just now undertaking my first large project, and it's amazing how much you can do with it.
Eezergoode - AKA Rabid Penguin
Team Lead

It does not matter how slowly you go so long as you do not stop.
Confucius
Chinese philosopher & reformer (551 BC - 479 BC)

EvilDragon
Veteran
Posts: 284
Joined: Fri Dec 28, 2007 5:47 am
Location: Where the Dragons rule!
Contact:

Re: Changing what happens when you right click on the mouse

#10 Post by EvilDragon »

F/SN has an option which switches the right mouse click behaviour between:

1. right click to game menu
2. right click to view the bg image, then right click again to enter game menu

I think that's a nifty solution for players who got used to a certain look and feel of a VN.
Angels of paradise, angels of sacrifice
Please let me be under your wings...

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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:

Re: Changing what happens when you right click on the mouse

#11 Post by PyTom »

The downside is that it requires an additional choice on the preferences screen... which is already pretty full. Ren'Py binds hiding transient things to center-click, where available, and 'h' when it's not.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users