make invisible a part of parent widget

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

metylbk
Just popping in
Just popping in
Posts: 11
Joined: Fri Jul 08, 2011 18:59

make invisible a part of parent widget

Postby metylbk » Wed Jul 20, 2011 02:34

Hi!
I have a frame window with green background. I add a staticImage to the framewindow. The StaticImage is quite transparent, but it overlaps on a part of framewindow, so that it becomes not transparent as my will. How can make a part of windowframe where the staticimage overlaps invisible (or transparent)?
Thanks!
What I want:
Image http://up.anhso.net
The fact:
Image http://up.anhso.net
(Don't care about character, I just didn't add character in picture 2)

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: make invisible a part of parent widget

Postby Ident » Wed Jul 20, 2011 10:47

What?
CrazyEddie: "I don't like GUIs"

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: make invisible a part of parent widget

Postby Kulik » Wed Jul 20, 2011 11:09

Even with InheritAlpha = false the frame would have to have a transparent spot at the right place for this to work.

User avatar
Mikademus
CEGUI MVP
CEGUI MVP
Posts: 130
Joined: Wed Mar 18, 2009 19:14

Re: make invisible a part of parent widget

Postby Mikademus » Wed Jul 20, 2011 18:32

Ident wrote:What?

The OP is asking about how to make an area of the window translucent. The first picture is how he wants it to look with the background slightly visible behind the character. The second picture is what he has at the moment with an opaque frame instead.

metylbk
Just popping in
Just popping in
Posts: 11
Joined: Fri Jul 08, 2011 18:59

Re: make invisible a part of parent widget

Postby metylbk » Thu Jul 21, 2011 09:45

Do I have to draw a framewindow exactly what I want? (there is a transparent area at the top right of frame). Can't I achieve what I want by coding?

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: make invisible a part of parent widget

Postby Kulik » Fri Jul 22, 2011 19:57

To be honest I am not sure, I don't think so though. I think the most compatible solution (with most GPUs) is to have the frame window's background transparent at the place you want and put image on top of it. Perhaps you could do this with RTTs and overwriting pixels but off the top of my head I have no idea :-)

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

Re: make invisible a part of parent widget

Postby Jamarr » Mon Jul 25, 2011 18:44

I think you would have to make the entire frame-window transparent and then add opaque child-widgets (panels) where you do not want the transparency. You will probably also have to tweak the frame-window definition in the looknfeel (probably want to derive a new frame-window type for this) and make sure the titlebar and frame components of the window are opaque; this way only the client area is transparent.

The other option is to use RTT and render the background + model onto the texture to give the illusion of a transparent sub-window.

p.s. I think Kulik was suggesting similar ideas, but it was kind of vague so I was not completely sure ;)
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!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 9 guests