2014-02-10 09:24:40 +00: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 09:32:24 +00:00
|
|
|
#include <functional>
|
|
|
|
|
2020-10-04 18:48:47 +00:00
|
|
|
#include "Common/UI/UIScreen.h"
|
|
|
|
#include "Common/UI/ViewGroup.h"
|
2014-02-10 09:24:40 +00:00
|
|
|
#include "UI/MiscScreens.h"
|
2021-05-05 23:31:38 +00:00
|
|
|
#include "Common/File/Path.h"
|
2014-02-10 09:24:40 +00:00
|
|
|
|
2016-09-18 23:33:25 +00:00
|
|
|
enum class ReportingOverallScore : int {
|
|
|
|
PERFECT = 0,
|
|
|
|
PLAYABLE = 1,
|
|
|
|
INGAME = 2,
|
|
|
|
MENU = 3,
|
|
|
|
NONE = 4,
|
|
|
|
INVALID = -1,
|
|
|
|
};
|
|
|
|
|
2017-03-18 22:30:50 +00:00
|
|
|
class ReportScreen : public UIDialogScreenWithGameBackground {
|
2014-02-10 09:24:40 +00:00
|
|
|
public:
|
2021-05-05 23:31:38 +00:00
|
|
|
ReportScreen(const Path &gamePath);
|
2014-02-10 09:24:40 +00:00
|
|
|
|
2022-09-16 08:14:00 +00:00
|
|
|
const char *tag() const override { return "Report"; }
|
|
|
|
|
2014-02-10 09:24:40 +00:00
|
|
|
protected:
|
2023-12-11 11:41:44 +00:00
|
|
|
ScreenRenderFlags render(ScreenRenderMode mode) override;
|
2017-03-15 05:01:18 +00:00
|
|
|
void update() override;
|
2018-06-03 19:08:51 +00:00
|
|
|
void resized() override;
|
2016-06-12 17:33:33 +00:00
|
|
|
void CreateViews() override;
|
|
|
|
void UpdateSubmit();
|
2021-01-31 20:12:54 +00:00
|
|
|
void UpdateCRCInfo();
|
2016-09-18 23:33:25 +00:00
|
|
|
void UpdateOverallDescription();
|
2016-06-12 14:21:56 +00:00
|
|
|
|
2014-02-10 09:24:40 +00:00
|
|
|
UI::EventReturn HandleChoice(UI::EventParams &e);
|
2014-09-27 22:37:53 +00:00
|
|
|
UI::EventReturn HandleSubmit(UI::EventParams &e);
|
|
|
|
UI::EventReturn HandleBrowser(UI::EventParams &e);
|
2021-01-31 20:12:54 +00:00
|
|
|
UI::EventReturn HandleShowCRC(UI::EventParams &e);
|
2016-06-12 17:33:33 +00:00
|
|
|
UI::EventReturn HandleReportingChange(UI::EventParams &e);
|
2014-02-10 09:24:40 +00:00
|
|
|
|
2016-09-18 23:33:25 +00:00
|
|
|
UI::Choice *submit_ = nullptr;
|
|
|
|
UI::View *screenshot_ = nullptr;
|
|
|
|
UI::TextView *reportingNotice_ = nullptr;
|
|
|
|
UI::TextView *overallDescription_ = nullptr;
|
2021-01-31 20:12:54 +00:00
|
|
|
UI::TextView *crcInfo_ = nullptr;
|
|
|
|
UI::Choice *showCrcButton_ = nullptr;
|
2021-05-05 23:31:38 +00:00
|
|
|
Path screenshotFilename_;
|
2016-06-12 14:21:56 +00:00
|
|
|
|
2016-09-18 23:33:25 +00:00
|
|
|
ReportingOverallScore overall_ = ReportingOverallScore::INVALID;
|
|
|
|
int graphics_ = -1;
|
|
|
|
int speed_ = -1;
|
|
|
|
int gameplay_ = -1;
|
2016-06-12 17:33:33 +00:00
|
|
|
bool enableReporting_;
|
2016-06-10 04:07:30 +00:00
|
|
|
bool ratingEnabled_;
|
2020-05-18 03:37:26 +00:00
|
|
|
bool tookScreenshot_ = false;
|
2016-09-18 23:33:25 +00:00
|
|
|
bool includeScreenshot_ = true;
|
2021-01-31 20:12:54 +00:00
|
|
|
bool showCRC_ = false;
|
2014-02-10 09:24:40 +00:00
|
|
|
};
|
2016-06-26 06:11:07 +00:00
|
|
|
|
2017-03-19 14:46:06 +00:00
|
|
|
class ReportFinishScreen : public UIDialogScreenWithGameBackground {
|
2016-06-26 06:11:07 +00:00
|
|
|
public:
|
2021-05-05 23:31:38 +00:00
|
|
|
ReportFinishScreen(const Path &gamePath, ReportingOverallScore score);
|
2016-06-26 06:11:07 +00:00
|
|
|
|
2022-09-16 08:14:00 +00:00
|
|
|
const char *tag() const override { return "ReportFinish"; }
|
|
|
|
|
2016-06-26 06:11:07 +00:00
|
|
|
protected:
|
2017-03-15 05:01:18 +00:00
|
|
|
void update() override;
|
2016-06-26 06:11:07 +00:00
|
|
|
void CreateViews() override;
|
2018-06-03 21:47:49 +00:00
|
|
|
void ShowSuggestions();
|
2016-06-26 06:11:07 +00:00
|
|
|
|
|
|
|
UI::EventReturn HandleViewFeedback(UI::EventParams &e);
|
2016-06-28 05:59:09 +00:00
|
|
|
|
2018-06-03 21:47:49 +00:00
|
|
|
UI::TextView *resultNotice_ = nullptr;
|
|
|
|
UI::LinearLayout *resultItems_ = nullptr;
|
|
|
|
ReportingOverallScore score_;
|
|
|
|
bool setStatus_ = false;
|
2016-06-26 06:11:07 +00:00
|
|
|
};
|