Name tag customization

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
Fatimah
Regular
Posts: 94
Joined: Tue Mar 01, 2016 2:53 pm
Contact:

Name tag customization

#1 Post by Fatimah » Tue Aug 16, 2016 3:51 am

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
Attachments
text.PNG

User avatar
Iylae
Regular
Posts: 73
Joined: Sat Jan 09, 2016 6:57 am
Location: Cornwall, UK
Contact:

Re: Name tag customization

#2 Post by Iylae » Tue Aug 16, 2016 4:18 am

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
Image
  If we are what we repeatedly do, then good coding is not an act, but a habit

User avatar
zankizuna
Veteran
Posts: 416
Joined: Fri May 04, 2012 2:20 am
Projects: Softwar
Deviantart: raseru09
itch: ZanKizuna
Location: Manilaaaaaaaa
Contact:

Re: Name tag customization

#3 Post by zankizuna » Tue Aug 16, 2016 4:39 am

Maybe in the code, the textbox should be shown first , then the nametag.

Fatimah
Regular
Posts: 94
Joined: Tue Mar 01, 2016 2:53 pm
Contact:

Re: Name tag customization

#4 Post by Fatimah » Thu Aug 18, 2016 1:36 am

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

Fatimah
Regular
Posts: 94
Joined: Tue Mar 01, 2016 2:53 pm
Contact:

Re: Name tag customization

#5 Post by Fatimah » Sun Aug 21, 2016 4:39 am

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

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Name tag customization

#6 Post by trooper6 » Sun Aug 21, 2016 11:10 am

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
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Fatimah
Regular
Posts: 94
Joined: Tue Mar 01, 2016 2:53 pm
Contact:

Re: Name tag customization

#7 Post by Fatimah » Tue Aug 23, 2016 4:44 am

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!

Post Reply

Who is online

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