Cleanup, part 2 (working on fallback)
This commit is contained in:
@@ -16,10 +16,10 @@ PLAYER_1 = "PlayerNumber_P1"
|
|||||||
PLAYER_2 = "PlayerNumber_P2"
|
PLAYER_2 = "PlayerNumber_P2"
|
||||||
NUM_PLAYERS = #PlayerNumber
|
NUM_PLAYERS = #PlayerNumber
|
||||||
|
|
||||||
function string:find_last( text )
|
function string:find_last(text)
|
||||||
local LastPos = 0
|
local LastPos = 0
|
||||||
while true do
|
while true do
|
||||||
local p = string.find( self, text, LastPos+1, true )
|
local p = string.find(self, text, LastPos+1, true)
|
||||||
if not p then
|
if not p then
|
||||||
return LastPos
|
return LastPos
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,35 +1,27 @@
|
|||||||
-- Override Lua's loadfile to use lua.ReadFile.
|
-- Override Lua's loadfile to use lua.ReadFile.
|
||||||
function loadfile(file)
|
function loadfile(file)
|
||||||
local data, err = lua.ReadFile(file);
|
local data, err = lua.ReadFile(file)
|
||||||
if not data then
|
if not data then
|
||||||
return nil, ("what " .. file)
|
return nil, ("what " .. file)
|
||||||
end
|
end
|
||||||
|
|
||||||
local chunk, err = load(
|
local chunk, err = load(data, "@" .. file)
|
||||||
function()
|
|
||||||
local ret = data
|
|
||||||
data = nil
|
|
||||||
return ret
|
|
||||||
end,
|
|
||||||
"@" .. file );
|
|
||||||
if not chunk then return nil, err end
|
if not chunk then return nil, err end
|
||||||
|
|
||||||
-- Set the environment, like loadfile does.
|
-- Set the environment, like loadfile does.
|
||||||
setfenv( chunk, getfenv(2) );
|
setfenv(chunk, getfenv(2))
|
||||||
return chunk
|
return chunk
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Override Lua's dofile to use our loadfile.
|
-- Override Lua's dofile to use our loadfile.
|
||||||
function dofile(file)
|
function dofile(file)
|
||||||
if not file then
|
if not file then
|
||||||
error( "dofile(nil) unsupported", 2 );
|
error( "dofile(nil) unsupported", 2 )
|
||||||
end
|
end
|
||||||
|
|
||||||
local chunk, err = loadfile(file)
|
local chunk, err = loadfile(file)
|
||||||
if not chunk then
|
if not chunk then
|
||||||
error( err, 2 );
|
error(err, 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
return chunk
|
return chunk
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -9,52 +9,14 @@ function Actor:hidden(bHide)
|
|||||||
self:visible(not bHide)
|
self:visible(not bHide)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- for when horizalign and vertalign get killed by glenn:
|
|
||||||
--[[
|
|
||||||
function Actor:horizalign(v)
|
|
||||||
local values = {
|
|
||||||
left = 0,
|
|
||||||
center = 0.5,
|
|
||||||
right = 1
|
|
||||||
}
|
|
||||||
self:halign(values[v])
|
|
||||||
end
|
|
||||||
|
|
||||||
function Actor:vertalign(v)
|
|
||||||
local values = {
|
|
||||||
top = 0,
|
|
||||||
middle = 0.5,
|
|
||||||
bottom = 1
|
|
||||||
}
|
|
||||||
self:valign(values[v])
|
|
||||||
end
|
|
||||||
--]]
|
|
||||||
|
|
||||||
--[[ ActorScroller: all of these got renamed, so alias the lowercase ones if
|
--[[ ActorScroller: all of these got renamed, so alias the lowercase ones if
|
||||||
things are going to look for them. ]]
|
things are going to look for them. ]]
|
||||||
function ActorScroller:getsecondtodestination()
|
ActorScroller.getsecondtodestination = ActorScroller.GetSecondsToDestination
|
||||||
self:GetSecondsToDestination()
|
ActorScroller.setsecondsperitem = ActorScroller.SetSecondsPerItem
|
||||||
end
|
ActorScroller.setnumsubdivisions = ActorScroller.SetNumSubdivisions
|
||||||
|
ActorScroller.scrollthroughallitems = ActorScroller.ScrollThroughAllItems
|
||||||
function ActorScroller:setsecondsperitem(secs)
|
ActorScroller.scrollwithpadding = ActorScroller.ScrollWithPadding
|
||||||
self:SetSecondsPerItem(secs)
|
ActorScroller.setfastcatchup = ActorScroller.SetFastCatchup
|
||||||
end
|
|
||||||
|
|
||||||
function ActorScroller:setnumsubdivisions(subs)
|
|
||||||
self:SetNumSubdivisions(subs)
|
|
||||||
end
|
|
||||||
|
|
||||||
function ActorScroller:scrollthroughallitems()
|
|
||||||
self:ScrollThroughAllItems()
|
|
||||||
end
|
|
||||||
|
|
||||||
function ActorScroller:scrollwithpadding(fPadStart,fPadEnd)
|
|
||||||
self:ScrollWithPadding(fPadStart,fPadEnd)
|
|
||||||
end
|
|
||||||
|
|
||||||
function ActorScroller:setfastcatchup(bFastCatchup)
|
|
||||||
self:SetFastCatchup(bFastCatchup)
|
|
||||||
end
|
|
||||||
|
|
||||||
--[[ GameState ]]
|
--[[ GameState ]]
|
||||||
--Aliases for old GAMESTATE timing functions.
|
--Aliases for old GAMESTATE timing functions.
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
-- Convenience aliases:
|
-- Convenience aliases:
|
||||||
left = "HorizAlign_Left";
|
left = "HorizAlign_Left"
|
||||||
center = "HorizAlign_Center";
|
center = "HorizAlign_Center"
|
||||||
right = "HorizAlign_Right";
|
right = "HorizAlign_Right"
|
||||||
top = "VertAlign_Top";
|
top = "VertAlign_Top"
|
||||||
middle = "VertAlign_Middle";
|
middle = "VertAlign_Middle"
|
||||||
bottom = "VertAlign_Bottom";
|
bottom = "VertAlign_Bottom"
|
||||||
|
|
||||||
function Actor:ease(t, fEase)
|
function Actor:ease(t, fEase)
|
||||||
-- Optimizations:
|
-- Optimizations:
|
||||||
-- fEase = -100 is equivalent to TweenType_Accelerate.
|
-- fEase = -100 is equivalent to TweenType_Accelerate.
|
||||||
if fEase == -100 then
|
if fEase == -100 then
|
||||||
self:accelerate(t);
|
self:accelerate(t)
|
||||||
return;
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- fEase = 0 is equivalent to TweenType_Linear.
|
-- fEase = 0 is equivalent to TweenType_Linear.
|
||||||
if fEase == 0 then
|
if fEase == 0 then
|
||||||
self:linear(t);
|
self:linear(t)
|
||||||
return;
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- fEase = +100 is equivalent to TweenType_Decelerate.
|
-- fEase = +100 is equivalent to TweenType_Decelerate.
|
||||||
if fEase == 100 then
|
if fEase == 100 then
|
||||||
self:decelerate(t);
|
self:decelerate(t)
|
||||||
return;
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self:tween( t, "TweenType_Bezier",
|
self:tween( t, "TweenType_Bezier",
|
||||||
@@ -33,7 +33,7 @@ function Actor:ease(t, fEase)
|
|||||||
scale(fEase, -100, 100, 1/3, 3/3),
|
scale(fEase, -100, 100, 1/3, 3/3),
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
end
|
end
|
||||||
-- Notes On Beziers --
|
-- Notes On Beziers --
|
||||||
-- They can be 1D ( Quadratic ) or 2D ( Bezier )
|
-- They can be 1D ( Quadratic ) or 2D ( Bezier )
|
||||||
@@ -51,7 +51,7 @@ local BounceBeginBezier =
|
|||||||
1, 1
|
1, 1
|
||||||
}
|
}
|
||||||
function Actor:bouncebegin(t)
|
function Actor:bouncebegin(t)
|
||||||
self:tween( t, "TweenType_Bezier", BounceBeginBezier );
|
self:tween( t, "TweenType_Bezier", BounceBeginBezier )
|
||||||
end
|
end
|
||||||
|
|
||||||
local BounceEndBezier =
|
local BounceEndBezier =
|
||||||
@@ -62,7 +62,7 @@ local BounceEndBezier =
|
|||||||
1, 1
|
1, 1
|
||||||
}
|
}
|
||||||
function Actor:bounceend(t)
|
function Actor:bounceend(t)
|
||||||
self:tween( t, "TweenType_Bezier", BounceEndBezier );
|
self:tween( t, "TweenType_Bezier", BounceEndBezier )
|
||||||
end
|
end
|
||||||
|
|
||||||
local SmoothBezier =
|
local SmoothBezier =
|
||||||
@@ -70,7 +70,7 @@ local SmoothBezier =
|
|||||||
0, 0, 1, 1
|
0, 0, 1, 1
|
||||||
}
|
}
|
||||||
function Actor:smooth(t)
|
function Actor:smooth(t)
|
||||||
self:tween( t, "TweenType_Bezier", SmoothBezier );
|
self:tween( t, "TweenType_Bezier", SmoothBezier )
|
||||||
end
|
end
|
||||||
-- SSC Additions
|
-- SSC Additions
|
||||||
local DropBezier =
|
local DropBezier =
|
||||||
@@ -81,7 +81,7 @@ local DropBezier =
|
|||||||
1 , 1,
|
1 , 1,
|
||||||
}
|
}
|
||||||
function Actor:drop(t)
|
function Actor:drop(t)
|
||||||
self:tween( t, "TweenType_Bezier", DropBezier );
|
self:tween( t, "TweenType_Bezier", DropBezier )
|
||||||
end
|
end
|
||||||
|
|
||||||
-- compound tweens "combine multiple interpolators to allow generating more
|
-- compound tweens "combine multiple interpolators to allow generating more
|
||||||
@@ -133,9 +133,9 @@ function Actor:player(p)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ActorFrame:propagatecommand(...)
|
function ActorFrame:propagatecommand(...)
|
||||||
self:propagate(1);
|
self:propagate(1)
|
||||||
self:playcommand(...);
|
self:playcommand(...)
|
||||||
self:propagate(0);
|
self:propagate(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Shortcut for alignment.
|
-- Shortcut for alignment.
|
||||||
@@ -143,12 +143,12 @@ end
|
|||||||
-- cmd(align,0.0,0.0) -- align top-left
|
-- cmd(align,0.0,0.0) -- align top-left
|
||||||
-- cmd(align,0.5,0.0) -- align top-center
|
-- cmd(align,0.5,0.0) -- align top-center
|
||||||
function Actor:align(h, v)
|
function Actor:align(h, v)
|
||||||
self:halign( h );
|
self:halign( h )
|
||||||
self:valign( v );
|
self:valign( v )
|
||||||
end
|
end
|
||||||
|
|
||||||
function Actor:FullScreen()
|
function Actor:FullScreen()
|
||||||
self:stretchto( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT );
|
self:stretchto( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT )
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ Typical background sizes:
|
--[[ Typical background sizes:
|
||||||
@@ -166,10 +166,10 @@ function Actor:scale_or_crop_background()
|
|||||||
|
|
||||||
if graphicAspect == displayAspect then
|
if graphicAspect == displayAspect then
|
||||||
-- bga matches the current aspect, we can stretch it.
|
-- bga matches the current aspect, we can stretch it.
|
||||||
self:stretchto( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT );
|
self:stretchto( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT )
|
||||||
else
|
else
|
||||||
-- temp
|
-- temp
|
||||||
self:scaletocover( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT );
|
self:scaletocover( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT )
|
||||||
--[[
|
--[[
|
||||||
-- bga doesn't match the aspect.
|
-- bga doesn't match the aspect.
|
||||||
if displayAspect > graphicAspect then
|
if displayAspect > graphicAspect then
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ end
|
|||||||
|
|
||||||
function SelectMusicOrCourse()
|
function SelectMusicOrCourse()
|
||||||
if IsNetSMOnline() then
|
if IsNetSMOnline() then
|
||||||
return "ScreenNetSelectMusic";
|
return "ScreenNetSelectMusic"
|
||||||
elseif GAMESTATE:IsCourseMode() then
|
elseif GAMESTATE:IsCourseMode() then
|
||||||
return "ScreenSelectCourse"
|
return "ScreenSelectCourse"
|
||||||
else
|
else
|
||||||
@@ -28,7 +28,7 @@ end
|
|||||||
|
|
||||||
-- functions used for Routine mode
|
-- functions used for Routine mode
|
||||||
function IsRoutine()
|
function IsRoutine()
|
||||||
return GAMESTATE:GetCurrentStyle() and GAMESTATE:GetCurrentStyle():GetStyleType() == "StyleType_TwoPlayersSharedSides";
|
return GAMESTATE:GetCurrentStyle() and GAMESTATE:GetCurrentStyle():GetStyleType() == "StyleType_TwoPlayersSharedSides"
|
||||||
end
|
end
|
||||||
|
|
||||||
Branch = {
|
Branch = {
|
||||||
@@ -63,20 +63,20 @@ Branch = {
|
|||||||
-- a possibility someone will use their existing StepMania simfile
|
-- a possibility someone will use their existing StepMania simfile
|
||||||
-- collection with sm-ssc via AdditionalFolders/AdditionalSongFolders.
|
-- collection with sm-ssc via AdditionalFolders/AdditionalSongFolders.
|
||||||
if SONGMAN:GetNumSongs() == 0 and SONGMAN:GetNumAdditionalSongs() == 0 then
|
if SONGMAN:GetNumSongs() == 0 and SONGMAN:GetNumAdditionalSongs() == 0 then
|
||||||
return "ScreenHowToInstallSongs";
|
return "ScreenHowToInstallSongs"
|
||||||
end;
|
end
|
||||||
if PROFILEMAN:GetNumLocalProfiles() >= 2 then
|
if PROFILEMAN:GetNumLocalProfiles() >= 2 then
|
||||||
return "ScreenSelectProfile";
|
return "ScreenSelectProfile"
|
||||||
else
|
else
|
||||||
return "ScreenProfileLoad";
|
return "ScreenProfileLoad"
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
OptionsEdit = function()
|
OptionsEdit = function()
|
||||||
-- Similar to above, don't let anyone in here with 0 songs.
|
-- Similar to above, don't let anyone in here with 0 songs.
|
||||||
if SONGMAN:GetNumSongs() == 0 and SONGMAN:GetNumAdditionalSongs() == 0 then
|
if SONGMAN:GetNumSongs() == 0 and SONGMAN:GetNumAdditionalSongs() == 0 then
|
||||||
return "ScreenHowToInstallSongs";
|
return "ScreenHowToInstallSongs"
|
||||||
end;
|
end
|
||||||
return "ScreenOptionsEdit";
|
return "ScreenOptionsEdit"
|
||||||
end,
|
end,
|
||||||
AfterProfileLoad = function()
|
AfterProfileLoad = function()
|
||||||
return Branch.AfterSelectProfile()
|
return Branch.AfterSelectProfile()
|
||||||
@@ -147,17 +147,17 @@ Branch = {
|
|||||||
local pm = GAMESTATE:GetPlayMode()
|
local pm = GAMESTATE:GetPlayMode()
|
||||||
local restricted = { "PlayMode_Oni", "PlayMode_Rave",
|
local restricted = { "PlayMode_Oni", "PlayMode_Rave",
|
||||||
--"PlayMode_Battle" -- ??
|
--"PlayMode_Battle" -- ??
|
||||||
};
|
}
|
||||||
local optionsScreen = "ScreenPlayerOptions"
|
local optionsScreen = "ScreenPlayerOptions"
|
||||||
for i=1,#restricted do
|
for i=1,#restricted do
|
||||||
if restricted[i] == pm then
|
if restricted[i] == pm then
|
||||||
optionsScreen = "ScreenPlayerOptionsRestricted"
|
optionsScreen = "ScreenPlayerOptionsRestricted"
|
||||||
end;
|
end
|
||||||
end
|
end
|
||||||
if SCREENMAN:GetTopScreen():GetGoToOptions() then
|
if SCREENMAN:GetTopScreen():GetGoToOptions() then
|
||||||
return optionsScreen;
|
return optionsScreen
|
||||||
else
|
else
|
||||||
return "ScreenStageInformation";
|
return "ScreenStageInformation"
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
SongOptions = function()
|
SongOptions = function()
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ Color = {
|
|||||||
Saturation(hInput)
|
Saturation(hInput)
|
||||||
Alpha(hInput)
|
Alpha(hInput)
|
||||||
HSV(iHue,fSaturation,fValue or any other overload) --]]
|
HSV(iHue,fSaturation,fValue or any other overload) --]]
|
||||||
Alpha = function(cColor,fAlpha)
|
Alpha = function(c, fAlpha)
|
||||||
local c = cColor;
|
return { c[1],c[2],c[3], fAlpha }
|
||||||
return { c[1],c[2],c[3],fAlpha };
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,11 +90,12 @@ GameColor = {
|
|||||||
JudgmentLine_Miss = color("#ff3c3c"),
|
JudgmentLine_Miss = color("#ff3c3c"),
|
||||||
JudgmentLine_MaxCombo = color("#ffc600")
|
JudgmentLine_MaxCombo = color("#ffc600")
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
GameColor.Difficulty["Crazy"] = GameColor.Difficulty["Hard"];
|
|
||||||
GameColor.Difficulty["Freestyle"] = GameColor.Difficulty["Easy"];
|
GameColor.Difficulty["Crazy"] = GameColor.Difficulty["Hard"]
|
||||||
GameColor.Difficulty["Nightmare"] = GameColor.Difficulty["Challenge"];
|
GameColor.Difficulty["Freestyle"] = GameColor.Difficulty["Easy"]
|
||||||
GameColor.Difficulty["HalfDouble"] = GameColor.Difficulty["Medium"];
|
GameColor.Difficulty["Nightmare"] = GameColor.Difficulty["Challenge"]
|
||||||
|
GameColor.Difficulty["HalfDouble"] = GameColor.Difficulty["Medium"]
|
||||||
|
|
||||||
--[[ Fallbacks ]]
|
--[[ Fallbacks ]]
|
||||||
function BoostColor( cColor, fBoost )
|
function BoostColor( cColor, fBoost )
|
||||||
|
|||||||
@@ -8,37 +8,37 @@ function LoadFallbackB()
|
|||||||
-- The fallback metrics group and element name will come either from LuaThreadVars
|
-- The fallback metrics group and element name will come either from LuaThreadVars
|
||||||
-- (loading from C++) or from the Lua globals above (loading from Lua).
|
-- (loading from C++) or from the Lua globals above (loading from Lua).
|
||||||
|
|
||||||
--Warn( "g_element " .. (g_element or "") );
|
--Warn( "g_element " .. (g_element or "") )
|
||||||
--Warn( "MatchingElement " .. (Var 'MatchingElement' or "") );
|
--Warn( "MatchingElement " .. (Var 'MatchingElement' or "") )
|
||||||
--Warn( "g_metrics_group " .. (g_metrics_group or "") );
|
--Warn( "g_metrics_group " .. (g_metrics_group or "") )
|
||||||
--Warn( "MatchingMetricsGroup " .. (Var 'MatchingMetricsGroup' or "") );
|
--Warn( "MatchingMetricsGroup " .. (Var 'MatchingMetricsGroup' or "") )
|
||||||
|
|
||||||
local metrics_group = g_metrics_group or Var 'MatchingMetricsGroup';
|
local metrics_group = g_metrics_group or Var 'MatchingMetricsGroup'
|
||||||
local element = g_element or Var 'MatchingElement';
|
local element = g_element or Var 'MatchingElement'
|
||||||
local fallback = THEME:GetMetric(metrics_group,'Fallback');
|
local fallback = THEME:GetMetric(metrics_group,'Fallback')
|
||||||
|
|
||||||
local old_metrics_group = g_metrics_group;
|
local old_metrics_group = g_metrics_group
|
||||||
local old_element = g_element;
|
local old_element = g_element
|
||||||
|
|
||||||
local path;
|
local path
|
||||||
path, g_metrics_group, g_element = THEME:GetPathInfoB(fallback,element);
|
path, g_metrics_group, g_element = THEME:GetPathInfoB(fallback,element)
|
||||||
--Trace('path ' .. path );
|
--Trace('path ' .. path )
|
||||||
local t = LoadActor( path );
|
local t = LoadActor( path )
|
||||||
|
|
||||||
g_metrics_group = old_metrics_group;
|
g_metrics_group = old_metrics_group
|
||||||
g_element = old_element;
|
g_element = old_element
|
||||||
|
|
||||||
return t;
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
function FormatNumSongsPlayed( num )
|
function FormatNumSongsPlayed( num )
|
||||||
local s = num..' song';
|
local s = num..' song'
|
||||||
if s == 1 then
|
if s == 1 then
|
||||||
s = s .. ' ';
|
s = s .. ' '
|
||||||
else
|
else
|
||||||
s = s .. 's';
|
s = s .. 's'
|
||||||
end
|
end
|
||||||
return s..' played';
|
return s..' played'
|
||||||
end
|
end
|
||||||
|
|
||||||
function JudgmentTransformCommand( self, params )
|
function JudgmentTransformCommand( self, params )
|
||||||
@@ -87,7 +87,7 @@ function GetEditModeSubScreens()
|
|||||||
"ScreenMiniMenuInsertTapAttack," ..
|
"ScreenMiniMenuInsertTapAttack," ..
|
||||||
"ScreenMiniMenuInsertCourseAttack," ..
|
"ScreenMiniMenuInsertCourseAttack," ..
|
||||||
"ScreenMiniMenuCourseDisplay," ..
|
"ScreenMiniMenuCourseDisplay," ..
|
||||||
"ScreenEditOptions";
|
"ScreenEditOptions"
|
||||||
end
|
end
|
||||||
|
|
||||||
function GetCoursesToShowRanking()
|
function GetCoursesToShowRanking()
|
||||||
@@ -105,24 +105,30 @@ end
|
|||||||
ScreenMetric = Screen.Metric
|
ScreenMetric = Screen.Metric
|
||||||
|
|
||||||
Screen.String = function ( sName )
|
Screen.String = function ( sName )
|
||||||
local sClass = Var "LoadingScreen";
|
local sClass = Var "LoadingScreen"
|
||||||
return THEME:GetString( sClass, sName )
|
return THEME:GetString( sClass, sName )
|
||||||
end
|
end
|
||||||
ScreenString = Screen.String
|
ScreenString = Screen.String
|
||||||
|
|
||||||
function TextBannerAfterSet(self,param)
|
function TextBannerAfterSet(self,param)
|
||||||
local Title=self:GetChild("Title");
|
local Title=self:GetChild("Title")
|
||||||
local Subtitle=self:GetChild("Subtitle");
|
local Subtitle=self:GetChild("Subtitle")
|
||||||
--local Artist=self:GetChild("Artist");
|
|
||||||
if Subtitle:GetText() == "" then
|
if Subtitle:GetText() == "" then
|
||||||
(cmd(maxwidth,208;y,0;zoom,1.0;))(Title);
|
Title:maxwidth(208)
|
||||||
(cmd(visible,false))(Subtitle);
|
Title:y(0)
|
||||||
--(cmd(zoom,0.66;maxwidth,300;y,7))(Artist);
|
Title:zoom(1)
|
||||||
|
|
||||||
|
Subtitle:visible(false)
|
||||||
else
|
else
|
||||||
-- subtitle below
|
Title:zoom(1)
|
||||||
(cmd(zoom,1;y,-6;zoom,0.9;))(Title);
|
Title:y(-6)
|
||||||
(cmd(visible,true;zoom,0.6;y,7))(Subtitle);
|
Title:zoom(0.9)
|
||||||
--(cmd(zoom,0.66;maxwidth,300;y,9))(Artist);
|
|
||||||
|
-- subtitle below title
|
||||||
|
Subtitle:visible(true)
|
||||||
|
Subtitle:zoom(0.6)
|
||||||
|
Subtitle:y(7)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -28,18 +28,18 @@ function LoadSongBackground()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Sprite:LoadFromCurrentSongBackground()
|
function Sprite:LoadFromCurrentSongBackground()
|
||||||
local song = GAMESTATE:GetCurrentSong();
|
local song = GAMESTATE:GetCurrentSong()
|
||||||
if not song then
|
if not song then
|
||||||
local trail = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber());
|
local trail = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber())
|
||||||
local e = trail:GetTrailEntries()
|
local e = trail:GetTrailEntries()
|
||||||
if #e > 0 then
|
if #e > 0 then
|
||||||
song = e[1]:GetSong();
|
song = e[1]:GetSong()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not song then return end
|
if not song then return end
|
||||||
|
|
||||||
self:LoadFromSongBackground(song);
|
self:LoadFromSongBackground(song)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Sprite:position( f )
|
function Sprite:position( f )
|
||||||
|
|||||||
@@ -14,29 +14,22 @@ function AreStageSongModsForced()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SetFail()
|
function SetFail()
|
||||||
local sFail = "";
|
local sFail = ""
|
||||||
|
|
||||||
if GetGamePref("DefaultFail") then
|
if GetGamePref("DefaultFail") then
|
||||||
sFail = string.format("Fail%s", GetGamePref("DefaultFail"));
|
sFail = string.format("Fail%s", GetGamePref("DefaultFail"))
|
||||||
else
|
else
|
||||||
sFail = "FailOff";
|
sFail = "FailOff"
|
||||||
end
|
end
|
||||||
|
|
||||||
sFail = tostring(sFail);
|
sFail = tostring(sFail)
|
||||||
-- SCREENMAN:SystemMessage( 'NEW FAIL IS: ' .. tostring(sFail) );
|
|
||||||
|
|
||||||
for pn in ivalues(GAMESTATE:GetHumanPlayers()) do
|
for pn in ivalues(GAMESTATE:GetHumanPlayers()) do
|
||||||
-- GAMESTATE:ApplyGameCommand( "stagemod,FailImmediateContinue", pn );
|
MESSAGEMAN:Broadcast( "PlayerOptionsChanged", {PlayerNumber = pn} )
|
||||||
-- GAMESTATE:GetPlayerState(pn):SetPlayerOptions( "ModsLevel_Song", 'mod,FailImmediateContinue' );
|
|
||||||
MESSAGEMAN:Broadcast( "PlayerOptionsChanged", {PlayerNumber = pn} );
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- GAMESTATE:SetSongOptions( "ModsLevel_Preferred", 'mod,FailImmediateContinue' );
|
GAMESTATE:ApplyGameCommand( "mod," .. sFail)
|
||||||
-- GAMESTATE:SetSongOptions( "ModsLevel_Stage", 'mod,FailImmediateContinue' );
|
MESSAGEMAN:Broadcast( "SongOptionsChanged" )
|
||||||
-- GAMESTATE:SetSongOptions( "ModsLevel_Song",'mod,FailImmediateContinue' );
|
|
||||||
GAMESTATE:ApplyGameCommand( "mod," .. sFail);
|
|
||||||
-- GAMESTATE:ApplyGameCommand( "stagemod,FailImmediateContinue");
|
|
||||||
MESSAGEMAN:Broadcast( "SongOptionsChanged" );
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function ScreenSelectMusic:setupmusicstagemods()
|
function ScreenSelectMusic:setupmusicstagemods()
|
||||||
@@ -44,9 +37,9 @@ function ScreenSelectMusic:setupmusicstagemods()
|
|||||||
local pm = GAMESTATE:GetPlayMode()
|
local pm = GAMESTATE:GetPlayMode()
|
||||||
|
|
||||||
if pm == "PlayMode_Battle" or pm == "PlayMode_Rave" then
|
if pm == "PlayMode_Battle" or pm == "PlayMode_Rave" then
|
||||||
local so = GAMESTATE:GetDefaultSongOptions();
|
local so = GAMESTATE:GetDefaultSongOptions()
|
||||||
GAMESTATE:SetSongOptions( "ModsLevel_Stage", so );
|
GAMESTATE:SetSongOptions( "ModsLevel_Stage", so )
|
||||||
MESSAGEMAN:Broadcast( "SongOptionsChanged" );
|
MESSAGEMAN:Broadcast( "SongOptionsChanged" )
|
||||||
elseif GAMESTATE:IsAnExtraStage() then
|
elseif GAMESTATE:IsAnExtraStage() then
|
||||||
if GAMESTATE:GetPreferredSongGroup() == "---Group All---" then
|
if GAMESTATE:GetPreferredSongGroup() == "---Group All---" then
|
||||||
local song = GAMESTATE:GetCurrentSong()
|
local song = GAMESTATE:GetCurrentSong()
|
||||||
@@ -58,11 +51,11 @@ function ScreenSelectMusic:setupmusicstagemods()
|
|||||||
local song, steps = SONGMAN:GetExtraStageInfo( bExtra2, style )
|
local song, steps = SONGMAN:GetExtraStageInfo( bExtra2, style )
|
||||||
local po, so
|
local po, so
|
||||||
if bExtra2 then
|
if bExtra2 then
|
||||||
po = THEME:GetMetric("SongManager","OMESPlayerModifiers");
|
po = THEME:GetMetric("SongManager","OMESPlayerModifiers")
|
||||||
so = THEME:GetMetric("SongManager","OMESStageModifiers");
|
so = THEME:GetMetric("SongManager","OMESStageModifiers")
|
||||||
else
|
else
|
||||||
po = THEME:GetMetric("SongManager","ExtraStagePlayerModifiers");
|
po = THEME:GetMetric("SongManager","ExtraStagePlayerModifiers")
|
||||||
so = THEME:GetMetric("SongManager","ExtraStageStageModifiers");
|
so = THEME:GetMetric("SongManager","ExtraStageStageModifiers")
|
||||||
end
|
end
|
||||||
|
|
||||||
local difficulty = steps:GetDifficulty()
|
local difficulty = steps:GetDifficulty()
|
||||||
|
|||||||
Reference in New Issue
Block a user