Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/UI/InstallZipScreen.h
5656 views
1
// Copyright (c) 2013- PPSSPP Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
17
18
#pragma once
19
20
#include "Common/File/Path.h"
21
22
#include "Common/UI/View.h"
23
#include "Common/UI/UIScreen.h"
24
25
#include "UI/BaseScreens.h"
26
#include "UI/SimpleDialogScreen.h"
27
28
class SavedataView;
29
30
class InstallZipScreen : public UITwoPaneBaseDialogScreen {
31
public:
32
InstallZipScreen(const Path &zipPath);
33
34
void update() override;
35
bool key(const KeyInput &key) override;
36
37
const char *tag() const override { return "InstallZip"; }
38
39
protected:
40
void BeforeCreateViews() override;
41
void CreateSettingsViews(UI::ViewGroup *parent) override;
42
void CreateContentViews(UI::ViewGroup *parent) override;
43
std::string_view GetTitle() const override;
44
45
private:
46
void OnInstall(UI::EventParams &params);
47
void OnPlay(UI::EventParams &params);
48
49
UI::Choice *installChoice_ = nullptr;
50
UI::Choice *playChoice_ = nullptr;
51
UI::Choice *backChoice_ = nullptr;
52
UI::TextView *doneView_ = nullptr;
53
SavedataView *existingSaveView_ = nullptr;
54
Path savedataToOverwrite_;
55
Path zipPath_;
56
std::vector<Path> destFolders_;
57
int destFolderChoice_ = 0;
58
59
ZipFileInfo zipFileInfo_{};
60
bool returnToHomebrew_ = true;
61
bool installStarted_ = false;
62
bool deleteZipFile_ = false;
63
};
64
65
66