StaticImage RotatingSkin

Calder

22-03-2010 12:17:15

I've just gotten hopelessly baffled by the whole RotatingSkin for static images. I found the RotatingSkin class in the documentation, but can't find any way of retrieving a pointer to one for a given StaticImage. Skins in general have me kind of confused. Thanks so much for your patience! ;-)

Altren

22-03-2010 12:46:48

MyGUI::StaticImage* image = window->createWidget<MyGUI::StaticImage>("RotatingSkin", MyGUI::IntCoord(150, 150, 100, 150), MyGUI::Align::Default);
image->setImageTexture("wallpaper0.png");

MyGUI::ISubWidget* main = image->getSubWidgetMain();
MyGUI::RotatingSkin* rotatingSubskin = main->castType<MyGUI::RotatingSkin>();

Note that "RotatingSkin" used as skin.

rotatingSubskin->setAngle(3.14);

Also look at UnitTest_RotatingSkin code: http://redmine.mygui.info/repositories/ ... Keeper.cpp

Calder

22-03-2010 15:01:20

Awesome, thanks Altren!