From 6a8fb2543508b909fe2c6377be2cfa23568312f8 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 15 Oct 2006 05:06:31 +0000 Subject: [PATCH] convert to Lua This doesn't actually need to be two files anymore. Previously, XML forced us to split actors apart at a finer level than was natural. This could be merged into a single file easily now, but I've left it as two for now for demonstration and testing purposes. --- .../ScreenEvaluationStage overlay/default.lua | 10 ++++++++ .../life graph.lua | 25 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 stepmania/Themes/default/BGAnimations/ScreenEvaluationStage overlay/default.lua create mode 100644 stepmania/Themes/default/BGAnimations/ScreenEvaluationStage overlay/life graph.lua diff --git a/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage overlay/default.lua b/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage overlay/default.lua new file mode 100644 index 0000000000..939da01148 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage overlay/default.lua @@ -0,0 +1,10 @@ +return Def.ActorFrame { + children = { + LoadActor("life graph")(PLAYER_1) .. { + InitCommand = cmd(x,SCREEN_LEFT+96;y,SCREEN_CENTER_Y+91), + }, + LoadActor("life graph")(PLAYER_2) .. { + InitCommand = cmd(x,SCREEN_LEFT-96;y,SCREEN_CENTER_Y+91), + }, + } +} diff --git a/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage overlay/life graph.lua b/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage overlay/life graph.lua new file mode 100644 index 0000000000..7d37ab2548 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenEvaluationStage overlay/life graph.lua @@ -0,0 +1,25 @@ +local Player = ... +assert( Player ); + +local t = Def.ActorFrame { +children = { + Def.GraphDisplay { + OnCommand=function(self) + local Stats = STATSMAN:GetCurStageStats(); + self:LoadFromStats( Stats, Stats:GetPlayerStageStats(Player) ) + end, + -- Input = { Name="Player" }, + Texture = Def.Layer { + File="LifeGraph p1", + InitCommand=cmd(ztest,1;diffusealpha,0), + OnCommand=cmd(linear,0.5;diffusealpha,1), + OffCommand=cmd(linear,0.5;diffusealpha,0), + }, + Line = Def.Layer { InitCommand=cmd(hidden,1) }, + Body = Def.Layer { InitCommand=cmd(zwrite,1;blend,"BlendMode_NoEffect") }, + SongBoundary = Def.Actor { InitCommand=cmd(hidden,1) }, + Barely = Def.Actor { InitCommand=cmd(hidden,1) }, + } +} +} +return t