I've been trying out different sliders and noticed that when moving the thumb around the width of the left and right get miscalculated. The bar can grow and shrink or the thumb can overlap the sides incorrectly as well. It even sometimes depends on the positioning of the sliders themselves in the window!
I don't know if this can be fixed, but it's something to look out for. You can even see this bug happen in the tutorial level's preferences page. I've compiled a screenshot that shows the two bugs I'm talking about.
The first is just the bars without extra explanation, the second image is stripped down to just the slider bars and has white lines I've added in to showcase measuring discrepancies. Bar #1 is measured correctly at the native width of 192 pixels while bar #2 has the thumb moved slightly and it throws off the measurements yielding a width of 191 pixels. Bar #3 has the thumb in the right place with the left and right bars cut off at the correct widths but bar #4 has the thumb nudged 1 pixel to the left where the left and right bars are incorrectly still registering the same widths as bar #3.
I hope that makes sense, and if not I hope the images convey the problem. My speculation is a rounding error but I can't be sure what it is.
Slider Rounding Errors?
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Slider Rounding Errors?
I will look into this.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Slider Rounding Errors?
Oh, and this is in Ren'Py 6.13.12.1728 (the latest?) in case that matters.
Thanks for looking into it!
Thanks for looking into it!
- SleepKirby
- Veteran
- Posts: 255
- Joined: Mon Aug 09, 2010 10:02 pm
- Projects: Eastern Starlight Romance, Touhou Mecha
- Organization: Dai-Sukima Dan
- Location: California, USA
- Contact:
Re: Slider Rounding Errors?
I've also observed this bar issue in both of the games I'm working on. In one case, I just made the slider "slot" (the dark blue line, in the Tutorial's case) part of another element instead of part of the bar itself. So I guess that would be the workaround until there is a fix.
Who is online
Users browsing this forum: No registered users