InOutFader problem [fixed]

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
kwitee
Posts: 8
Joined: Fri May 07, 2010 9:16 pm

InOutFader problem [fixed]

Post 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?
Last edited by kwitee on Mon Apr 18, 2011 1:00 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Should be using alpha (it's the usual way to use it). Did you call fadeIn or fadeOut?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
kwitee
Posts: 8
Joined: Fri May 07, 2010 9:16 pm

Post 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);
};
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

CDemo.cpp does use the fader. So maybe look there.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
kwitee
Posts: 8
Joined: Fri May 07, 2010 9:16 pm

Post by kwitee »

Thanks, I got it now. I didn't know what is the second color of setColor method for.
Post Reply