Skip to content

Commit

Permalink
Fix bug in setting alpha when chat is disabled (Fixes #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecxvs committed Jun 3, 2015
1 parent 29f844e commit 33e248d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utchat/client/utchat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function UTChat:PostMessage( utxt )
if chat_enabled then
utxt:Format( "fade", true, 0, 0.3, 0, utxt.init_alpha, Easing.inOutQuad, {Terminate = true})
else
utxt.alpha = 0
utxt.color.a = 0
end
utxt:Format( "shadow", 1, #utxt.text, -1, -1, 150 )

Expand All @@ -95,8 +95,8 @@ function UTChat:PostMessage( utxt )
m:SetDuration(0.1)
else
local msgremainder = (msgs_visible-msgs_fade)
m.init_alpha = (((((-(ix-msgs_fade) * (ix-msgs_fade))/msgremainder + msgremainder))/msgremainder)*(paused and 255*0.5 or 255))
m.alpha = m.init_alpha
m.init_alpha = ((((-(ix-msgs_fade) * (ix-msgs_fade))/msgremainder + msgremainder))/msgremainder) * 255
m.alpha = m.init_alpha * (paused and 0.5 or 1)
end
end
end
Expand Down

0 comments on commit 33e248d

Please sign in to comment.