[solved] Can I add a frame on textbutton?

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
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

[solved] Can I add a frame on textbutton?

#1 Post by Nanahs »

This is my screen:

Code: Select all

screen my_buttons():
    modal True
    textbutton "{image=pinkpic}" action Hide("my_buttons") align (0.95, 0.05)
    
    vbox:
        align(0.5, 0.5)
        
        textbutton "Open Music Room" action [Hide("my_buttons"),Hide("one_buton_scr"), Jump("musicroom")]
        null height 50
        textbutton "Open Gallery" action [Hide("my_buttons"),Hide("one_buton_scr"), Jump("galerry")]
        null height 50
        textbutton "Go To Main Menu" action MainMenu()
And it looks like this:

Image

Depending on the background image, it gets difficult to see the text.

So I want to now if there's a way to add a frame or something around it to look more like this:

Image

So the text gets more visible.

Thanks.
Last edited by Nanahs on Tue Dec 04, 2018 5:21 pm, edited 1 time in total.

User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Re: Can I add a frame on textbutton?

#2 Post by Nanahs »

Oh, I already found the solution. I changed the code to:

Code: Select all

screen my_buttons():
    modal True
    textbutton "{image=pinkpic}" action Hide("my_buttons") align (0.95, 0.05)

    frame:
        align(0.5, 0.5)
        has vbox 
        
        textbutton "Open Music Room" action [Hide("my_buttons"),Hide("one_buton_scr"), Jump("musicroom")]
        null height 50
        textbutton "Open Gallery" action [Hide("my_buttons"),Hide("one_buton_scr"), Jump("galerry")]
        null height 50
        textbutton "Go To Main Menu" action MainMenu()
And now it's inside of a box :)

Post Reply

Who is online

Users browsing this forum: No registered users