forked from rosebudai/OpenRCT2-Web
Add quit button to onboarding options
This commit is contained in:
1 parent
f8805635f6
commit
17533dae34
4 files changed
+10
-2
No files matched your search
@@ -3846,3 +3846,4 @@ STR_7013 :Drag areas of path
|
||||
STR_7014 :I own the game on Steam, but I haven’t installed it yet.
|
||||
STR_7015 :Please close Steam if it’s running, then click ‘OK’.
|
||||
STR_7016 :OpenRCT2 has tried to trigger a download in Steam. Please open Steam and let it download the game. When Steam is finished, click ‘OK’.
|
||||
STR_7017 :Quit
|
||||
@@ -73,13 +73,13 @@ namespace OpenRCT2::Ui
|
||||
const std::vector<std::string>& options, const std::string& title, const std::string& text) override
|
||||
{
|
||||
@autoreleasepool
|
||||
{
|
||||
{
|
||||
NSAlert* alert = [[[NSAlert alloc] init] autorelease];
|
||||
for (const std::string& option : options)
|
||||
{
|
||||
[alert addButtonWithTitle:[NSString stringWithUTF8String:option.c_str()]];
|
||||
}
|
||||
|
||||
|
||||
alert.messageText = [NSString stringWithUTF8String:title.c_str()];
|
||||
alert.informativeText = [NSString stringWithUTF8String:text.c_str()];
|
||||
NSModalResponse response = [alert runModal];
|
||||
|
||||
@@ -929,6 +929,7 @@ namespace OpenRCT2::Config
|
||||
std::string gog = LanguageGetString(STR_OWN_ON_GOG);
|
||||
std::string steam = LanguageGetString(STR_OWN_ON_STEAM);
|
||||
std::string hdd = LanguageGetString(STR_INSTALLED_ON_HDD);
|
||||
std::string exit = LanguageGetString(STR_QUIT_ONBOARDING);
|
||||
|
||||
std::string chosenOption;
|
||||
|
||||
@@ -938,6 +939,7 @@ namespace OpenRCT2::Config
|
||||
options.push_back(hdd);
|
||||
options.push_back(gog);
|
||||
options.push_back(steam);
|
||||
options.push_back(exit);
|
||||
int optionIndex = uiContext.ShowMenuDialog(
|
||||
options, LanguageGetString(STR_OPENRCT2_SETUP), LanguageGetString(STR_WHICH_APPLIES_BEST));
|
||||
if (optionIndex < 0 || static_cast<uint32_t>(optionIndex) >= options.size())
|
||||
@@ -1010,6 +1012,10 @@ namespace OpenRCT2::Config
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (chosenOption == exit)
|
||||
{
|
||||
ContextQuit();
|
||||
}
|
||||
if (possibleInstallPaths.empty())
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -1605,6 +1605,7 @@ enum : StringId
|
||||
STR_OWN_ON_STEAM = 7014,
|
||||
STR_PLEASE_CLOSE_STEAM = 7015,
|
||||
STR_WAIT_FOR_STEAM_DOWNLOAD = 7016,
|
||||
STR_QUIT_ONBOARDING = 7017,
|
||||
|
||||
STR_TILE_INSPECTOR_TOGGLE_INVISIBILITY_TIP = 6436,
|
||||
|
||||
|
||||
Reference in new issue
Block a user