add some system direction stuff [Midiman]

This commit is contained in:
AJ Kelly
2010-06-08 18:21:09 -05:00
parent f8a9423301
commit a97f7eb9d2
6 changed files with 91 additions and 30 deletions
@@ -7,5 +7,6 @@ t[#t+1] = StandardDecorationFromFileOptional("CurrentGametype","CurrentGametype"
t[#t+1] = StandardDecorationFromFileOptional("LifeDifficulty","LifeDifficulty");
t[#t+1] = StandardDecorationFromFileOptional("TimingDifficulty","TimingDifficulty");
t[#t+1] = StandardDecorationFromFileOptional("NetworkStatus","NetworkStatus");
t[#t+1] = StandardDecorationFromFileOptional("SystemDirection","SystemDirection");
return t
@@ -8,9 +8,12 @@ return Def.CourseContentsList {
HideCommand=cmd(linear,0.3;zoomy,0);
SetCommand=function(self)
self:SetFromGameState();
self:PositionItems();
self:SetTransformFromHeight(44);
self:SetCurrentAndDestinationItem(0);
-- self:SetDestinationItem( self:GetNumItems()-2 );
self:SetLoop(false);
self:SetMask(270,44);
self:SetMask(270,0);
end;
CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
@@ -34,7 +37,7 @@ return Def.CourseContentsList {
};
Def.TextBanner {
InitCommand=cmd(x,-96;y,1;Load,"TextBanner";SetFromString,"", "", "", "", "", "");
InitCommand=cmd(x,-128;y,1;Load,"TextBanner";SetFromString,"", "", "", "", "", "");
SetSongCommand=function(self, params)
if params.Song then
if GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() == "Abomination" then
@@ -65,17 +68,17 @@ return Def.CourseContentsList {
end;
};
LoadFont("CourseEntryDisplay","number") .. {
InitCommand=cmd(x,-114-8;y,-12;shadowlength,1);
--[[ LoadFont("CourseEntryDisplay","number") .. {
InitCommand=cmd(x,114+8;y,-12;shadowlength,1);
SetSongCommand=function(self, params)
self:settext(string.format("#%i", params.Number));
(cmd(finishtweening;zoom,0.5;zoomy,0.5*1.5;diffusealpha,0;sleep,0.125*params.Number;linear,0.125;diffusealpha,1;linear,0.05;zoomy,0.5*1;zoomx,0.5*1.1;glow,color("1,1,1,0.5");decelerate,0.1;zoom,0.5;glow,color("1,1,1,0")))(self);
end;
};
}; --]]
LoadFont("CourseEntryDisplay","difficulty") .. {
Text="0";
InitCommand=cmd(x,-114;y,3;zoom,0.75;shadowlength,1);
InitCommand=cmd(x,114;y,0;zoom,0.75;shadowlength,1);
SetSongCommand=function(self, params)
if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end
self:settext( params.Meter );
@@ -0,0 +1,40 @@
local t = Def.ActorFrame {};
local tInfo = {
{"EventMode","Stages"},
{"LifeDifficulty","Life"},
{"TimingDifficulty","Difficulty"},
};
local fSpacingX = 72;
local function MakeIcon( sTarget )
local t = Def.ActorFrame {
LoadActor(THEME:GetPathG("MenuTimer","Frame"));
LoadFont("Common Normal") .. {
Text=sTarget[2];
InitCommand=cmd(y,24+2;zoom,0.5;shadowlength,1);
};
--
LoadFont("Common Normal") .. {
Text="TEST";
-- Text=( PREFSMAN:GetPreference("EventMode") ) and "∞" or PREFSMAN:GetPreference("SongsPerPlay");
OnCommand=cmd(settext,"4");
Condition=sTarget[1] == "EventMode";
};
--
--[[ for i=1,8 do
t[#t+1] = Def.Quad {
InitCommand=cmd(vertalign,bottom;zoomto,4,10+(i*4));
};
end --]]
};
return t
end;
for i=1,#tInfo do
t[#t+1] = MakeIcon( tInfo[i] ) .. {
InitCommand=cmd(x,(i-1)*fSpacingX);
};
end
return t
@@ -10,29 +10,40 @@ function MakeBitmapTest()
};
end
for s in ivalues(Stage) do
if not PREFSMAN:GetPreference("EventMode") then
for s in ivalues(Stage) do
stages[#stages+1] = MakeBitmapTest() .. {
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 );
if Stage == 'Stage_Event' then
self:settext( StageToLocalizedString(Stage) .. " Mode" );
else
self:settext( StageToLocalizedString(Stage) .. " Stage" );
end
self:diffuse( StageToColor(s) );
self:diffusebottomedge( ColorMidTone(StageToColor(s)) );
self:strokecolor( cStageOutlineColor );
end;
}
end
else
stages[#stages+1] = MakeBitmapTest() .. {
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 );
if Stage == 'Stage_Event' then
self:settext( StageToLocalizedString(Stage) .. " Mode" );
else
self:settext( StageToLocalizedString(Stage) .. " Stage" );
end
self:diffuse( StageToColor(s) );
self:diffusebottomedge( ColorMidTone(StageToColor(s)) );
self:strokecolor( cStageOutlineColor );
SetCommand=function(self,params)
local Stage = GAMESTATE:GetCurrentStageIndex();
self:settextf( "Stage %03i", Stage);
self:diffuse( StageToColor('Stage_1st') );
self:diffusebottomedge( ColorMidTone(StageToColor('Stage_1st')) );
self:strokecolor( Colors.Alpha( ColorDarkTone(StageToColor('Stage_1st')), 0.75) );
end;
}
end
+8 -2
View File
@@ -552,7 +552,7 @@ PillTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) \
end
TextureCoordScaleX=1
NumPills=1
AlwaysBounceNormalBar=true
AlwaysBounceNormalBar=false
[TextBanner]
TitleOnCommand=horizalign,left;shadowlength,1;
@@ -699,6 +699,12 @@ TimingDifficultyY=(SCREEN_HEIGHT*0.1575)-24
TimingDifficultyOnCommand=vertalign,bottom;horizalign,right;zoom,0.5;
TimingDifficultyOffCommand=
#
ShowSystemDirection=true
SystemDirectionX=SCREEN_LEFT+40
SystemDirectionY=SCREEN_TOP+24
SystemDirectionOnCommand=
SystemDirectionOffCommand=
#
ShowVersionInfo=true
VersionInfoX=SCREEN_WIDTH*0.9875
VersionInfoY=SCREEN_HEIGHT*0.8825
@@ -837,7 +843,7 @@ WrapScroller=false
UseIconMetrics=true
#
IconGainFocusCommand=stoptweening;bounceend,0.125;zoom,1;
IconLoseFocusCommand=stoptweening;decelerate,0.25;zoom,0.6;
IconLoseFocusCommand=stoptweening;decelerate,0.125;zoom,0.6;
#
IconChoiceEasyX=SCREEN_CENTER_X-160
IconChoiceEasyY=SCREEN_CENTER_Y-48