Skip to content

Commit

Permalink
move upload bar and be make nice of looking
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 8, 2020
1 parent 30d6f21 commit 3007b0f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,34 +104,6 @@ t[#t + 1] =
}
}

--UPLOADBAR LULL
t[#t + 1] = Def.Quad {
InitCommand = function(self)
self:xy(350, 300):zoomto(30, 100):diffuse(color("#111111")):valign(1):diffusealpha(0)
end,
UploadProgressMessageCommand = function(self, params)
self:diffusealpha(1)
self:zoomto(30, 100)

if params.percent == 1 then
self:diffusealpha(0)
end
end
}
t[#t + 1] = Def.Quad {
InitCommand = function(self)
self:xy(350, 300):zoomto(30, 0):diffuse(color("#AAAAAAA")):valign(1):diffusealpha(0)
end,
UploadProgressMessageCommand = function(self, params)
self:diffusealpha(1)
self:zoomto(30, params.percent * 100)

if params.percent == 1 then
self:diffusealpha(0)
end
end
}

t[#t + 1] = LoadActor("../_mousewheelscroll")
collectgarbage()
return t
47 changes: 46 additions & 1 deletion Themes/Til Death/BGAnimations/_PlayerInfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ local numfaves = 0
local AvatarX = 0
local AvatarY = SCREEN_HEIGHT - 50
local playerRating = 0
local uploadbarwidth = 100
local uploadbarheight = 10

local setnewdisplayname = function(answer)
if answer ~= "" then
Expand Down Expand Up @@ -373,8 +375,51 @@ t[#t + 1] =
DFRFinishedMessageCommand = function(self)
self:queuecommand("Set")
end
},
-- ok coulda done this as a separate object to avoid copy paste but w.e
-- upload progress bar bg
Def.Quad {
InitCommand = function(self)
self:xy(SCREEN_WIDTH * 2/3, AvatarY + 41):zoomto(uploadbarwidth, uploadbarheight)
self:diffuse(color("#111111")):diffusealpha(0):halign(0)
end,
UploadProgressMessageCommand = function(self, params)
self:diffusealpha(1)
if params.percent == 1 then
self:diffusealpha(0)
end
end
},
-- fill bar
Def.Quad {
InitCommand = function(self)
self:xy(SCREEN_WIDTH * 2/3, AvatarY + 41):zoomto(0, uploadbarheight)
self:diffuse(color("#AAAAAAA")):diffusealpha(0):halign(0)
end,
UploadProgressMessageCommand = function(self, params)
self:diffusealpha(1)
self:zoomto(params.percent * uploadbarwidth, uploadbarheight)
if params.percent == 1 then
self:diffusealpha(0)
end
end
},
-- super required explanatory text
LoadFont("Common Normal") ..
{
InitCommand = function(self)
self:xy(SCREEN_WIDTH * 2/3, AvatarY + 27):halign(0):valign(0)
self:diffuse(getMainColor("positive")):diffusealpha(0):zoom(0.35)
self:settext("Uploading Scores...")
end,
UploadProgressMessageCommand = function(self, params)
self:diffusealpha(1)
if params.percent == 1 then
self:diffusealpha(0)
end
end
}
}
}

local function Update(self)
t.InitCommand = function(self)
Expand Down

0 comments on commit 3007b0f

Please sign in to comment.