Planeshift
pawsspellcancelwindow.h
Go to the documentation of this file.
1 /*
2  * pawsspellcancelwindow.h
3  *
4  * Copyright (C) 2003 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef PAWS_SPELLCANCEL_WINDOW_HEADER
21 #define PAWS_SPELLCANCEL_WINDOW_HEADER
22 
23 #include "paws/pawswidget.h"
24 class pawsProgressBar;
25 
26 #include "net/subscriber.h"
27 
32 {
33 public:
35  virtual ~pawsSpellCancelWindow();
36 
37  virtual bool PostSetup();
38  virtual void Draw();
39 
40  void Start(csTicks castingTime);
41 
42  virtual bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
43 private:
44 
45  void Cancel();
46 
47  pawsProgressBar* spellProgress;
48  csTicks startTime,castingTime;
49 };
50 
52 
53 
54 #endif
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
A progress bar displayed when casting a spell, with a button to cancel the spell. ...
CREATE_PAWS_FACTORY(pawsSpellCancelWindow)
void Start(csTicks castingTime)
virtual void Draw()
Draws the widget and all of it's children.
virtual ~pawsSpellCancelWindow()
virtual bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
virtual bool PostSetup()
This is called after the widget and all of it's children have been created.