static image without background

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

lw89
Just popping in
Just popping in
Posts: 11
Joined: Tue Jul 28, 2009 09:57

static image without background

Postby lw89 » Mon Apr 05, 2010 06:16

hello:

I try to display a static image on the screen, and it's a circle. I use CELayoutEditer to create a static image, and then load a static. The image is display with a black square background. if i just want to a image without the background. how can i do it. i just a beginer, thanks in advance

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: static image without background

Postby Jamarr » Mon Apr 05, 2010 16:51

Are you loading an image that supports alpha-transparency? And if so, are you using that feature? Also, are you setting the background-color of the static-text widget to be 100% transparent?
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

lw89
Just popping in
Just popping in
Posts: 11
Joined: Tue Jul 28, 2009 09:57

Re: static image without background

Postby lw89 » Tue Apr 06, 2010 01:27

i create the image from photoshop and save as png file, i have try setAlpha() funciton, that is worked with static image window and image. My idea is keep the image and let the static image window gone. so just display the image without the window.

how can i set the background-color of the static-text widget to be 100% transparent. this code is about static image form looknfeel. what should i do.

Code: Select all

<PropertyDefinition name="BackgroundColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />


i have try this line code, background is gone. but this is for all the static. but i just want one of the static image without background, can i do this in the code. is any function can do it.

Code: Select all

<Property name="FrameEnabled" value="false" />
Last edited by lw89 on Wed Apr 07, 2010 06:11, edited 6 times in total.

lw89
Just popping in
Just popping in
Posts: 11
Joined: Tue Jul 28, 2009 09:57

Re: static image without background

Postby lw89 » Wed Apr 07, 2010 05:20

here is another question, i just want to change cursor image to a front sight for a fps game. i plan use a red circle for front sight. I have two question about this.
1. how can i just display a red circle.
2. how can i use change the mouse click point to the center of red circle.

thanks in advance

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: static image without background

Postby CrazyEddie » Wed Apr 07, 2010 09:33

For the StaticImage type widgets:

Code: Select all

<Property name="BackgroundEnabled" value="False" />


Mouse cursor images should be set from an Imageset and Image definition. The offset you are able to specify for an image can be used to specify the picking-point / hot-spot of the image. Look at the existing imageset definitions (for TaharezLook, say) to see how we do this already.

CE.


Return to “Help”

Who is online

Users browsing this forum: Google [Bot] and 27 guests