//
// Created by sasha on 12.12.2025.
//

#include "iscreen.h"
#include "engine/engine.h"

IScreen::IScreen(const std::string &name) : IWidget(nullptr,0,0,0,0) {
    SDL_Log("=> IScreen::IScreen(\"%s\")",name.c_str());
    screen_name = name;

    Engine::addIScreen(name,this);

    this->setSize(Engine::getWindowSize().w,Engine::getWindowSize().h);
}

IScreen::~IScreen() {
    SDL_Log("=> IScreen::~IScreen(\"%s\")",screen_name.c_str());
    Engine::deleteScreen(screen_name);
}

void IScreen::setBackgroundColor(Uint8 r, Uint8 g, Uint8 b) {
    backgroundColor = {r,g,b,255};
}

SDL_Color IScreen::getBackgroundColor() {
    return backgroundColor;
}

void IScreen::onActive(const VariantMap &args) {}
void IScreen::iterate() {}
