summaryrefslogtreecommitdiff
path: root/src/gui/char_select.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2006-02-05 21:28:38 +0000
committerYohann Ferreira <bertram@cegetel.net>2006-02-05 21:28:38 +0000
commit5e1658aade25018073cc432fbc55c7857441039b (patch)
tree855ab86c0c1a02dd3750751f4b8f0db3dbe71010 /src/gui/char_select.cpp
parentbb16416fdc756e1952bc975be4a2fee6c584c38f (diff)
downloadmana-5e1658aade25018073cc432fbc55c7857441039b.tar.gz
mana-5e1658aade25018073cc432fbc55c7857441039b.tar.bz2
mana-5e1658aade25018073cc432fbc55c7857441039b.tar.xz
mana-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/char_select.cpp')
-rw-r--r--src/gui/char_select.cpp12
1 files changed, 8 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;