how to use TaharezLook/StaticImage

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

syngen101
Just popping in
Just popping in
Posts: 19
Joined: Thu Sep 25, 2008 08:30
Location: Australia

how to use TaharezLook/StaticImage

Postby syngen101 » Thu Oct 02, 2008 02:47

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.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Thu Oct 02, 2008 07:20

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.

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!

syngen101
Just popping in
Just popping in
Posts: 19
Joined: Thu Sep 25, 2008 08:30
Location: Australia

Postby syngen101 » Sun Oct 05, 2008 23:09

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

traibuidoi
Just popping in
Just popping in
Posts: 13
Joined: Tue Aug 05, 2008 08:31

Postby traibuidoi » Mon Oct 06, 2008 02:55


syngen101
Just popping in
Just popping in
Posts: 19
Joined: Thu Sep 25, 2008 08:30
Location: Australia

Postby syngen101 » Mon Oct 06, 2008 04:38

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

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Mon Oct 06, 2008 07:00

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.
Check out my released snake game using Cegui!

syngen101
Just popping in
Just popping in
Posts: 19
Joined: Thu Sep 25, 2008 08:30
Location: Australia

Postby syngen101 » Sun Oct 12, 2008 07:40

thanks


Return to “Help”

Who is online

Users browsing this forum: No registered users and 4 guests