// Copyright (c) 2013- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include <functional>2021#include "UI/BaseScreens.h"22#include "Common/UI/UIScreen.h"23#include "Common/File/Path.h"24#include "UI/GameInfoCache.h"25#include "UI/SimpleDialogScreen.h"262728class NoticeView;2930// Game screen: Allows you to start a game, delete saves, delete the game,31// set game specific settings, etc.3233// Uses GameInfoCache heavily to implement the functionality.34// Should possibly merge this with the PauseScreen.3536class GameScreen : public UITwoPaneBaseDialogScreen {37public:38GameScreen(const Path &gamePath, bool inGame);39~GameScreen();4041void update() override;4243const char *tag() const override { return "Game"; }4445protected:46void CreateContentViews(UI::ViewGroup *parent) override;47void CreateSettingsViews(UI::ViewGroup *parent) override;48void CreateContextMenu(UI::ViewGroup *parent) override;4950std::string_view GetTitle() const override;5152private:53// Event handlers54void OnPlay(UI::EventParams &e);55void OnGameSettings(UI::EventParams &e);56void OnDeleteSaveData(UI::EventParams &e);57void OnDeleteGame(UI::EventParams &e);58void OnSwitchBack(UI::EventParams &e);59void OnRemoveFromRecent(UI::EventParams &e);60void OnCreateConfig(UI::EventParams &e);61void OnDeleteConfig(UI::EventParams &e);62void OnCwCheat(UI::EventParams &e);63void OnSetBackground(UI::EventParams &e);6465std::string CRC32string;6667bool isHomebrew_ = false;68bool inGame_ = false;6970// Keep track of progressive loading of metadata.71GameInfoFlags knownFlags_ = GameInfoFlags::EMPTY;7273bool knownHasCRC_ = false;7475std::shared_ptr<GameInfo> info_;76mutable std::string titleCache_;77};787980