forked from jaildesigner-jailgames/jaildoctors_dilemma
i per fi ja comença a tornar tot a la normalitat
This commit is contained in:
@@ -146,9 +146,9 @@ std::shared_ptr<Surface> Text::writeToSurface(const std::string &text, int zoom,
|
||||
{
|
||||
auto width = lenght(text, kerning) * zoom;
|
||||
auto height = box_height_ * zoom;
|
||||
auto surface = std::make_shared<Surface>(Screen::get()->getRendererSurface(), width, height);
|
||||
auto surface = std::make_shared<Surface>(width, height);
|
||||
Screen::get()->setRendererSurface(surface);
|
||||
Screen::get()->clearSurface(stringToColor("transparent"));
|
||||
surface->clear(stringToColor("transparent"));
|
||||
write(0, 0, text, kerning);
|
||||
Screen::get()->setRendererSurface(nullptr);
|
||||
|
||||
@@ -160,9 +160,9 @@ std::shared_ptr<Surface> Text::writeDXToSurface(Uint8 flags, const std::string &
|
||||
{
|
||||
auto width = Text::lenght(text, kerning) + shadow_distance;
|
||||
auto height = box_height_ + shadow_distance;
|
||||
auto surface = std::make_shared<Surface>(Screen::get()->getRendererSurface(), width, height);
|
||||
auto surface = std::make_shared<Surface>(width, height);
|
||||
Screen::get()->setRendererSurface(surface);
|
||||
Screen::get()->clearSurface(stringToColor("transparent"));
|
||||
surface->clear(stringToColor("transparent"));
|
||||
writeDX(flags, 0, 0, text, kerning, textColor, shadow_distance, shadow_color, lenght);
|
||||
Screen::get()->setRendererSurface(nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user