shows the game selection page of the create instance dialog so the user can pick which game is managed by this instance this is used below in setupInstance() when the game directory is gone or no plugins can recognize it
| 743 | // no plugins can recognize it |
| 744 | // |
| 745 | SetupInstanceResults selectGame(Instance& instance, PluginContainer& pc) |
| 746 | { |
| 747 | CreateInstanceDialog dlg(pc, nullptr); |
| 748 | |
| 749 | // only show the game page |
| 750 | dlg.setSinglePage<cid::GamePage>(instance.displayName()); |
| 751 | |
| 752 | dlg.show(); |
| 753 | dlg.activateWindow(); |
| 754 | dlg.raise(); |
| 755 | |
| 756 | if (dlg.exec() != QDialog::Accepted) { |
| 757 | // cancelled |
| 758 | return SetupInstanceResults::SelectAnother; |
| 759 | } |
| 760 | |
| 761 | // this info will be used instead of the ini, which should fix this |
| 762 | // particular problem |
| 763 | instance.setGame(dlg.creationInfo().game->gameName(), |
| 764 | dlg.creationInfo().gameLocation); |
| 765 | |
| 766 | return SetupInstanceResults::TryAgain; |
| 767 | } |
| 768 | |
| 769 | // shows the game variant page of the create instance dialog so the user can |
| 770 | // pick which game variant is installed |
no test coverage detected