Change Widget's size and position

stalker87

15-09-2008 12:49:59

Hi all !

Is there a method to modify my widget's position or size in real mode ?

I can do this

widget->setSize(100,100);

but i can't do something like this

widget->setSizeReal(0.2,0.1);

Can you help me ?

Altren

15-09-2008 21:48:06

Yep :) MyGUI::IntSize size = MyGUI::Gui::getInstance().getViewSize();
widget->setSize(x * size.width, y * size.height);
where x and y is your real mode position.

stalker87

16-09-2008 13:59:19

Oh yep... thanks for your help.

I think that it may be useful to have a single line method to do this work...

Something like

void setSizeReal(float,float);