Remove ShowAutoplayStatus, hold alt to hide autoplay text
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "SongManager.h"
|
||||
#include "GameLoop.h"
|
||||
#include "Song.h"
|
||||
#include "ScreenSyncOverlay.h"
|
||||
|
||||
static bool g_bIsDisplayed = false;
|
||||
static bool g_bIsSlow = false;
|
||||
@@ -562,7 +563,7 @@ static LocalizedString SYNC_TEMPO ( "ScreenDebugOverlay", "Tempo" );
|
||||
|
||||
class DebugLineAutoplay : public IDebugLine
|
||||
{
|
||||
virtual RString GetDisplayTitle() { return AUTO_PLAY.GetValue(); }
|
||||
virtual RString GetDisplayTitle() { return AUTO_PLAY.GetValue() + " (+Shift = AI) (+Alt = hide)"; }
|
||||
virtual RString GetDisplayValue()
|
||||
{
|
||||
switch( GamePreferences::m_AutoPlay.Get() )
|
||||
@@ -579,7 +580,9 @@ class DebugLineAutoplay : public IDebugLine
|
||||
{
|
||||
ASSERT( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID );
|
||||
PlayerController pc = GAMESTATE->m_pPlayerState[GAMESTATE->m_MasterPlayerNumber]->m_PlayerController;
|
||||
bool bHoldingShift = INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT) );
|
||||
bool bHoldingShift =
|
||||
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT) ) ||
|
||||
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_RSHIFT) );
|
||||
if( bHoldingShift )
|
||||
pc = (pc==PC_CPU) ? PC_HUMAN : PC_CPU;
|
||||
else
|
||||
@@ -589,6 +592,13 @@ class DebugLineAutoplay : public IDebugLine
|
||||
GAMESTATE->m_pPlayerState[p]->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||
FOREACH_MultiPlayer(p)
|
||||
GAMESTATE->m_pMultiPlayerState[p]->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||
|
||||
// Hide Autoplay if Alt is held down
|
||||
bool bHoldingAlt =
|
||||
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LALT) ) ||
|
||||
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_RALT) );
|
||||
ScreenSyncOverlay::SetShowAutoplay( !bHoldingAlt );
|
||||
|
||||
IDebugLine::DoAndLog( sMessageOut );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -37,7 +37,6 @@ void ScreenSyncOverlay::Init()
|
||||
m_textHelp.SetHorizAlign( align_left );
|
||||
m_textHelp.SetXY( SCREEN_CENTER_X+20, SCREEN_TOP+100 );
|
||||
m_textHelp.SetDiffuseAlpha( 0 );
|
||||
m_textHelp.SetZoom( 0.6f );
|
||||
m_textHelp.SetShadowLength( 2 );
|
||||
m_textHelp.SetText(
|
||||
REVERT_SYNC_CHANGES.GetValue()+":\n"
|
||||
@@ -81,7 +80,11 @@ void ScreenSyncOverlay::Update( float fDeltaTime )
|
||||
UpdateText();
|
||||
}
|
||||
|
||||
static Preference<bool> g_bShowAutoPlayStatus( "ShowAutoPlayStatus", true );
|
||||
bool g_bShowAutoplay = true;
|
||||
void ScreenSyncOverlay::SetShowAutoplay( bool b )
|
||||
{
|
||||
g_bShowAutoplay = b;
|
||||
}
|
||||
|
||||
static LocalizedString AUTO_PLAY ( "ScreenSyncOverlay", "AutoPlay" );
|
||||
static LocalizedString AUTO_PLAY_CPU ( "ScreenSyncOverlay", "AutoPlayCPU" );
|
||||
@@ -99,7 +102,7 @@ void ScreenSyncOverlay::UpdateText()
|
||||
//
|
||||
vector<RString> vs;
|
||||
|
||||
if( g_bShowAutoPlayStatus )
|
||||
if( g_bShowAutoplay )
|
||||
{
|
||||
switch( GamePreferences::m_AutoPlay.Get() )
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
|
||||
void Update( float fDeltaTime );
|
||||
|
||||
static void SetShowAutoplay( bool b );
|
||||
private:
|
||||
void UpdateText();
|
||||
void ShowHelp();
|
||||
|
||||
Reference in New Issue
Block a user