Added temporary game launch notification popup.

This commit is contained in:
Leon Styhre 2020-08-15 15:41:11 +02:00
parent b355b5b22a
commit 6dd1078e09
2 changed files with 10 additions and 0 deletions

View file

@ -735,6 +735,8 @@ void FileData::launchGame(Window* window)
window->setInfoPopup(s); window->setInfoPopup(s);
} }
else { else {
// Stop showing the game launch notification.
window->stopInfoPopup();
#ifdef _WIN64 #ifdef _WIN64
// This code is only needed for Windows, where we may need to keep ES running while // This code is only needed for Windows, where we may need to keep ES running while
// the game/emulator is in use. It's basically used to pause any playing game video // the game/emulator is in use. It's basically used to pause any playing game video

View file

@ -13,6 +13,7 @@
#include "animations/LambdaAnimation.h" #include "animations/LambdaAnimation.h"
#include "animations/LaunchAnimation.h" #include "animations/LaunchAnimation.h"
#include "animations/MoveCameraAnimation.h" #include "animations/MoveCameraAnimation.h"
#include "guis/GuiInfoPopup.h"
#include "guis/GuiMenu.h" #include "guis/GuiMenu.h"
#include "guis/GuiMsgBox.h" #include "guis/GuiMsgBox.h"
#include "views/gamelist/DetailedGameListView.h" #include "views/gamelist/DetailedGameListView.h"
@ -261,6 +262,13 @@ void ViewController::launch(FileData* game, Vector3f center)
mWindow->stopInfoPopup(); // Make sure we disable any existing info popup. mWindow->stopInfoPopup(); // Make sure we disable any existing info popup.
mLockInput = true; mLockInput = true;
// TEMPORARY - Until a proper game launch screen is implemented, at least this
// will let the user know that something is actually happening (in addition
// to the launch sound, if navigation sounds are enabled).
GuiInfoPopup* s = new GuiInfoPopup(mWindow, "LAUNCHING GAME '" +
Utils::String::toUpper(game->metadata.get("name") + "'"), 10000);
mWindow->setInfoPopup(s);
std::string transition_style = Settings::getInstance()->getString("TransitionStyle"); std::string transition_style = Settings::getInstance()->getString("TransitionStyle");
NavigationSounds::getInstance()->playThemeNavigationSound(LAUNCHSOUND); NavigationSounds::getInstance()->playThemeNavigationSound(LAUNCHSOUND);