Right click mouse button?

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
User avatar
vollschauer
Veteran
Posts: 231
Joined: Sun Oct 11, 2015 9:38 am
Github: vollschauer
Contact:

Right click mouse button?

#1 Post by vollschauer »

If I start a game and go for example to the settings menu I can right click there and I'm back In the game, which is nice!
But if I do not start the game and go straight from the main menu to the settings menu, right-clicking there to go back (to the main menu) isn't possible.

So I tried this and it is actually working:

Code: Select all

screen preferences():

    tag menu
    key "mousedown_3" action Return()
Anyway I read the doc's here (http://www.renpy.org/doc/html/keymap.html) and noticed that Renpy expect a 5 button mouse ...

So how about if you just have a 2 button mouse? Does it work or should it be then "mousedown_2" ?
And how about "those MAC guys" ;) I guess they also just have 2 buttons?
How can I make sure that I listen for a right-click, no matter if you have 2, 5, 7 or whatever buttons on your mouse ?

Or should I just stop worrying!?

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Right click mouse button?

#2 Post by xela »

vollschauer wrote:Or should I just stop worrying!?
This! ;)
Like what we're doing? Support us at:
Image

User avatar
vollschauer
Veteran
Posts: 231
Joined: Sun Oct 11, 2015 9:38 am
Github: vollschauer
Contact:

Re: Right click mouse button?

#3 Post by vollschauer »

My idea of the mouse key binding to get back to the main menu .... while in "main_menu" mode
doesn't work if I hover with the mous over hotspots or save/load slots or whatever.

Is there a way to get this working? I mean when I start a game right click works just fine everywhere to get back!?

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Right click mouse button?

#4 Post by xela »

You should bind whatever screen action leads to main menu when you click default buttons to the key, there is no reason for it not to work.
Like what we're doing? Support us at:
Image

synedraacus
Regular
Posts: 58
Joined: Tue Jun 09, 2015 8:10 am
Github: synedraacus
Contact:

Re: Right click mouse button?

#5 Post by synedraacus »

'mousebutton_3' is always a right button, don't worry about that. For mac people just make sure whatever key is usually expected to do your thing (Esc, I guess?) to actually do it.

User avatar
HB38
Regular
Posts: 57
Joined: Sun Apr 27, 2014 2:14 pm
Contact:

Re: Right click mouse button?

#6 Post by HB38 »

vollschauer wrote:And how about "those MAC guys" ;) I guess they also just have 2 buttons?
Most Macs come with multi button setups (on the desktop, just two on the laptops not including gestures). I have 7 buttons myself (Logitech with OS X), but I don't think anyone expects anything more than left/right/middle wheel to every do anything in a game unless they set it up themselves…

User avatar
vollschauer
Veteran
Posts: 231
Joined: Sun Oct 11, 2015 9:38 am
Github: vollschauer
Contact:

Re: Right click mouse button?

#7 Post by vollschauer »

Thanks everybody. But the main reason was:

I want to use the right button to get back from the settings menu to main menu. This does not work until I started the game ....once the game is running and you go to the settings menu ...you be able to get back by right click.

- Launch your project
- go staight to preferences
- right click --> nothing happen

- start your game
- go to preferences via the quick menu
- right click -> here we go ..back to game :D

User avatar
vollschauer
Veteran
Posts: 231
Joined: Sun Oct 11, 2015 9:38 am
Github: vollschauer
Contact:

Re: Right click mouse button?

#8 Post by vollschauer »

Anyway found out myself ...first I did it with "mousedown_3" which isn't so nice, but this works:

Code: Select all

    if main_menu:
        key "mouseup_3" action Return()

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ocelot