even more rsr stuff

helpdisplay + difficulties. which color is best on sstitle?

(Sourced from shakesoda/stepmania.)
This commit is contained in:
Jonathan Payne
2013-10-09 01:39:11 -07:00
parent 6d393c76b9
commit ad67621b8a
8 changed files with 136 additions and 12 deletions
+1 -1
View File
@@ -406,7 +406,7 @@ HoldJudgmentHeldCommand=finishtweening;visible,true;shadowlength,0;diffusealpha,
# How fast it changes between texts (seconds)
TipShowTime=4
# How long each switch takes (seconds)
TipSwitchTime=1
TipSwitchTime=2
# The Command when its made
TipOnCommand=shadowlength,0;diffuseblink
@@ -23,7 +23,10 @@ local t = LoadFallbackB();
for pn in ivalues(PlayerNumber) do
t[#t+1] = StepsDisplay(pn) .. {
InitCommand=cmd(x,pn == PLAYER_1 and SCREEN_CENTER_X*0.5 or SCREEN_CENTER_X*1.5;y,SCREEN_BOTTOM-96);
}
};
end
--
t[#t+1] = StandardDecorationFromFileOptional("DifficultyIconRow","DifficultyIconRow");
--
return t;
@@ -0,0 +1,24 @@
local c = {
color("#33B5E5"),
color("#0099CC"),
color("#AA66CC"),
color("#9933CC"),
color("#99CC00"),
color("#669900"),
color("#FFBB33"),
color("#FF8800"),
color("#FF4444"),
color("#CC0000"),
}
local t = Def.ActorFrame {};
for i=1,#c do
t[#t+1] = Def.Quad {
InitCommand=cmd(zoomto,32,32;x,32*((i-1)%2);y,32*math.floor((i-1)/2));
OnCommand=cmd(diffuse,c[i];shadowlength,1.5);
};
end
t.OnCommand=cmd(x,96;y,128;shadowlength,1.5);
return t;
@@ -4,4 +4,5 @@
local t = Def.ActorFrame {};
t[#t+1] = StandardDecorationFromFileOptional("Header","Header");
t[#t+1] = StandardDecorationFromFileOptional("Footer","Footer");
t[#t+1] = StandardDecorationFromFileOptional("HelpDisplay","HelpDisplay");
return t
+1
View File
@@ -0,0 +1 @@
Common Normal
@@ -0,0 +1,75 @@
local t = Def.ActorFrame {};
local function GetEdits( in_Song, in_StepsType )
if in_Song then
local sSong = in_Song;
local sCurrentStyle = GAMESTATE:GetCurrentStyle();
local sStepsType = in_StepsType;
local iNumEdits = 0;
if sSong:HasEdits( sStepsType ) then
local tAllSteps = sSong:GetAllSteps();
for i,Step in pairs(tAllSteps) do
if Step:IsAnEdit() and Step:GetStepsType() == sStepsType then
iNumEdits = iNumEdits + 1;
end
end
return iNumEdits;
else
return iNumEdits;
end
else
return 0;
end
end;
--
for idx,diff in pairs(Difficulty) do
local sDifficulty = ToEnumShortString( diff );
local tLocation = {
Beginner = 0,
Easy = 32,
Medium = 64,
Hard = 96,
Challenge = 128,
Edit = 128+48,
};
t[#t+1] = Def.ActorFrame {
SetCommand=function(self)
local c = self:GetChildren();
local song = GAMESTATE:GetCurrentSong()
local bHasStepsTypeAndDifficulty = false;
local meter = "";
if song then
local st = GAMESTATE:GetCurrentStyle():GetStepsType();
bHasStepsTypeAndDifficulty = song:HasStepsTypeAndDifficulty( st, diff );
local steps = song:GetOneSteps( st, diff );
if steps then
meter = steps:GetMeter();
append = ""
--
if diff == 'Difficulty_Edit' then
meter = GetEdits( song, st );
append = ( GetEdits( song, st ) > 1 ) and "Edits" or "Edit"
meter = meter .. " " .. append
end
end
end
c.Meter:settext( meter );
self:playcommand( bHasStepsTypeAndDifficulty and "Show" or "Hide" );
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
--
Def.Quad {
Name="BarPeice";
ShowCommand=cmd(stoptweening;linear,0.1;diffuse,CustomDifficultyToColor( sDifficulty ));
HideCommand=cmd(stoptweening;decelerate,0.05;diffuse,CustomDifficultyToDarkColor( sDifficulty ));
InitCommand=cmd(x,tLocation[sDifficulty];diffuse,CustomDifficultyToColor( sDifficulty );zoomto,(sDifficulty == 'Edit') and 64 or 32,32);
};
LoadFont("StepsDisplay","Meter") .. {
Name="Meter";
Text=(sDifficulty == "Edit") and "0 Edits" or "0";
ShowCommand=cmd(stoptweening;linear,0.1;diffuse,Color.White);
HideCommand=cmd(stoptweening;decelerate,0.05;diffuse,CustomDifficultyToColor( sDifficulty ));
InitCommand=cmd(x,tLocation[sDifficulty];shadowlength,1.5;zoom,0.75;diffuse,CustomDifficultyToColor( sDifficulty ));
};
};
end
return t
@@ -0,0 +1,14 @@
local t = Def.HelpDisplay {
File = THEME:GetPathF("HelpDisplay", "text");
InitCommand=function(self)
local s = THEME:GetString(Var "LoadingScreen","HelpText");
self:SetTipsColonSeparated(s);
end;
SetHelpTextCommand=function(self, params)
self:SetTipsColonSeparated( params.Text );
end;
};
t.ScreenChangedMessageCommand=cmd(playcommand,"SetHelpText",{ Text = "&MENULEFT; Left &START; Start &SELECT; Select"});
return t;
+16 -10
View File
@@ -1,13 +1,6 @@
[Global]
FallbackTheme=_fallback
[FadingBanner]
BannerFadeFromCachedCommand=diffusealpha,1;stoptweening;accelerate,0.05;glow,Color.Alpha( Color("White"), 0.45 );decelerate,0.075;diffusealpha,0;glow,Color("Invisible");
BannerOnCommand=
BannerFadeFromCachedCommand=diffusealpha,1;stoptweening;linear,0.1;glow,Color.Alpha(Color("White"),0.25);decelerate,0.15;glow,Color.Invisible;diffusealpha,0
BannerFadeOffCommand=diffusealpha,1;stoptweening;linear,0.1;diffusealpha,0
BannerResetFadeCommand=diffusealpha,1
[ScreenWithMenuElements]
ShowHeader=true
HeaderX=SCREEN_CENTER_X
@@ -22,6 +15,13 @@ FooterY=SCREEN_BOTTOM
FooterOnCommand=
FooterOffCommand=
#
ShowHelpDisplay=true
HelpDisplayX=SCREEN_CENTER_X
HelpDisplayY=SCREEN_BOTTOM-48+4
HelpDisplayOnCommand=shadowlength,1.5
HelpDisplayOffCommand=
#
TimerX=SCREEN_RIGHT-16
TimerY=SCREEN_TOP+40-4.5
@@ -56,12 +56,18 @@ BannerY=SCREEN_CENTER_Y-120
MusicWheelX=SCREEN_RIGHT-128-18
MusicWheelOnCommand=draworder,-1
ShowDifficultyIconRow=true
DifficultyIconRowX=SCREEN_CENTER_X-160-96-16
DifficultyIconRowY=SCREEN_CENTER_Y-120+56
DifficultyIconRowOnCommand=
DifficultyIconRowOffcommand=
[StepsDisplay]
FrameX=0
FrameY=0
FrameOnCommand=
FrameLoadCommand=
FrameSetCommand=%function(self,param) if param.CustomDifficulty then self:diffuse(CustomDifficultyToDarkColor(param.CustomDifficulty)) end end
FrameSetCommand=%function(self,param) if param.CustomDifficulty then self:diffuse(CustomDifficultyToColor(param.CustomDifficulty)) end end
NumTicks=10
MaxTicks=10
@@ -94,13 +100,13 @@ end;
ShowDescription=true
DescriptionX=(-32)/2
DescriptionY=-1
DescriptionOnCommand=shadowlength,1.5;
DescriptionOnCommand=shadowlength,1.5;maxwidth,128+32-4
DescriptionSetCommand=%function(self,param) \
if self:GetText() == "" then \
self:settext("Edit"); \
end; \
if param.CustomDifficulty then \
self:diffuse(CustomDifficultyToColor(param.CustomDifficulty)); \
self:diffuse(CustomDifficultyToLightColor(param.CustomDifficulty)); \
end; \
end;
#