Hello,
In 0.41 version, i used method as setNormalImage or setHoverImage to set in the code a new image to draw on a pushbutton.
But these methods disappears in the 0.5 version.
Have i to create a new LookAndFeel object for my push button?
Please help me, I am lost on the new implementation.
Thanks in advance
CEGUI 0.5: How to set an image in a PushButton
Moderators: CEGUI MVP, CEGUI Team
-
- Just popping in
- Posts: 18
- Joined: Tue Apr 18, 2006 08:19
Ok, I found how to create an ImageButton, so for those who are looking on how to do it, here is a little sample:
Hope this will help someone
Code: Select all
<Window Type="TaharezLook/ImageButton" Name="btnGeneral">
<Property Name="UnifiedPosition" Value="{{0,50},{0,50}}" />
<Property Name="UnifiedSize" Value="{{0,77},{0,76}}" />
<Property Name="NormalImage" Value="set:myImageSet image:myButtonNormalImage" />
<Property Name="HoverImage" Value="set:myImageSet image:myButtonHoverImage" />
<Property Name="PushedImage" Value="set:myImageSet image:myButtonPushedImage" />
<Property Name="DisabledImage" Value="set:myImageSet image:myButtonDisabledImage" />
</Window>
Hope this will help someone
-
- Just popping in
- Posts: 18
- Joined: Tue Apr 18, 2006 08:19
Thank you for your answer Pompei2!
I looked for the method and property in the source code and not in the looknfeel file! Stupid i am!
The "PropertyDefinition" are now set in looknfeel file.
So, i set ImageButton looknfeel in WindowsLook Looknfeel and it is ok!
Futhermode, in the source code, we can set the image with:
myImageButton->setProperty("myImageSetName","myImage");
I looked for the method and property in the source code and not in the looknfeel file! Stupid i am!
The "PropertyDefinition" are now set in looknfeel file.
So, i set ImageButton looknfeel in WindowsLook Looknfeel and it is ok!
Futhermode, in the source code, we can set the image with:
myImageButton->setProperty("myImageSetName","myImage");
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 2 guests