[Solved]Change static image position

majc

30-07-2011 17:16:32

I'm trying to change a static image position, in this case a cross hair but for some reason it's not working.
Here is the code:

MyGUI::LayoutManager::getInstance().load("crosshair.layout");
crosshairImg = mGUI->findWidget<MyGUI::StaticImage>("Crosshair");
crosshairImg->setSize(width,height);
crosshairImg->setVisible(isVisible);
crosshairImg->setPosition(0,0);



Layout file:
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="StaticImage" skin="StaticImage" position="364 268 72

64" align="Center" layer="Back" name="Crosshair">
<Property key="Widget_Visible" value="true"/>
</Widget>
</MyGUI>


The cross hair remains aligned in the center, but i want to change it's position dynamically.

Thanks in advance.

majc

31-07-2011 16:38:59

Problem solved, I removed align="Center" and it's working fine now.