xoreos  0.0.5
charskills.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos 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; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef ENGINES_NWN_GUI_CHARGEN_CHARSKILLS_H
26 #define ENGINES_NWN_GUI_CHARGEN_CHARSKILLS_H
27 
30 
31 namespace Engines {
32 
33 namespace NWN {
34 
35 class WidgetButton;
36 class WidgetPanel;
37 class WidgetEditBox;
38 
40 public:
43 
44  void setPosition(float x, float y, float z);
45 
46  void reset();
47  void mouseDown(uint8 state, float x, float y);
48 
49 private:
50  void subActive(Widget &widget);
51  bool changeRank(bool isIncreasing);
52 
56 
58 
59  friend class CharSkills;
60 };
61 
62 class CharSkills : public CharGenBase {
63 public:
64  CharSkills(CharGenChoices &choices, ::Engines::Console *console = 0);
65  ~CharSkills();
66 
67  void reset();
68  void hide();
69 
70  bool changeAvailableSkillRank(int rankChange);
71  void setSkillCost(uint8 cost);
72  void setHelpText(const Common::UString &title, const Common::UString &text);
73 
74 private:
75  void callbackActive(Widget &widget);
76  void createSkillsList();
77  void computeAvailablePoints(uint8 pointBase);
78  void setRecommendedSkills();
79 
82 };
83 
84 } // End of namespace NWN
85 
86 } // End of namespace Engines
87 
88 #endif // ENGINES_NWN_GUI_CHARGEN_CHARSKILLS_H
A NWN panel widget.
Definition: panel.h:41
void hide()
Hide the GUI.
Definition: charskills.cpp:184
void setSkillCost(uint8 cost)
Definition: charskills.cpp:200
A class holding an UTF-8 string.
Definition: ustring.h:48
uint8_t uint8
Definition: types.h:200
CharSkills(CharGenChoices &choices, ::Engines::Console *console=0)
Definition: charskills.cpp:138
void setPosition(float x, float y, float z)
Set the widget&#39;s position.
Definition: charskills.cpp:78
A NWN button widget.
Definition: button.h:39
A GUI.
Definition: gui.h:43
bool changeRank(bool isIncreasing)
Definition: charskills.cpp:117
WidgetEditBox * _helpTextBox
Definition: charskills.h:81
WidgetListItemSkill(::Engines::GUI &gui, SkillItem skill)
Definition: charskills.cpp:50
void subActive(Widget &widget)
A sub-widget was activated.
Definition: charskills.cpp:103
Button items used in WidgetListBox.
bool changeAvailableSkillRank(int rankChange)
Definition: charskills.cpp:191
void computeAvailablePoints(uint8 pointBase)
The character generator base class.
A widget in a GUI.
Definition: widget.h:40
A NWN editbox widget.
Definition: editbox.h:43
void mouseDown(uint8 state, float x, float y)
A mouse button was pressed on the widget.
Definition: charskills.cpp:96
void callbackActive(Widget &widget)
Callback that&#39;s triggered when a widget was activated.
Definition: charskills.cpp:204
void setHelpText(const Common::UString &title, const Common::UString &text)
Definition: charskills.cpp:244