Show the homebrew & demos tab after having installed a zip file.

This commit is contained in:
Henrik Rydgård 2013-12-06 12:29:27 +01:00
parent ffc6fc0b80
commit cc22a70667
3 changed files with 9 additions and 1 deletions

View File

@ -25,6 +25,7 @@
#include "Core/Util/GameManager.h"
#include "UI/InstallZipScreen.h"
#include "UI/MainScreen.h"
void InstallZipScreen::CreateViews() {
using namespace UI;
@ -68,6 +69,7 @@ UI::EventReturn InstallZipScreen::OnInstall(UI::EventParams &params) {
if (g_GameManager.InstallGameOnThread(zipPath_, deleteZipFile_)) {
installStarted_ = true;
installChoice_->SetEnabled(false);
MainScreen::showHomebrewTab = true;
}
return UI::EVENT_DONE;
}

View File

@ -62,6 +62,8 @@
#include <sstream>
bool MainScreen::showHomebrewTab = false;
class GameButton : public UI::Clickable {
public:
GameButton(const std::string &gamePath, bool gridStyle, UI::LayoutParams *layoutParams = 0)
@ -511,9 +513,10 @@ void MainScreen::CreateViews() {
leftColumn->SetCurrentTab(1);
}
if (backFromStore_) {
if (backFromStore_ || showHomebrewTab) {
leftColumn->SetCurrentTab(2);
backFromStore_ = false;
showHomebrewTab = false;
}
/* if (info) {

View File

@ -32,6 +32,9 @@ public:
virtual bool isTopLevel() const { return true; }
// Horrible hack to show the demos & homebrew tab after having installed a game from a zip file.
static bool showHomebrewTab;
protected:
virtual void CreateViews();
virtual void update(InputState &input);