Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » DialSlider (curved slider ctrl)
DialSlider (curved slider ctrl) [message #15530] Mon, 28 April 2008 16:58 Go to next message
mrjt is currently offline  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):
index.php?t=getfile&id=1168&private=0
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 #15531 is a reply to message #15530] Mon, 28 April 2008 17:01 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Moved to later post.

[Updated on: Tue, 29 April 2008 11:07]

Report message to a moderator

Re: DialSlider (curved slider ctrl) [message #15532 is a reply to message #15531] Mon, 28 April 2008 17:44 Go to previous messageGo to next message
bytefield is currently offline  bytefield
Messages: 210
Registered: December 2007
Experienced Member
Hi, I've tested it on Linux and have trouble. It isn't displayed correct. Also don't forget to end DialSlider.cpp with new line, Gcc give warnings Razz .
However, it is a nice widget and an good example.
index.php?t=getfile&id=1170&private=0

Andrei


cdabbd745f1234c2751ee1f932d1dd75
Re: DialSlider (curved slider ctrl) [message #15533 is a reply to message #15532] Mon, 28 April 2008 18:02 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Thanks, I was too lazy to reboot in to Linux to test it. My suspicion is that the display problem is something internal to Draw/ImageDraw (I know there have been some fixes recently), but I'll test it tomorrow and see if I can fix it.

[Updated on: Mon, 28 April 2008 18:04]

Report message to a moderator

Re: DialSlider (curved slider ctrl) [message #15550 is a reply to message #15533] Tue, 29 April 2008 00:38 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Thanx for new useful control.
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. It`s a kind`of de-facto standard.
Re: DialSlider (curved slider ctrl) [message #15564 is a reply to message #15550] Tue, 29 April 2008 11:05 Go to previous messageGo to next message
mrjt is currently offline  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?
index.php?t=getfile&id=1174&private=0
(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 #15565 is a reply to message #15564] Tue, 29 April 2008 11:08 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
See later post for source.

[Updated on: Tue, 29 April 2008 18:47]

Report message to a moderator

Re: DialSlider (curved slider ctrl) [message #15567 is a reply to message #15565] Tue, 29 April 2008 12:31 Go to previous messageGo to next message
bytefield is currently offline  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 #15569 is a reply to message #15567] Tue, 29 April 2008 12:42 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Sorry. I meant to say that I haven't tried it on Linux yet.
Re: DialSlider (curved slider ctrl) [message #15584 is a reply to message #15569] Tue, 29 April 2008 18:46 Go to previous messageGo to next message
mrjt is currently offline  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 Rolling Eyes

[Updated on: Tue, 29 April 2008 18:47]

Report message to a moderator

Re: DialSlider (curved slider ctrl) [message #15948 is a reply to message #15584] Mon, 19 May 2008 16:38 Go to previous message
cdoty is currently offline  cdoty
Messages: 23
Registered: April 2008
Location: Houston, TX
Promising Member

Nice job. That's an impressive looking control.

a3e77f341aa1d91d0388a0c8b786e8b5
Previous Topic: SystemLog class added
Next Topic: SystemLog class updated
Goto Forum:
  


Current Time: Fri Apr 19 16:37:22 CEST 2024

Total time taken to generate the page: 0.06334 seconds