From 2140b1d8c8bd073b1848d3564661ba4d3fc923be Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 10 Feb 2007 22:45:25 +0000 Subject: [PATCH] xml->lua for files that use % --- .../ScreenOptionsEditCourse overlay.redir | 2 +- ...ScreenOptionsEditCourseEntry overlay.redir | 2 +- .../ScreenOptionsManageCourses overlay.redir | 2 +- .../BGAnimations/_shared edit courses.lua | 37 +++++++++++++++++++ 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 stepmania/Themes/default/BGAnimations/_shared edit courses.lua diff --git a/stepmania/Themes/default/BGAnimations/ScreenOptionsEditCourse overlay.redir b/stepmania/Themes/default/BGAnimations/ScreenOptionsEditCourse overlay.redir index d0ebdc9b73..511d786565 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenOptionsEditCourse overlay.redir +++ b/stepmania/Themes/default/BGAnimations/ScreenOptionsEditCourse overlay.redir @@ -1 +1 @@ -_shared edit courses.xml +_shared edit courses diff --git a/stepmania/Themes/default/BGAnimations/ScreenOptionsEditCourseEntry overlay.redir b/stepmania/Themes/default/BGAnimations/ScreenOptionsEditCourseEntry overlay.redir index d0ebdc9b73..511d786565 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenOptionsEditCourseEntry overlay.redir +++ b/stepmania/Themes/default/BGAnimations/ScreenOptionsEditCourseEntry overlay.redir @@ -1 +1 @@ -_shared edit courses.xml +_shared edit courses diff --git a/stepmania/Themes/default/BGAnimations/ScreenOptionsManageCourses overlay.redir b/stepmania/Themes/default/BGAnimations/ScreenOptionsManageCourses overlay.redir index d0ebdc9b73..511d786565 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenOptionsManageCourses overlay.redir +++ b/stepmania/Themes/default/BGAnimations/ScreenOptionsManageCourses overlay.redir @@ -1 +1 @@ -_shared edit courses.xml +_shared edit courses diff --git a/stepmania/Themes/default/BGAnimations/_shared edit courses.lua b/stepmania/Themes/default/BGAnimations/_shared edit courses.lua new file mode 100644 index 0000000000..54f9630a4b --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/_shared edit courses.lua @@ -0,0 +1,37 @@ +local frame = Def.ActorFrame +{ + OnCommand=cmd(x,SCREEN_CENTER_X+180;y,SCREEN_CENTER_Y);--;addx,SCREEN_WIDTH/2;decelerate,0.5;addx,-SCREEN_WIDTH/2); + OffCommand=cmd(accelerate,0.5;addx,SCREEN_WIDTH/2); + children = { + Def.BitmapText { + Font="Common Normal"; + Text=""; + OnCommand=cmd(horizalign,left;x,-80;y,-130;zoom,0.65;playcommand,"CurrentCourseChanged"); + CurrentCourseChangedMessageCommand=function(self) + local c = GAMESTATE:GetCurrentCourse() + if c then + self:settext( c:GetDisplayFullTitle() ) + else + self:settext( "" ) + end + end; + }; + Def.BitmapText { + Font="Common Normal"; + Text=""; + OnCommand=cmd(horizalign,left;x,-80;y,-100;zoom,0.65;playcommand,"CurrentTrailP1Changed"); + CurrentTrailP1ChangedMessageCommand=function(self) + local t = GAMESTATE:GetCurrentTrail( PLAYER_1 ) + if t then + local st = GAMEMAN:StepsTypeToLocalizedString( t:GetStepsType() ) + local cd = CourseDifficultyToLocalizedString( t:GetDifficulty() ) + self:settext( st .. ", " .. cd ) + else + self:settext( "" ) + end + end; + }; + }; +}; + +return Def.ActorFrame { children = { frame } };