#pragma once
#include <functional>
#include "UI/MiscScreens.h"
#include "Common/UI/UIScreen.h"
#include "Common/File/Path.h"
class NoticeView;
class GameScreen : public UIDialogScreenWithGameBackground {
public:
GameScreen(const Path &gamePath, bool inGame);
~GameScreen();
void update() override;
ScreenRenderFlags render(ScreenRenderMode mode) override;
const char *tag() const override { return "Game"; }
protected:
void CreateViews() override;
private:
UI::Choice *AddOtherChoice(UI::Choice *choice);
UI::EventReturn OnPlay(UI::EventParams &e);
UI::EventReturn OnGameSettings(UI::EventParams &e);
UI::EventReturn OnDeleteSaveData(UI::EventParams &e);
UI::EventReturn OnDeleteGame(UI::EventParams &e);
UI::EventReturn OnSwitchBack(UI::EventParams &e);
UI::EventReturn OnRemoveFromRecent(UI::EventParams &e);
UI::EventReturn OnCreateConfig(UI::EventParams &e);
UI::EventReturn OnDeleteConfig(UI::EventParams &e);
UI::EventReturn OnCwCheat(UI::EventParams &e);
UI::EventReturn OnSetBackground(UI::EventParams &e);
UI::EventReturn OnDoCRC32(UI::EventParams& e);
UI::TextView *tvTitle_ = nullptr;
UI::TextView *tvGameSize_ = nullptr;
UI::TextView *tvSaveDataSize_ = nullptr;
UI::TextView *tvInstallDataSize_ = nullptr;
UI::TextView *tvRegion_ = nullptr;
UI::TextView *tvPlayTime_ = nullptr;
UI::TextView *tvCRC_ = nullptr;
UI::TextView *tvID_ = nullptr;
UI::Button *tvCRCCopy_ = nullptr;
NoticeView *tvVerified_ = nullptr;
UI::Choice *btnGameSettings_ = nullptr;
UI::Choice *btnCreateGameConfig_ = nullptr;
UI::Choice *btnDeleteGameConfig_ = nullptr;
UI::Choice *btnDeleteSaveData_ = nullptr;
UI::Choice *btnSetBackground_ = nullptr;
UI::Choice *btnCalcCRC_ = nullptr;
std::vector<UI::Choice *> otherChoices_;
std::string CRC32string;
bool isHomebrew_ = false;
bool inGame_ = false;
};