Best Way to Scale an SIO2Widget
3 posters
Best Way to Scale an SIO2Widget
I would like to scale an SIO2Widget in/out and keep the center in the same location. Does anyone have any tips on what the best way to do this is?
uprise78- Posts : 228
Join date : 2008-10-31
Re: Best Way to Scale an SIO2Widget
You could simply use:
glPushMatrix();
//scale down
glScalef(0.5, 0.5, 0.5);
sio2WidgetRender(my_widget);
glPopMatrix();
best,
-joshua
glPushMatrix();
//scale down
glScalef(0.5, 0.5, 0.5);
sio2WidgetRender(my_widget);
glPopMatrix();
best,
-joshua
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: Best Way to Scale an SIO2Widget
I gave that a shot first and it ended up changing the position of the widget quite a bit and the touch event for the widget ends up being at the original location. I am thinking I may need to scale and change the position and possibly the widget flags as well...
uprise78- Posts : 228
Join date : 2008-10-31
Re: Best Way to Scale an SIO2Widget
Just create a widget with the SIO2_WIDGET_CENTERED flag ON and then use the pos property to place your object and size to scale it within your rendering loop.
That's all there is to it
Cheers,
That's all there is to it
Cheers,
Re: Best Way to Scale an SIO2Widget
Man, that's almost too easy. Thanks sio2.
uprise78- Posts : 228
Join date : 2008-10-31
Similar topics
» Reposition a static physics object
» collision and scale :(
» How use SIO2widget draw HP Bar?
» SIO2Widget help
» SIO2widget in v1.3??
» collision and scale :(
» How use SIO2widget draw HP Bar?
» SIO2Widget help
» SIO2widget in v1.3??
Permissions in this forum:
You cannot reply to topics in this forum