RotatingSkin problem

icaromotta

25-04-2011 23:00:46

Hi,

When I use RotateSkin, before of the I to use the function setAngle(), the image rotates 90 grades.


MyGUI::IntSize dim = GRender->getMyGUI()->getViewSize();

canvasHud = GRender->getMyGUI()->createWidget<MyGUI::Widget>("PanelEmpty", MyGUI::IntCoord(0, 0, 200, 600), MyGUI::Align::Top | MyGUI::Align::Right, "Main");

back = canvasHud->createWidget<MyGUI::StaticImage>("RotatingSkin", MyGUI::IntCoord(0, 0, 100, 100), MyGUI::Align::Default, "Statistic");
back->setImageTexture("seta.png");

MyGUI::ISubWidget* main = back->getSubWidgetMain();
rotateZ = main->castType<MyGUI::RotatingSkin>();
rotateZ->setCenter(MyGUI::IntPoint(50, 50));
//the image back to normal
rotateZ->setAngle(Ogre::Math::DegreesToRadians(90));

textBack = canvasHud->createWidget<MyGUI::StaticText>("TextBox", 0, 210, 105, 20, MyGUI::Align::Default, "Popup");
textBack->setTextColour(MyGUI::Colour(1,0,0,0));
textBack->setCaption("0 graus");


Anyone can help me? I am having than to rotate the image manually after inicialization. :(

Thanks.

icaromotta

26-04-2011 14:35:59

Moreover, it is also mirroring.

The example of rotateSkin that comes with the library also has the same problem.

icaromotta

27-04-2011 16:16:46

I gave up using the MyGUI for this HUD. I will go of OgreOverlay.

jsding

21-09-2011 10:29:26

I have the same problem. Anyone solved?

Thanks

Altren

21-09-2011 15:11:13

Odd, that we missed that.
I commited fix into svn. You can get new revision from svn or you can fix this manually by replacing lines:
FloatPoint v0 = baseVerticiesUV[1] - baseVerticiesUV[0];
FloatPoint v1 = baseVerticiesUV[3] - baseVerticiesUV[0];
with FloatPoint v0 = baseVerticiesUV[3] - baseVerticiesUV[0];
FloatPoint v1 = baseVerticiesUV[1] - baseVerticiesUV[0];
(3 and 1 switched) in MyGUI_RotatingSkin.cpp.

icaromotta

21-09-2011 20:22:03

Thank you!

jsding

22-09-2011 02:17:21

Thanks, you are awesome!