working on edit screens

This commit is contained in:
Chris Danford
2005-11-29 08:02:54 +00:00
parent 8305eea9eb
commit 22f1387385
5 changed files with 39 additions and 27 deletions
+8 -9
View File
@@ -3097,7 +3097,6 @@ Line9=conf,ShowSongOptions
Line10=conf,GetRankingName Line10=conf,GetRankingName
Line11=conf,AllowW1 Line11=conf,AllowW1
[ScreenGraphicOptions] [ScreenGraphicOptions]
Fallback=ScreenOptionsServiceChild Fallback=ScreenOptionsServiceChild
LineNames=1,2,3,4,5,6,7,8,9,10,11,12,13,14 LineNames=1,2,3,4,5,6,7,8,9,10,11,12,13,14
@@ -3613,7 +3612,7 @@ PrevScreen=@ScreenTitleBranch()
# when using entries that change the screen; otherwise, the only way to # when using entries that change the screen; otherwise, the only way to
# exit the screen when in regular mode is "exit". # exit the screen when in regular mode is "exit".
ThemeItems=0 ThemeItems=1
ThemeTitles=1 ThemeTitles=1
IconsOnCommand=x,-30 IconsOnCommand=x,-30
@@ -3623,7 +3622,7 @@ StyleIcon=0
TimerSeconds=0 TimerSeconds=0
AllowOperatorMenuButton=0 AllowOperatorMenuButton=0
LineNames=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 LineNames=1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17
OptionMenuFlags=together;forceallplayers;smnavigation OptionMenuFlags=together;forceallplayers;smnavigation
# This NextScreen is only used for the "exit" choice. # This NextScreen is only used for the "exit" choice.
Line1=list,Appearance Options Line1=list,Appearance Options
@@ -3636,12 +3635,12 @@ Line7=list,Input Options
Line8=list,Gameplay Options Line8=list,Gameplay Options
Line9=list,Graphic Options Line9=list,Graphic Options
Line10=list,Machine Options Line10=list,Machine Options
Line11=list,Sound Options Line12=list,Sound Options
Line12=list,Profiles Line13=list,Profiles
Line13=list,Other Options Line14=list,Other Options
Line14=list,Network Options Line15=list,Network Options
Line15=list,Reload Songs/Courses Line16=list,Reload Songs/Courses
Line16=list,Test Input Line17=list,Test Input
[ScreenOptionsServiceChild] [ScreenOptionsServiceChild]
Fallback=ScreenOptionsService Fallback=ScreenOptionsService
+1
View File
@@ -49,6 +49,7 @@ Preference1D<int> MemoryCardManager::m_iMemoryCardUsbBus( MemoryCardUsbBusInit,
Preference1D<int> MemoryCardManager::m_iMemoryCardUsbPort( MemoryCardUsbPortInit, NUM_PLAYERS ); Preference1D<int> MemoryCardManager::m_iMemoryCardUsbPort( MemoryCardUsbPortInit, NUM_PLAYERS );
Preference1D<int> MemoryCardManager::m_iMemoryCardUsbLevel( MemoryCardUsbLevelInit, NUM_PLAYERS ); Preference1D<int> MemoryCardManager::m_iMemoryCardUsbLevel( MemoryCardUsbLevelInit, NUM_PLAYERS );
Preference<CString> MemoryCardManager::m_sEditorMemoryCardOsMountPoint( "EditorMemoryCardOsMountPoint", "" );
const CString MEM_CARD_MOUNT_POINT[NUM_PLAYERS] = const CString MEM_CARD_MOUNT_POINT[NUM_PLAYERS] =
{ {
+2
View File
@@ -46,6 +46,8 @@ public:
static Preference1D<int> m_iMemoryCardUsbPort; static Preference1D<int> m_iMemoryCardUsbPort;
static Preference1D<int> m_iMemoryCardUsbLevel; static Preference1D<int> m_iMemoryCardUsbLevel;
static Preference<CString> m_sEditorMemoryCardOsMountPoint;
protected: protected:
void CheckStateChanges(); void CheckStateChanges();
+27 -18
View File
@@ -3,6 +3,7 @@
#include "RageLog.h" #include "RageLog.h"
#include "arch/MemoryCard/MemoryCardDriver.h" #include "arch/MemoryCard/MemoryCardDriver.h"
#include "MemoryCardManager.h" #include "MemoryCardManager.h"
#include "GameState.h"
REGISTER_SCREEN_CLASS( ScreenOptionsMemoryCard ); REGISTER_SCREEN_CLASS( ScreenOptionsMemoryCard );
@@ -35,6 +36,25 @@ void ScreenOptionsMemoryCard::Init()
InitMenu( m_vDefs, vHands ); InitMenu( m_vDefs, vHands );
} }
void ScreenOptionsMemoryCard::BeginScreen()
{
ScreenOptions::BeginScreen();
// select the last chosen memory card (if present)
if( !MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Get().empty() )
{
const vector<UsbStorageDevice> v = MEMCARDMAN->GetStorageDevices();
for( unsigned i=0; i<v.size(); i++ )
{
if( v[i].sOsMountDir == MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Get() )
{
this->MoveRowAbsolute( PLAYER_1, i, false );
break;
}
}
}
}
void ScreenOptionsMemoryCard::HandleScreenMessage( const ScreenMessage SM ) void ScreenOptionsMemoryCard::HandleScreenMessage( const ScreenMessage SM )
{ {
if( SM == SM_GoToNextScreen ) if( SM == SM_GoToNextScreen )
@@ -52,32 +72,21 @@ void ScreenOptionsMemoryCard::MenuStart( const InputEventPlus &input )
void ScreenOptionsMemoryCard::ImportOptions( int iRow, const vector<PlayerNumber> &vpns ) void ScreenOptionsMemoryCard::ImportOptions( int iRow, const vector<PlayerNumber> &vpns )
{ {
OptionRow &row = *m_pRows[iRow];
if( row.GetRowType() == OptionRow::ROW_EXIT )
return;
const vector<UsbStorageDevice> v = MEMCARDMAN->GetStorageDevices();
const UsbStorageDevice &dev = v[iRow];
// row.SetOneSharedSelection( MEMCARDMAN->IsBlacklisted(dev) ? 1:0 );
} }
void ScreenOptionsMemoryCard::ExportOptions( int iRow, const vector<PlayerNumber> &vpns ) void ScreenOptionsMemoryCard::ExportOptions( int iRow, const vector<PlayerNumber> &vpns )
{ {
// if( iRow == 0 )
// MEMCARDMAN->m_sMemoryCardOsMountPointBlacklist.Set( "" );
OptionRow &row = *m_pRows[iRow]; OptionRow &row = *m_pRows[iRow];
if( row.GetRowType() == OptionRow::ROW_EXIT ) if( row.GetRowType() == OptionRow::ROW_EXIT )
return; return;
const vector<UsbStorageDevice> v = MEMCARDMAN->GetStorageDevices();
const UsbStorageDevice &dev = v[iRow]; PlayerNumber pn = GAMESTATE->m_MasterPlayerNumber;
int iSel = row.GetOneSharedSelection(); if( m_iCurrentRow[pn] == iRow )
if( iSel == 1 )
{ {
// CString s = MEMCARDMAN->m_sMemoryCardOsMountPointBlacklist; const vector<UsbStorageDevice> v = MEMCARDMAN->GetStorageDevices();
// if( s.empty() ) const UsbStorageDevice &dev = v[iRow];
// s = dev.sOsMountDir; MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Set( dev.sOsMountDir );
// else
// s += ","+dev.sOsMountDir;
// MEMCARDMAN->m_sMemoryCardOsMountPointBlacklist.Set( s );
} }
} }
+1
View File
@@ -8,6 +8,7 @@ class ScreenOptionsMemoryCard : public ScreenOptions
public: public:
ScreenOptionsMemoryCard( CString sName ); ScreenOptionsMemoryCard( CString sName );
virtual void Init(); virtual void Init();
void BeginScreen();
virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void HandleScreenMessage( const ScreenMessage SM );