2024-02-18 23:08:03 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "IWidget.hpp"
|
|
|
|
|
#include "../../helpers/Vector2D.hpp"
|
2024-02-19 20:50:58 +00:00
|
|
|
#include "../../helpers/Color.hpp"
|
2024-02-21 22:19:01 +00:00
|
|
|
#include "../Framebuffer.hpp"
|
2024-02-18 23:08:03 +00:00
|
|
|
#include <string>
|
2024-02-21 22:19:01 +00:00
|
|
|
#include <unordered_map>
|
|
|
|
|
#include <any>
|
2024-02-18 23:08:03 +00:00
|
|
|
|
|
|
|
|
struct SPreloadedAsset;
|
2024-03-03 02:19:25 +00:00
|
|
|
class COutput;
|
2024-02-18 23:08:03 +00:00
|
|
|
|
|
|
|
|
class CBackground : public IWidget {
|
|
|
|
|
public:
|
2024-03-03 02:19:25 +00:00
|
|
|
CBackground(const Vector2D& viewport, COutput* output_, const std::string& resourceID, const std::unordered_map<std::string, std::any>& props, bool ss_);
|
2024-02-18 23:08:03 +00:00
|
|
|
|
2024-02-19 16:26:08 +00:00
|
|
|
virtual bool draw(const SRenderData& data);
|
2024-02-18 23:08:03 +00:00
|
|
|
|
|
|
|
|
private:
|
2024-02-21 22:19:01 +00:00
|
|
|
// if needed
|
|
|
|
|
CFramebuffer blurredFB;
|
|
|
|
|
|
|
|
|
|
int blurSize = 10;
|
|
|
|
|
int blurPasses = 3;
|
|
|
|
|
float noise = 0.0117;
|
|
|
|
|
float contrast = 0.8916;
|
|
|
|
|
float brightness = 0.8172;
|
|
|
|
|
float vibrancy = 0.1696;
|
|
|
|
|
float vibrancy_darkness = 0.0;
|
2024-02-18 23:08:03 +00:00
|
|
|
Vector2D viewport;
|
|
|
|
|
std::string resourceID;
|
2024-02-19 20:50:58 +00:00
|
|
|
CColor color;
|
2024-03-03 02:19:25 +00:00
|
|
|
SPreloadedAsset* asset = nullptr;
|
|
|
|
|
COutput* output = nullptr;
|
|
|
|
|
bool isScreenshot = false;
|
2024-02-18 23:08:03 +00:00
|
|
|
};
|