#19 Song title and artist back in.
authorCameron Ball <c.ball1729@gmail.com>
Thu, 12 Dec 2013 08:29:22 +0000 (16:29 +0800)
committerCameron Ball <c.ball1729@gmail.com>
Thu, 12 Dec 2013 08:30:12 +0000 (16:30 +0800)
Themes/GrooveNights/BGAnimations/ScreenPlayerOptions overlay/default.xml
Themes/GrooveNights/Scripts/Other.lua
Themes/GrooveNights/Scripts/gnSystem.lua

index 73bf8e5..b77c08b 100644 (file)
@@ -6,32 +6,32 @@
                                end
                        end"><children>
        
-
         <!-- Options pane -->
        <Layer File="../ScreenOptions overlay"/>
 
         <!-- Current song pane -->
-        <ActorFrame><children>
+        <ActorFrame
+            InitCommand="x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-172; horizalign,center"
+            OnCommand="shadowlength,0"
+        ><children>
+            <!-- Song title -->
             <Layer
                 Type="BitmapText"
                 File="_eurostile blue glow"
-                OnCommand="horizalign,center;maxwidth,450;shadowlength,0;zoom,0.75;playcommand,Update"
-                InitCommand="x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-172"
+                InitCommand="maxwidth,450"
+                OnCommand="zoom,0.75;playcommand,Update"                
                 UpdateCommand="%SetFromSongTitleAndCourseTitle"
             />
-                       
-            <BitmapText
-                Text=""
+               
+            <!-- Song artist -->       
+            <Layer
+                Type="BitmapText"
                 File="_eurostile blue glow"
                 Condition="not GAMESTATE:IsCourseMode()"
-                OnCommand="horizalign,center;shadowlength,0;zoom,0.5;"
-
-                InitCommand="%function(self)
-                self:settext(GAMESTATE:GetCurrentSong():GetDisplayArtist());
-                self:x(SCREEN_CENTER_X);
-                self:y(SCREEN_CENTER_Y-150-8);
-                self:maxwidth(350);
-                end"
+                InitCommand="y,15;maxwidth,350"
+                OnCommand="zoom,0.5;playcommand,Update"
+                UpdateCommand="%SetFromSongArtist"
             />
-       
-</children> </ActorFrame>
\ No newline at end of file
+        </children></ActorFrame>
+        <!-- End current song pane -->
+</children></ActorFrame>
\ No newline at end of file
index 8dcf776..b3ee494 100644 (file)
@@ -174,20 +174,7 @@ function SetDifficultyFrameFromGameState( Actor, pn )
        end
 end
 
-function SetFromSongTitleAndCourseTitle( actor )
-       Trace( "SetFromSongTitleAndCourseTitle" )
-       local song = GAMESTATE:GetCurrentSong();
-       local course = GAMESTATE:GetCurrentCourse();
-       local text = ""
-       if song then
-               text = song:GetDisplayFullTitle()
-       end
-       if course then
-               text = course:GetDisplayFullTitle() .. " - " .. text;
-       end
 
-       actor:settext( text )
-end
 
 function SetRemovedText(self, port)
        local CurrentSong = GAMESTATE:GetCurrentSong()
index 504649a..47b4f94 100644 (file)
@@ -413,15 +413,31 @@ RegisterGlobalCallback("TotalTimeSeconds", TotalTimeSeconds)
 --actor setters
 
 function SetFromDisplayScrollSpeed( Actor, pn )
-    Actor:settext(DisplayScrollSpeed(pn))
-    
-    local function GetWidthCallback( ScrollSpeedDisplay ) 
-        return ScrollSpeedDisplay:GetWidth()
-    end
+    --TODO: Work the logic here like below to ensure that in the worst case
+    -- we simply set an empty string
+    Actor:settext(DisplayScrollSpeed(pn))   
+end
 
-    if not GetGlobal("ScrollSpeedDisplayWidth") then
-        RegisterGlobalCallback("ScrollSpeedDisplayWidth", GetWidthCallback)
-    end
+function SetFromSongTitleAndCourseTitle( actor )
+       local song = GAMESTATE:GetCurrentSong();
+       local course = GAMESTATE:GetCurrentCourse();
+       local text = ""
+       if song then
+               text = song:GetDisplayMainTitle()
+       end
+       if course then
+               text = course:GetDisplayFullTitle() .. " - " .. text;
+       end
+
+       actor:settext( text )
+end
+
+function SetFromSongArtist( actor )
+       local song = GAMESTATE:GetCurrentSong();
+       local text = ""
+       if song then
+               text = song:GetDisplayArtist()
+       end
 
-    RegisterGlobal("ScrollSpeedDisplayWidth", Actor)
+       actor:settext( text )
 end