Fix #408
Gray out "only buddies/only reg users" in the “create game” dialog if the user is unregistered
This commit is contained in:
parent
8d2e5d3c43
commit
da46996294
1 changed files with 5 additions and 0 deletions
|
@ -56,7 +56,12 @@ void DlgCreateGame::sharedCtor()
|
|||
onlyBuddiesCheckBox = new QCheckBox(tr("Only &buddies can join"));
|
||||
onlyRegisteredCheckBox = new QCheckBox(tr("Only ®istered users can join"));
|
||||
if (room && room->getUserInfo()->user_level() & ServerInfo_User::IsRegistered)
|
||||
{
|
||||
onlyRegisteredCheckBox->setChecked(true);
|
||||
} else {
|
||||
onlyBuddiesCheckBox->setEnabled(false);
|
||||
onlyRegisteredCheckBox->setEnabled(false);
|
||||
}
|
||||
|
||||
QGridLayout *joinRestrictionsLayout = new QGridLayout;
|
||||
joinRestrictionsLayout->addWidget(passwordLabel, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue