From a4d0ec095acb1172b047fc29958fca82dade9051 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 11 Mar 2007 20:21:42 +0000 Subject: [PATCH] replace 6 commands in TextBanner with 1 now that Lua can access children --- stepmania/Themes/default/Scripts/Other.lua | 15 +++++++++++++++ stepmania/Themes/default/metrics.ini | 7 +------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/stepmania/Themes/default/Scripts/Other.lua b/stepmania/Themes/default/Scripts/Other.lua index 376c438f5b..79eee94b32 100644 --- a/stepmania/Themes/default/Scripts/Other.lua +++ b/stepmania/Themes/default/Scripts/Other.lua @@ -75,6 +75,21 @@ function ScreenString( sName ) return THEME:GetString( sClass, sName ) end +function TextBannerSet(self,param) + local Title=self:GetChild("Title"); + local Subtitle=self:GetChild("Subtitle"); + local Artist=self:GetChild("Artist"); + if Subtitle:GetText() == "" then + (cmd(zoom,1;maxwidth,180;y,-8))(Title); + (cmd(visible,false))(Subtitle); + (cmd(zoom,0.6;maxwidth,266;y,8))(Artist); + else + (cmd(zoom,1;maxwidth,180;y,-10))(Title); + (cmd(visible,true;zoom,.5;maxwidth,360))(Subtitle); + (cmd(zoom,0.6;maxwidth,266;y,10))(Artist); + end +end + -- (c) 2005 Chris Danford -- All rights reserved. -- diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index d6d91de5d7..cab07b3def 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -3166,12 +3166,7 @@ ArtistX=-120 ArtistY=0 ArtistOnCommand=shadowlength,0;horizalign,left ArtistPrependString="/" -TwoLinesTitleCommand=zoom,1;maxwidth,180;y,-8 -TwoLinesSubtitleCommand=hidden,1 -TwoLinesArtistCommand=zoom,0.6;maxwidth,266;y,8 -ThreeLinesTitleCommand=zoom,1;maxwidth,180;y,-10 -ThreeLinesSubtitleCommand=hidden,0;zoom,.5;maxwidth,360 -ThreeLinesArtistCommand=zoom,0.6;maxwidth,266;y,10 +SetCommand=%TextBannerSet [TextBannerCourseEntry] Fallback="TextBanner"