mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-14 05:55:13 +01:00
citra_qt: use Citra Web Service username as default multiplayer nickname
This commit is contained in:
parent
fd5f71bcff
commit
40aea8d6b8
@ -33,6 +33,10 @@ DirectConnectWindow::DirectConnectWindow(QWidget* parent)
|
|||||||
|
|
||||||
ui->nickname->setValidator(validation.GetNickname());
|
ui->nickname->setValidator(validation.GetNickname());
|
||||||
ui->nickname->setText(UISettings::values.nickname);
|
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->setValidator(validation.GetIP());
|
||||||
ui->ip->setText(UISettings::values.ip);
|
ui->ip->setText(UISettings::values.ip);
|
||||||
ui->port->setValidator(validation.GetPort());
|
ui->port->setValidator(validation.GetPort());
|
||||||
|
@ -54,6 +54,10 @@ HostRoomWindow::HostRoomWindow(QWidget* parent, QStandardItemModel* list,
|
|||||||
|
|
||||||
// Restore the settings:
|
// Restore the settings:
|
||||||
ui->username->setText(UISettings::values.room_nickname);
|
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->room_name->setText(UISettings::values.room_name);
|
||||||
ui->port->setText(UISettings::values.room_port);
|
ui->port->setText(UISettings::values.room_port);
|
||||||
ui->max_player->setValue(UISettings::values.max_player);
|
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->setValidator(validation.GetNickname());
|
||||||
ui->nickname->setText(UISettings::values.nickname);
|
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
|
// UI Buttons
|
||||||
connect(ui->refresh_list, &QPushButton::pressed, this, &Lobby::RefreshLobby);
|
connect(ui->refresh_list, &QPushButton::pressed, this, &Lobby::RefreshLobby);
|
||||||
|
Loading…
Reference in New Issue
Block a user