theme updates from midi; adds protiming

This commit is contained in:
AJ Kelly
2010-07-23 18:57:48 -05:00
parent c12b073a37
commit 986a1ec791
6 changed files with 65 additions and 22 deletions
@@ -1,6 +1,6 @@
local c;
local player = Var "Player";
local bShowProtiming = GetUserPrefB("UserPrefProtiming" .. ToEnumShortString(player) );
local JudgeCmds = {
TapNoteScore_W1 = THEME:GetMetric( "Judgment", "JudgmentW1Command" );
TapNoteScore_W2 = THEME:GetMetric( "Judgment", "JudgmentW2Command" );
@@ -35,14 +35,13 @@ t[#t+1] = Def.ActorFrame {
OnCommand=THEME:GetMetric("Judgment","JudgmentOnCommand");
ResetCommand=cmd(finishtweening;stopeffect;visible,false);
};
LoadFont("Common Normal") .. {
LoadFont("Combo Numbers") .. {
Name="ProtimingDisplay";
Text="";
InitCommand=cmd(visible,false);
OnCommand=THEME:GetMetric("Protiming","ProtimingOnCommand");
ResetCommand=cmd(finishtweening;stopeffect;visible,false);
};
InitCommand = function(self)
c = self:GetChildren();
end;
@@ -66,12 +65,12 @@ t[#t+1] = Def.ActorFrame {
self:playcommand("Reset");
c.Judgment:visible( true );
c.Judgment:visible( not bShowProtiming );
c.Judgment:setstate( iFrame );
JudgeCmds[param.TapNoteScore](c.Judgment);
--~ c.ProtimingDisplay:visible( true );
c.ProtimingDisplay:settext( math.floor(math.abs(param.TapNoteOffset * 1000)) );
c.ProtimingDisplay:visible( bShowProtiming );
c.ProtimingDisplay:settextf("%i%%",100 - math.floor(math.abs(param.TapNoteOffset * 1000)) );
ProtimingCmds[param.TapNoteScore](c.ProtimingDisplay);
end;
+31 -7
View File
@@ -22,6 +22,12 @@ function InitUserPrefs()
if GetUserPrefB("UserPrefComboOnRolls") == nil then
SetUserPref("UserPrefComboOnRolls", false);
end;
if GetUserPrefB("UserPrefProtimingP1") == nil then
SetUserPref("UserPrefProtimingP1", false);
end;
if GetUserPrefB("UserPrefProtimingP2") == nil then
SetUserPref("UserPrefProtimingP2", false);
end;
if GetUserPrefB("FlashyCombos") == nil then
SetUserPref("FlashyCombos", false);
end;
@@ -55,23 +61,41 @@ function OptionRowProTiming()
ExportOnChange = false;
Choices = { 'Off','On' };
LoadSelections = function(self, list, pn)
local pname = ToEnumShortString(pn);
local bShow;
if GetUserPrefB("UserPrefProtiming" .. ToEnumShortString(pn) ) then
bShow = GetUserPrefB("UserPrefProtiming" .. ToEnumShortString(pn) );
if bShow then
list[2] = true;
else
list[1] = true;
end
else
list[1] = true;
end;
--[[ local pname = ToEnumShortString(pn);
if getenv("ProTiming"..pname) == true then
list[2] = true;
else
list[1] = true;
end;
end; --]]
end;
SaveSelections = function(self, list, pn)
local val;
local bSave;
if list[2] then
bSave = true;
else
bSave = false;
end;
SetUserPref("UserPrefProtiming" .. ToEnumShortString(pn),bSave);
--[[ local val;
if list[2] then
val = true;
else
val = false;
end;
local pname = ToEnumShortString(pn);
setenv("ProTiming"..pname, val);
setenv("ProTiming"..pname, val); --]]
end;
};
setmetatable( t, t );
@@ -188,8 +212,8 @@ end
function GetDefaultOptionLines()
local LineSets = {
"1,2,3,4,5,6,R,7,8,9,10,11,12,13,14,15,16,17", -- All
"1,2,7,8,13,14,16,17", -- DDR Essentials ( no turns, fx )
"1,2,3,4,5,6,R,7,8,9,10,11,12,13,14,15,16,17,18", -- All
"1,2,7,8,13,14,16,17,18", -- DDR Essentials ( no turns, fx )
};
local function IsExtra()
if GAMESTATE:IsExtraStage() or GAMESTATE:IsExtraStage2() then
@@ -205,7 +229,7 @@ function GetDefaultOptionLines()
return LineSets[2]; -- Just make sure!
end
else
return "1,2,7,8,13,14,17" -- "failsafe" list
return "1,2,7,8,13,14,17,18" -- "failsafe" list
end
end;
+9 -8
View File
@@ -303,14 +303,14 @@ LeftOnCommand=horizalign,right;diffuse,PlayerColor(PLAYER_2)
MiddleOnCommand=;diffuse,PlayerColor(PLAYER_2)
RightOnCommand=horizalign,left;diffuse,PlayerColor(PLAYER_2)
[Protiming]
ProtimingOnCommand=y,24
ProtimingOnCommand=shadowlength,1;strokecolor,Color("Outline");skewx,-0.125;textglowmode,"TextGlowMode_Inner";
ProtimingW1Command=
ProtimingW2Command=
ProtimingW3Command=
ProtimingW4Command=
ProtimingW5Command=
ProtimingMissCommand=
ProtimingW1Command=diffusealpha,1;zoom,1.15;glow,GameColor.Judgment["JudgmentLine_W1"];linear,0.05;zoom,1;glow,Color("Invisible");sleep,2;linear,0.5;diffuse,Color("Invisible");
ProtimingW2Command=diffusealpha,1;zoom,1.15;glow,GameColor.Judgment["JudgmentLine_W2"];linear,0.05;zoom,1;glow,Color("Invisible");sleep,2;linear,0.5;diffuse,Color("Invisible");
ProtimingW3Command=diffusealpha,1;zoom,1.15;glow,GameColor.Judgment["JudgmentLine_W3"];linear,0.05;zoom,1;glow,Color("Invisible");sleep,2;linear,0.5;diffuse,Color("Invisible");
ProtimingW4Command=diffusealpha,1;zoom,1.15;glow,GameColor.Judgment["JudgmentLine_W4"];linear,0.05;zoom,1;glow,Color("Invisible");sleep,2;linear,0.5;diffuse,Color("Invisible");
ProtimingW5Command=diffusealpha,1;zoom,1.15;glow,GameColor.Judgment["JudgmentLine_W5"];
ProtimingMissCommand=diffusealpha,1;zoom,1.15;glow,GameColor.Judgment["JudgmentLine_Miss"];linear,0.05;zoom,1;glow,Color("Invisible");sleep,2;linear,0.5;diffuse,Color("Invisible");
[Player]
ReceptorArrowsYStandard=GetTapPosition('Standard')
@@ -1222,7 +1222,7 @@ PercentScoreP1OnCommand=visible,THEME:GetMetric(Var "LoadingScreen","ShowPercent
PercentScoreP1OffCommand=bouncebegin,0.15;zoomx,0;
#
ShowPercentScoreP2=GAMESTATE:IsHumanPlayer(PLAYER_2)
PercentScoreP2X=SCREEN_CENTER_X+160-1
PercentScoreP2X=SCREEN_CENTER_X+240-1
PercentScoreP2Y=SCREEN_BOTTOM-60
PercentScoreP2OnCommand=visible,THEME:GetMetric(Var "LoadingScreen","ShowPercentScoreP2");addy,SCREEN_CENTER_Y;decelerate,0.35;addy,-SCREEN_CENTER_Y
PercentScoreP2OffCommand=bouncebegin,0.15;zoomx,0;
@@ -1290,6 +1290,7 @@ Line14="list,Persp"
Line15="list,ScoreDisplay"
Line16="list,Steps"
Line17="list,Characters"
Line18="lua,OptionRowProTiming()"
[ScreenEditOptions]
Line1="lua,SpeedMods()"