Skip to content

Commit

Permalink
Fix activity glow being on top of resize handles, fix command input i…
Browse files Browse the repository at this point in the history
…ssue
  • Loading branch information
timothyschoen committed Dec 17, 2024
1 parent e7cd6f6 commit d8a9f1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Source/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,13 @@ void Object::render(NVGcontext* nvg)
{
auto const lb = getLocalBounds();
auto const b = lb.reduced(margin);


if (cnv->shouldShowObjectActivity() && !approximatelyEqual(activeStateAlpha, 0.0f)) {
auto glowColour = cnv->dataCol;
glowColour.a = static_cast<uint8_t>(activeStateAlpha * 255);
nvgSmoothGlow(nvg, lb.getX(), lb.getY(), lb.getWidth(), lb.getHeight(), glowColour, nvgRGBA(0, 0, 0, 0), Corners::objectCornerRadius, 1.1f);
}

if (selectedFlag && showHandles) {
auto& resizeHandleImage = cnv->resizeHandleImage;
int angle = 360;
Expand All @@ -1201,12 +1207,6 @@ void Object::render(NVGcontext* nvg)
}
}

if (cnv->shouldShowObjectActivity() && !approximatelyEqual(activeStateAlpha, 0.0f)) {
auto glowColour = cnv->dataCol;
glowColour.a = static_cast<uint8_t>(activeStateAlpha * 255);
nvgSmoothGlow(nvg, lb.getX(), lb.getY(), lb.getWidth(), lb.getHeight(), glowColour, nvgRGBA(0, 0, 0, 0), Corners::objectCornerRadius, 1.1f);
}

if (gui && gui->isTransparent() && !getValue<bool>(locked) && !cnv->isGraph) {
nvgFillColor(nvg, cnv->transparentObjectBackgroundCol);
nvgFillRoundedRect(nvg, b.getX(), b.getY(), b.getWidth(), b.getHeight(), Corners::objectCornerRadius);
Expand Down
5 changes: 5 additions & 0 deletions Source/Sidebar/CommandInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ class LuaExpressionParser {
lua_pop(L, 1); // Remove result from stack
return result;
}
if (lua_isboolean(L, -1)) {
bool result = lua_toboolean(L, -1);
lua_pop(L, 1); // Remove result from stack
return static_cast<double>(result);
}
if (lua_isstring(L, -1)) {
String result = lua_tostring(L, -1);
lua_pop(L, 1); // Remove result from stack
Expand Down

0 comments on commit d8a9f1b

Please sign in to comment.