FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Widget events

2 posters

Go down

Widget events Empty Widget events

Post  fred Fri Nov 07, 2008 12:26 am

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 ;-)

fred

Posts : 8
Join date : 2008-11-07

Back to top Go down

Widget events Empty Re: Widget events

Post  sio2interactive Fri Nov 07, 2008 2:33 am

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!
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Widget events Empty Re: Widget events

Post  fred Fri Nov 07, 2008 2:44 am

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

fred

Posts : 8
Join date : 2008-11-07

Back to top Go down

Widget events Empty Re: Widget events

Post  sio2interactive Fri Nov 07, 2008 2:50 am

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,
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Widget events Empty Re: Widget events

Post  fred Fri Nov 07, 2008 6:30 am

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

fred

Posts : 8
Join date : 2008-11-07

Back to top Go down

Widget events Empty Re: Widget events

Post  sio2interactive Fri Nov 07, 2008 4:24 pm

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,
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Widget events Empty Re: Widget events

Post  fred Mon Nov 10, 2008 8:08 am

Ok, i will try.
Fred

fred

Posts : 8
Join date : 2008-11-07

Back to top Go down

Widget events Empty Re: Widget events

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum