From 46ca7f526a300ab49f9013657d6c5ddc9ee62ba4 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 16 Feb 2007 07:09:04 +0000 Subject: [PATCH] explicitly LoadAllCommands. The "load commands in SetXY" hack isn't working well now that more and more Actors are being moved into Lua. That hack should be removed eventually in favor of explicit command loading. --- stepmania/src/PaneDisplay.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/stepmania/src/PaneDisplay.cpp b/stepmania/src/PaneDisplay.cpp index a32ed31f16..bdc9ba486b 100644 --- a/stepmania/src/PaneDisplay.cpp +++ b/stepmania/src/PaneDisplay.cpp @@ -75,12 +75,14 @@ void PaneDisplay::Load( const RString &sMetricsGroup, PlayerNumber pn ) m_textContents[p].LoadFromFont( THEME->GetPathF(sMetricsGroup,"text") ); m_textContents[p].SetName( ssprintf("%sText", g_Contents[p].name) ); - ActorUtil::SetXY( m_textContents[p], sMetricsGroup ); // SetXY loads all commands + ActorUtil::LoadAllCommands( m_textContents[p], sMetricsGroup ); + ActorUtil::SetXY( m_textContents[p], sMetricsGroup ); m_ContentsFrame.AddChild( &m_textContents[p] ); m_Labels[p].Load( THEME->GetPathG(sMetricsGroup,RString(g_Contents[p].name)+" label") ); m_Labels[p]->SetName( ssprintf("%sLabel", g_Contents[p].name) ); - ActorUtil::SetXY( m_Labels[p], sMetricsGroup ); // SetXY loads all commands + ActorUtil::LoadAllCommands( *m_Labels[p], sMetricsGroup ); + ActorUtil::SetXY( m_Labels[p], sMetricsGroup ); m_ContentsFrame.AddChild( m_Labels[p] ); ActorUtil::LoadAllCommandsFromName( m_textContents[p], sMetricsGroup, g_Contents[p].name ); @@ -299,13 +301,13 @@ void PaneDisplay::SetFocus( PaneTypes NewPane ) { if( g_Contents[i].type == m_CurPane ) { - COMMAND( m_textContents[i], "LoseFocus" ); - COMMAND( m_Labels[i], "LoseFocus" ); + m_textContents[i].PlayCommand( "LoseFocus" ); + m_Labels[i]->PlayCommand( "LoseFocus" ); } else if( g_Contents[i].type == NewPane ) { - COMMAND( m_textContents[i], "GainFocus" ); - COMMAND( m_Labels[i], "GainFocus" ); + m_textContents[i].PlayCommand( "GainFocus" ); + m_Labels[i]->PlayCommand( "GainFocus" ); } }