diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-12-18 01:27:27 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-12-18 01:27:27 +0000 |
commit | 1f2b8d3d4c36c3cf30187633e4cf5bb5d0012e7c (patch) | |
tree | eb36781dbb8a76967b10f45773e6fb4949ca9b74 /src/gui | |
parent | 57e9dc1c0f794508335819db4eb1f80ff8836d68 (diff) | |
download | mana-client-1f2b8d3d4c36c3cf30187633e4cf5bb5d0012e7c.tar.gz mana-client-1f2b8d3d4c36c3cf30187633e4cf5bb5d0012e7c.tar.bz2 mana-client-1f2b8d3d4c36c3cf30187633e4cf5bb5d0012e7c.tar.xz mana-client-1f2b8d3d4c36c3cf30187633e4cf5bb5d0012e7c.zip |
Updated attribute system to the latest design decisions (removed charisma, kept agility in)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/char_select.cpp | 16 | ||||
-rw-r--r-- | src/gui/char_select.h | 8 | ||||
-rw-r--r-- | src/gui/status.cpp | 17 | ||||
-rw-r--r-- | src/gui/status.h | 8 |
4 files changed, 21 insertions, 28 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index ccdf20c8..96140bb5 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -264,8 +264,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot): mAttributeLabel[3] = new gcn::Label(_("Vitality:")); mAttributeLabel[4] = new gcn::Label(_("Intelligence:")); mAttributeLabel[5] = new gcn::Label(_("Willpower:")); - mAttributeLabel[6] = new gcn::Label(_("Charisma:")); - for (int i=0; i<7; i++) + for (int i=0; i<6; i++) { mAttributeLabel[i]->setWidth(70); mAttributeSlider[i] = new Slider(1, 20); @@ -289,7 +288,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot): mPrevHairStyleButton->setPosition(90, 64); mNextHairStyleButton->setPosition(165, 64); mHairStyleLabel->setPosition(5, 70); - for (int i=0; i<7; i++) + for (int i=0; i<6; i++) { mAttributeSlider[i]->setValue(10); mAttributeSlider[i]->setDimension(gcn::Rectangle( 75, 140 + i*20, @@ -319,7 +318,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot): add(mNextHairStyleButton); add(mPrevHairStyleButton); add(mHairStyleLabel); - for (int i=0; i<7; i++) + for (int i=0; i<6; i++) { add(mAttributeSlider[i]); add(mAttributeValue[i]); @@ -359,8 +358,7 @@ CharCreateDialog::action(const gcn::ActionEvent &event) (int) mAttributeSlider[2]->getValue(), // DEX (int) mAttributeSlider[3]->getValue(), // VIT (int) mAttributeSlider[4]->getValue(), // INT - (int) mAttributeSlider[5]->getValue(), // WILL - (int) mAttributeSlider[6]->getValue() // CHAR + (int) mAttributeSlider[5]->getValue() // WILL ); } else { @@ -398,7 +396,7 @@ CharCreateDialog::getName() void CharCreateDialog::UpdateSliders() { - for (int i = 0; i < 7; i++) + for (int i = 0; i < 6; i++) { // Update captions mAttributeValue[i]->setCaption( @@ -407,7 +405,7 @@ void CharCreateDialog::UpdateSliders() } // Update distributed points - int pointsLeft = 70 - getDistributedPoints(); + int pointsLeft = 60 - getDistributedPoints(); if (pointsLeft == 0) { mAttributesLeft->setCaption(_("Character stats OK")); @@ -439,7 +437,7 @@ int CharCreateDialog::getDistributedPoints() { int points = 0; - for (int i = 0; i < 7; i++) + for (int i = 0; i < 6; i++) { points += (int) mAttributeSlider[i]->getValue(); } diff --git a/src/gui/char_select.h b/src/gui/char_select.h index 5d0b42fa..f2d6cbc4 100644 --- a/src/gui/char_select.h +++ b/src/gui/char_select.h @@ -140,9 +140,9 @@ class CharCreateDialog : public Window, public gcn::ActionListener gcn::Button *mPrevHairStyleButton; gcn::Label *mHairStyleLabel; - gcn::Slider *mAttributeSlider[7]; - gcn::Label *mAttributeLabel[7]; - gcn::Label *mAttributeValue[7]; + gcn::Slider *mAttributeSlider[6]; + gcn::Label *mAttributeLabel[6]; + gcn::Label *mAttributeValue[6]; gcn::Label *mAttributesLeft; gcn::Button *mCreateButton; @@ -153,7 +153,7 @@ class CharCreateDialog : public Window, public gcn::ActionListener int mSlot; - static const int mMaxPoints = 70; + static const int mMaxPoints = 60; int mUsedPoints; }; diff --git a/src/gui/status.cpp b/src/gui/status.cpp index 323a6b16..b0a92665 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -108,7 +108,7 @@ StatusWindow::StatusWindow(LocalPlayer *player): mStatsReflexPoints = new gcn::Label("% Reflex:"); */ // New labels - for (int i = 0; i < 7; i++) { + for (int i = 0; i < 6; i++) { mStatsLabel[i] = new gcn::Label(); mStatsDisplayLabel[i] = new gcn::Label(); mPointsLabel[i] = new gcn::Label("0"); @@ -131,7 +131,7 @@ StatusWindow::StatusWindow(LocalPlayer *player): int totalLabelY = mStatsTotalLabel->getY(); mStatsCostLabel->setPosition(170, totalLabelY); - for (int i = 0; i < 7; i++) + for (int i = 0; i < 6; i++) { mStatsLabel[i]->setPosition(5, mStatsTotalLabel->getY() + (i * 23) + 15); @@ -163,7 +163,7 @@ StatusWindow::StatusWindow(LocalPlayer *player): add(mStatsTitleLabel); add(mStatsTotalLabel); add(mStatsCostLabel); - for(int i = 0; i < 7; i++) + for(int i = 0; i < 6; i++) { add(mStatsLabel[i]); add(mStatsDisplayLabel[i]); @@ -224,19 +224,18 @@ void StatusWindow::update() // Stats Part // ---------- - const std::string attrNames[7] = { + const std::string attrNames[6] = { "Strength", "Agility", "Dexterity", "Vitality", "Intelligence", - "Willpower", - "Charisma" + "Willpower" }; int statusPoints = mPlayer->getAttributeIncreasePoints(); // Update labels - for (int i = 0; i < 7; i++) + for (int i = 0; i < 6; i++) { mStatsLabel[i]->setCaption(attrNames[i]); mStatsDisplayLabel[i]->setCaption( @@ -331,9 +330,5 @@ void StatusWindow::action(const gcn::ActionEvent &event) { mPlayer->raiseAttribute(LocalPlayer::WIL); } - else if (eventId == "CHR") - { - mPlayer->raiseAttribute(LocalPlayer::CHR); - } } } diff --git a/src/gui/status.h b/src/gui/status.h index 62cd8805..f3475263 100644 --- a/src/gui/status.h +++ b/src/gui/status.h @@ -90,15 +90,15 @@ class StatusWindow : public Window, public gcn::ActionListener /** * Stats captions. */ - gcn::Label *mStatsLabel[7]; - gcn::Label *mPointsLabel[7]; - gcn::Label *mStatsDisplayLabel[7]; + gcn::Label *mStatsLabel[6]; + gcn::Label *mPointsLabel[6]; + gcn::Label *mStatsDisplayLabel[6]; gcn::Label *mRemainingStatsPointsLabel; /** * Stats buttons. */ - gcn::Button *mStatsButton[7]; + gcn::Button *mStatsButton[6]; }; extern StatusWindow *statusWindow; |