replace 6 commands in TextBanner with 1 now that Lua can access children
This commit is contained in:
@@ -75,6 +75,21 @@ function ScreenString( sName )
|
|||||||
return THEME:GetString( sClass, sName )
|
return THEME:GetString( sClass, sName )
|
||||||
end
|
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
|
-- (c) 2005 Chris Danford
|
||||||
-- All rights reserved.
|
-- All rights reserved.
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -3166,12 +3166,7 @@ ArtistX=-120
|
|||||||
ArtistY=0
|
ArtistY=0
|
||||||
ArtistOnCommand=shadowlength,0;horizalign,left
|
ArtistOnCommand=shadowlength,0;horizalign,left
|
||||||
ArtistPrependString="/"
|
ArtistPrependString="/"
|
||||||
TwoLinesTitleCommand=zoom,1;maxwidth,180;y,-8
|
SetCommand=%TextBannerSet
|
||||||
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
|
|
||||||
|
|
||||||
[TextBannerCourseEntry]
|
[TextBannerCourseEntry]
|
||||||
Fallback="TextBanner"
|
Fallback="TextBanner"
|
||||||
|
|||||||
Reference in New Issue
Block a user