forked from etternagame/etterna
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slightly modernize screenprofilesave lua
- Loading branch information
Showing
1 changed file
with
15 additions
and
28 deletions.
There are no files selected for viewing
43 changes: 15 additions & 28 deletions
43
Themes/_fallback/BGAnimations/ScreenProfileSave overlay.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,20 @@ | ||
local x = | ||
Def.ActorFrame { | ||
-- this used to be responsible for showing "Saving Profiles" after Evaluation, but we moved saving to before Evaluation | ||
-- now it is responsible for clearing the chart leaderboard cache | ||
return Def.ActorFrame { | ||
Def.Quad { | ||
InitCommand = function(self) | ||
self:Center():zoomto(SCREEN_WIDTH, 80):diffuse(color("0,0,0,0.5")) | ||
end | ||
end, | ||
}, | ||
LoadFont("Common Normal") .. | ||
{ | ||
Text = ScreenString("Saving Profiles"), | ||
InitCommand = function(self) | ||
self:Center():diffuse(color("1,1,1,1")):shadowlength(1) | ||
end, | ||
OffCommand = function(self) | ||
self:linear(0.15):diffusealpha(0) | ||
end | ||
} | ||
} | ||
|
||
x[#x + 1] = | ||
Def.Actor { | ||
BeginCommand = function(self) | ||
if SCREENMAN:GetTopScreen():HaveProfileToSave() then | ||
self:sleep(1) | ||
end | ||
self:queuecommand("Load") | ||
end, | ||
LoadCommand = function() | ||
SCREENMAN:GetTopScreen():Continue() | ||
end | ||
} | ||
|
||
return x | ||
BeginCommand = function(self) | ||
if SCREENMAN:GetTopScreen():HaveProfileToSave() then | ||
self:sleep(1) | ||
end | ||
self:queuecommand("Load") | ||
end, | ||
LoadCommand = function() | ||
SCREENMAN:GetTopScreen():Continue() | ||
end, | ||
}, | ||
} |