better stagedisplay. needs SCREENMAN:GetTopScreen() but seems to be unable to handle it.
This commit is contained in:
@@ -1,37 +0,0 @@
|
|||||||
local stages = Def.ActorFrame {
|
|
||||||
BeginCommand=cmd(playcommand,"Set";);
|
|
||||||
CurrentSongChangedMessageCommand=cmd(finishtweening;playcommand,"Set";);
|
|
||||||
};
|
|
||||||
|
|
||||||
local ScreenName = Var "LoadingScreen";
|
|
||||||
|
|
||||||
function MakeBitmapTest()
|
|
||||||
return LoadFont(ScreenName,"StageDisplay") .. {
|
|
||||||
|
|
||||||
};
|
|
||||||
end
|
|
||||||
|
|
||||||
for s in ivalues(Stage) do
|
|
||||||
stages[#stages+1] = MakeBitmapTest() .. {
|
|
||||||
InitCommand=cmd(shadowlength,2);
|
|
||||||
SetCommand=function(self, params)
|
|
||||||
local Stage = GAMESTATE:GetCurrentStage();
|
|
||||||
local StageIndex = GAMESTATE:GetCurrentStageIndex();
|
|
||||||
local screen = SCREENMAN:GetTopScreen();
|
|
||||||
local cStageOutlineColor = ColorDarkTone( StageToStrokeColor(s) );
|
|
||||||
cStageOutlineColor[4] = 0.75;
|
|
||||||
if screen and screen.GetStageStats then
|
|
||||||
local ss = screen:GetStageStats();
|
|
||||||
Stage = ss:GetStage();
|
|
||||||
StageIndex = ss:GetStageIndex();
|
|
||||||
end
|
|
||||||
self:visible( Stage == s );
|
|
||||||
self:settext( StageToLocalizedString(Stage) );
|
|
||||||
self:diffuse( StageToColor(s) );
|
|
||||||
self:diffusebottomedge( ColorMidTone(StageToColor(s)) );
|
|
||||||
self:strokecolor( cStageOutlineColor );
|
|
||||||
end;
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return stages;
|
|
||||||
@@ -1,76 +1,31 @@
|
|||||||
|
local curScreen = Var "LoadingScreen";
|
||||||
|
local curStage = GAMESTATE:GetCurrentStage();
|
||||||
|
local curStageIndex = GAMESTATE:GetCurrentStageIndex();
|
||||||
|
|
||||||
local stages = Def.ActorFrame {
|
local t = Def.ActorFrame {};
|
||||||
BeginCommand=cmd(playcommand,"Set";);
|
|
||||||
CurrentSongChangedMessageCommand=cmd(finishtweening;playcommand,"Set";);
|
|
||||||
};
|
|
||||||
|
|
||||||
local ScreenName = Var "LoadingScreen";
|
t[#t+1] = Def.ActorFrame {
|
||||||
|
LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black",64,12);
|
||||||
function MakeBitmapTest()
|
LoadFont("Common Normal") .. {
|
||||||
return LoadFont(ScreenName,"StageDisplay") .. {
|
InitCommand=cmd(y,-1;shadowlength,1;playcommand,"Set");
|
||||||
|
SetCommand=function(self)
|
||||||
};
|
if GAMESTATE:GetCurrentCourse() then
|
||||||
end
|
self:settext( GAMESTATE:GetCurrentStageIndex()+1 .. " / " .. GAMESTATE:GetCurrentCourse():GetEstimatedNumStages() );
|
||||||
if not PREFSMAN:GetPreference("EventMode") then
|
elseif GAMESTATE:IsEventMode() then
|
||||||
for s in ivalues(Stage) do
|
self:settextf("Stage %s", curStageIndex+1);
|
||||||
stages[#stages+1] = MakeBitmapTest() .. {
|
|
||||||
SetCommand=function(self, params)
|
|
||||||
local tRemap = {
|
|
||||||
Stage_1st = 1,
|
|
||||||
Stage_2nd = 2,
|
|
||||||
Stage_3rd = 3,
|
|
||||||
Stage_4th = 4,
|
|
||||||
Stage_5th = 5,
|
|
||||||
Stage_6th = 6,
|
|
||||||
--[[ 'Stage_Next' = 6,
|
|
||||||
'Stage_Final' = 7,
|
|
||||||
'Stage_Extra1' = 8,
|
|
||||||
'Stage_Extra2' = 9,
|
|
||||||
'Stage_Nonstop' = 10,
|
|
||||||
'Stage_Oni' = 11,
|
|
||||||
'Stage_Endless' = 12,
|
|
||||||
'Stage_Event' = 13,
|
|
||||||
'Stage_Demo' = 14, --]]
|
|
||||||
}
|
|
||||||
local Stage = GAMESTATE:GetCurrentStage();
|
|
||||||
local StageIndex = GAMESTATE:GetCurrentStageIndex();
|
|
||||||
local screen = SCREENMAN:GetTopScreen();
|
|
||||||
-- local cStageOutlineColor = ColorDarkTone( StageToStrokeColor(s) );
|
|
||||||
-- cStageOutlineColor[4] = 0.75;
|
|
||||||
if screen and screen.GetStageStats then
|
|
||||||
local ss = screen:GetStageStats();
|
|
||||||
Stage = ss:GetStage();
|
|
||||||
StageIndex = ss:GetStageIndex();
|
|
||||||
end
|
|
||||||
self:visible( Stage == s );
|
|
||||||
|
|
||||||
if tRemap[Stage] == PREFSMAN:GetPreference("SongsPerPlay") then
|
|
||||||
Stage = 'Stage_Final';
|
|
||||||
else
|
else
|
||||||
Stage = Stage;
|
if THEME:GetMetric(curScreen,"StageDisplayUseShortString") then
|
||||||
s = s;
|
self:settextf("%s", ToEnumShortString(curStage));
|
||||||
end;
|
self:zoom(0.75);
|
||||||
self:settext( string.format( THEME:GetString("ScreenWithMenuElements","StageCounter"), StageToLocalizedString(Stage) ) );
|
|
||||||
self:diffuse( (Stage == 'Stage_Final') and StageToColor('Stage_Final') or StageToColor(s) );
|
|
||||||
self:diffusebottomedge( (Stage == 'Stage_Final') and ColorMidTone(StageToColor('Stage_Final')) or ColorMidTone(StageToColor(s)) );
|
|
||||||
self:strokecolor( (Stage == 'Stage_Final') and ColorDarkTone(StageToColor('Stage_Final')) or ColorDarkTone(StageToColor(s)) );
|
|
||||||
end;
|
|
||||||
}
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
stages[#stages+1] = MakeBitmapTest() .. {
|
self:settextf("%s Stage", ToEnumShortString(curStage));
|
||||||
SetCommand=function(self,params)
|
self:zoom(1);
|
||||||
if Var "LoadingScreen" then
|
|
||||||
local Offset = THEME:GetMetric(Var "LoadingScreen","StageDisplayNumberOffset");
|
|
||||||
local Stage = GAMESTATE:GetCurrentStageIndex();
|
|
||||||
local RealStage = Stage + Offset;
|
|
||||||
self:settextf( THEME:GetString("ScreenWithMenuElements","EventStageCounter"), RealStage );
|
|
||||||
self:diffuse( StageToColor('Stage_1st') );
|
|
||||||
self:diffusebottomedge( ColorMidTone(StageToColor('Stage_1st')) );
|
|
||||||
self:strokecolor( Color.Alpha( ColorDarkTone(StageToColor('Stage_1st')), 0.75) );
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
}
|
--
|
||||||
end
|
self:diffuse(StageToColor(curStage));
|
||||||
|
self:diffusetopedge(ColorLightTone(StageToColor(curStage)));
|
||||||
return stages;
|
end;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
return t
|
||||||
@@ -584,6 +584,9 @@ TimerOffCommand=
|
|||||||
|
|
||||||
StageDisplayNumberOffset=1
|
StageDisplayNumberOffset=1
|
||||||
|
|
||||||
|
#
|
||||||
|
StageDisplayUseShortString=false
|
||||||
|
|
||||||
# This is useful
|
# This is useful
|
||||||
ArcadeOverlayX=
|
ArcadeOverlayX=
|
||||||
ArcadeOverlayY=
|
ArcadeOverlayY=
|
||||||
@@ -1378,11 +1381,12 @@ BPMDisplayY=SCREEN_BOTTOM-17
|
|||||||
BPMDisplayOnCommand=draworder,101
|
BPMDisplayOnCommand=draworder,101
|
||||||
BPMDisplayOffCommand=bounceend,0.25;zoom,0
|
BPMDisplayOffCommand=bounceend,0.25;zoom,0
|
||||||
#
|
#
|
||||||
ShowStageDisplay=not GAMESTATE:IsCourseMode()
|
ShowStageDisplay=true
|
||||||
StageDisplayX=SCREEN_CENTER_X
|
StageDisplayX=SCREEN_CENTER_X
|
||||||
StageDisplayY=SCREEN_TOP+24
|
StageDisplayY=SCREEN_BOTTOM-50
|
||||||
StageDisplayOnCommand=zoom,0.675;
|
StageDisplayOnCommand=draworder,102
|
||||||
StageDisplayOffCommand=bounceend,0.25;zoom,0
|
StageDisplayOffCommand=bounceend,0.25;zoom,0
|
||||||
|
StageDisplayUseShortString=true
|
||||||
#
|
#
|
||||||
ShowScoreFrame=ThemePrefs.Get("GameplayFooter");
|
ShowScoreFrame=ThemePrefs.Get("GameplayFooter");
|
||||||
ScoreFrameX=SCREEN_CENTER_X
|
ScoreFrameX=SCREEN_CENTER_X
|
||||||
|
|||||||
Reference in New Issue
Block a user