Planeshift
pawsconfigHPandMana.h
Go to the documentation of this file.
1 /*
2  * pawsconfighpandmana.h - Author: Joe Lyon
3  *
4  * Copyright (C) 2014 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_CONFIG_HPANDMANA_HEADER
21 #define PAWS_CONFIG_HPANDMANA_HEADER
22 
23 
24 // PAWS INCLUDES
25 #include "paws/pawswidget.h"
26 #include "paws/pawscombo.h"
27 #include "pawsconfigwindow.h"
28 #include "util/psxmlparser.h"
29 #include "shortcutwindow.h"
30 #include "pawsinfowindow.h"
31 #include "pawsskillwindow.h"
32 
33 
34 class pawsCheckBox;
36 
37 
38 /*
39  * class pawsConfigHPandMana is options screen for configuration of HPandMana Bar
40  */
42 {
43 public:
45 
46  //from pawsWidget:
47  virtual bool PostSetup();
48  virtual bool OnScroll(int, pawsScrollBar*);
49 
50  // from pawsConfigSectionWindow:
51  virtual bool Initialize();
52  virtual bool LoadConfig();
53  virtual bool SaveConfig();
54  virtual void SetDefault();
55 
56  void PickText( const char * fontName, int size );
57 
58  void UpdateHPWarnLevel( );
59  void UpdateHPDangerLevel( );
60  void UpdateHPFlashLevel( );
61  void UpdateManaWarnLevel( );
62  void UpdateManaDangerLevel( );
63  void UpdateManaFlashLevel( );
64 
65  bool LoadUserSharedPrefs();
66 
67 protected:
68 
73 
76 
79 
82 
85 
88 
91 
92 
93  bool loaded;
94 
95 };
96 
97 
99 
100 
101 #endif
102 
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
pawsTextBox * ManaDangerSetting
void PickText(const char *fontName, int size)
Window displaying the player's stats, vitals and skills.
csString fontName
Name of currently selected font.
Definition: pawswidget.h:305
pawsScrollBar * ManaDangerLevel
A combination widget that has a check box and a text label.
Definition: pawscheckbox.h:48
pawsTextBox * ManaFlashSetting
virtual bool LoadConfig()
sets content of dialog according to current configuration
pawsScrollMenu * MenuBar
pawsTextBox * ManaWarnSetting
pawsScrollBar * ManaWarnLevel
pawsSkillWindow * SkillWindow
virtual bool OnScroll(int, pawsScrollBar *)
Called whenever a window is scrolled.
CREATE_PAWS_FACTORY(pawsConfigHPandMana)
virtual bool PostSetup()
This is called after the widget and all of it's children have been created.
pawsTextBox * HPFlashSetting
A scrolling list of buttons, each with an icon and which accepts drag-n-drop.
pawsScrollBar * HPWarnLevel
A simple scroll bar widget.
Definition: pawscrollbar.h:64
void UpdateManaDangerLevel()
pawsTextBox * HPDangerSetting
pawsScrollBar * HPDangerLevel
virtual bool SaveConfig()
remembers settings in-game and saves them permanently to a file also
pawsScrollBar * HPFlashLevel
pawsScrollBar * ManaFlashLevel
A window to show the player's vitals, the target's name and health, and the time. ...
pawsTextBox * HPWarnSetting
virtual bool Initialize()
A basic text box widget.
Definition: pawstextbox.h:42
pawsInfoWindow * InfoWindow
virtual void SetDefault()
sets content of dialog according to default configuration
This is a set of radio buttons and is used to control them.
Definition: pawsradio.h:131