summaryrefslogtreecommitdiff
path: root/src/gui/charcreatedialog.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-04-28 22:10:37 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-04-30 21:21:06 +0200
commita6b11834f227b8edbfb39633380806480fd2a2c5 (patch)
treec9397013f135d61f3321c45d8b10493aecac2344 /src/gui/charcreatedialog.h
parent286eb6552fa059d8e4561fb4bb13cb5266dff71d (diff)
downloadmana-a6b11834f227b8edbfb39633380806480fd2a2c5.tar.gz
mana-a6b11834f227b8edbfb39633380806480fd2a2c5.tar.bz2
mana-a6b11834f227b8edbfb39633380806480fd2a2c5.tar.xz
mana-a6b11834f227b8edbfb39633380806480fd2a2c5.zip
Hide attribute sliders on character creation when appropriate
When the minimum and maximum values of the attributes are equal, then there is nothing for the player to customize and the sliders are not shown. At the same time the dialog has been fixed to resize properly to any number of modifiable attributes.
Diffstat (limited to 'src/gui/charcreatedialog.h')
-rw-r--r--src/gui/charcreatedialog.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index 7548bbff..9f49f6c5 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -58,14 +58,12 @@ class CharCreateDialog : public Window, public gcn::ActionListener
void unlock();
void setAttributes(const std::vector<std::string> &labels,
- unsigned int available,
- unsigned int min, unsigned int max);
+ unsigned available,
+ unsigned min, unsigned max);
void setFixedGender(bool fixed, Gender gender = GENDER_FEMALE);
private:
- int getDistributedPoints() const;
-
void updateSliders();
/**
@@ -94,13 +92,13 @@ class CharCreateDialog : public Window, public gcn::ActionListener
gcn::RadioButton *mMale;
gcn::RadioButton *mFemale;
+ std::vector<int> mAttributes;
std::vector<gcn::Slider*> mAttributeSlider;
std::vector<gcn::Label*> mAttributeLabel;
std::vector<gcn::Label*> mAttributeValue;
gcn::Label *mAttributesLeft;
- int mMaxPoints;
- int mUsedPoints;
+ unsigned mMaxPoints;
gcn::Button *mCreateButton;
gcn::Button *mCancelButton;