Page 1 of 1

text centered in the middle of the bottom part of the screen(solved)

Posted: Thu Dec 12, 2019 4:12 pm
by glithch
this might seem really easy and simple but i havent touched renpy in a long time and documentation isnt helping me so i thought i would ask here.

neither
define gui.dialogue_text_xalign = 0.5
nor
define gui.dialogue_xpos = 600

really center it proprely.
i need the text to format appropriately. not just "start' at the beginning. but that it fills the appropriate space in the middle

Re: text centered in the middle of the bottom part of the screen

Posted: Thu Dec 12, 2019 5:33 pm
by Imperf3kt
Are you trying to make the text "justified"?
Use an xalign and additionally add an xfill True

Re: text centered in the middle of the bottom part of the screen

Posted: Mon Dec 23, 2019 9:37 am
by glithch
Imperf3kt wrote: Thu Dec 12, 2019 5:33 pm Are you trying to make the text "justified"?
Use an xalign and additionally add an xfill True
@Imperf3kt
i know this is a late answer, i was doing focused on the art' but where exactly do i add that xfill?

Re: text centered in the middle of the bottom part of the screen

Posted: Mon Dec 23, 2019 3:52 pm
by Imperf3kt
Which text are you talking about.
When I suggested an xfill before, I forgot to ask.

Do you mean the dialogue text?

Re: text centered in the middle of the bottom part of the screen

Posted: Sat Jan 04, 2020 12:24 pm
by glithch
Imperf3kt wrote: Mon Dec 23, 2019 3:52 pm Which text are you talking about.
When I suggested an xfill before, I forgot to ask.

Do you mean the dialogue text?
yes!
edit: i tried using justify True in style say_dialogue but it wont work

Re: text centered in the middle of the bottom part of the screen(still need help)

Posted: Fri Jan 10, 2020 5:20 pm
by glithch
is it ok if i bump this after some time?

Re: text centered in the middle of the bottom part of the screen(still need help)

Posted: Fri Jan 10, 2020 7:12 pm
by Imperf3kt
Bumps are fine most of the time.
I forgot to reply and currently I am away from my laptop.

I would suggest looking for things related to the text box in gui.rpy, but I can't currently suggest what as I don't have access to any copy of renpy at the moment.

Re: text centered in the middle of the bottom part of the screen(still need help)

Posted: Fri Jan 10, 2020 8:58 pm
by gas
The defaults are:

Code: Select all

define gui.dialogue_xpos = 268
define gui.dialogue_ypos = 50

## The maximum width of dialogue text, in pixels.
define gui.dialogue_width = 744

## The horizontal alignment of the dialogue text. This can be 0.0 for left-
## aligned, 0.5 for centered, and 1.0 for right-aligned.
define gui.dialogue_text_xalign = 0.0
You have 268 pixels of left margin by the dialogue frame pushed that side. Set it to 0.
You should also probably change the width of the dialogue frame from 744 to your window size.
then set dialogue_text_align to 0.5.

Re: text centered in the middle of the bottom part of the screen(still need help)

Posted: Mon Jan 13, 2020 5:32 pm
by glithch
gas wrote: Fri Jan 10, 2020 8:58 pm You have 268 pixels of left margin by the dialogue frame pushed that side. Set it to 0.
You should also probably change the width of the dialogue frame from 744 to your window size.
then set dialogue_text_align to 0.5.
this just pushes my text to the left, to the point where most of the message gets cut off.
Imperf3kt wrote: Fri Jan 10, 2020 7:12 pm Bumps are fine most of the time.
I forgot to reply and currently I am away from my laptop.

I would suggest looking for things related to the text box in gui.rpy, but I can't currently suggest what as I don't have access to any copy of renpy at the moment.
i did that multiple times and tried a lot of different things but still cant figure it out

Re: text centered in the middle of the bottom part of the screen(still need help)

Posted: Mon Jan 13, 2020 7:01 pm
by Imperf3kt
Can you show a mock screenshot of what you want and a screenshot if what you currently have along with the relevant code you have right now?

Re: text centered in the middle of the bottom part of the screen(still need help)

Posted: Tue Jan 14, 2020 9:10 am
by glithch
Imperf3kt wrote: Mon Jan 13, 2020 7:01 pm Can you show a mock screenshot of what you want and a screenshot if what you currently have along with the relevant code you have right now?
sorry for how messy it looks, just stitched it fast, ignore the clock.
https://imgur.com/a/MpOe6In
i dont know what code would i have to post, other then just changing the textbox size etc i didnt really touch anything.

Re: text centered in the middle of the bottom part of the screen(still need help)

Posted: Tue Jan 14, 2020 12:09 pm
by gas
Are these normal dialogue lines? They look as menu voices. Or just "text". Or whatever.

Anyway:

Code: Select all

define gui.dialogue_xpos = 0.5
define gui.dialogue_text_xalign = 0.5
That's the example in the gui doc, and it worked for me.
Did you try to erase permanent data too from the launcher?

Re: text centered in the middle of the bottom part of the screen(still need help)

Posted: Tue Jan 14, 2020 6:34 pm
by glithch
gas wrote: Tue Jan 14, 2020 12:09 pm Are these normal dialogue lines? They look as menu voices. Or just "text". Or whatever.

Anyway:

Code: Select all

define gui.dialogue_xpos = 0.5
define gui.dialogue_text_xalign = 0.5
That's the example in the gui doc, and it worked for me.
Did you try to erase permanent data too from the launcher?
omg finally that worked. i had no idea you could put decimals in xpos! it was a regular number so i assumed i cant just switch it to a decimal

Re: text centered in the middle of the bottom part of the screen(solved)

Posted: Tue Jan 14, 2020 8:27 pm
by Imperf3kt
There's two forms of numbering, when you use whole numbers, it changes the position based on the number of pixels.
If you use a decimal, it's a percentage, with a range of 0.0 to 1.0, 1.0 being 100%, 0.5 being 50%, 0.0 being 0%, etc.