Change the position of the text in the "Settings", "Help", etc.

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
lFeedYoul
Newbie
Posts: 7
Joined: Sat Oct 06, 2018 3:47 am
Contact:

Change the position of the text in the "Settings", "Help", etc.

#1 Post by lFeedYoul »

Hello everybody! I need to change the location of the text and buttons in the "Settings", "Help", "About", etc. But I don`t know how to do it. I tried to write xalign after the hbox:

Code: Select all

screen help():

    tag menu

    default device = "keyboard"

    use game_menu3(_("Помощь"), scroll="viewport"):

        style_prefix "help"

        vbox:


            spacing 23

            hbox xalign .1:


                textbutton _("Клавиатура"):

                     activate_sound "music/click2.ogg"
                     action SetScreenVariable("device", "keyboard")
                textbutton _("Мышь"):
                     activate_sound "music/click2.ogg"
                     action SetScreenVariable("device", "mouse")

                if GamepadExists():
                    textbutton _("Геймпад"):
                         activate_sound "music/click2.ogg"
                         action SetScreenVariable("device", "gamepad")
But nothing happened. Also I tried to write xalign after the textbutton _("title"):

Code: Select all

screen help():

    tag menu

    default device = "keyboard"

    use game_menu3(_("Помощь"), scroll="viewport"):

        style_prefix "help"

        vbox:


            spacing 23

            hbox :


                textbutton _("Клавиатура") xalign .1:

                     activate_sound "music/click2.ogg"
                     action SetScreenVariable("device", "keyboard")
                textbutton _("Мышь"):
                     activate_sound "music/click2.ogg"
                     action SetScreenVariable("device", "mouse")

                if GamepadExists():
                    textbutton _("Геймпад"):
                         activate_sound "music/click2.ogg"
                         action SetScreenVariable("device", "gamepad")

Also nothing happened.

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Change the position of the text in the "Settings", "Help", etc.

#2 Post by Per K Grok »

lFeedYoul wrote: Mon Oct 08, 2018 12:01 am Hello everybody! I need to change the location of the text and buttons in the "Settings", "Help", "About", etc. But I don`t know how to do it. I tried to write xalign after the hbox:

Code: Select all

screen help():

    tag menu

    default device = "keyboard"

    use game_menu3(_("Помощь"), scroll="viewport"):

        style_prefix "help"

        vbox:


            spacing 23

            hbox xalign .1:


               ----

--- nothing happened.

It aught to work.

I would prefer to write

Code: Select all

    hbox:
        xalign 0.1
but testing it, the way you have written it worked too.

0.1 is just a small movement from 0.0. Might it be that you just didn't notice the movement? Did you possibly intend to make the movement 1.0 instead (to the right side)

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Change the position of the text in the "Settings", "Help", etc.

#3 Post by Imperf3kt »

0.1 is 10% of the screen, so if your screen is 1920*1080, it should move 108 pixels, which is a rather noticeable difference.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

lFeedYoul
Newbie
Posts: 7
Joined: Sat Oct 06, 2018 3:47 am
Contact:

Re: Change the position of the text in the "Settings", "Help", etc.

#4 Post by lFeedYoul »

I need to make the text to the left. How to do it?

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Change the position of the text in the "Settings", "Help", etc.

#5 Post by Per K Grok »

lFeedYoul wrote: Mon Oct 08, 2018 12:50 pm I need to make the text to the left. How to do it?
xalign 0.0 is all the way left
xalign 0.5 is in the middle
xalign 1.0 is all the way to the right


The default is all the way to the left. If you don't add anything about xalign you will be as far left as it goes with the hbox.

You could test with a negative number. That would put you left of the 0 point. I don't think that will turn out well though. But you could put it to the test.
i.e.
xalign -0.1

lFeedYoul
Newbie
Posts: 7
Joined: Sat Oct 06, 2018 3:47 am
Contact:

Re: Change the position of the text in the "Settings", "Help", etc.

#6 Post by lFeedYoul »

Thank you

Post Reply

Who is online

Users browsing this forum: Google [Bot], RandomHuman64