Custom slider

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

HorizonDefeated
Just popping in
Just popping in
Posts: 19
Joined: Tue Feb 16, 2010 00:17

Custom slider

Postby HorizonDefeated » Mon Nov 08, 2010 21:29

Hello,

I'm looking for a slider type control similar to the zoom slider that Google Earth uses (on the right side under the compass deal). Forgive me if I've missed anything obvious/built in, but can anyone point me to any existing control that works similar to this?

Thanks!
Horizon

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Custom slider

Postby Jamarr » Tue Nov 09, 2010 00:30

Why don't you just use the standard slider in the TaharezLook / WindowsLook looknfeel definitions?
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

HorizonDefeated
Just popping in
Just popping in
Posts: 19
Joined: Tue Feb 16, 2010 00:17

Re: Custom slider

Postby HorizonDefeated » Tue Nov 09, 2010 00:54

Sorry, I should have provided more detail in my first post.

I'm after the behavior of the control in Google Earth (don't care about the look so much). Basically the slider looking control causes the thumb to always be centered in the middle (if you aren't holding it with the mouse). Moving it down decrements the controlled value. Moving it up increases the controlled value. Moving it more up/down increases/decreases it faster, etc. The control is a little bit like a scrub control on some AV decks.

Thanks
HorizonDefeated

ShadowTiger
Quite a regular
Quite a regular
Posts: 46
Joined: Fri Mar 19, 2010 05:31

Re: Custom slider

Postby ShadowTiger » Tue Nov 09, 2010 03:13

An easy way to do this would be to subscribe to the scroll position change event and then reset the scroll position to the center and calculate whatever changes you wanted based on how much the position changed.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 28 guests