diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2006-02-05 21:28:38 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2006-02-05 21:28:38 +0000 |
commit | 5e1658aade25018073cc432fbc55c7857441039b (patch) | |
tree | 855ab86c0c1a02dd3750751f4b8f0db3dbe71010 /src/gui | |
parent | bb16416fdc756e1952bc975be4a2fee6c584c38f (diff) | |
download | mana-client-5e1658aade25018073cc432fbc55c7857441039b.tar.gz mana-client-5e1658aade25018073cc432fbc55c7857441039b.tar.bz2 mana-client-5e1658aade25018073cc432fbc55c7857441039b.tar.xz mana-client-5e1658aade25018073cc432fbc55c7857441039b.zip |
Made the nickname and emotions displayed above every layers. Made the delete and ok buttons be disabled once the character is selected at login.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/char_select.cpp | 12 | ||||
-rw-r--r-- | src/gui/char_select.h | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index 621dc461..7ce2a77d 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -69,7 +69,7 @@ void CharDeleteConfirm::action(const std::string &eventId) } CharSelectDialog::CharSelectDialog(Network *network, LockedArray<LocalPlayer*> *charInfo): - Window("Select Character"), mNetwork(network), mCharInfo(charInfo) + Window("Select Character"), mNetwork(network), mCharInfo(charInfo), mCharSelected(false) { selectButton = new Button("Ok"); cancelButton = new Button("Cancel"); @@ -146,6 +146,7 @@ void CharSelectDialog::action(const std::string& eventId) selectButton->setEnabled(false); previousButton->setEnabled(false); nextButton->setEnabled(false); + mCharSelected = true; attemptCharSelect(); } else if (eventId == "cancel") @@ -195,9 +196,12 @@ void CharSelectDialog::updatePlayerInfo() levelLabel->setCaption(levelCaption.str()); jobLevelLabel->setCaption(jobCaption.str()); moneyLabel->setCaption(moneyCaption.str()); - newCharButton->setEnabled(false); - delCharButton->setEnabled(true); - selectButton->setEnabled(true); + if (!mCharSelected) + { + newCharButton->setEnabled(false); + delCharButton->setEnabled(true); + selectButton->setEnabled(true); + } playerBox->hairStyle = pi->getHairStyle() - 1; playerBox->hairColor = pi->getHairColor() - 1; playerBox->showPlayer = true; diff --git a/src/gui/char_select.h b/src/gui/char_select.h index 94d69e06..0cfc4f94 100644 --- a/src/gui/char_select.h +++ b/src/gui/char_select.h @@ -71,6 +71,8 @@ class CharSelectDialog : public Window, public gcn::ActionListener PlayerBox *playerBox; + bool mCharSelected; + /** * Communicate character deletion to the server. */ |