name cleanup:
GetDescription -> GetDisplayTitle GetValue -> GetDisplayValue Do -> DoAndMakeSystemMessage
This commit is contained in:
@@ -56,13 +56,13 @@ public:
|
|||||||
virtual ~IDebugLine() { }
|
virtual ~IDebugLine() { }
|
||||||
enum Type { all_screens, gameplay_only };
|
enum Type { all_screens, gameplay_only };
|
||||||
virtual Type GetType() const { return all_screens; }
|
virtual Type GetType() const { return all_screens; }
|
||||||
virtual RString GetDescription() = 0;
|
virtual RString GetDisplayTitle() = 0;
|
||||||
virtual RString GetValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
virtual RString GetDisplayValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
||||||
virtual bool IsEnabled() = 0;
|
virtual bool IsEnabled() = 0;
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
RString s1 = GetDescription();
|
RString s1 = GetDisplayTitle();
|
||||||
RString s2 = GetValue();
|
RString s2 = GetDisplayValue();
|
||||||
if( !s2.empty() )
|
if( !s2.empty() )
|
||||||
s1 += " - ";
|
s1 += " - ";
|
||||||
sMessageOut = s1 + s2;
|
sMessageOut = s1 + s2;
|
||||||
@@ -297,8 +297,8 @@ void ScreenDebugOverlay::UpdateText()
|
|||||||
txt2.SetY( fY );
|
txt2.SetY( fY );
|
||||||
txt2.SetZoom( 0.7f );
|
txt2.SetZoom( 0.7f );
|
||||||
|
|
||||||
RString s1 = (*p)->GetDescription();
|
RString s1 = (*p)->GetDisplayTitle();
|
||||||
RString s2 = (*p)->GetValue();
|
RString s2 = (*p)->GetDisplayValue();
|
||||||
|
|
||||||
bool bOn = (*p)->IsEnabled();
|
bool bOn = (*p)->IsEnabled();
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ bool ScreenDebugOverlay::OverlayInput( const InputEventPlus &input )
|
|||||||
txt1.SetZoom( fZoom );
|
txt1.SetZoom( fZoom );
|
||||||
|
|
||||||
RString sMessage;
|
RString sMessage;
|
||||||
(*p)->Do( sMessage );
|
(*p)->DoAndMakeSystemMessage( sMessage );
|
||||||
if( !sMessage.empty() )
|
if( !sMessage.empty() )
|
||||||
SCREENMAN->SystemMessage( sMessage );
|
SCREENMAN->SystemMessage( sMessage );
|
||||||
|
|
||||||
@@ -447,8 +447,8 @@ static LocalizedString SYNC_TEMPO ( "ScreenDebugOverlay", "Tempo" );
|
|||||||
|
|
||||||
class DebugLineAutoplay : public IDebugLine
|
class DebugLineAutoplay : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return AUTO_PLAY.GetValue(); }
|
virtual RString GetDisplayTitle() { return AUTO_PLAY.GetValue(); }
|
||||||
virtual RString GetValue()
|
virtual RString GetDisplayValue()
|
||||||
{
|
{
|
||||||
switch( GamePreferences::m_AutoPlay.Get() )
|
switch( GamePreferences::m_AutoPlay.Get() )
|
||||||
{
|
{
|
||||||
@@ -460,7 +460,7 @@ class DebugLineAutoplay : public IDebugLine
|
|||||||
}
|
}
|
||||||
virtual Type GetType() const { return IDebugLine::gameplay_only; }
|
virtual Type GetType() const { return IDebugLine::gameplay_only; }
|
||||||
virtual bool IsEnabled() { return GamePreferences::m_AutoPlay.Get() != PC_HUMAN; }
|
virtual bool IsEnabled() { return GamePreferences::m_AutoPlay.Get() != PC_HUMAN; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
ASSERT( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID );
|
ASSERT( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID );
|
||||||
PlayerController pc = GAMESTATE->m_pPlayerState[GAMESTATE->m_MasterPlayerNumber]->m_PlayerController;
|
PlayerController pc = GAMESTATE->m_pPlayerState[GAMESTATE->m_MasterPlayerNumber]->m_PlayerController;
|
||||||
@@ -474,15 +474,15 @@ class DebugLineAutoplay : public IDebugLine
|
|||||||
GAMESTATE->m_pPlayerState[p]->m_PlayerController = GamePreferences::m_AutoPlay;
|
GAMESTATE->m_pPlayerState[p]->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||||
FOREACH_MultiPlayer(p)
|
FOREACH_MultiPlayer(p)
|
||||||
GAMESTATE->m_pMultiPlayerState[p]->m_PlayerController = GamePreferences::m_AutoPlay;
|
GAMESTATE->m_pMultiPlayerState[p]->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineAssist : public IDebugLine
|
class DebugLineAssist : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return ASSIST.GetValue(); }
|
virtual RString GetDisplayTitle() { return ASSIST.GetValue(); }
|
||||||
virtual Type GetType() const { return gameplay_only; }
|
virtual Type GetType() const { return gameplay_only; }
|
||||||
virtual RString GetValue() {
|
virtual RString GetDisplayValue() {
|
||||||
SongOptions so;
|
SongOptions so;
|
||||||
so.m_bAssistClap = GAMESTATE->m_SongOptions.GetSong().m_bAssistClap;
|
so.m_bAssistClap = GAMESTATE->m_SongOptions.GetSong().m_bAssistClap;
|
||||||
so.m_bAssistMetronome = GAMESTATE->m_SongOptions.GetSong().m_bAssistMetronome;
|
so.m_bAssistMetronome = GAMESTATE->m_SongOptions.GetSong().m_bAssistMetronome;
|
||||||
@@ -492,7 +492,7 @@ class DebugLineAssist : public IDebugLine
|
|||||||
return OFF.GetValue();
|
return OFF.GetValue();
|
||||||
}
|
}
|
||||||
virtual bool IsEnabled() { return GAMESTATE->m_SongOptions.GetSong().m_bAssistClap || GAMESTATE->m_SongOptions.GetSong().m_bAssistMetronome; }
|
virtual bool IsEnabled() { return GAMESTATE->m_SongOptions.GetSong().m_bAssistClap || GAMESTATE->m_SongOptions.GetSong().m_bAssistMetronome; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
ASSERT( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID );
|
ASSERT( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID );
|
||||||
bool bHoldingShift = INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT) );
|
bool bHoldingShift = INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT) );
|
||||||
@@ -506,14 +506,14 @@ class DebugLineAssist : public IDebugLine
|
|||||||
else
|
else
|
||||||
SO_GROUP_ASSIGN( GAMESTATE->m_SongOptions, ModsLevel_Song, m_bAssistClap, b );
|
SO_GROUP_ASSIGN( GAMESTATE->m_SongOptions, ModsLevel_Song, m_bAssistClap, b );
|
||||||
|
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineAutosync : public IDebugLine
|
class DebugLineAutosync : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return AUTOSYNC.GetValue(); }
|
virtual RString GetDisplayTitle() { return AUTOSYNC.GetValue(); }
|
||||||
virtual RString GetValue()
|
virtual RString GetDisplayValue()
|
||||||
{
|
{
|
||||||
switch( GAMESTATE->m_SongOptions.GetSong().m_AutosyncType )
|
switch( GAMESTATE->m_SongOptions.GetSong().m_AutosyncType )
|
||||||
{
|
{
|
||||||
@@ -526,7 +526,7 @@ class DebugLineAutosync : public IDebugLine
|
|||||||
}
|
}
|
||||||
virtual Type GetType() const { return IDebugLine::gameplay_only; }
|
virtual Type GetType() const { return IDebugLine::gameplay_only; }
|
||||||
virtual bool IsEnabled() { return GAMESTATE->m_SongOptions.GetSong().m_AutosyncType!=SongOptions::AUTOSYNC_OFF; }
|
virtual bool IsEnabled() { return GAMESTATE->m_SongOptions.GetSong().m_AutosyncType!=SongOptions::AUTOSYNC_OFF; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
int as = GAMESTATE->m_SongOptions.GetSong().m_AutosyncType + 1;
|
int as = GAMESTATE->m_SongOptions.GetSong().m_AutosyncType + 1;
|
||||||
bool bAllowSongAutosync = !GAMESTATE->IsCourseMode();
|
bool bAllowSongAutosync = !GAMESTATE->IsCourseMode();
|
||||||
@@ -536,127 +536,127 @@ class DebugLineAutosync : public IDebugLine
|
|||||||
wrap( as, SongOptions::NUM_AUTOSYNC_TYPES );
|
wrap( as, SongOptions::NUM_AUTOSYNC_TYPES );
|
||||||
SO_GROUP_ASSIGN( GAMESTATE->m_SongOptions, ModsLevel_Song, m_AutosyncType, SongOptions::AutosyncType(as) );
|
SO_GROUP_ASSIGN( GAMESTATE->m_SongOptions, ModsLevel_Song, m_AutosyncType, SongOptions::AutosyncType(as) );
|
||||||
MESSAGEMAN->Broadcast( Message_AutosyncChanged );
|
MESSAGEMAN->Broadcast( Message_AutosyncChanged );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineCoinMode : public IDebugLine
|
class DebugLineCoinMode : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return COIN_MODE.GetValue(); }
|
virtual RString GetDisplayTitle() { return COIN_MODE.GetValue(); }
|
||||||
virtual RString GetValue() { return CoinModeToString(GamePreferences::m_CoinMode); }
|
virtual RString GetDisplayValue() { return CoinModeToString(GamePreferences::m_CoinMode); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
int cm = GamePreferences::m_CoinMode+1;
|
int cm = GamePreferences::m_CoinMode+1;
|
||||||
wrap( cm, NUM_CoinMode );
|
wrap( cm, NUM_CoinMode );
|
||||||
GamePreferences::m_CoinMode.Set( CoinMode(cm) );
|
GamePreferences::m_CoinMode.Set( CoinMode(cm) );
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineSlow : public IDebugLine
|
class DebugLineSlow : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return SLOW.GetValue(); }
|
virtual RString GetDisplayTitle() { return SLOW.GetValue(); }
|
||||||
virtual bool IsEnabled() { return g_bIsSlow; }
|
virtual bool IsEnabled() { return g_bIsSlow; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
g_bIsSlow = !g_bIsSlow;
|
g_bIsSlow = !g_bIsSlow;
|
||||||
SetSpeed();
|
SetSpeed();
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineHalt : public IDebugLine
|
class DebugLineHalt : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return HALT.GetValue(); }
|
virtual RString GetDisplayTitle() { return HALT.GetValue(); }
|
||||||
virtual bool IsEnabled() { return g_bIsHalt; }
|
virtual bool IsEnabled() { return g_bIsHalt; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
g_bIsHalt = !g_bIsHalt;
|
g_bIsHalt = !g_bIsHalt;
|
||||||
g_HaltTimer.Touch();
|
g_HaltTimer.Touch();
|
||||||
SetSpeed();
|
SetSpeed();
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineLightsDebug : public IDebugLine
|
class DebugLineLightsDebug : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return LIGHTS_DEBUG.GetValue(); }
|
virtual RString GetDisplayTitle() { return LIGHTS_DEBUG.GetValue(); }
|
||||||
virtual bool IsEnabled() { return PREFSMAN->m_bDebugLights.Get(); }
|
virtual bool IsEnabled() { return PREFSMAN->m_bDebugLights.Get(); }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
PREFSMAN->m_bDebugLights.Set( !PREFSMAN->m_bDebugLights );
|
PREFSMAN->m_bDebugLights.Set( !PREFSMAN->m_bDebugLights );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineMonkeyInput : public IDebugLine
|
class DebugLineMonkeyInput : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return MONKEY_INPUT.GetValue(); }
|
virtual RString GetDisplayTitle() { return MONKEY_INPUT.GetValue(); }
|
||||||
virtual bool IsEnabled() { return PREFSMAN->m_bMonkeyInput.Get(); }
|
virtual bool IsEnabled() { return PREFSMAN->m_bMonkeyInput.Get(); }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
PREFSMAN->m_bMonkeyInput.Set( !PREFSMAN->m_bMonkeyInput );
|
PREFSMAN->m_bMonkeyInput.Set( !PREFSMAN->m_bMonkeyInput );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineStats : public IDebugLine
|
class DebugLineStats : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return RENDERING_STATS.GetValue(); }
|
virtual RString GetDisplayTitle() { return RENDERING_STATS.GetValue(); }
|
||||||
virtual bool IsEnabled() { return PREFSMAN->m_bShowStats.Get(); }
|
virtual bool IsEnabled() { return PREFSMAN->m_bShowStats.Get(); }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
PREFSMAN->m_bShowStats.Set( !PREFSMAN->m_bShowStats );
|
PREFSMAN->m_bShowStats.Set( !PREFSMAN->m_bShowStats );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineVsync : public IDebugLine
|
class DebugLineVsync : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return VSYNC.GetValue(); }
|
virtual RString GetDisplayTitle() { return VSYNC.GetValue(); }
|
||||||
virtual bool IsEnabled() { return PREFSMAN->m_bVsync.Get(); }
|
virtual bool IsEnabled() { return PREFSMAN->m_bVsync.Get(); }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
PREFSMAN->m_bVsync.Set( !PREFSMAN->m_bVsync );
|
PREFSMAN->m_bVsync.Set( !PREFSMAN->m_bVsync );
|
||||||
StepMania::ApplyGraphicOptions();
|
StepMania::ApplyGraphicOptions();
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineAllowMultitexture : public IDebugLine
|
class DebugLineAllowMultitexture : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return MULTITEXTURE.GetValue(); }
|
virtual RString GetDisplayTitle() { return MULTITEXTURE.GetValue(); }
|
||||||
virtual bool IsEnabled() { return PREFSMAN->m_bAllowMultitexture.Get(); }
|
virtual bool IsEnabled() { return PREFSMAN->m_bAllowMultitexture.Get(); }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
PREFSMAN->m_bAllowMultitexture.Set( !PREFSMAN->m_bAllowMultitexture );
|
PREFSMAN->m_bAllowMultitexture.Set( !PREFSMAN->m_bAllowMultitexture );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineScreenTestMode : public IDebugLine
|
class DebugLineScreenTestMode : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return SCREEN_TEST_MODE.GetValue(); }
|
virtual RString GetDisplayTitle() { return SCREEN_TEST_MODE.GetValue(); }
|
||||||
virtual bool IsEnabled() { return PREFSMAN->m_bScreenTestMode.Get(); }
|
virtual bool IsEnabled() { return PREFSMAN->m_bScreenTestMode.Get(); }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
PREFSMAN->m_bScreenTestMode.Set( !PREFSMAN->m_bScreenTestMode );
|
PREFSMAN->m_bScreenTestMode.Set( !PREFSMAN->m_bScreenTestMode );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineClearMachineStats : public IDebugLine
|
class DebugLineClearMachineStats : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return CLEAR_MACHINE_STATS.GetValue(); }
|
virtual RString GetDisplayTitle() { return CLEAR_MACHINE_STATS.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
GameCommand gc;
|
GameCommand gc;
|
||||||
ClearMachineStats();
|
ClearMachineStats();
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -738,36 +738,36 @@ static void FillProfileStats( Profile *pProfile )
|
|||||||
|
|
||||||
class DebugLineFillMachineStats : public IDebugLine
|
class DebugLineFillMachineStats : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return FILL_MACHINE_STATS.GetValue(); }
|
virtual RString GetDisplayTitle() { return FILL_MACHINE_STATS.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
Profile* pProfile = PROFILEMAN->GetMachineProfile();
|
Profile* pProfile = PROFILEMAN->GetMachineProfile();
|
||||||
FillProfileStats( pProfile );
|
FillProfileStats( pProfile );
|
||||||
PROFILEMAN->SaveMachineProfile();
|
PROFILEMAN->SaveMachineProfile();
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineSendNotesEnded : public IDebugLine
|
class DebugLineSendNotesEnded : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return SEND_NOTES_ENDED.GetValue(); }
|
virtual RString GetDisplayTitle() { return SEND_NOTES_ENDED.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_NotesEnded, 0 );
|
SCREENMAN->PostMessageToTopScreen( SM_NotesEnded, 0 );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineReloadCurrentScreen : public IDebugLine
|
class DebugLineReloadCurrentScreen : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return RELOAD.GetValue(); }
|
virtual RString GetDisplayTitle() { return RELOAD.GetValue(); }
|
||||||
virtual RString GetValue() { return SCREENMAN && SCREENMAN->GetTopScreen()? SCREENMAN->GetTopScreen()->GetName() : RString(); }
|
virtual RString GetDisplayValue() { return SCREENMAN && SCREENMAN->GetTopScreen()? SCREENMAN->GetTopScreen()->GetName() : RString(); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
RString sScreenName = SCREENMAN->GetScreen(0)->GetName();
|
RString sScreenName = SCREENMAN->GetScreen(0)->GetName();
|
||||||
SCREENMAN->PopAllScreens();
|
SCREENMAN->PopAllScreens();
|
||||||
@@ -776,30 +776,30 @@ class DebugLineReloadCurrentScreen : public IDebugLine
|
|||||||
StepMania::ResetGame();
|
StepMania::ResetGame();
|
||||||
|
|
||||||
SCREENMAN->SetNewScreen( sScreenName );
|
SCREENMAN->SetNewScreen( sScreenName );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
sMessageOut = "";
|
sMessageOut = "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineRestartCurrentScreen : public IDebugLine
|
class DebugLineRestartCurrentScreen : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return RESTART.GetValue(); }
|
virtual RString GetDisplayTitle() { return RESTART.GetValue(); }
|
||||||
virtual RString GetValue() { return SCREENMAN && SCREENMAN->GetTopScreen()? SCREENMAN->GetTopScreen()->GetName() : RString(); }
|
virtual RString GetDisplayValue() { return SCREENMAN && SCREENMAN->GetTopScreen()? SCREENMAN->GetTopScreen()->GetName() : RString(); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
SCREENMAN->GetTopScreen()->BeginScreen();
|
SCREENMAN->GetTopScreen()->BeginScreen();
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
sMessageOut = "";
|
sMessageOut = "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineReloadTheme : public IDebugLine
|
class DebugLineReloadTheme : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return RELOAD_THEME_AND_TEXTURES.GetValue(); }
|
virtual RString GetDisplayTitle() { return RELOAD_THEME_AND_TEXTURES.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
THEME->ReloadMetrics();
|
THEME->ReloadMetrics();
|
||||||
TEXTUREMAN->ReloadAll();
|
TEXTUREMAN->ReloadAll();
|
||||||
@@ -807,16 +807,16 @@ class DebugLineReloadTheme : public IDebugLine
|
|||||||
CodeDetector::RefreshCacheItems();
|
CodeDetector::RefreshCacheItems();
|
||||||
// HACK: Don't update text below. Return immediately because this screen
|
// HACK: Don't update text below. Return immediately because this screen
|
||||||
// was just destroyed as part of the theme reload.
|
// was just destroyed as part of the theme reload.
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineWriteProfiles : public IDebugLine
|
class DebugLineWriteProfiles : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return WRITE_PROFILES.GetValue(); }
|
virtual RString GetDisplayTitle() { return WRITE_PROFILES.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
// Also save bookkeeping and profile info for debugging
|
// Also save bookkeeping and profile info for debugging
|
||||||
// so we don't have to play through a whole song to get new output.
|
// so we don't have to play through a whole song to get new output.
|
||||||
@@ -834,100 +834,100 @@ class DebugLineWriteProfiles : public IDebugLine
|
|||||||
if( bWasMemoryCard )
|
if( bWasMemoryCard )
|
||||||
MEMCARDMAN->UnmountCard( p );
|
MEMCARDMAN->UnmountCard( p );
|
||||||
}
|
}
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineWritePreferences : public IDebugLine
|
class DebugLineWritePreferences : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return WRITE_PREFERENCES.GetValue(); }
|
virtual RString GetDisplayTitle() { return WRITE_PREFERENCES.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
PREFSMAN->SavePrefsToDisk();
|
PREFSMAN->SavePrefsToDisk();
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineMenuTimer : public IDebugLine
|
class DebugLineMenuTimer : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return MENU_TIMER.GetValue(); }
|
virtual RString GetDisplayTitle() { return MENU_TIMER.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return PREFSMAN->m_bMenuTimer.Get(); }
|
virtual bool IsEnabled() { return PREFSMAN->m_bMenuTimer.Get(); }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
PREFSMAN->m_bMenuTimer.Set( !PREFSMAN->m_bMenuTimer );
|
PREFSMAN->m_bMenuTimer.Set( !PREFSMAN->m_bMenuTimer );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineFlushLog : public IDebugLine
|
class DebugLineFlushLog : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return FLUSH_LOG.GetValue(); }
|
virtual RString GetDisplayTitle() { return FLUSH_LOG.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
LOG->Flush();
|
LOG->Flush();
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLinePullBackCamera : public IDebugLine
|
class DebugLinePullBackCamera : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return PULL_BACK_CAMERA.GetValue(); }
|
virtual RString GetDisplayTitle() { return PULL_BACK_CAMERA.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return g_fImageScaleDestination != 1; }
|
virtual bool IsEnabled() { return g_fImageScaleDestination != 1; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
if( g_fImageScaleDestination == 1 )
|
if( g_fImageScaleDestination == 1 )
|
||||||
g_fImageScaleDestination = 0.5f;
|
g_fImageScaleDestination = 0.5f;
|
||||||
else
|
else
|
||||||
g_fImageScaleDestination = 1;
|
g_fImageScaleDestination = 1;
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineVolumeUp : public IDebugLine
|
class DebugLineVolumeUp : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return VOLUME_UP.GetValue(); }
|
virtual RString GetDisplayTitle() { return VOLUME_UP.GetValue(); }
|
||||||
virtual RString GetValue() { return ssprintf("%.0f%%",PREFSMAN->m_fSoundVolume.Get()*100); }
|
virtual RString GetDisplayValue() { return ssprintf("%.0f%%",PREFSMAN->m_fSoundVolume.Get()*100); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
ChangeVolume( +0.1f );
|
ChangeVolume( +0.1f );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineVolumeDown : public IDebugLine
|
class DebugLineVolumeDown : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return VOLUME_DOWN.GetValue(); }
|
virtual RString GetDisplayTitle() { return VOLUME_DOWN.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return true; }
|
virtual bool IsEnabled() { return true; }
|
||||||
virtual void Do( RString &sMessageOut )
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
ChangeVolume( -0.1f );
|
ChangeVolume( -0.1f );
|
||||||
IDebugLine::Do( sMessageOut );
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
sMessageOut += " - " + ssprintf("%.0f%%",PREFSMAN->m_fSoundVolume.Get()*100);
|
sMessageOut += " - " + ssprintf("%.0f%%",PREFSMAN->m_fSoundVolume.Get()*100);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineForceCrash : public IDebugLine
|
class DebugLineForceCrash : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return FORCE_CRASH.GetValue(); }
|
virtual RString GetDisplayTitle() { return FORCE_CRASH.GetValue(); }
|
||||||
virtual RString GetValue() { return RString(); }
|
virtual RString GetDisplayValue() { return RString(); }
|
||||||
virtual bool IsEnabled() { return false; }
|
virtual bool IsEnabled() { return false; }
|
||||||
virtual void Do( RString &sMessageOut ) { FAIL_M("DebugLineCrash"); }
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut ) { FAIL_M("DebugLineCrash"); }
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugLineUptime : public IDebugLine
|
class DebugLineUptime : public IDebugLine
|
||||||
{
|
{
|
||||||
virtual RString GetDescription() { return UPTIME.GetValue(); }
|
virtual RString GetDisplayTitle() { return UPTIME.GetValue(); }
|
||||||
virtual RString GetValue() { return SecondsToMMSSMsMsMs(RageTimer::GetTimeSinceStart()); }
|
virtual RString GetDisplayValue() { return SecondsToMMSSMsMsMs(RageTimer::GetTimeSinceStart()); }
|
||||||
virtual bool IsEnabled() { return false; }
|
virtual bool IsEnabled() { return false; }
|
||||||
virtual void Do( RString &sMessageOut ) {}
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut ) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* #ifdef out the lines below if you don't want them to appear on certain
|
/* #ifdef out the lines below if you don't want them to appear on certain
|
||||||
|
|||||||
Reference in New Issue
Block a user