#pragma once
#include <deque>
#include "Common/UI/View.h"
#include "Common/UI/ViewGroup.h"
#include "GPU/Common/PostShader.h"
#include "MiscScreens.h"
class DisplayLayoutScreen : public UIDialogScreenWithGameBackground {
public:
DisplayLayoutScreen(const Path &filename);
void CreateViews() override;
void dialogFinished(const Screen *dialog, DialogResult result) override;
void onFinish(DialogResult reason) override;
void resized() override {
RecreateViews();
}
bool wantBrightBackground() const override { return true; }
const char *tag() const override { return "DisplayLayout"; }
protected:
UI::EventReturn OnPostProcShaderChange(UI::EventParams &e);
void sendMessage(UIMessage message, const char *value) override;
void DrawBackground(UIContext &dc) override;
private:
UI::ChoiceStrip *mode_ = nullptr;
UI::Choice *postProcChoice_ = nullptr;
std::string shaderNames_[256];
std::deque<bool> settingsVisible_;
};
class PostProcScreen : public UI::ListPopupScreen {
public:
PostProcScreen(std::string_view title, int id, bool showStereoShaders)
: ListPopupScreen(title), id_(id), showStereoShaders_(showStereoShaders) { }
void CreateViews() override;
const char *tag() const override { return "PostProc"; }
private:
void OnCompleted(DialogResult result) override;
bool ShowButtons() const override { return true; }
std::vector<ShaderInfo> shaders_;
int id_;
bool showStereoShaders_;
std::vector<int> indexTranslation_;
};