mirror of
https://github.com/PabloMK7/citra
synced 2024-11-15 05:08:23 +00:00
citra_qt: use Citra Web Service username as default multiplayer nickname
This commit is contained in:
parent
fd5f71bcff
commit
40aea8d6b8
3 changed files with 12 additions and 0 deletions
|
@ -33,6 +33,10 @@ DirectConnectWindow::DirectConnectWindow(QWidget* parent)
|
|||
|
||||
ui->nickname->setValidator(validation.GetNickname());
|
||||
ui->nickname->setText(UISettings::values.nickname);
|
||||
if (ui->nickname->text().isEmpty() && !Settings::values.citra_username.empty()) {
|
||||
// Use Citra Web Service user name as nickname by default
|
||||
ui->nickname->setText(QString::fromStdString(Settings::values.citra_username));
|
||||
}
|
||||
ui->ip->setValidator(validation.GetIP());
|
||||
ui->ip->setText(UISettings::values.ip);
|
||||
ui->port->setValidator(validation.GetPort());
|
||||
|
|
|
@ -54,6 +54,10 @@ HostRoomWindow::HostRoomWindow(QWidget* parent, QStandardItemModel* list,
|
|||
|
||||
// Restore the settings:
|
||||
ui->username->setText(UISettings::values.room_nickname);
|
||||
if (ui->username->text().isEmpty() && !Settings::values.citra_username.empty()) {
|
||||
// Use Citra Web Service user name as nickname by default
|
||||
ui->username->setText(QString::fromStdString(Settings::values.citra_username));
|
||||
}
|
||||
ui->room_name->setText(UISettings::values.room_name);
|
||||
ui->port->setText(UISettings::values.room_port);
|
||||
ui->max_player->setValue(UISettings::values.max_player);
|
||||
|
|
|
@ -48,6 +48,10 @@ Lobby::Lobby(QWidget* parent, QStandardItemModel* list,
|
|||
|
||||
ui->nickname->setValidator(validation.GetNickname());
|
||||
ui->nickname->setText(UISettings::values.nickname);
|
||||
if (ui->nickname->text().isEmpty() && !Settings::values.citra_username.empty()) {
|
||||
// Use Citra Web Service user name as nickname by default
|
||||
ui->nickname->setText(QString::fromStdString(Settings::values.citra_username));
|
||||
}
|
||||
|
||||
// UI Buttons
|
||||
connect(ui->refresh_list, &QPushButton::pressed, this, &Lobby::RefreshLobby);
|
||||
|
|
Loading…
Reference in a new issue