| 131 | } |
| 132 | |
| 133 | bool LaunchController::askPlayDemo() |
| 134 | { |
| 135 | QMessageBox box(m_parentWidget); |
| 136 | box.setWindowTitle(tr("Play demo?")); |
| 137 | box.setText( |
| 138 | tr("This account does not own Minecraft.\nYou need to purchase the game first to play it.\n\nDo you want to play " |
| 139 | "the demo?")); |
| 140 | box.setIcon(QMessageBox::Warning); |
| 141 | auto demoButton = box.addButton(tr("Play Demo"), QMessageBox::ButtonRole::YesRole); |
| 142 | auto cancelButton = box.addButton(tr("Cancel"), QMessageBox::ButtonRole::NoRole); |
| 143 | box.setDefaultButton(cancelButton); |
| 144 | |
| 145 | box.exec(); |
| 146 | return box.clickedButton() == demoButton; |
| 147 | } |
| 148 | |
| 149 | QString LaunchController::askOfflineName(QString playerName, bool demo, bool& ok) |
| 150 | { |