| Irrlicht 3D Engine |

Public Member Functions
irr::gui::IGUIInOutFader Class Reference

Element for fading out or in. More...

`#include <IGUIInOutFader.h>`

Inheritance diagram for irr::gui::IGUIInOutFader:

List of all members.

## Public Member Functions

- IGUIInOutFader (IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
    constructor
- virtual void fadeIn (u32 time)=0
    Starts the fade in process.
- virtual void fadeOut (u32 time)=0
    Starts the fade out process.
- virtual video::SColor getColor () const =0
    Gets the color to fade out to or to fade in from.
- virtual bool isReady () const =0
    Returns if the fade in or out process is done.
- virtual void setColor (video::SColor color)=0
    Sets the color to fade out to or to fade in from.
- virtual void setColor (video::SColor source, video::SColor dest)=0

## Detailed Description

Element for fading out or in.

Here is a small example on how the class is used. In this example we fade in from a total red screen in the beginning. As you can see, the fader is not only useful for dramatic in and out fading, but also to show that the player is hit in a first person shooter game for example.

        gui::IGUIInOutFader* fader = device->getGUIEnvironment()->addInOutFader();
        fader->setColor(video::SColor(0,255,0,0));
        fader->fadeIn(4000);

Definition at line 27 of file IGUIInOutFader.h.

## Constructor & Destructor Documentation

irr::gui::IGUIInOutFader::IGUIInOutFader | ( | IGUIEnvironment * | environment,
|  | IGUIElement * | parent,
|  | s32 | id,
|  | core::rect< s32 > | rectangle
| ) |  | `[inline]`

constructor

Definition at line 32 of file IGUIInOutFader.h.

## Member Function Documentation

virtual void irr::gui::IGUIInOutFader::fadeIn | ( | u32 | time | ) | `[pure virtual]`

Starts the fade in process.

In the beginning the whole rect is drawn by the set color (black by default) and at the end of the overgiven time the color has faded out.

Parameters:

  time,: | Time specifying how long it should need to fade in, in milliseconds.

virtual void irr::gui::IGUIInOutFader::fadeOut | ( | u32 | time | ) | `[pure virtual]`

Starts the fade out process.

In the beginning everything is visible, and at the end of the time only the set color (black by the fault) will be drawn.

Parameters:

  time,: | Time specifying how long it should need to fade out, in milliseconds.

virtual video::SColor irr::gui::IGUIInOutFader::getColor | ( |  | ) | const`[pure virtual]`

Gets the color to fade out to or to fade in from.

virtual bool irr::gui::IGUIInOutFader::isReady | ( |  | ) | const`[pure virtual]`

Returns if the fade in or out process is done.

virtual void irr::gui::IGUIInOutFader::setColor | ( | video::SColor | color | ) | `[pure virtual]`

Sets the color to fade out to or to fade in from.

Parameters:

  color,: | Color to where it is faded out od from it is faded in.

virtual void irr::gui::IGUIInOutFader::setColor | ( | video::SColor | source,
|  | video::SColor | dest
| ) |  | `[pure virtual]`

The documentation for this class was generated from the following file:

- IGUIInOutFader.h