summaryrefslogtreecommitdiff
path: root/src/gui/char_select.cpp
diff options
context:
space:
mode:
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;