30 lines
547 B
C++
30 lines
547 B
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <variant>
|
|
|
|
#include "uui/config.hpp"
|
|
|
|
namespace uui
|
|
{
|
|
class Component
|
|
{
|
|
public:
|
|
Component(const position_t x, const position_t y, const position_t width, const position_t height):
|
|
position_x(x), position_y(y), size_width(width), size_height(height)
|
|
{
|
|
background_color = {0.0f, 0.0f, 0.0f, 0.0f};
|
|
}
|
|
|
|
virtual void render() = 0;
|
|
|
|
protected:
|
|
position_t position_x;
|
|
position_t position_y;
|
|
position_t size_width;
|
|
position_t size_height;
|
|
|
|
std::array<float, 4> background_color;
|
|
};
|
|
|
|
} // namespace uui
|