About setAlpha!

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

jasonjzz
Not too shy to talk
Not too shy to talk
Posts: 40
Joined: Mon Dec 22, 2008 06:37

About setAlpha!

Postby jasonjzz » Sat Mar 13, 2010 13:52

the CEGUI Samples Demo7 have one setAlpha's VerticalScrollbar.

when I change for the VerticalScrollbar. all windows all controls all elements alpha value will change.

if I set the FrameWindow alpha value == 0.5f , Framewindow elements of all the controls inside the alpha value will change.

Examples:

FrameWdinow ;
Button (In the controls inside the Framewindow)


Code: Select all

CEGUI::WindowManager &wm = CEGUI::WindowManager::getSingleton();
FrameWindow * mWnd;
mWnd = (FrameWindow *)wm.getWindow("MainWnd");
mWnd->setAlpha(0.5f);

Window * mBtn;
mBtn = wm.getWindow("AlphaTestBtn");
mBtn->setAlpha(1.0f);



The end result is not what I want.
the AlphaTestBtn alpha value always 0.5f. :twisted: :twisted: :twisted:

How can I do to change the FrameWindow the alpha value, without thereby affecting the AlphaTestBtn's alpha value.

thanks .

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

Re: About setAlpha!

Postby CrazyEddie » Sat Mar 13, 2010 16:24

Hi,

Code: Select all

mBtn->setInheritsAlpha(false);
:D

HTH

CE.

jasonjzz
Not too shy to talk
Not too shy to talk
Posts: 40
Joined: Mon Dec 22, 2008 06:37

Re: About setAlpha!

Postby jasonjzz » Sat Mar 13, 2010 16:28

Oh , is ok now!

thanks!!

CE you are COOL MAN! :pint:


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests