1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef CL_CASTING_BAR_H
20 #define CL_CASTING_BAR_H
22 #include "nel/misc/types_nl.h"
23 #include "progress_bar.h"
28 * class for casting bar : a progress bar but with auto modification of the position every 'x' 1/10s
29 * \author David Fleury
30 * \author Nevrax France
33 class CCastingBar
: public CProgressBar
37 CCastingBar(uint id
, float x
, float y
, float x_pixel
, float y_pixel
, float w
, float h
, float w_pixel
, float h_pixel
, uint range
)
38 :CProgressBar(id
, x
, y
, x_pixel
, y_pixel
, w
, h
, w_pixel
, h_pixel
, range
)
41 _LastChangePosTime
= ryzomGetLocalTime ();
51 _LastChangePosTime
= ryzomGetLocalTime ();
57 inline void stop() { _Running
= false; }
59 /// display the control
60 virtual void display();
62 /// set the auto hide mode (hide the control when the pos == 0
63 inline void autoHide( bool autoHide
) { _AutoHide
= autoHide
; }
66 /// true : the control is active, false : the control is stopped (no modification of the bar)
69 /// the time of the last modif of pos
70 mutable NLMISC::TTime _LastChangePosTime
;
73 mutable NLMISC::TTime _Time
;
81 #endif // CL_CASTING_BAR_H
83 /* End of casting_bar.h */