[SOLVED] Scrollbar thumb has a white border

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
User avatar
Posts: 4
Joined: Sun Oct 04, 2020 2:21 am
Projects: A Place Beyond the Horizon

[SOLVED] Scrollbar thumb has a white border

#1 Post by tasteslikeciel » Sun Oct 04, 2020 2:53 am

Hello there! Newbie here! I haven't been using Ren'Py for very long, but I've been scouring the forum topics and managed to teach myself how to code the majority of the GUI pages I need for my first game. However, I'm at a complete loss on how to handle the History page. I've gotten everything positioned perfectly and it functionally works just fine. But the issue I'm having is, well, two things, really. One is more important than the other.

The first and main issue is the thumb to my scrollbar will not display correctly no matter what code I input, take out, or change and I can't figure out what it is that I'm missing.

For reference, this is what it looks like in-game:

And this is what it's supposed to look like:

My current Ren'Py version is and here's what I currently have for code in screens.rpy

Code: Select all

screen history():

    tag menu

        ground "gui/log_ground.png"
        hover "gui/log_hover.png"
        cache False

        hotspot (1513,940,169,59) action Return()

    predict False


        style_prefix "history"

        cols 1
        yinitial 1.0

        draggable True
        mousewheel True

        scrollbars "vertical"

        yalign 0.7
        xalign 0.42
        ymaximum 645

        xmaximum 1550

        for h in _history_list:


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

                if h.who:

                    label h.who:
                        style "history_name"

                        ## 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 = h.what #renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
                text what

                if not _history_list:
                    label _("The dialogue history is empty.")

style history_window is empty

style history_name is gui_label
style history_name_text is gui_label_text
style history_text is gui_text

style history_text is gui_text

style history_label is gui_label
style history_label_text is gui_label_text

style history_window:
    xfill True
    ysize gui.history_height

style history_name:
    xpos gui.history_name_xpos
    xanchor gui.history_name_xalign
    ypos gui.history_name_ypos
    xsize gui.history_name_width

style history_name_text:
    min_width gui.history_name_width
    text_align gui.history_name_xalign

style history_text:
    xpos gui.history_text_xpos
    ypos gui.history_text_ypos
    xanchor gui.history_text_xalign
    xsize gui.history_text_width
    min_width gui.history_text_width
    text_align gui.history_text_xalign
    layout ("subtitle" if gui.history_text_xalign else "tex")

style history_label:
    xfill True

style history_label_text:
    xalign 0.5
The only other changes I've made are in gui.rpy and that was only to reposition text and the the scrollbar itself (plus resize it to be the correct size). The thumb was still doing this even before I made all those changes.

The second thing isn't so much an issue as I'm not sure if it's possible or not. Basically, I want to set up an image between each message in the History page to divide each. Is that possible and if so, how would I go about implementing that?

Thank you in advance to anyone who might be able to help!
Last edited by tasteslikeciel on Tue Oct 06, 2020 5:19 pm, edited 1 time in total.

User avatar
Posts: 4
Joined: Sun Oct 04, 2020 2:21 am
Projects: A Place Beyond the Horizon

Re: Scrollbar thumb on History page not displaying properly

#2 Post by tasteslikeciel » Mon Oct 05, 2020 2:42 am


For anyone who might ever have the same issue I did, I was able to fix it with some help and I will mark this topic as solved (and also change the title a bit to be more concise).

To fix ALL the issues I had with the thumb, I merely had to remove the Frame to make the image show as the proper size, add an offset to bring back the transparency, and change gutters to keep the image within the bar. The code looks like this now:

Code: Select all

style vscrollbar:
    xsize gui.scrollbar_size
    base_bar Frame("gui/vertical_bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
    thumb "gui/thumb.png"
    thumb_offset 36
    top_gutter 39
    bottom_gutter 39

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], hyouseo5356, Imperf3kt