forked from jaildesigner-jailgames/jaildoctors_dilemma
i per fi ja comença a tornar tot a la normalitat
This commit is contained in:
@@ -234,32 +234,31 @@ void Notifier::show(std::vector<std::string> texts, NotificationText text_is, in
|
||||
n.rect = {desp_h, y_pos, width, height};
|
||||
|
||||
// Crea la textura
|
||||
n.surface = std::make_shared<Surface>(Screen::get()->getRendererSurface(), width, height);
|
||||
n.surface = std::make_shared<Surface>(width, height);
|
||||
|
||||
// Prepara para dibujar en la textura
|
||||
Screen::get()->setRendererSurface(n.surface);
|
||||
|
||||
// Dibuja el fondo de la notificación
|
||||
SDL_Rect rect;
|
||||
auto surface = Screen::get()->getRendererSurface();
|
||||
if (shape == NotificationShape::ROUNDED)
|
||||
{
|
||||
rect = {4, 0, width - (4 * 2), height};
|
||||
surface->fillRect(&rect, bg_color_);
|
||||
n.surface->fillRect(&rect, bg_color_);
|
||||
|
||||
rect = {4 / 2, 1, width - 4, height - 2};
|
||||
surface->fillRect(&rect, bg_color_);
|
||||
n.surface->fillRect(&rect, bg_color_);
|
||||
|
||||
rect = {1, 4 / 2, width - 2, height - 4};
|
||||
surface->fillRect(&rect, bg_color_);
|
||||
n.surface->fillRect(&rect, bg_color_);
|
||||
|
||||
rect = {0, 4, width, height - (4 * 2)};
|
||||
surface->fillRect(&rect, bg_color_);
|
||||
n.surface->fillRect(&rect, bg_color_);
|
||||
}
|
||||
|
||||
else if (shape == NotificationShape::SQUARED)
|
||||
{
|
||||
Screen::get()->clearSurface(bg_color_);
|
||||
n.surface->clear(bg_color_);
|
||||
}
|
||||
|
||||
// Dibuja el icono de la notificación
|
||||
|
||||
Reference in New Issue
Block a user