Page 1 of 1

About setAlpha!

Posted: Sat Mar 13, 2010 13:52
by jasonjzz
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 .

Re: About setAlpha!

Posted: Sat Mar 13, 2010 16:24
by CrazyEddie
Hi,

Code: Select all

mBtn->setInheritsAlpha(false);
:D

HTH

CE.

Re: About setAlpha!

Posted: Sat Mar 13, 2010 16:28
by jasonjzz
Oh , is ok now!

thanks!!

CE you are COOL MAN! :pint: