Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Spoke too soon actually; try replacing the following function with these modifications:

def get_all_children(d, xoffset, yoffset, width, height):
    """Return all the children, grandchildren etc of d."""
    children = [ ]
    offsets = [ ]
    sizes = [ ]
    if not hasattr(d, "children"):
        return children, offsets, sizes
    for i, child in enumerate(d.children):
        ## Render it to get the size
        # cr = child.render(width, height, 0, 0) ## Caused some weirdness with bars
        cr = renpy.render(child, width, height, 0, 0)
        sizes.append((cr.width, cr.height))
        children.append(child)
        offsets.append(d.offsets[i])
        if hasattr(child, "children"):
            ch, of, sz = get_all_children(child, d.offsets[i][0], d.offsets[i][1], cr.width, cr.height)
            children.extend(ch)
            offsets.extend(of)
            sizes.extend(sz)
    new_offsets = [ ]
    for of in offsets:
        new_offsets.append((of[0]+xoffset, of[1]+yoffset))
    return children, new_offsets, sizes

Let me know if that fixes your problem. I still need to do a bit more testing to make sure other aspects of the viewport work as expected, but this did solve the bar problems for me.

Thank you so much! This instantly fixed the issue for me!

It's a bit of weird one. The bars with custom bar value objects never exhibited that issue, but the bars using Preference values like the ones for the audio controls definitely did for me. So the ones provided in the expansion like "Left stick sensitivity" never had this problem cause they use custom classes inherited from BarValue. Making python classes inherited from BarValue was the workaround I have found to work. I tried that for the volume sliders, but it can be a bit funky sometimes and the value can sometimes jump around oddly.
Anyways, thanks again and thank you for the effort you put into this project!