Skip to content

Commit

Permalink
scale MusicRate Quad on ScreenEval more cleanly
Browse files Browse the repository at this point in the history
I noticed that the Quad behind the MusicRate text on ScreenEvaluation didn't cover the full width of the banner in 4:3 aspect ratio (but did in 16:9).

This code should size both the Quad and the BitmapText absolutely and then scale down using a zoom factor of 0.7 on their parent ActorFrame.
  • Loading branch information
quietly-turning committed Oct 15, 2017
1 parent 784e7a8 commit 955fee2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BGAnimations/ScreenEvaluation common/RateMod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ return Def.ActorFrame{
-- don't bother drawing the ActorFrame if MusicRate==1
InitCommand=function(self)
self:visible(SL.Global.ActiveModifiers.MusicRate ~= 1)
:xy(_screen.cx, 172)
:xy(_screen.cx, 172):zoom(0.7)
end,

--quad behind the MusicRate text
Def.Quad{
InitCommand=function(self) self:diffuse( color("#1E282FCC") ):zoomto(293,14) end,
InitCommand=function(self) self:diffuse( color("#1E282FCC") ):zoomto(418,20) end,
},

--the MusicRate text
LoadFont("_miso")..{
InitCommand=function(self) self:shadowlength(1):zoom(0.7) end,
InitCommand=function(self) self:shadowlength(1) end,
OnCommand=function(self)
self:settext( ("%g"):format(SL.Global.ActiveModifiers.MusicRate) .. " " .. THEME:GetString("OptionTitles", "MusicRate") )

Expand Down

0 comments on commit 955fee2

Please sign in to comment.