Planeshift
pawsinfowindow.h
Go to the documentation of this file.
1 /*
2  * pawsinfowindow.h - Author: Andrew Craig
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 // pawsinfowindow.h: interface for the pawsInfoWindow class.
20 //
22 
23 #ifndef PAWS_INFO_WINDOW_HEADER
24 #define PAWS_INFO_WINDOW_HEADER
25 
26 #include "paws/pawswidget.h"
27 #include "net/cmdbase.h"
28 #include "gui/pawscontrolwindow.h"
29 #include "net/message.h"
30 #include "gui/pawsslot.h"
31 
32 class pawsTextBox;
33 class pawsProgressBar;
34 class pawsScrollBar;
35 class pawsButton;
36 class GEMClientObject;
37 class GEMClientActor;
38 
43 {
44 public:
45  virtual ~pawsInfoWindow();
46 
47  virtual void Show();
48  virtual void Draw();
49  bool PostSetup();
50 
51  virtual void HandleMessage(MsgEntry *msg);
52 
53  virtual bool OnScroll( int direction, pawsScrollBar* widget );
54  virtual bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* reporter );
55 
56  void SetStanceHighlight(uint stance);
57  void UpdateAttkQueue(MsgEntry* me);
58 
59  bool LoadUserSharedPrefs();
60 
61  void SetHPWarnLevel( float val );
62  float GetHPWarnLevel();
63 
64  void SetHPDangerLevel( float val );
65  float GetHPDangerLevel();
66 
67  void SetHPFlashLevel( float val );
68  float GetHPFlashLevel();
69 
70  void SetManaWarnLevel( float val );
71  float GetManaWarnLevel();
72 
73  void SetManaDangerLevel( float val );
74  float GetManaDangerLevel();
75 
76  void SetManaFlashLevel( float val );
77  float GetManaFlashLevel();
78 
79 private:
80  pawsTextBox *targetName;
81  pawsProgressBar *main_hp;
82  pawsProgressBar *main_mana;
83  pawsProgressBar *main_stamina[2];
84  pawsProgressBar *target_hp;
85  pawsScrollBar *kFactor;
86  pawsTextBox *kFactorPct;
87  pawsButton *stanceButton0;
88  pawsButton *stanceButton1;
89  pawsButton *stanceButton2;
90  pawsButton *stanceButton3;
91  pawsButton *stanceButton4;
92  pawsButton *stanceButton5;
93 
94  pawsSlot* attackImage[5];
95 
96  pawsTextBox* timeOfDay;
97  csString stanceConvert(const uint ID);
98 
99  uint selectedstance;
100 
101  enum baseStances {
102  BLOODY = 1,
103  AGGRESSIVE,
104  NORMAL,
105  DEFENSIVE,
106  FULLYDEFENSIVE };
107 };
108 
110 
111 
112 #endif
113 
This is a window that is controlled by a button on the control bar.
void UpdateAttkQueue(MsgEntry *me)
This is a player or another 'alive' entity on the client.
Definition: pscelclient.h:554
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
virtual void Show()
When the window is opened let the controller window know about it.
void SetManaFlashLevel(float val)
A slot which may contain one item, with icon, and stack count.
Definition: pawsslot.h:22
The structure of 1 queue entry (pointer to a message)
Definition: message.h:143
virtual ~pawsInfoWindow()
virtual void HandleMessage(MsgEntry *msg)
void SetStanceHighlight(uint stance)
void SetHPFlashLevel(float val)
virtual void Draw()
Draws the widget and all of it's children.
void SetHPDangerLevel(float val)
virtual bool OnScroll(int direction, pawsScrollBar *widget)
Called whenever a window is scrolled.
A simple scroll bar widget.
Definition: pawscrollbar.h:64
bool LoadUserSharedPrefs()
float GetManaWarnLevel()
float GetHPFlashLevel()
void SetHPWarnLevel(float val)
An object that the client knows about.
Definition: pscelclient.h:373
A simple button widget.
Definition: pawsbutton.h:43
void SetManaDangerLevel(float val)
float GetManaFlashLevel()
float GetManaDangerLevel()
float GetHPWarnLevel()
A window to show the player's vitals, the target's name and health, and the time. ...
bool PostSetup()
This is called after the widget and all of it's children have been created.
void SetManaWarnLevel(float val)
virtual bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *reporter)
Called whenever a button is pressed.
CREATE_PAWS_FACTORY(pawsInfoWindow)
A basic text box widget.
Definition: pawstextbox.h:42
float GetHPDangerLevel()