diff --git a/Themes/Til Death/BGAnimations/ScreenCoreBundleSelect underlay.lua b/Themes/Til Death/BGAnimations/ScreenCoreBundleSelect underlay.lua new file mode 100644 index 0000000000..a8da1decc0 --- /dev/null +++ b/Themes/Til Death/BGAnimations/ScreenCoreBundleSelect underlay.lua @@ -0,0 +1,108 @@ +local minidoots = {"Novice", "Beginner", "Intermediate", "Advanced", "Expert"} +local diffcolors = {"#66ccff","#099948","#ddaa00","#ff6666","#c97bff"} +local packsy +local packspacing = 54 +local ind = 1 + +local o = Def.ActorFrame{ + InitCommand=function(self) + self:xy(SCREEN_WIDTH/2, 50):halign(0.5) + end, + CodeMessageCommand = function(self, params) + if params.Name == 'Up' then + ind = ind - 1 + if ind < 1 then + ind = 5 + end + self:queuecommand("SelectionChanged") + end + if params.Name == 'Down' then + ind = ind + 1 + if ind > 5 then + ind = 1 + end + self:queuecommand("SelectionChanged") + end + if params.Name == 'Select' then + DLMAN:DownloadCoreBundle(minidoots[i]) + -- then move to screenselectmusic some way + end + end, + Def.Quad{ + InitCommand=function(self) + self:y(200):zoomto(500,500):diffuse(getMainColor('frames')):diffusealpha(1) + end, + }, + LoadFont("Common Large") .. { + InitCommand=function(self) + self:zoom(0.5) + end, + OnCommand=function(self) + self:settext("You have no songs!") + end + }, + LoadFont("Common normal") .. { + InitCommand=function(self) + self:y(24):zoom(0.5) + end, + OnCommand=function(self) + self:settext("Select a skill range to begin downloading some") + end + }, + LoadFont("Common normal") .. { + InitCommand=function(self) + self:y(330):zoom(0.4) + end, + OnCommand=function(self) + self:settext("Core bundles are diverse selections of packs that span a skill range. They are chosen based on quality\nand popularity and are intended to span a variety of music and chart types. They will always be \navailable for download in the Packs tab in case you misjudge your level or wish for an easy step up.") + end + } +} + +local function makedoots(i) + local packinfo + local t = Def.ActorFrame{ + InitCommand=function(self) + self:y(packspacing*i) + end, + + Def.Quad{ + InitCommand=function(self) + self:y(-12):zoomto(400,48):valign(0):diffuse(getMainColor('positive')):diffuse(color(diffcolors[i])) + end, + OnCommand=function(self) + self:queuecommand("SelectionChanged") + end, + SelectionChangedCommand=function(self) + if i == ind then + self:diffusealpha(1) + else + self:diffusealpha(0.5) + end + end + }, + LoadFont("Common Large") .. { + InitCommand=function(self) + self:zoom(0.5) + end, + OnCommand=function(self) + self:settext(minidoots[i]) + end + }, + LoadFont("Common normal") .. { + InitCommand=function(self) + self:y(24):zoom(0.5) + end, + OnCommand=function(self) + self:settextf("(%dmb)", 29) + end + } + } + return t +end + +for i=1,#minidoots do + o[#o+1] = makedoots(i) +end + +return o \ No newline at end of file diff --git a/Themes/Til Death/Scripts/02 Branches.lua b/Themes/Til Death/Scripts/02 Branches.lua index 64970aa3d9..43070126d8 100644 --- a/Themes/Til Death/Scripts/02 Branches.lua +++ b/Themes/Til Death/Scripts/02 Branches.lua @@ -76,7 +76,7 @@ Branch = { -- a possibility someone will use their existing StepMania simfile -- collection with sm-ssc via AdditionalFolders/AdditionalSongFolders. if SONGMAN:GetNumSongs() == 0 and SONGMAN:GetNumAdditionalSongs() == 0 then - return "ScreenHowToInstallSongs" + return "ScreenCoreBundleSelect" end if PROFILEMAN:GetNumLocalProfiles() >= 2 then return "ScreenSelectProfile" @@ -87,7 +87,7 @@ Branch = { OptionsEdit = function() -- Similar to above, don't let anyone in here with 0 songs. if SONGMAN:GetNumSongs() == 0 and SONGMAN:GetNumAdditionalSongs() == 0 then - return "ScreenHowToInstallSongs" + return "ScreenCoreBundleSelect" end return "ScreenOptionsEdit" end, diff --git a/Themes/Til Death/metrics.ini b/Themes/Til Death/metrics.ini index 93844abc21..81f5feef7a 100644 --- a/Themes/Til Death/metrics.ini +++ b/Themes/Til Death/metrics.ini @@ -226,6 +226,21 @@ ShowBPMDisplay=false ShowBPMLabel=false SampleMusicDelay=0 +[ScreenCoreBundleSelect] +Class="ScreenSplash" +Fallback="ScreenSplash" +NextScreen=Branch.TitleMenu() +PrevScreen=Branch.TitleMenu() +ShowStyleIcon=false +TimerSeconds=-1 +ShowHelp=false + +CodeNames="Up,Down,Select" +CodeUp="MenuUp" +CodeDown="MenuDown" +CodeSelect="Start" + +# our equivalent of howtoinstallsongs except you know, it does that for you -mina [ScreenAvatarSwitch] Class="ScreenWithMenuElements" Fallback="ScreenWithMenuElements" diff --git a/src/DownloadManager.cpp b/src/DownloadManager.cpp index f5cd3139bc..16ba50fa6e 100644 --- a/src/DownloadManager.cpp +++ b/src/DownloadManager.cpp @@ -1516,6 +1516,13 @@ class LunaDownloadManager : public Luna } return 1; } + static int DownloadCoreBundle(T* p, lua_State* L) + { + // pass "novice", "expert" etc, should start a queue and download packs in sequence rather than concurrently to minimize time before can begin -mina + p->DownloadCoreBundle(SArg(1)); + return 1; + } + LunaDownloadManager() { ADD_METHOD(GetPackList); @@ -1533,6 +1540,7 @@ class LunaDownloadManager : public Luna ADD_METHOD(GetLastVersion); ADD_METHOD(GetRegisterPage); ADD_METHOD(Logout); + ADD_METHOD(DownloadCoreBundle) } }; LUA_REGISTER_CLASS(DownloadManager) diff --git a/src/DownloadManager.h b/src/DownloadManager.h index dd4d3c9804..3177ac72bd 100644 --- a/src/DownloadManager.h +++ b/src/DownloadManager.h @@ -201,6 +201,7 @@ class DownloadManager // most recent single score upload result -mina RString mostrecentresult = ""; + void DownloadCoreBundle(string whichoneyo) { bool imnotdoneyet = true; }; // handle this how u want // Lua void PushSelf(lua_State *L);