Hi,
I am using the TaharezLook/Button to create buttons but I wanted to have an image on the button. I thought of using TaharezLook/StaticImage and add it to the button. I was just wondering how to reference the image needed for the button.
how to use TaharezLook/StaticImage
Moderators: CEGUI MVP, CEGUI Team
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Hi,
adding an image onto a button is a little overkill, instead use the TaharezLook/ImageButton directly, which has the following four properties to set:
NormalImage, HoverImage, PushedImage, DisabledImage.
What do you mean? How to set images? An image is a combination of a set and an image inside it. For example:
HTH.
adding an image onto a button is a little overkill, instead use the TaharezLook/ImageButton directly, which has the following four properties to set:
NormalImage, HoverImage, PushedImage, DisabledImage.
I was just wondering how to reference the image needed for the button.
What do you mean? How to set images? An image is a combination of a set and an image inside it. For example:
Code: Select all
icon->setProperty("NormalImage", "set:TaharezLook image:MouseArrow");
HTH.
Check out my released snake game using Cegui!
Hi,
I was wondering how I create an ImageButton directly, I have been looking at the TarahezLook files (LookNFeel, Imageset), and the gui default sheet .layout file and I was wondering which I have to add to and how to add to them, to create an ImageButton.
Sorry I have never coded in XML before. Any help would be appreciated, also is there a link to an example of how to implement these buttons as im sure this has been done before.
Thank you in advance
I was wondering how I create an ImageButton directly, I have been looking at the TarahezLook files (LookNFeel, Imageset), and the gui default sheet .layout file and I was wondering which I have to add to and how to add to them, to create an ImageButton.
Sorry I have never coded in XML before. Any help would be appreciated, also is there a link to an example of how to implement these buttons as im sure this has been done before.
Thank you in advance
-
- Just popping in
- Posts: 13
- Joined: Tue Aug 05, 2008 08:31
i think you're looking this : http://www.cegui.org.uk/wiki/index.php/ ... ageButtons
Thanks for that I dont believe I didnt find that page on the website from my searches ><.
I was also wondering what programs can be used to make the image file (whether it be .png or .tga), I am currently trying to use Gimp but am finding it hard to add more then one item to a file with a 'empty' (not white) background.
Cheers for the help
I was also wondering what programs can be used to make the image file (whether it be .png or .tga), I am currently trying to use Gimp but am finding it hard to add more then one item to a file with a 'empty' (not white) background.
Cheers for the help
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Hi,
when you create a new image in Gimp, with Advanced Options choose Transparent background.
Also, make sure that you leave a few pixels of space between your sub-images, to avoid 'bleeding' on some combinations of videocard/driver and such.
HTH.
when you create a new image in Gimp, with Advanced Options choose Transparent background.
Also, make sure that you leave a few pixels of space between your sub-images, to avoid 'bleeding' on some combinations of videocard/driver and such.
HTH.
Check out my released snake game using Cegui!
Who is online
Users browsing this forum: No registered users and 16 guests