Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Tue May 21, 2013 10:26 pm

All times are UTC - 5 hours [ DST ]


Forum rules


Ren'Py support questions should go here. This forum is for discussing changes to Ren'Py itself.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Slider Rounding Errors?
PostPosted: Mon Jun 04, 2012 5:47 am 
Newbie
User avatar

Joined: Mon Jun 04, 2012 5:16 am
Posts: 2
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.

Attachment:
File comment: Screenshot of the sliders.
Compare.png
Compare.png [ 16.64 KiB | Viewed 429 times ]

Attachment:
File comment: Detail of the sliders with measurements.
Compare_detail.png
Compare_detail.png [ 9.05 KiB | Viewed 429 times ]


Top
 Profile Send private message  
 
PostPosted: Mon Jun 04, 2012 10:08 am 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10774
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
I will look into this.

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
PostPosted: Mon Jun 04, 2012 10:01 pm 
Newbie
User avatar

Joined: Mon Jun 04, 2012 5:16 am
Posts: 2
Oh, and this is in Ren'Py 6.13.12.1728 (the latest?) in case that matters.

Thanks for looking into it! :D


Top
 Profile Send private message  
 
PostPosted: Mon Jun 11, 2012 10:07 pm 
Veteran
User avatar

Joined: Mon Aug 09, 2010 10:02 pm
Posts: 237
Location: California, USA
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
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.

_________________
Dai-Sukima Dan blog


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group