GLBasic forum

Main forum => GLBasic - en => Topic started by: djtoon on 2010-Aug-29

Title: rotating knob
Post by: djtoon on 2010-Aug-29
any one know to start?
i know how to do it in as3 ( im a flash programer) but here its alittle bit tricky
any ideas how to start on a knob ui component
Title: Re: rotating knob
Post by: ketil on 2010-Aug-29
Do you mean adding a rotating knob component to the DDGUI, or just making one self-standing component ?

You provide is with very little information :)

Can you tell a little more about the app and the use of your component ?

It may be as simple as ROTOSPRITE for the rotation ;)
Title: Re: rotating knob
Post by: djtoon on 2010-Aug-29
well its a knob that chages volume
and when you click it and turn it sould rotate

Title: Re: rotating knob
Post by: ketil on 2010-Aug-29
Check out the MOUSESTATE and ROTOSPRITE commands in the documentation.
I quess that might be all you need.
Title: Re: rotating knob
Post by: MrTAToad on 2010-Aug-29
In DDgui would be a bit tricky as the interface to add your own widgets hasn't been exposed yet.

However, what you would need is to design a dial and then rotate a dot or something depending on the direction of mouse movements.

The alternative (and easier way) would be to use a slider.
Title: Re: rotating knob
Post by: backslider on 2010-Aug-30
Hi djtoon,

here is a little code snippet. If you want to understand it, change some values or so.
Have fun ;)

cheers

[attachment deleted by admin]