[solved]How to load a image to a StaticImage or button
Posted: Tue Jul 08, 2008 01:54
I have searched and read some topics about loading a image to a staticImage object, especially this one:
http://www.cegui.org.uk/phpBB2/viewtopi ... +jpg+image
I followed this page and implemented my function like this:
CEGUI::ImagesetManager::getSingleton().createImageset("mj.imageset");
guiWnd= WindowManager::getSingleton().getWindow("logo");
guiWnd->setImage("mjset", "ogretext");
"logo" is the name of a StaticImage object, defined as:
<Window Type="TaharezLook/StaticImage" Name="logo">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
<Property Name="UnifiedSize" Value="{{1,0},{1,0}}" />
<Property Name="Alpha" Value="0.8" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="NormalImage" Value="set:mjset image:ogretext" />
</Window>
After compiling, my codeblocks shows this message:
error: 'class CEGUI::Window' has no member named 'setImage'
I looked up the CEGUI reference, and found that setImage is not a member function of StaticImage class, In fact I can not even find a StaticImage class, I don't know how to fix it.
I also want to load a image to a button, if it is possible? and how? thanks
http://www.cegui.org.uk/phpBB2/viewtopi ... +jpg+image
I followed this page and implemented my function like this:
CEGUI::ImagesetManager::getSingleton().createImageset("mj.imageset");
guiWnd= WindowManager::getSingleton().getWindow("logo");
guiWnd->setImage("mjset", "ogretext");
"logo" is the name of a StaticImage object, defined as:
<Window Type="TaharezLook/StaticImage" Name="logo">
<Property Name="FrameEnabled" Value="False" />
<Property Name="BackgroundEnabled" Value="False" />
<Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
<Property Name="UnifiedSize" Value="{{1,0},{1,0}}" />
<Property Name="Alpha" Value="0.8" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="NormalImage" Value="set:mjset image:ogretext" />
</Window>
After compiling, my codeblocks shows this message:
error: 'class CEGUI::Window' has no member named 'setImage'
I looked up the CEGUI reference, and found that setImage is not a member function of StaticImage class, In fact I can not even find a StaticImage class, I don't know how to fix it.
I also want to load a image to a button, if it is possible? and how? thanks