Page 1 of 1

namebox positioning[solved]

Posted: Sat Feb 03, 2018 4:42 pm
by PoisionLullaby
So I've been trying to figure this out on my own for a while now but I just can't understand what I'm supposed to so. What I'm trying to do is move the namebox because currently it's on top of my dialogue box and blending with my dialogue text. At first I thought I had to change something here in screens.rpy

Code: Select all

## Make the namebox available for styling through the Character object.
init python:
    config.character_id_prefixes.append('namebox')
style window is default
style say_label is default
style say_dialogue is default
style say_thought is say_dialogue

style namebox is default
style namebox_label is say_label


style window:
    xalign 0.5
    xfill True
    yalign gui.textbox_yalign
    ysize gui.textbox_height

    background Image("gui/textbox.png", xalign=0.5, yalign=1.0)

style namebox:
    xpos gui.name_xpos
    xanchor gui.name_xalign
    xsize gui.namebox_width
    ypos gui.name_ypos
    ysize gui.namebox_height

    background Frame("gui/namebox.png", gui.namebox_borders, tile=gui.namebox_tile, xalign=gui.name_xalign)
    padding gui.namebox_borders.padding

style say_label:
    properties gui.text_properties("name", accent=True)
    xalign gui.name_xalign
    yalign 0.5

style say_dialogue:
    properties gui.text_properties("dialogue")

    xpos gui.dialogue_xpos
    xsize gui.dialogue_width
    ypos gui.dialogue_ypos
but I don't really know what to mess with and I don't want to completely destroy everything. So when I looked around a bit more I found this code

Code: Select all

add##Customization of the name box if show_two_window = True
    
    style.say_who_window.background = Frame("FILE NAME HERE", 50, 50)
    style.say_who_window.xalign = 0.0
    style.say_who_window.yalign = 1.0
    style.say_who_window.xpos = 2 
    style.say_who_window.ypos = 49 
    style.say_who_window.left_padding = 15
    style.say_who_window.top_padding = 15
    style.say_who_window.right_ping = 15 
    style.say_who_window.bottom_padding = 15
    style.say_who_window.xminimum = 190 
    style.say_who_window.yminimum = 50
But I don't know where to put it. plus I don't know what this code means or where it's at.

Code: Select all

##Customization of the name box if show_two_window = True[\code] 

This may be me being naive to programming but any help is appreciated. :)

Re: namebox positioning

Posted: Sat Feb 03, 2018 6:03 pm
by poorlyformed
It's in the GUI.rpy

Code: Select all

## The placement of the speaking character's name, relative to the textbox.
## These can be a whole number of pixels from the left or top, or 0.5 to center.
define gui.name_xpos = 440
define gui.name_ypos = 60
Those numbers there are from my own code, so it might show slightly different, but you get the idea.

Re: namebox positioning

Posted: Sat Feb 03, 2018 7:07 pm
by PoisionLullaby
I still don't quite understand. I changed those before hand and I still can't get the namebox above the dialogue box.^^'

Re: namebox positioning

Posted: Wed Feb 21, 2018 11:12 pm
by PoisionLullaby
I'm still having this problem and would love some help.

Re: namebox positioning

Posted: Wed Feb 21, 2018 11:37 pm
by irredeemable
If you lower the number after gui.name_ypos the name box should move higher on the screen. Default is 0. Set it to -40 or something and see if that changes anything.

Re: namebox positioning

Posted: Fri Feb 23, 2018 6:44 pm
by PoisionLullaby
Thank you so much, that's all I needed! I figured it was something simple just wasn't sure where to make the changes.

Re: namebox positioning

Posted: Tue Aug 06, 2019 5:17 pm
by Crazy Li
sorry to necropost, but I'm having a very similar issue (my namebox is clipping into the text box slightly) and I've tried setting "define gui.name_ypos" to all kinds of values and it doesn't seem to have an affect on anything at all. I've tried small numbers (like -20) and when that didn't work, drastic numbers both negative and positive (like 200/-200) and it doesn't budge a pixel. I'm not really sure what's going on and how to make it move. Is maybe this method outdated and there's some other way to control the namebox now in newer Ren'py?

Example image of what it's doing. Notice, there's a few pixels of overlap there and I want the box to float above the dialogue window, not clip into it.

Image