load row sound in advance

This commit is contained in:
Glenn Maynard
2005-03-15 22:52:01 +00:00
parent 6abf475686
commit c3ad1345ef
2 changed files with 6 additions and 3 deletions
+4 -2
View File
@@ -62,6 +62,8 @@ ScreenMiniMenu::ScreenMiniMenu( const Menu* pDef, ScreenMessage SM_SendOnOK, Scr
m_textTitle.SetZoom( 0.8f ); m_textTitle.SetZoom( 0.8f );
this->AddChild( &m_textTitle ); this->AddChild( &m_textTitle );
m_sndRow.Load( THEME->GetPathS("ScreenMiniMenu","row") );
bool bMarkedFirstEnabledLine = false; bool bMarkedFirstEnabledLine = false;
m_iCurLine = 0; m_iCurLine = 0;
@@ -232,7 +234,7 @@ void ScreenMiniMenu::BeforeLineChanged()
m_textAnswer[m_iCurLine].SetEffectNone(); m_textAnswer[m_iCurLine].SetEffectNone();
m_textLabel[m_iCurLine].SetZoom( ZOOM_NOT_SELECTED ); m_textLabel[m_iCurLine].SetZoom( ZOOM_NOT_SELECTED );
m_textAnswer[m_iCurLine].SetZoom( ZOOM_NOT_SELECTED ); m_textAnswer[m_iCurLine].SetZoom( ZOOM_NOT_SELECTED );
SOUND->PlayOnce( THEME->GetPathS("ScreenMiniMenu","row") ); m_sndRow.Play();
} }
void ScreenMiniMenu::AfterLineChanged() void ScreenMiniMenu::AfterLineChanged()
@@ -245,7 +247,7 @@ void ScreenMiniMenu::AfterLineChanged()
void ScreenMiniMenu::AfterAnswerChanged() void ScreenMiniMenu::AfterAnswerChanged()
{ {
SOUND->PlayOnce( THEME->GetPathS("ScreenMiniMenu","row") ); m_sndRow.Play();
int iAnswerInRow = m_iCurAnswers[m_iCurLine]; int iAnswerInRow = m_iCurAnswers[m_iCurLine];
CString sAnswerText = m_Def.rows[m_iCurLine].choices[iAnswerInRow]; CString sAnswerText = m_Def.rows[m_iCurLine].choices[iAnswerInRow];
m_textAnswer[m_iCurLine].SetText( sAnswerText ); m_textAnswer[m_iCurLine].SetText( sAnswerText );
+2 -1
View File
@@ -7,7 +7,7 @@
#include "BitmapText.h" #include "BitmapText.h"
#include "Transition.h" #include "Transition.h"
#include "Quad.h" #include "Quad.h"
#include "RandomSample.h" #include "RageSound.h"
#include "BGAnimation.h" #include "BGAnimation.h"
#define MAX_MENU_ROWS 40 #define MAX_MENU_ROWS 40
@@ -94,6 +94,7 @@ protected:
int m_iCurLine; int m_iCurLine;
int m_iCurAnswers[MAX_MENU_ROWS]; int m_iCurAnswers[MAX_MENU_ROWS];
ScreenMessage m_SMSendOnOK, m_SMSendOnCancel; ScreenMessage m_SMSendOnOK, m_SMSendOnCancel;
RageSound m_sndRow;
Transition m_In; Transition m_In;
Transition m_Out; Transition m_Out;