aboutsummaryrefslogtreecommitdiff
path: root/src/charselect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/charselect.cpp')
-rw-r--r--src/charselect.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/charselect.cpp b/src/charselect.cpp
index 040bfd0..2443393 100644
--- a/src/charselect.cpp
+++ b/src/charselect.cpp
@@ -62,8 +62,8 @@ void Courtroom::construct_char_select()
connect(ui_spectator, &AOButton::clicked, this, &Courtroom::on_spectator_clicked);
connect(ui_char_search, &QLineEdit::textEdited, this, &Courtroom::on_char_search_changed);
- connect(ui_char_passworded, &QCheckBox::stateChanged, this, &Courtroom::on_char_passworded_clicked);
- connect(ui_char_taken, &QCheckBox::stateChanged, this, &Courtroom::on_char_taken_clicked);
+ connect(ui_char_passworded, &QCheckBox::checkStateChanged, this, &Courtroom::on_char_passworded_clicked);
+ connect(ui_char_taken, &QCheckBox::checkStateChanged, this, &Courtroom::on_char_taken_clicked);
}
void Courtroom::set_char_select()
@@ -300,6 +300,7 @@ void Courtroom::character_loading_finished()
char_button->setContextMenuPolicy(Qt::CustomContextMenu);
char_button->hide();
char_button->setCharacter(character.name);
+ char_button->setPassworded(character.passworded);
char_button->setTaken(character.taken);
char_button->setToolTip(character.name);
ui_char_button_list.append(char_button);
@@ -354,10 +355,11 @@ void Courtroom::filter_character_list()
AOCharButton *current_char = ui_char_button_list.at(i);
QTreeWidgetItem *current_char_list_item = ui_char_list->findItems(QString::number(i), Qt::MatchExactly | Qt::MatchRecursive, 1).at(0);
- // It seems passwording characters is unimplemented yet?
- // Until then, this will stay here, I suppose.
- // if (ui_char_passworded->isChecked() && character_is_passworded??)
- // continue;
+ if (!ui_char_passworded->isChecked() && char_list.at(i).passworded)
+ {
+ current_char_list_item->setHidden(true);
+ continue;
+ }
if (!ui_char_taken->isChecked() && char_list.at(i).taken)
{
@@ -375,6 +377,7 @@ void Courtroom::filter_character_list()
// for the buttons that actually appear.
// You'd also update the passwordedness and etc. here later.
current_char_list_item->setHidden(false);
+ current_char->setPassworded(char_list.at(i).passworded);
current_char->setTaken(char_list.at(i).taken);
current_char_list_item->setText(0, char_list.at(i).name);
// reset disabled