Widget events
2 posters
Widget events
First, congratulations, i need to say that your sdk is awesome ! very good job man.
I am using it intensively and i am trying to deal with widget events.
When i tried to use widget events in 2D landscape mode, it did not work.
Maybe it is my code, but after changing some lines in the resssource.cc it worked.
So if your are interested, i just changed:
if( _SIO2window->landscape2Devents )
{
float tmp = _SIO2widget->bl->y;
_SIO2widget->bl->y = _SIO2window->size->y - _SIO2widget->bl->x;
_SIO2widget->bl->x = tmp;
tmp = _SIO2widget->tr->y;
_SIO2widget->tr->y = _SIO2window->size->y - _SIO2widget->tr->x;
_SIO2widget->tr->x = tmp;
by:
if( _SIO2window->landscape2Devents )
{
_SIO2widget->bl->y = ( _SIO2window->size->y * (1-_SIO2widget->pos->x)) - h_size_x;
_SIO2widget->tr->y = ( _SIO2window->size->y * (1-_SIO2widget->pos->x)) + h_size_x;
_SIO2widget->bl->x = ( _SIO2window->size->x * _SIO2widget->pos->y ) - h_size_y;
_SIO2widget->tr->x = ( _SIO2window->size->x * _SIO2widget->pos->y ) + h_size_y;
Thanks for your sdk, it is so cool ;-)
I am using it intensively and i am trying to deal with widget events.
When i tried to use widget events in 2D landscape mode, it did not work.
Maybe it is my code, but after changing some lines in the resssource.cc it worked.
So if your are interested, i just changed:
if( _SIO2window->landscape2Devents )
{
float tmp = _SIO2widget->bl->y;
_SIO2widget->bl->y = _SIO2window->size->y - _SIO2widget->bl->x;
_SIO2widget->bl->x = tmp;
tmp = _SIO2widget->tr->y;
_SIO2widget->tr->y = _SIO2window->size->y - _SIO2widget->tr->x;
_SIO2widget->tr->x = tmp;
by:
if( _SIO2window->landscape2Devents )
{
_SIO2widget->bl->y = ( _SIO2window->size->y * (1-_SIO2widget->pos->x)) - h_size_x;
_SIO2widget->tr->y = ( _SIO2window->size->y * (1-_SIO2widget->pos->x)) + h_size_x;
_SIO2widget->bl->x = ( _SIO2window->size->x * _SIO2widget->pos->y ) - h_size_y;
_SIO2widget->tr->x = ( _SIO2window->size->x * _SIO2widget->pos->y ) + h_size_y;
Thanks for your sdk, it is so cool ;-)
fred- Posts : 8
Join date : 2008-11-07
Re: Widget events
Hummm tks for the tips, I'll check that out... however just our of curiosity what are the flags that are turned ON for your widget(s)?
Tks!
Tks!
Re: Widget events
oh, yes sorry i forget, SIO2_WIDGET_VISIBLE | SIO2_WIDGET_CENTERED | SIO2_WIDGET_ALIGNH | SIO2_WIDGET_ALIGNV | SIO2_WIDGET_ENABLED
Maybe it is due to my code, i do not kow...
sy
Fred
Maybe it is due to my code, i do not kow...
sy
Fred
fred- Posts : 8
Join date : 2008-11-07
Re: Widget events
intresting... can you, you are using all relative value, can you try your code for absolute values? (without SIO2_WIDGET_ALIGNH | SIO2_WIDGET_ALIGNV, as well for SIO2_WIDGET_CENTERED and not centered)
Keep me posted!
Tks again!
Cheers,
Keep me posted!
Tks again!
Cheers,
Re: Widget events
here the results i have (in landscape mode)
if flags == SIO2_WIDGET_VISIBLE | SIO2_WIDGET_ENABLED, widget appear at the bottom left corner
if flags== SIO2_WIDGET_VISIBLE | SIO2_WIDGET_ENABLED |SIO2_WIDGET_ALIGNH | SIO2_WIDGET_ALIGNV, widgets appear at the correct positions but the plane is no more centered.
if flags ==SIO2_WIDGET_VISIBLE | SIO2_WIDGET_ENABLED | CENTERED, widgets appear on the bottom left corner, and a litlle part is outside the screen...
So, i am not sure it is the perfect solution, but for me it works well with all the flags on.
Sy
Fred
if flags == SIO2_WIDGET_VISIBLE | SIO2_WIDGET_ENABLED, widget appear at the bottom left corner
if flags== SIO2_WIDGET_VISIBLE | SIO2_WIDGET_ENABLED |SIO2_WIDGET_ALIGNH | SIO2_WIDGET_ALIGNV, widgets appear at the correct positions but the plane is no more centered.
if flags ==SIO2_WIDGET_VISIBLE | SIO2_WIDGET_ENABLED | CENTERED, widgets appear on the bottom left corner, and a litlle part is outside the screen...
So, i am not sure it is the perfect solution, but for me it works well with all the flags on.
Sy
Fred
fred- Posts : 8
Join date : 2008-11-07
Re: Widget events
Heuuuu.... that's not what I was asking you... I was asking you to do some test with the widget flags and the events, landscape and not landscape... Just to make sure that your code is working for every scenario... if yes I will integrate it...
Just run some tests with all the flags possibility (shoudn't be too long) and test if your code modification is solid enough to handle it. If yes I will add it...
Tks in advance,
Cheers,
Just run some tests with all the flags possibility (shoudn't be too long) and test if your code modification is solid enough to handle it. If yes I will add it...
Tks in advance,
Cheers,
Similar topics
» Widget _SIO2widgettapdown area
» Widget suggestions
» Render freeze after widget.
» Weird widget issue
» The widget in the 3D scene
» Widget suggestions
» Render freeze after widget.
» Weird widget issue
» The widget in the 3D scene
Permissions in this forum:
You cannot reply to topics in this forum