How do I assign a custom text align to two textbuttons in an hbox?

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
henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

How do I assign a custom text align to two textbuttons in an hbox?

#1 Post by henvu50 »

Here is what I'm trying to achieve:

Image

I want to right align the words name & address, but left align the actual name & address.

Here is my code so far:

Code: Select all


vbox:
  hbox:
    textbutton "name:":
	text_align 1.0
	xalign 1.0
	action Return(1)
    textbutton " harold smith":
    	text_align 0
	xalign 0
	action Return(1)
  hbox:
    textbutton "address:":
	text_align 1.0
	xalign 1.0
	action Return(1)
    textbutton " 871 gej street":
    	text_align 0
	xalign 0
	action Return(1)

The code doesn't work, anyone know why?

The only way I've figured out how to achieve my sample image is by using two separate vbox.

Post Reply

Who is online

Users browsing this forum: Google [Bot]