2014-02-10 01:24:40 -08:00
|
|
|
// Copyright (c) 2014- PPSSPP Project.
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official git repository and contact information can be found at
|
|
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2016-10-12 11:32:24 +02:00
|
|
|
#include <functional>
|
|
|
|
|
2020-10-04 20:48:47 +02:00
|
|
|
#include "Common/UI/UIScreen.h"
|
|
|
|
#include "Common/UI/ViewGroup.h"
|
2014-02-10 01:24:40 -08:00
|
|
|
#include "UI/MiscScreens.h"
|
2021-05-06 01:31:38 +02:00
|
|
|
#include "Common/File/Path.h"
|
2014-02-10 01:24:40 -08:00
|
|
|
|
2016-09-18 16:33:25 -07:00
|
|
|
enum class ReportingOverallScore : int {
|
|
|
|
PERFECT = 0,
|
|
|
|
PLAYABLE = 1,
|
|
|
|
INGAME = 2,
|
|
|
|
MENU = 3,
|
|
|
|
NONE = 4,
|
|
|
|
INVALID = -1,
|
|
|
|
};
|
|
|
|
|
2017-03-18 23:30:50 +01:00
|
|
|
class ReportScreen : public UIDialogScreenWithGameBackground {
|
2014-02-10 01:24:40 -08:00
|
|
|
public:
|
2021-05-06 01:31:38 +02:00
|
|
|
ReportScreen(const Path &gamePath);
|
2014-02-10 01:24:40 -08:00
|
|
|
|
2022-09-16 10:14:00 +02:00
|
|
|
const char *tag() const override { return "Report"; }
|
|
|
|
|
2014-02-10 01:24:40 -08:00
|
|
|
protected:
|
2020-05-17 20:37:26 -07:00
|
|
|
void postRender() override;
|
2017-03-14 22:01:18 -07:00
|
|
|
void update() override;
|
2018-06-03 12:08:51 -07:00
|
|
|
void resized() override;
|
2016-06-12 10:33:33 -07:00
|
|
|
void CreateViews() override;
|
|
|
|
void UpdateSubmit();
|
2021-01-31 12:12:54 -08:00
|
|
|
void UpdateCRCInfo();
|
2016-09-18 16:33:25 -07:00
|
|
|
void UpdateOverallDescription();
|
2016-06-12 07:21:56 -07:00
|
|
|
|
2014-02-10 01:24:40 -08:00
|
|
|
UI::EventReturn HandleChoice(UI::EventParams &e);
|
2014-09-27 15:37:53 -07:00
|
|
|
UI::EventReturn HandleSubmit(UI::EventParams &e);
|
|
|
|
UI::EventReturn HandleBrowser(UI::EventParams &e);
|
2021-01-31 12:12:54 -08:00
|
|
|
UI::EventReturn HandleShowCRC(UI::EventParams &e);
|
2016-06-12 10:33:33 -07:00
|
|
|
UI::EventReturn HandleReportingChange(UI::EventParams &e);
|
2014-02-10 01:24:40 -08:00
|
|
|
|
2016-09-18 16:33:25 -07:00
|
|
|
UI::Choice *submit_ = nullptr;
|
|
|
|
UI::View *screenshot_ = nullptr;
|
|
|
|
UI::TextView *reportingNotice_ = nullptr;
|
|
|
|
UI::TextView *overallDescription_ = nullptr;
|
2021-01-31 12:12:54 -08:00
|
|
|
UI::TextView *crcInfo_ = nullptr;
|
|
|
|
UI::Choice *showCrcButton_ = nullptr;
|
2021-05-06 01:31:38 +02:00
|
|
|
Path screenshotFilename_;
|
2016-06-12 07:21:56 -07:00
|
|
|
|
2016-09-18 16:33:25 -07:00
|
|
|
ReportingOverallScore overall_ = ReportingOverallScore::INVALID;
|
|
|
|
int graphics_ = -1;
|
|
|
|
int speed_ = -1;
|
|
|
|
int gameplay_ = -1;
|
2016-06-12 10:33:33 -07:00
|
|
|
bool enableReporting_;
|
2016-06-09 21:07:30 -07:00
|
|
|
bool ratingEnabled_;
|
2020-05-17 20:37:26 -07:00
|
|
|
bool tookScreenshot_ = false;
|
2016-09-18 16:33:25 -07:00
|
|
|
bool includeScreenshot_ = true;
|
2021-01-31 12:12:54 -08:00
|
|
|
bool showCRC_ = false;
|
2014-02-10 01:24:40 -08:00
|
|
|
};
|
2016-06-25 23:11:07 -07:00
|
|
|
|
2017-03-19 07:46:06 -07:00
|
|
|
class ReportFinishScreen : public UIDialogScreenWithGameBackground {
|
2016-06-25 23:11:07 -07:00
|
|
|
public:
|
2021-05-06 01:31:38 +02:00
|
|
|
ReportFinishScreen(const Path &gamePath, ReportingOverallScore score);
|
2016-06-25 23:11:07 -07:00
|
|
|
|
2022-09-16 10:14:00 +02:00
|
|
|
const char *tag() const override { return "ReportFinish"; }
|
|
|
|
|
2016-06-25 23:11:07 -07:00
|
|
|
protected:
|
2017-03-14 22:01:18 -07:00
|
|
|
void update() override;
|
2016-06-25 23:11:07 -07:00
|
|
|
void CreateViews() override;
|
2018-06-03 14:47:49 -07:00
|
|
|
void ShowSuggestions();
|
2016-06-25 23:11:07 -07:00
|
|
|
|
|
|
|
UI::EventReturn HandleViewFeedback(UI::EventParams &e);
|
2016-06-27 22:59:09 -07:00
|
|
|
|
2018-06-03 14:47:49 -07:00
|
|
|
UI::TextView *resultNotice_ = nullptr;
|
|
|
|
UI::LinearLayout *resultItems_ = nullptr;
|
|
|
|
ReportingOverallScore score_;
|
|
|
|
bool setStatus_ = false;
|
2016-06-25 23:11:07 -07:00
|
|
|
};
|