Page 1 of 1

Name tag customization

Posted: Tue Aug 16, 2016 3:51 am
by Fatimah
Hello,

Is there any way I can place the name tag in "front" of the text box?

I'm attaching a screenshot of how my text box looks now. You can see that the name tag image is behind the text box image. I tried different approaches but none seems to work.

Thanks

Re: Name tag customization

Posted: Tue Aug 16, 2016 4:18 am
by Iylae
If the name and the text box are being showed are on two different screens then you can use zorder to sort them:

https://www.renpy.org/doc/html/screens. ... -statement

Re: Name tag customization

Posted: Tue Aug 16, 2016 4:39 am
by zankizuna
Maybe in the code, the textbox should be shown first , then the nametag.

Re: Name tag customization

Posted: Thu Aug 18, 2016 1:36 am
by Fatimah
Iylae wrote:If the name and the text box are being showed are on two different screens then you can use zorder to sort them:

https://www.renpy.org/doc/html/screens. ... -statement
They are in the same screen.
zankizuna wrote:Maybe in the code, the textbox should be shown first , then the nametag.
Nothing in the code allows me to do that.

I'm attaching my code (options.rpy) where I'm defining the images for the text box and the name tag:

Code: Select all

## These settings let you customize the window containing the
    ## dialogue and narration, by replacing it with an image.

    ## The background of the window. In a Frame, the two numbers
    ## are the size of the left/right and top/bottom borders,
    ## respectively.
    
    style.window.background = "textbox.png"
    #style.say_who_window.background = Frame("nametag.png", 100, 100)
    style.say_who_window.background = "nametag.png"
    #style.say_who_window.background = "textbox.png"
    style.say_who_window.xalign = 1.0
    style.say_who_window.yalign = 1.0
    style.say_who_window.xpos = 1390 
    style.say_who_window.ypos = 0
    style.say_who_window.yanchor = -50
    style.say_who_window.left_padding = 15
    style.say_who_window.top_padding = 15
    style.say_who_window.right_padding = 15 
    style.say_who_window.bottom_padding = 15
    style.say_who_window.xminimum = 220 
    style.say_who_window.yminimum = 75
If any one has any idea how to solve this, that'll be great!

Thank you

Re: Name tag customization

Posted: Sun Aug 21, 2016 4:39 am
by Fatimah
So.. I have figured a way around that problem, but there is one thing that I'm still struggling with.
It is the position of the character's name.

I have tried different approaches but no success what so ever.

Any one knows how I can change the alignment or the position?

I tried but it didn't work.
style.say_label.xalign = 0.5

Re: Name tag customization

Posted: Sun Aug 21, 2016 11:10 am
by trooper6
How to have the name box in front of the text box was answered here:
viewtopic.php?f=8&t=25117&hilit=order+reverse#p309221

Re: Name tag customization

Posted: Tue Aug 23, 2016 4:44 am
by Fatimah
trooper6 wrote:How to have the name box in front of the text box was answered here:
viewtopic.php?f=8&t=25117&hilit=order+reverse#p309221
Thank you so much. This is what I was looking for!