|
|
Home » Developing U++ » UppHub » DialSlider (curved slider ctrl)
DialSlider (curved slider ctrl) [message #15530] |
Mon, 28 April 2008 16:58  |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
I really only made this as an experiment to see how easy it was, so I thought I may as well post the results. It wasn't as easy as I'd hoped, the difficulty is mainly in creating the images and layering them correctly with an alpha mask.
It works quite well though (the frames are a bit too thick here, but look better when it's slightly smaller):

Works like a normal SliderCtrl (but with some features missing). Clicking once sets the bar to the correct position by working out the necessary angle.
(source and example in next post)
James
[Updated on: Mon, 28 April 2008 17:09] Report message to a moderator
|
|
|
|
|
|
|
Re: DialSlider (curved slider ctrl) [message #15564 is a reply to message #15550] |
Tue, 29 April 2008 11:05   |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
Mindtraveller wrote on Mon, 28 April 2008 23:38 | I think arrow should be more straight ("official looking"). Also it would be handy to see minimum/maximum values along with current value. Display of these values should be optional.
|
I'm not 100% sure what you mean about the arrow, something like this?

(IMO a bit ugly, perhaps it's too long now)
I've added min/max labels and improved the mouse handling when dragging. Zip in next post.
Ps. I should warn you that at the moment the control does 2 rotations on 192x192 images everytime the position is changed (these are cached for Paint, so that is fast). I can optimize it at some point but it makes the code much more complex/difficult so I haven't bothered yet.
[Updated on: Tue, 29 April 2008 12:44] Report message to a moderator
|
|
|
|
Re: DialSlider (curved slider ctrl) [message #15567 is a reply to message #15565] |
Tue, 29 April 2008 12:31   |
bytefield
Messages: 210 Registered: December 2007
|
Experienced Member |
|
|
Still not work under Linux. To see the problems, I've attached a video with it in which you will see it working improper until slider(green) is full loaded, moment in which it work better, but showing green image under the control.
Good luck.
Andrei
cdabbd745f1234c2751ee1f932d1dd75
|
|
|
|
Re: DialSlider (curved slider ctrl) [message #15584 is a reply to message #15569] |
Tue, 29 April 2008 18:46   |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
I've fixed the Linux problem. In case you're interested the cause was this.
I've also optimized it to greatly reduce the number of pixels that need rotating and (I think) improved the marker/arrow.
This is absolutely the final version though, I wasn't intending to spend this much time fiddling with it
[Updated on: Tue, 29 April 2008 18:47] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 14:17:53 CEST 2025
Total time taken to generate the page: 0.02309 seconds
|
|
|