I have a 420x200 size tga image so I made a fblogo.imageset like this
Code: Select all
<?xml version="1.0" ?>
<Imageset Name="FreebootersLogo" Imagefile="./cegui/imagesets/fblogo.tga" NativeHorzRes="420" NativeVertRes="200" AutoScaled="true">
<Image Name="FBLogo" XPos="0" YPos="0" Width="420" Height="200" />
</Imageset>
So later I just load it in like this (jut copy & paste from demo code 7)
Code: Select all
// replace frame and backdrop images
StaticImage* ologo = (StaticImage*)WindowManager::getSingleton().createWindow((utf8*)"TaharezLook/StaticImage", (utf8*)"FrameBoo Logo");
panel->addChildWindow(ologo);
ologo->setFrameEnabled(false);
ologo->setBackgroundEnabled(false);
ologo->setImage(&giset->getImage((utf8*)"FBLogo"));
ologo->setPosition(Point(0 ,0));
ologo->setSize(Size(0.3f, 0.3f));
ologo->setAlwaysOnTop(true);
ologo->setAlpha(0.9f);
ologo->setEnabled(false);
ologo->setInheritsAlpha(false);
Amd it shows, but its missing about 50 pixels left of the image, and some ones in the bottom.
Tjhe only way to "fix it" is change in the imageset xml the values in Width="420" Height="200" by Width="511" Height="250" so supposedly Im a bit "out of bounds".
Something Im doing must be wrong no idea Thx for any help