Skip to content

Commit

Permalink
first mockup core bundle download splash for new players
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jul 17, 2018
1 parent 0c4d37d commit db70d23
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 2 deletions.
108 changes: 108 additions & 0 deletions Themes/Til Death/BGAnimations/ScreenCoreBundleSelect underlay.lua
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions Themes/Til Death/Scripts/02 Branches.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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,
Expand Down
15 changes: 15 additions & 0 deletions Themes/Til Death/metrics.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 8 additions & 0 deletions src/DownloadManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,13 @@ class LunaDownloadManager : public Luna<DownloadManager>
}
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);
Expand All @@ -1533,6 +1540,7 @@ class LunaDownloadManager : public Luna<DownloadManager>
ADD_METHOD(GetLastVersion);
ADD_METHOD(GetRegisterPage);
ADD_METHOD(Logout);
ADD_METHOD(DownloadCoreBundle)
}
};
LUA_REGISTER_CLASS(DownloadManager)
Expand Down
1 change: 1 addition & 0 deletions src/DownloadManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit db70d23

Please sign in to comment.