MyGUI  3.0.1
MyGUI_ControllerFadeAlpha.h
Go to the documentation of this file.
1 
7 /*
8  This file is part of MyGUI.
9 
10  MyGUI is free software: you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  MyGUI is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
22 */
23 #ifndef __MYGUI_CONTROLLER_FADE_ALPHA_H__
24 #define __MYGUI_CONTROLLER_FADE_ALPHA_H__
25 
26 #include "MyGUI_Prerequest.h"
27 #include "MyGUI_WidgetDefines.h"
28 #include "MyGUI_ControllerItem.h"
29 
30 namespace MyGUI
31 {
32 
35  public ControllerItem
36  {
38 
39  public:
41  virtual ~ControllerFadeAlpha() { }
42 
46  void setAlpha(float _value) { mAlpha = _value; }
47 
51  void setCoef(float _value) { mCoef = _value; }
52 
56  void setEnabled(bool _value) { mEnabled = _value; }
57 
58 
59  virtual void setProperty(const std::string& _key, const std::string& _value);
60 
61  private:
62  bool addTime(Widget* _widget, float _time);
63  void prepareItem(Widget* _widget);
64 
65  bool getEnabled() { return mEnabled; }
66  float getAlpha() { return mAlpha; }
67  float getCoef() { return mCoef; }
68 
69  private:
70  float mAlpha;
71  float mCoef;
72  bool mEnabled;
73 
74  };
75 
76 }
77 
78 #endif // __MYGUI_CONTROLLER_FADE_ALPHA_H__