Highlighting Text for Choice Menu Options

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
Zeekee
Regular
Posts: 67
Joined: Wed Jul 23, 2014 10:17 pm
Projects: No One But You, The Anomaly
Organization: Annexe Interactive
Skype: ytmnd111
Soundcloud: zomgaarh
Location: USAF Academy, CO
Contact:

Highlighting Text for Choice Menu Options

#1 Post by Zeekee »

Is it possible to make it so that, as opposed to changing the image for a container or box of a choice option to a hover variant, the text attributes can be changed when hovered over instead? Been fiddling around with this for a short while and I'm not sure exactly how I'd achieve this.

Thanks in advance!
"When people sometimes misquote me, I don't know if they understand what I'm saying."
-Tommy Wiseau

User avatar
Zeekee
Regular
Posts: 67
Joined: Wed Jul 23, 2014 10:17 pm
Projects: No One But You, The Anomaly
Organization: Annexe Interactive
Skype: ytmnd111
Soundcloud: zomgaarh
Location: USAF Academy, CO
Contact:

Re: Highlighting Text for Choice Menu Options

#2 Post by Zeekee »

In case anyone was looking for a fix to a similar issue, I ended up solving this one on my own. In screens.rpy, go down to the Choice screen. The bottom part of that function, at least for me, looks something like this:

init -2:
$ config.narrator_menu = True

style menu_window is default

style menu_choice is button_text:
clear
color "#372409"
hover_color "#ffcc3e"
hover_bold True
idle_bold True
size 26

style menu_choice_button is button:
xminimum 1048
xmaximum 1048
yminimum 198
idle_background Frame("images/GUI/choice.png",0,0)
hover_background Frame("images/GUI/choice.png",0,0)
xpadding 97
top_padding 75
bottom_padding 45


...where hover_bold True and hover_color "#ffcc3e" are the styles that are changed when the mouse hovers over a choice.
"When people sometimes misquote me, I don't know if they understand what I'm saying."
-Tommy Wiseau

Post Reply

Who is online

Users browsing this forum: Bing [Bot], elcharlo, Google [Bot]