Skip to content

Commit

Permalink
Make speed not ignore its own proximity
Browse files Browse the repository at this point in the history
  • Loading branch information
darsain committed Dec 3, 2020
1 parent 0539187 commit 61dba19
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions uosc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1854,9 +1854,8 @@ end
function render_speed(this)
if not this.dragging and (elements.curtain.opacity > 0) then return end

local timeline = elements.timeline
local proximity = timeline:get_effective_proximity()
local opacity = this.forced_proximity and this.forced_proximity or (this.dragging and 1 or proximity)
local proximity = this:get_effective_proximity()
local opacity = this.dragging and 1 or proximity

if opacity == 0 then return end

Expand Down Expand Up @@ -2469,6 +2468,10 @@ if options.speed then
if not this.dragging then this:fadein() end
end)
end,
get_effective_proximity = function(this)
local proximity = math.max(this.proximity, elements.timeline:get_effective_proximity())
return this.forced_proximity and this.forced_proximity or proximity
end,
fadeout = function(this)
this:tween_property('forced_proximity', 1, 0, function(this)
this.forced_proximity = 0
Expand Down

0 comments on commit 61dba19

Please # to comment.