MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / askPlayDemo

Method askPlayDemo

launcher/LaunchController.cpp:133–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133bool 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
149QString LaunchController::askOfflineName(QString playerName, bool demo, bool& ok)
150{

Callers

nothing calls this directly

Calls 3

setTextMethod · 0.45
setIconMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected