(Solved) Applying styles to individual menu and choices

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
morrie
Regular
Posts: 33
Joined: Mon Aug 01, 2016 11:18 am
Tumblr: morrie-games
Contact:

(Solved) Applying styles to individual menu and choices

#1 Post by morrie »

I've been searching but I can't figure out how to apply custom styles to individual in-game choice menus and/or to the individual choices....

Code: Select all

    menu:
        "Choice A":
            jump ChoiceA
        "Choice B":
            jump ChoiceB
Where in the code above should I put the "style" part? I tried these different things based on what I found but it doesn't work.....

Code: Select all

menu style "MyStyle":
(etc)

menu style="MyStyle":
(etc)

"Choice A (MyStyle)":
(etc)
Edit for solution: I'll make custom screens instead.
Last edited by morrie on Fri Feb 24, 2017 4:54 am, edited 3 times in total.
*perpetual beginner who can't wrap my head around coding....*

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2405
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Applying styles to in-game menu and choices

#2 Post by Ocelot »

The game displays in-game choice mnu using 'choice' screen. You can find it and accompanying styles in screens.rpy
< < insert Rick Cook quote here > >

User avatar
morrie
Regular
Posts: 33
Joined: Mon Aug 01, 2016 11:18 am
Tumblr: morrie-games
Contact:

Re: Applying styles to in-game menu and choices

#3 Post by morrie »

Ocelot wrote:The game displays in-game choice mnu using 'choice' screen. You can find it and accompanying styles in screens.rpy
No.... sorry.... I want to style individual menus, because I use them for different purposes. Like, one is for choosing your dialogue action but another is for what item to buy and I don't want them to look the same....

Edit: I added "individual" to the thread title for clarity.
*perpetual beginner who can't wrap my head around coding....*

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2405
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Applying styles to individual in-game menu and choices

#4 Post by Ocelot »

you can always create your own choice-like screens and invoke them in your code. Look at the renpy.display_menu() Python function to see how choice screen actualy works, so you can replicate it.
https://www.renpy.org/doc/html/statemen ... splay_menu

Another way, if you are attached to renpy menu statement, is to replace the choice screen style and rebuild all styles before each individual menu, but be warned, that it is a complex operation, which introduces noticeable lag.
https://www.renpy.org/doc/html/style.ht ... les-python
https://www.renpy.org/doc/html/style.html#style.rebuild
< < insert Rick Cook quote here > >

User avatar
morrie
Regular
Posts: 33
Joined: Mon Aug 01, 2016 11:18 am
Tumblr: morrie-games
Contact:

Re: Applying styles to individual in-game menu and choices

#5 Post by morrie »

Ocelot wrote:you can always create your own choice-like screens and invoke them in your code. Look at the renpy.display_menu() Python function to see how choice screen actualy works, so you can replicate it.
https://www.renpy.org/doc/html/statemen ... splay_menu

Another way, if you are attached to renpy menu statement, is to replace the choice screen style and rebuild all styles before each individual menu, but be warned, that it is a complex operation, which introduces noticeable lag.
https://www.renpy.org/doc/html/style.ht ... les-python
https://www.renpy.org/doc/html/style.html#style.rebuild
Okay, thanks. I'll turn it into custom screens then.
*perpetual beginner who can't wrap my head around coding....*

Post Reply

Who is online

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