From c526f14c44f86b17c26d5e3a04b372887e8932ab Mon Sep 17 00:00:00 2001 From: lisyarus Date: Tue, 20 Aug 2024 17:45:41 +0300 Subject: [PATCH] Turn sources into circles --- source/application.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/application.cpp b/source/application.cpp index 817dd1e..cf445dc 100644 --- a/source/application.cpp +++ b/source/application.cpp @@ -1229,9 +1229,11 @@ namespace gmtk else shift = {0.f, -1.f}; + auto box = v.location.bbox(); + shift *= v.location.bbox()[0].length() * animation_factor(s.animate) / 12.f; - painter.rect(shift + v.location.bbox(-0.2f), gfx::black); - painter.rect(shift + v.location.bbox(-0.225f), color_of(s.type)); + painter.circle(shift + box.center(), box[0].length() * 0.6f / 2.f, gfx::black, 72); + painter.circle(shift + box.center(), box[0].length() * 0.5f / 2.f, color_of(s.type), 72); }); map.world->apply([&](vertex const & v, transformer const & t)