Help with Buttonstates in Button [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
felsenstern
Regular
Posts: 72
Joined: Tue Jul 11, 2017 2:13 am
Contact:

Help with Buttonstates in Button [solved]

#1 Post by felsenstern »

Hiya,

is it possible to use the buttonstate inside of button: like in imagebutton: to setup images in background, add and foreground like in imagebutton: with idle, hover... and so on?

if so, then can you give me a short example?
Last edited by felsenstern on Tue Nov 07, 2023 5:54 am, edited 1 time in total.
---
Yes, I've Read The F*cking Manual
Yes, I've used the f*cking search function
Yes, I've used a site search
No, I don't need a reminder that search functions exist
No, I don't need your astonished outbreak that I couldn't find the information
No, I don't need your answer if you can't just give it without all the BS around it

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

Re: Help with Buttonstates in Button

#2 Post by Ocelot »

https://www.renpy.org/doc/html/style_pr ... y-prefixes
There is an example with button text color change upon hover.

You do not need to apply it through styles, you can write prefixed style properties within button itself, if you want:

Code: Select all

button:
    foreground None
    hover_foreground "locked.jpg"
    text "Hover over me!"
    # . . .
    
< < insert Rick Cook quote here > >

felsenstern
Regular
Posts: 72
Joined: Tue Jul 11, 2017 2:13 am
Contact:

Re: Help with Buttonstates in Button

#3 Post by felsenstern »

Thanks a lot, especially for the example.
---
Yes, I've Read The F*cking Manual
Yes, I've used the f*cking search function
Yes, I've used a site search
No, I don't need a reminder that search functions exist
No, I don't need your astonished outbreak that I couldn't find the information
No, I don't need your answer if you can't just give it without all the BS around it

Post Reply

Who is online

Users browsing this forum: MikiSiku