Scrollbar position in History screen

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
User avatar
arty
Regular
Posts: 104
Joined: Sat Jan 06, 2018 11:55 am
Completed: White Monday
Projects: HATE is a 4 Letter Word
Organization: KATHARSIS ART
itch: artys-games
Contact:

Scrollbar position in History screen

#1 Post by arty » Thu Nov 14, 2019 5:20 pm

Hey folks,

I'm trying to customize the History screen a bit. Really all I'm trying to do is move up the scrollbar a little. Just a few pixels. But I don't even know how to start doing this.

For reference, I didn't change anything about the standard code yet, so it looks like this:

Code: Select all

screen history():

    tag menu

    ## Avoid predicting this screen, as it can be very large.
    predict False

    use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):

        style_prefix "history"

        for h in _history_list:

            window:

                ## This lays things out properly if history_height is None.
                has fixed:
                    yfit True

                if h.who:

                    label h.who:
                        style "history_name"
                        substitute False

                        ## Take the color of the who text from the Character, if
                        ## set.
                        if "color" in h.who_args:
                            text_color h.who_args["color"]

                $ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
                text what:
                    substitute False

        if not _history_list:
            label _("The dialogue history is empty.")
Any help would be appreciated!

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

Re: Scrollbar position in History screen

#2 Post by Imperf3kt » Thu Nov 14, 2019 6:29 pm

The scrollbar in the history screen is actually part of the game_menu screen vbox.
You can edit gui.rpy to adjust the positioning, or you could change the style for just the history screen.

I can't help with doing these at the moment, but I should have some time later today if you require help.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Todo list:
Actually finish a project

User avatar
arty
Regular
Posts: 104
Joined: Sat Jan 06, 2018 11:55 am
Completed: White Monday
Projects: HATE is a 4 Letter Word
Organization: KATHARSIS ART
itch: artys-games
Contact:

Re: Scrollbar position in History screen

#3 Post by arty » Thu Nov 14, 2019 6:38 pm

I would like to only change it for the history screen, if possible. If you can give me any pointers how to do it, I would be grateful. :)

Post Reply

Who is online

Users browsing this forum: No registered users