From 4d68f2a2c9eaf01092ad94399372ea979b7a0076 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 7 Apr 2005 00:10:54 +0000 Subject: Use new Guichan widget disableing feature to disable buttons as appropriate in character select dialog. --- src/gui/char_select.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index d8071ac2..c2ad9eee 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -104,6 +104,7 @@ CharSelectDialog::CharSelectDialog(): selectButton->requestFocus(); setLocationRelativeTo(getParent()); + setPlayerInfo(NULL); } CharSelectDialog::~CharSelectDialog() @@ -156,6 +157,9 @@ void CharSelectDialog::setPlayerInfo(PLAYER_INFO *pi) levelLabel->setCaption(levelCaption.str()); jobLevelLabel->setCaption(jobCaption.str()); moneyLabel->setCaption(moneyCaption.str()); + newCharButton->setEnabled(false); + delCharButton->setEnabled(true); + selectButton->setEnabled(true); playerBox->hairStyle = pi->hair_style - 1; playerBox->hairColor = pi->hair_color - 1; @@ -166,6 +170,9 @@ void CharSelectDialog::setPlayerInfo(PLAYER_INFO *pi) levelLabel->setCaption("Level"); jobLevelLabel->setCaption("Job Level"); moneyLabel->setCaption("Money"); + newCharButton->setEnabled(true); + delCharButton->setEnabled(false); + selectButton->setEnabled(false); playerBox->hairStyle = 0; playerBox->hairColor = 0; -- cgit v1.2.3-70-g09d2