[SOLVED] Is the use of "Textbutton" to output a simple text to "Text"?

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
span4ev
Regular
Posts: 77
Joined: Fri Jul 08, 2022 9:29 pm
itch: rpymc
Contact:

[SOLVED] Is the use of "Textbutton" to output a simple text to "Text"?

#1 Post by span4ev » Thu Aug 04, 2022 6:34 am

I have a “Textbutton” and “Text” (the values of variables are displayed), but I want to ask them Background.
I could put the "Text" in "Frame".
But I thought that it would be easier to make "Textbutton" everywhere and display the same variables as the name "Textbutton" without action.

Do you do this in your projects?
Can this lead to errors?
Is there anything why it is so undesirable to do?
Last edited by span4ev on Sat Oct 15, 2022 5:01 am, edited 1 time in total.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Is the use of "Textbutton" to output a simple text to "Text"?

#2 Post by Imperf3kt » Thu Aug 04, 2022 6:37 am

Theres no problem doing that, a textbutton is a button with Text inside it, usually contained within some sort of container, like a frame.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

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

Re: Is the use of "Textbutton" to output a simple text to "Text"?

#3 Post by Ocelot » Thu Aug 04, 2022 6:42 am

span4ev wrote:
Thu Aug 04, 2022 6:34 am
Do you do this in your projects?
Can this lead to errors?
Is there anything why it is so undesirable to do?
Be careful with styles: textbutton can pick insensitive/hovered styles and use them instead of generic style for idle button (Depending on how you make a button do "no action", it either will be in insensitive state or in normal and pick up hovered events). Check if all Textbuttons are working properly by hovering over them.
< < insert Rick Cook quote here > >

span4ev
Regular
Posts: 77
Joined: Fri Jul 08, 2022 9:29 pm
itch: rpymc
Contact:

Re: Is the use of "Textbutton" to output a simple text to "Text"?

#4 Post by span4ev » Thu Aug 04, 2022 7:21 am

Imperf3kt wrote:
Thu Aug 04, 2022 6:37 am
Theres no problem doing that, a textbutton is a button with Text inside it, usually contained within some sort of container, like a frame.
OK thanks. This is what I was hoping to hear

span4ev
Regular
Posts: 77
Joined: Fri Jul 08, 2022 9:29 pm
itch: rpymc
Contact:

Re: Is the use of "Textbutton" to output a simple text to "Text"?

#5 Post by span4ev » Thu Aug 04, 2022 7:23 am

Ocelot wrote:
Thu Aug 04, 2022 6:42 am
span4ev wrote:
Thu Aug 04, 2022 6:34 am
Do you do this in your projects?
Can this lead to errors?
Is there anything why it is so undesirable to do?
Be careful with styles: textbutton can pick insensitive/hovered styles and use them instead of generic style for idle button (Depending on how you make a button do "no action", it either will be in insensitive state or in normal and pick up hovered events). Check if all Textbuttons are working properly by hovering over them.
Therefore, I removed the action of such buttons. I mean, I did not assign them anything as a action, even NullАction () so that I can use hover_background for the rest of the buttons

Post Reply

Who is online

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