Skip to content

Commit

Permalink
use updated save/load for scoredisplay coords
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Oct 5, 2018
1 parent 01a195a commit 81a0836
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Themes/Til Death/BGAnimations/superscoreboard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ local o =
collapsed = true
self:diffusealpha(0.8)

if
FILTERMAN:grabposx("Doot") <= 10 or FILTERMAN:grabposy("Doot") <= 45 or
FILTERMAN:grabposx("Doot") >= SCREEN_WIDTH - 60 or
FILTERMAN:grabposy("Doot") >= SCREEN_HEIGHT - 45
if -- a generic bounds check function that snaps an actor onto the screen or within specified coordinates should be added as an actor member, ie, not this -mina
FILTERMAN:grabposx("ScoreDisplay") <= 10 or FILTERMAN:grabposy("ScoreDisplay") <= 45 or
FILTERMAN:grabposx("ScoreDisplay") >= SCREEN_WIDTH - 60 or
FILTERMAN:grabposy("ScoreDisplay") >= SCREEN_HEIGHT - 45
then
self:xy(10, 45)
else
self:xy(FILTERMAN:grabposx("Doot"), FILTERMAN:grabposy("Doot"))
self:LoadXY()
end

FILTERMAN:HelpImTrappedInAChineseFortuneCodingFactory(true)
Expand Down Expand Up @@ -234,8 +234,8 @@ local o =
self:diffusealpha(0):zoomto(400, 400)
local nx = INPUTFILTER:GetMouseX() - width / 2
local ny = INPUTFILTER:GetMouseY() - self:GetY()
self:GetParent():xy(nx, ny)
FILTERMAN:savepos("Doot", nx, ny)
self:GetParent():SaveXY(nx, ny) -- this can probably be wrapped for convenience -mina
self:GetParent():LoadXY()
else
self:zoomto(dwidth / 2, pdh / 2)
end
Expand Down

0 comments on commit 81a0836

Please sign in to comment.