Changing game_menu (Right Click Action) [Solved]

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
Georgel
Newbie
Posts: 23
Joined: Tue Mar 22, 2016 8:03 am
Organization: Seventh Heart Sudios
Location: Romania, Bucharest
Contact:

Changing game_menu (Right Click Action) [Solved]

#1 Post by Georgel »

Hello!

How do we change how game_menu screen looks like?

I am talking about where the game goes when you click right click or ESC key?

I have been playing around with this for a while and cannot bing right click to take me to a game_menu_r screen, as it goes error, and anything that I try to do to game_menu (inside screens.rpy) has no effect. They still take me to save when I right click.

I know that I created or changed something right in game_menu, because if I assign it to another button it works, and I can see the screen I created. I am a bit puzzled. If anyone can, it would be great to have a bit of help!

EDIT::: If this sounds a bit more relevant, how do we change game_menu_screen. I mean, how exactly do I start changing it? Everything I write turns out to save game.

Code: Select all

screen game_menu_screen():

    add im.Scale(Image("images/assets/RightClick/rc_1.png"), 1366, 768)
    add "images/assets/RightClick/rc_bg.png" xpos (1366/2) - (976/2) ypos ((768/2) - (453/2) - 120)
for example, this will still return to save menu screen
Last edited by Georgel on Tue Mar 29, 2016 4:50 am, edited 1 time in total.

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

Re: Changing game_menu (Right Click Action)

#2 Post by xela »

Go over the screens.rpy file and you'll figure it out.
Like what we're doing? Support us at:
Image

Georgel
Newbie
Posts: 23
Joined: Tue Mar 22, 2016 8:03 am
Organization: Seventh Heart Sudios
Location: Romania, Bucharest
Contact:

Re: Changing game_menu (Right Click Action)

#3 Post by Georgel »

You mean there is another place in this forum?

I am in screens.rpy

I just do not know where to look, or what to reassign.

I was able to make mouseup_3 do nothing

Code: Select all

init:
    $ config.keymap['game_menu'].remove('mouseup_3')
But I am unable to re-assign it, it turns error.

Code: Select all

$ config.keymap['game_menu_r'].append('mouseup_3')

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

Re: Changing game_menu (Right Click Action)

#4 Post by xela »

Ah, I've misread your post, you prolly want to show a screen overriding the "game_menu" binding, look for key statement in screens documentation. Show a dummy screen with a shiny new binding after label start and it should overrule the default key binding as the are.
Like what we're doing? Support us at:
Image

Georgel
Newbie
Posts: 23
Joined: Tue Mar 22, 2016 8:03 am
Organization: Seventh Heart Sudios
Location: Romania, Bucharest
Contact:

Re: Changing game_menu (Right Click Action)

#5 Post by Georgel »

I don't quite understand what you mean.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Changing game_menu (Right Click Action)

#6 Post by Donmai »

There's a Ren'Py internal variable named _game_menu_screen. By default it shows the save screen (I believe). If you want it to show, say, the preferences screen, just put this line at the very start of your script.rpy:

Code: Select all

default _game_menu_screen = "preferences"
Of course you can create a new menu screen and show it by right-clicking using the same method. If you run RAPT it will complain that you are overwriting an internal variable, but you know that you're doing it, and why :) .
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Georgel
Newbie
Posts: 23
Joined: Tue Mar 22, 2016 8:03 am
Organization: Seventh Heart Sudios
Location: Romania, Bucharest
Contact:

Re: Changing game_menu (Right Click Action)

#7 Post by Georgel »

Donmai wrote:There's a Ren'Py internal variable named _game_menu_screen. By default it shows the save screen (I believe). If you want it to show, say, the preferences screen, just put this line at the very start of your script.rpy:

Code: Select all

default _game_menu_screen = "preferences"
Of course you can create a new menu screen and show it by right-clicking using the same method. If you run RAPT it will complain that you are overwriting an internal variable, but you know that you're doing it, and why :) .
Thanks a lot!

I was able to do what I wanted by overriding the default value. I did not know I needed an underscore before game_menu_screen to replace the default.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot], Milkymalk