quick menu customization [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
User avatar
chocoberrie
Veteran
Posts: 254
Joined: Wed Jun 19, 2013 10:34 pm
Projects: Marshmallow Days
Contact:

quick menu customization [solved]

#1 Post by chocoberrie » Mon May 26, 2014 1:02 pm

Hello! ^_^

I have a question about the quick menu, which appears in the dialogue box by default. Is it possible to make my own quick menu using an imagemap or make the menu a part of the dialogue box but still have the individual menu items clickable, as in this example?

Any help on this would be much appreciated! Thank you! ^_^
Last edited by chocoberrie on Mon May 26, 2014 10:02 pm, edited 1 time in total.

Crazy Li
Regular
Posts: 113
Joined: Fri Jan 03, 2014 3:35 pm
Contact:

Re: quick menu customization

#2 Post by Crazy Li » Mon May 26, 2014 2:40 pm

You certainly can!

In screens.rpy, you can customize the Quick Menu including repositioning options if you just wanted to move its location (I moved it from the bottom of the dialog box to the top for instance) or replace it entirely with an image map version. It just uses simple screen language so if you know how to do image maps, apply the same philosophy here. If you don't, I can dig up a tutorial for ya.

User avatar
chocoberrie
Veteran
Posts: 254
Joined: Wed Jun 19, 2013 10:34 pm
Projects: Marshmallow Days
Contact:

Re: quick menu customization

#3 Post by chocoberrie » Mon May 26, 2014 2:53 pm

Crazy Li wrote:You certainly can!

In screens.rpy, you can customize the Quick Menu including repositioning options if you just wanted to move its location (I moved it from the bottom of the dialog box to the top for instance) or replace it entirely with an image map version. It just uses simple screen language so if you know how to do image maps, apply the same philosophy here. If you don't, I can dig up a tutorial for ya.
Okay, great! :D

If I want to make the menu appear inside the dialogue box (like this), how would I go about doing that? Make an imagemap of the menu so that the ground and idle images have the dialogue box as their background?

User avatar
Marionette
Regular
Posts: 128
Joined: Thu Apr 21, 2011 12:04 pm
Completed: https://marionette.itch.io/
Projects: Get Meowt of Here
Deviantart: rexx9224
itch: marionette
Location: Ireland
Discord: Marionette#2995
Contact:

Re: quick menu customization

#4 Post by Marionette » Mon May 26, 2014 3:00 pm

You should be able to use this code to do the image maps for your buttons, and if you want it in different positions you should be able to add in xpos and ypos arguments to move the images around.

Code: Select all

screen gui_game_menu:
     vbox xalign 1.0 yalign 1.0:
          imagebutton auto "save_%s.png" action ShowMenu('save')
          imagebutton auto "prefs_%s.png" action ShowMenu('preferences')
          imagebutton auto "skip_%s.png" action Skip()
          imagebutton auto "afm_%s.png" action Preference("auto-forward mode", "toggle")
Note: the %s assumes you have differently named images that correspond to the different states so it can pick them up automatically
eg.
save_%s.png:

save_insensitive.png
save_idle.png
save_hover.png
save_selected_idle.png
save_selected_hover.png

User avatar
chocoberrie
Veteran
Posts: 254
Joined: Wed Jun 19, 2013 10:34 pm
Projects: Marshmallow Days
Contact:

Re: quick menu customization

#5 Post by chocoberrie » Mon May 26, 2014 3:59 pm

Marionette wrote:You should be able to use this code to do the image maps for your buttons, and if you want it in different positions you should be able to add in xpos and ypos arguments to move the images around.

Code: Select all

screen gui_game_menu:
     vbox xalign 1.0 yalign 1.0:
          imagebutton auto "save_%s.png" action ShowMenu('save')
          imagebutton auto "prefs_%s.png" action ShowMenu('preferences')
          imagebutton auto "skip_%s.png" action Skip()
          imagebutton auto "afm_%s.png" action Preference("auto-forward mode", "toggle")
I ended up using an imagemap, because I have no idea how imagebuttons work ^^;;

With regards to your code, I got an error about action Preference("auto-forward mode", "toggle"). Ren'Py says it's "unknown." If that's the case, how can I make the "Auto" hotspot I have toggle the auto-text mode?

Thank you so much for your help! :)

User avatar
chocoberrie
Veteran
Posts: 254
Joined: Wed Jun 19, 2013 10:34 pm
Projects: Marshmallow Days
Contact:

Re: quick menu customization

#6 Post by chocoberrie » Mon May 26, 2014 4:13 pm

Nevermind, I got it to work! :D

I used this code:

Code: Select all

 action Preference("auto-forward", "toggle")
instead of

Code: Select all

action Preference("auto-forward mode", "toggle")

User avatar
Marionette
Regular
Posts: 128
Joined: Thu Apr 21, 2011 12:04 pm
Completed: https://marionette.itch.io/
Projects: Get Meowt of Here
Deviantart: rexx9224
itch: marionette
Location: Ireland
Discord: Marionette#2995
Contact:

Re: quick menu customization

#7 Post by Marionette » Mon May 26, 2014 5:34 pm

chocoberrie wrote:Nevermind, I got it to work! :D

I used this code:

Code: Select all

 action Preference("auto-forward", "toggle")
instead of

Code: Select all

action Preference("auto-forward mode", "toggle")
Yeah lol, sorry about that.
Was looking at old code. :oops:

User avatar
chocoberrie
Veteran
Posts: 254
Joined: Wed Jun 19, 2013 10:34 pm
Projects: Marshmallow Days
Contact:

Re: quick menu customization

#8 Post by chocoberrie » Mon May 26, 2014 5:52 pm

Marionette wrote:Yeah lol, sorry about that.
Was looking at old code. :oops:
No worries! I found the newer code on the Ren'Py wiki. :)

henvu50
Veteran
Posts: 322
Joined: Wed Aug 22, 2018 1:22 am
Contact:

Re: quick menu customization [solved]

#9 Post by henvu50 » Thu Aug 23, 2018 3:34 am

How do you actually change the position of the quick menu? Like move it's position on the X and Y?

Post Reply

Who is online

Users browsing this forum: Google [Bot], span4ev