Message Text Box moves to the right
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.
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.
-
- Regular
- Posts: 27
- Joined: Fri Jul 08, 2016 6:53 am
- Contact:
Message Text Box moves to the right
Hello!
I have a big problem with my Renpy Text message box. Every time when the side image appears on the left side, the text message box will move more to the right. Could it be that there are two parameters for placing the box for
1. narrator text without side image
2. side image with text?
It would be great if you can help me.
Thanks!
I have a big problem with my Renpy Text message box. Every time when the side image appears on the left side, the text message box will move more to the right. Could it be that there are two parameters for placing the box for
1. narrator text without side image
2. side image with text?
It would be great if you can help me.
Thanks!
Re: Message Text Box moves to the right
Can you show us the code to your say screen? (in the screens.rpy file) Have you modified it?
-
- Regular
- Posts: 27
- Joined: Fri Jul 08, 2016 6:53 am
- Contact:
Re: Message Text Box moves to the right
Code: Select all
screen say(who, what):
style_prefix "say"
window:
id "window"
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what id "what"
## If there's a side image, display it above the text. Do not display on the
## phone variant - there's no room.
if not renpy.variant("small"):
add SideImage() xalign 0.0 yalign 1.0
## 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
-
- Regular
- Posts: 27
- Joined: Fri Jul 08, 2016 6:53 am
- Contact:
Re: Message Text Box moves to the right
I tried to change the parameters. But I cant have the exact size of the textfield when the side image appears and not.
Re: Message Text Box moves to the right
This is weird, if you haven't changed the screen code your text shouldn't shift at all. Can you show us your character and image declaration code?
-
- Regular
- Posts: 27
- Joined: Fri Jul 08, 2016 6:53 am
- Contact:
Re: Message Text Box moves to the right
Hello!
I have used in image declaration code: windows_left_padding 180 or is there any better solution ?
I have used in image declaration code: windows_left_padding 180 or is there any better solution ?
Re: Message Text Box moves to the right
If you want to move the image to the right by 180px, you can just use xpos? What are you trying to achieve?
-
- Regular
- Posts: 27
- Joined: Fri Jul 08, 2016 6:53 am
- Contact:
Re: Message Text Box moves to the right
I want to place the side image to the left side of the message box.
Is there a better code ? If it is possible could you please tell me how to code with xpos? I am not so great in coding. Thank you!!
Is there a better code ? If it is possible could you please tell me how to code with xpos? I am not so great in coding. Thank you!!
Re: Message Text Box moves to the right
Side image defaults to the left side of the message box, so we need more specifics of what you're trying to achieve. What's wrong with the default location?
-
- Regular
- Posts: 27
- Joined: Fri Jul 08, 2016 6:53 am
- Contact:
Re: Message Text Box moves to the right
Hello! I found the error! I deleted the windows_left_panning because this code shifted the message field box more to the right. Now it is correct!! Thank you!!!
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot]