Page 1 of 1

[SOLVED]Text Position

Posted: Sat Apr 26, 2014 12:32 pm
by Kazhuto
Explaination : I was making textbox and i found that the text couldnt fit with my textbox. The box is adjust perfectly fine but the text is at the up of textbox.

Question:
Is there any way to move the text position ??

Re: Text Position

Posted: Sat Apr 26, 2014 1:12 pm
by Donmai
You can learn everything about margins, padding, text styling and overal polishing of your text box in this tutorial: http://lemmasoft.renai.us/forums/viewto ... =51&t=9233

Re: Text Position

Posted: Sat Apr 26, 2014 1:44 pm
by Kazhuto
Thanks for your reply but i think this thing cant be done using padding or margin. Because the text is the problem. I made the textbox myself and i seen a few game have this kind of feature. Do you know something about text position ? I do try this

Code: Select all

init :
    $ left_text_normal = Character(None,
    window_background = ("images/Textbox.png"),
    window_xalign=0.1,
    window_yalign=0.8,
    what_color="#000000",
    what_size=24,
    what_xcenter = 580,
    what_ycenter = 112,
    what_xmaximum = 700,
    )

# The game starts here.
label start:
    show wallpaper
    left_text_normal "everybody have a dream story so do i, i used to imagine that my route life should be an happy ending"


And yeah its working, i made this solution myself thought but kinda not work with character name on it like ;

Code: Select all

left_text_normal C "asdasdasdasd"
its only result error, y'know. Any others method ???

Information : I learn python yesterday. So im kinda a beginner on this. Here some Snap of my work

Re: Text Position

Posted: Sat Apr 26, 2014 4:45 pm
by Donmai
Yes, this is done with styles, margins and padding. Go to options.rpy and find there the 'say screen' code. I've commented the lines you will need to adjust. The values in my code are only examples. Change them, then return to your game and press shift+r to see the results. Keep adjusting until you are satisfied.

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.say_window.background = "images/Textbox.png"

    ## Margin is space surrounding the window, where the background
    ## is not drawn.

    style.say_window.xmargin = 0
    style.say_window.ymargin = 0

    ## Padding is space inside the window, where the background is
    ## drawn.

    style.say_window.left_padding = 38 # This will adjust the x positioning of the text
    style.say_window.right_padding = 30
    style.say_window.top_padding = 10 # This will adjust the y positioning of the text
    # style.window.bottom_padding = 6

    ## This is the minimum height of the window, including the margins
    ## and padding.

    style.say_window.yminimum = 194 # Use this to adjust the window vertical position
    style.say_vbox.spacing = 20 # Use this to adjust the distance between the character name and the dialogue
    
Happy coding. :)
BTW nice text box!

Re: Text Position

Posted: Sun Apr 27, 2014 12:39 am
by Kazhuto
well, Thanks that solved the problem.. btw i made them myself using photoshop . 8)

Re: [SOLVED]Text Position

Posted: Thu May 22, 2014 3:17 am
by HypnoKitten
Hihi - just wanted to thank Kazhuto for asking the question and Donmai for answering it, completely took care of what I'd been stuck on and wanted to ask :) Rocking and so glad I searched the forum!

Re: [SOLVED]Text Position

Posted: Thu May 22, 2014 8:03 am
by Donmai
You are very welcome (really :D).
Welcome to the forums.

Re: [SOLVED]Text Position

Posted: Sat Jul 19, 2014 3:57 am
by Kazhuto
You are welcome :)