diff options
Diffstat (limited to 'libraries/irrlicht-1.8.1/include/IGUIInOutFader.h')
-rw-r--r-- | libraries/irrlicht-1.8.1/include/IGUIInOutFader.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/include/IGUIInOutFader.h b/libraries/irrlicht-1.8.1/include/IGUIInOutFader.h new file mode 100644 index 0000000..a89f615 --- /dev/null +++ b/libraries/irrlicht-1.8.1/include/IGUIInOutFader.h | |||
@@ -0,0 +1,67 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | ||
2 | // This file is part of the "Irrlicht Engine". | ||
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | ||
4 | |||
5 | #ifndef __I_GUI_IN_OUT_FADER_H_INCLUDED__ | ||
6 | #define __I_GUI_IN_OUT_FADER_H_INCLUDED__ | ||
7 | |||
8 | #include "IGUIElement.h" | ||
9 | #include "SColor.h" | ||
10 | |||
11 | namespace irr | ||
12 | { | ||
13 | namespace gui | ||
14 | { | ||
15 | |||
16 | //! Element for fading out or in | ||
17 | /** Here is a small example on how the class is used. In this example we fade | ||
18 | in from a total red screen in the beginning. As you can see, the fader is not | ||
19 | only useful for dramatic in and out fading, but also to show that the player | ||
20 | is hit in a first person shooter game for example. | ||
21 | \code | ||
22 | gui::IGUIInOutFader* fader = device->getGUIEnvironment()->addInOutFader(); | ||
23 | fader->setColor(video::SColor(0,255,0,0)); | ||
24 | fader->fadeIn(4000); | ||
25 | \endcode | ||
26 | */ | ||
27 | class IGUIInOutFader : public IGUIElement | ||
28 | { | ||
29 | public: | ||
30 | |||
31 | //! constructor | ||
32 | IGUIInOutFader(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) | ||
33 | : IGUIElement(EGUIET_IN_OUT_FADER, environment, parent, id, rectangle) {} | ||
34 | |||
35 | //! Gets the color to fade out to or to fade in from. | ||
36 | virtual video::SColor getColor() const = 0; | ||
37 | |||
38 | //! Sets the color to fade out to or to fade in from. | ||
39 | /** \param color: Color to where it is faded out od from it is faded in. */ | ||
40 | virtual void setColor(video::SColor color) = 0; | ||
41 | virtual void setColor(video::SColor source, video::SColor dest) = 0; | ||
42 | |||
43 | //! Starts the fade in process. | ||
44 | /** In the beginning the whole rect is drawn by the set color | ||
45 | (black by default) and at the end of the overgiven time the | ||
46 | color has faded out. | ||
47 | \param time: Time specifying how long it should need to fade in, | ||
48 | in milliseconds. */ | ||
49 | virtual void fadeIn(u32 time) = 0; | ||
50 | |||
51 | //! Starts the fade out process. | ||
52 | /** In the beginning everything is visible, and at the end of | ||
53 | the time only the set color (black by the fault) will be drawn. | ||
54 | \param time: Time specifying how long it should need to fade out, | ||
55 | in milliseconds. */ | ||
56 | virtual void fadeOut(u32 time) = 0; | ||
57 | |||
58 | //! Returns if the fade in or out process is done. | ||
59 | virtual bool isReady() const = 0; | ||
60 | }; | ||
61 | |||
62 | |||
63 | } // end namespace gui | ||
64 | } // end namespace irr | ||
65 | |||
66 | #endif | ||
67 | |||