Resizing image buttons

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
Pink09YT
Newbie
Posts: 5
Joined: Sat Aug 25, 2018 10:44 pm
Tumblr: Pink09YT
Deviantart: Pink09YT
Github: Pink09YT
Skype: Pink09YT
Contact:

Resizing image buttons

#1 Post by Pink09YT »

I need to resize some of the image buttons I'm using in the preferences menu. What's the best way for me to do it?

Code: Select all

screen preferences():

    tag menu

    use game_menu(_("Options"), scroll="viewport"):

            hbox:

                xalign 0.5
                vbox:
                    spacing 50
                    yalign 0.5

                    xsize 600
                    box_wrap True

                    if renpy.variant("pc"):

                        vbox:
                            xalign .5
                            #style_prefix "radio"
                            label _("Display"):
                                xalign .5
                            hbox:
                                spacing 20
                                imagebutton auto "gui/options menu/window_%s.png" action Preference("display", "window")
                                imagebutton auto "gui/options menu/fullscreen_%s.png" action Preference("display", "fullscreen")

                    vbox:
                        xalign .5
                        #style_prefix "radio"
                        label _("Rollback Side"):
                            xalign .5
                        hbox:
                            spacing 20
                            imagebutton auto "gui/options menu/disable_%s.png" action Preference("rollback side", "disable")
                            imagebutton auto "gui/options menu/left_%s.png" action Preference("rollback side", "left")
                            imagebutton auto "gui/options menu/right_%s.png" action Preference("rollback side", "right")

                    vbox:
                        xalign .5
                        #style_prefix "check"
                        label _("Skip"):
                            xalign .5
                        hbox:
                            yalign .5
                            spacing 20
                            imagebutton auto "gui/options menu/unseen_%s.png" action Preference("skip", "toggle")
                            imagebutton auto "gui/options menu/choices_%s.png" action Preference("after choices", "toggle")
                            imagebutton auto "gui/options menu/transitions_%s.png" action InvertSelected(Preference("transitions", "toggle"))

                    ## Additional vboxes of type "radio_pref" or "check_pref" can be
                    ## added here, to add additional creator-defined preferences.

                #null height (4 * gui.pref_spacing)

                vbox:
                    xalign .5
                    xsize 250
                    image "gui/menu_separator.png":
                        xpos 70
                        ypos 0.5

                vbox:
                    xalign .5
                    style_prefix "slider"
                    box_wrap True

                    vbox:

                        label _("Text Speed")

                        bar value Preference("text speed")

                        #label _("Auto-Forward Time")

                        #bar value Preference("auto-forward time")

                    vbox:
                        if config.has_music:
                            label _("Music Volume")

                            hbox:
                                bar value Preference("music volume")

                        if config.has_sound:

                            label _("Sound Volume")

                            hbox:
                                bar value Preference("sound volume")

                                if config.sample_sound:
                                    textbutton _("Test") action Play("sound", config.sample_sound)


                        if config.has_voice:
                            label _("Voice Volume")

                            hbox:
                                bar value Preference("voice volume")

                                if config.sample_voice:
                                    textbutton _("Test") action Play("voice", config.sample_voice)

                        if config.has_music or config.has_sound or config.has_voice:
                            null height gui.pref_spacing

                            imagebutton auto "gui/options menu/mute_%s.png":
                                action Preference("all mute", "toggle")

Post Reply

Who is online

Users browsing this forum: Google [Bot]