This commit is contained in:
Glenn Maynard
2005-12-09 03:13:51 +00:00
parent a3efa94b2a
commit d77a3372e4
4 changed files with 21 additions and 2 deletions
@@ -0,0 +1 @@
_common value
@@ -0,0 +1 @@
MusicWheel expand
+14 -1
View File
@@ -35,6 +35,9 @@ void ScreenMapControllers::Init()
{ {
ScreenWithMenuElements::Init(); ScreenWithMenuElements::Init();
m_soundChange.Load( THEME->GetPathS(m_sName,"change"), true );
m_soundDelete.Load( THEME->GetPathS(m_sName,"delete"), true );
CString sButtons = BUTTONS_TO_MAP; CString sButtons = BUTTONS_TO_MAP;
if( sButtons.empty() ) if( sButtons.empty() )
{ {
@@ -147,6 +150,7 @@ void ScreenMapControllers::Update( float fDeltaTime )
BitmapText *pText = pKey->m_textMappedTo[m_iCurController][m_iCurSlot]; BitmapText *pText = pKey->m_textMappedTo[m_iCurController][m_iCurSlot];
pText->PlayCommand( "MappedInput" ); pText->PlayCommand( "MappedInput" );
SCREENMAN->PlayStartSound();
} }
} }
@@ -264,9 +268,13 @@ void ScreenMapControllers::Input( const InputEventPlus &input )
{ {
const KeyToMap *pKey = &m_KeysToMap[m_iCurButton]; const KeyToMap *pKey = &m_KeysToMap[m_iCurButton];
GameInput curGameI( (GameController)m_iCurController, pKey->m_GameButton ); GameInput curGameI( (GameController)m_iCurController, pKey->m_GameButton );
INPUTMAPPER->ClearFromInputMap( curGameI, m_iCurSlot ); if( !INPUTMAPPER->ClearFromInputMap(curGameI, m_iCurSlot) )
break;
INPUTMAPPER->AddDefaultMappingsForCurrentGameIfUnmapped(); INPUTMAPPER->AddDefaultMappingsForCurrentGameIfUnmapped();
m_soundDelete.Play();
// commit to disk after each change // commit to disk after each change
INPUTMAPPER->SaveMappingsToDisk(); INPUTMAPPER->SaveMappingsToDisk();
} }
@@ -282,6 +290,7 @@ void ScreenMapControllers::Input( const InputEventPlus &input )
m_iCurController--; m_iCurController--;
} }
AfterChangeFocus(); AfterChangeFocus();
m_soundChange.Play();
break; break;
case KEY_RIGHT: /* Move the selection right, wrapping down. */ case KEY_RIGHT: /* Move the selection right, wrapping down. */
if( m_iCurSlot == NUM_CHANGABLE_SLOTS-1 && m_iCurController == MAX_GAME_CONTROLLERS-1 ) if( m_iCurSlot == NUM_CHANGABLE_SLOTS-1 && m_iCurController == MAX_GAME_CONTROLLERS-1 )
@@ -294,6 +303,7 @@ void ScreenMapControllers::Input( const InputEventPlus &input )
m_iCurController++; m_iCurController++;
} }
AfterChangeFocus(); AfterChangeFocus();
m_soundChange.Play();
break; break;
case KEY_UP: /* Move the selection up. */ case KEY_UP: /* Move the selection up. */
if( m_iCurButton == 0 ) if( m_iCurButton == 0 )
@@ -301,6 +311,7 @@ void ScreenMapControllers::Input( const InputEventPlus &input )
BeforeChangeFocus(); BeforeChangeFocus();
m_iCurButton--; m_iCurButton--;
AfterChangeFocus(); AfterChangeFocus();
m_soundChange.Play();
break; break;
case KEY_DOWN: /* Move the selection down. */ case KEY_DOWN: /* Move the selection down. */
if( m_iCurButton == (int) m_KeysToMap.size()-1 ) if( m_iCurButton == (int) m_KeysToMap.size()-1 )
@@ -308,6 +319,7 @@ void ScreenMapControllers::Input( const InputEventPlus &input )
BeforeChangeFocus(); BeforeChangeFocus();
m_iCurButton++; m_iCurButton++;
AfterChangeFocus(); AfterChangeFocus();
m_soundChange.Play();
break; break;
case KEY_ESC: /* Quit the screen. */ case KEY_ESC: /* Quit the screen. */
if( !IsTransitioning() ) if( !IsTransitioning() )
@@ -328,6 +340,7 @@ void ScreenMapControllers::Input( const InputEventPlus &input )
} }
m_WaitingForPress.Touch(); m_WaitingForPress.Touch();
m_DeviceIToMap.MakeInvalid(); m_DeviceIToMap.MakeInvalid();
SCREENMAN->PlayStartSound();
break; break;
} }
} }
+4
View File
@@ -7,6 +7,7 @@
#include "BitmapText.h" #include "BitmapText.h"
#include "InputMapper.h" #include "InputMapper.h"
#include "ActorScroller.h" #include "ActorScroller.h"
#include "RageSound.h"
enum { NUM_SHOWN_GAME_TO_DEVICE_SLOTS = 3 }; enum { NUM_SHOWN_GAME_TO_DEVICE_SLOTS = 3 };
@@ -46,6 +47,9 @@ private:
ActorFrame m_Line[MAX_GAME_BUTTONS]; ActorFrame m_Line[MAX_GAME_BUTTONS];
ActorScroller m_LineScroller; ActorScroller m_LineScroller;
RageSound m_soundChange;
RageSound m_soundDelete;
}; };
#endif #endif