Textbutton customization problem

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
RaikonKitsune
Regular
Posts: 39
Joined: Mon Apr 17, 2017 9:36 am
Projects: Reimei no Gakuen
Tumblr: raikonkitsune
Deviantart: RaikonKitsune
itch: Raikon Kitsune
Contact:

Textbutton customization problem

#1 Post by RaikonKitsune » Sun Jun 11, 2017 3:46 pm

Hi, I have some questions about textbutton customization. The most urgent is that I can't take off that blue frame that you can see in the attachment.

Also how can i add the font and color of a textbutton?
Attachments
question.jpg
question.jpg (10.66 KiB) Viewed 568 times

mikolajspy
Regular
Posts: 169
Joined: Sun Jun 04, 2017 12:05 pm
Completed: Too many, check signature
Deviantart: mikolajspy
Location: Wrocław, Poland
Contact:

Re: Textbutton customization problem

#2 Post by mikolajspy » Sun Jun 11, 2017 5:11 pm

For changing color and font you can simply use something like that:

Code: Select all

textbutton _("{color=#ff0000}{font=YourFont.otf}ButtonName{/font}{/color}") action YourAction
But probably there's better way to do it.
I don't know where did your frame came from, I believe you would need to delete some part of code, but I can't help without seeing how that code looks like.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1458
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: Textbutton customization problem

#3 Post by xavimat » Sun Jun 11, 2017 7:30 pm

You seem to use the old GUI. There is a long explanation about customization of the new GUI in the doc: https://www.renpy.org/doc/html/gui.html

There are old customization tutorials in the cookbook. Search there :wink:

Code: Select all

    textbutton "BLA BLA":
        text_font "myfont.ttf"
        text_color "#f00"
        background None
Textbuttons are a bit tricky because they wrap together button and text properties. You need the prefix "text_" for the specific text properties.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
RaikonKitsune
Regular
Posts: 39
Joined: Mon Apr 17, 2017 9:36 am
Projects: Reimei no Gakuen
Tumblr: raikonkitsune
Deviantart: RaikonKitsune
itch: Raikon Kitsune
Contact:

Re: Textbutton customization problem

#4 Post by RaikonKitsune » Mon Jun 12, 2017 4:37 am

Thank you! :)

Post Reply

Who is online

Users browsing this forum: Bing [Bot]