[Solved] Glowing text/button hovers help

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
nerupuff
Veteran
Posts: 211
Joined: Sat Dec 02, 2017 2:24 am
Contact:

[Solved] Glowing text/button hovers help

#1 Post by nerupuff »

Hi! I'm still a relative newbie when it comes to some advanced customization of GUI and the like, so I figured it might be best to ask for help for now since I think I got stuck somewhere.

I've been experimenting with using "outlines" on style properties for text and so far I managed to get it working to look like it is glowing, but I can't figure out where to place it if I want all buttons to glow UPON mouse hovers and changing the glow color to something different when it's been actively clicked.

This is the glow code I use (it's a bit rough, I'll fix it as well soon)

Code: Select all

outlines [ (3, "#ffe6ff", 0, 0), (2, "#ffccff", 0, 0),(1, "#ffb3ff", 0, 0),  ]
Which I then append to this:

Code: Select all

style button_text is gui_text:
    properties gui.text_properties("button")
    yalign 0.5
But so far, it just appears as static glow. I'm not sure where to fit it in for hover and selected in choices and in buttons. I tried checking the gui.rpy and I found this:

Code: Select all

## The color that is used for buttons and bars that are hovered.
define gui.hover_color = '#cc0066'

## The color used for a text button when it is selected but not focused. A
## button is selected if it is the current screen or preference value.
define gui.selected_color = '#555555'
But it's only for solid color changes. Please help me if I am missing something.
Last edited by nerupuff on Mon Mar 25, 2019 7:20 am, edited 1 time in total.
ImageImage
Hire me for proofreading, editing, and (maybe) writing! ♡ Check here!

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Glowing text/button hovers help

#2 Post by Alex »

nerupuff wrote: Sun Mar 24, 2019 10:01 am But it's only for solid color changes. ...
Yes, so try something like this

Code: Select all

define gui.button_text_hover_outlines = [ (3, "#ffe6ff", 0, 0), (2, "#ffccff", 0, 0),(1, "#ffb3ff", 0, 0),  ]

User avatar
nerupuff
Veteran
Posts: 211
Joined: Sat Dec 02, 2017 2:24 am
Contact:

Re: Glowing text/button hovers help

#3 Post by nerupuff »

Alex wrote: Sun Mar 24, 2019 2:16 pm
nerupuff wrote: Sun Mar 24, 2019 10:01 am But it's only for solid color changes. ...
Yes, so try something like this

Code: Select all

define gui.button_text_hover_outlines = [ (3, "#ffe6ff", 0, 0), (2, "#ffccff", 0, 0),(1, "#ffb3ff", 0, 0),  ]
Thank you so much! It worked! I'll also experiment with this code snippet so I can come up with more effects.
ImageImage
Hire me for proofreading, editing, and (maybe) writing! ♡ Check here!

Post Reply

Who is online

Users browsing this forum: 3N16M4, Bing [Bot], Google [Bot]