mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-25 04:44:59 +00:00
Profiles of both types now can be created. Ready for review
This commit is contained in:
@@ -43,14 +43,17 @@ void LoginDialog::accept()
|
||||
|
||||
// Setup the login task and start it
|
||||
m_account = MojangAccount::createFromUsername(ui->userTextBox->text());
|
||||
m_account->setLoginType("dummy"); // TODO: Add the login type selector
|
||||
if (ui->radioMojang->isChecked())
|
||||
m_account->setLoginType("mojang");
|
||||
else if (ui->radioDummy->isChecked())
|
||||
m_account->setLoginType("dummy");
|
||||
m_loginTask = m_account->login(nullptr, ui->passTextBox->text());
|
||||
connect(m_loginTask.get(), &Task::failed, this, &LoginDialog::onTaskFailed);
|
||||
connect(m_loginTask.get(), &Task::succeeded, this,
|
||||
&LoginDialog::onTaskSucceeded);
|
||||
connect(m_loginTask.get(), &Task::status, this, &LoginDialog::onTaskStatus);
|
||||
connect(m_loginTask.get(), &Task::progress, this, &LoginDialog::onTaskProgress);
|
||||
if (true)
|
||||
if (!m_loginTask)
|
||||
{
|
||||
onTaskSucceeded();
|
||||
} else {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>162</height>
|
||||
<height>219</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -60,6 +60,30 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="radioLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioMojang">
|
||||
<property name="text">
|
||||
<string>Mojang / Minecraft</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioDummy">
|
||||
<property name="text">
|
||||
<string>Offline (cracked)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
|
||||
Reference in New Issue
Block a user