Page 1 of 1

InOutFader problem [fixed]

Posted: Fri Apr 15, 2011 10:49 am
by kwitee
I want my InOutFader to fade in&out of transparent color,
but when I am using:

Code: Select all

fader->setColor(SColor(100,100,100,100));
it is not working. So I guess InOutFader doesn't work with color's alpha chanel. Is there simple way to do what I want?

Posted: Fri Apr 15, 2011 4:53 pm
by CuteAlien
Should be using alpha (it's the usual way to use it). Did you call fadeIn or fadeOut?

Posted: Mon Apr 18, 2011 9:50 am
by kwitee
I am using both fadeOut() and fadeIn(). InOutFader is private member of my inventory class, and when I show inventory, I want my background to fade into
darker colors.
I am using Irrlicht 1.7.1.

I am using these two methods to show or close inventory (window is
parent of everything else in my inventory):

Code: Select all

void inventory_node::show_inventory(){
	this->window->setVisible(true);
	this->fader->fadeOut(500);
};

void inventory_node::close_inventory(){
	this->window->setVisible(false);
	this->fader->fadeIn(500);
};

Posted: Mon Apr 18, 2011 10:05 am
by CuteAlien
CDemo.cpp does use the fader. So maybe look there.

Posted: Mon Apr 18, 2011 12:59 pm
by kwitee
Thanks, I got it now. I didn't know what is the second color of setColor method for.