From a976f65a089a8999cd52de1d2262c9bde6be1e6d Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 21 Mar 2005 14:13:11 +0000 Subject: [PATCH] add help text that's only shown in Play/Record --- .../Themes/default/Fonts/ScreenEdit PlayRecordHelp.redir | 1 + stepmania/Themes/default/metrics.ini | 3 +++ stepmania/src/ScreenEdit.cpp | 9 +++++++++ stepmania/src/ScreenEdit.h | 1 + 4 files changed, 14 insertions(+) create mode 100644 stepmania/Themes/default/Fonts/ScreenEdit PlayRecordHelp.redir diff --git a/stepmania/Themes/default/Fonts/ScreenEdit PlayRecordHelp.redir b/stepmania/Themes/default/Fonts/ScreenEdit PlayRecordHelp.redir new file mode 100644 index 0000000000..ca24092074 --- /dev/null +++ b/stepmania/Themes/default/Fonts/ScreenEdit PlayRecordHelp.redir @@ -0,0 +1 @@ +Common normal diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index c3c2933a7e..6bbb66f536 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -4218,6 +4218,9 @@ InputTipsOnCommand=horizalign,left;vertalign,top;zoom,0.5;shadowlength,0 InfoX=SCREEN_RIGHT-114 InfoY=SCREEN_TOP+40 InfoOnCommand=horizalign,left;vertalign,top;zoom,0.5;shadowlength,0 +PlayRecordHelpX=SCREEN_LEFT+20 +PlayRecordHelpY=SCREEN_BOTTOM-20 +PlayRecordHelpOnCommand=horizalign,left;vertalign,top;zoom,0.5;shadowlength,0 [CatalogXml] ShowPlayModeRegular=1 diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index b2396fb041..bc3344fa74 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -43,6 +43,7 @@ const float RECORD_HOLD_SECONDS = 0.3f; #define PLAYER_HEIGHT (360) #define PLAYER_Y_STANDARD (PLAYER_Y-PLAYER_HEIGHT/2) +#define PLAY_RECORD_HELP_TEXT THEME->GetMetric(m_sName,"PlayRecordHelpText") const ScreenMessage SM_BackFromMainMenu = (ScreenMessage)(SM_User+1); const ScreenMessage SM_BackFromAreaMenu = (ScreenMessage)(SM_User+2); @@ -568,6 +569,11 @@ void ScreenEdit::Init() SET_XY_AND_ON_COMMAND( m_textInfo ); this->AddChild( &m_textInfo ); + m_textPlayRecordHelp.SetName( "PlayRecordHelp" ); + m_textPlayRecordHelp.LoadFromFont( THEME->GetPathF("ScreenEdit","PlayRecordHelp") ); + m_textPlayRecordHelp.SetText( PLAY_RECORD_HELP_TEXT ); + SET_XY_AND_ON_COMMAND( m_textPlayRecordHelp ); + this->AddChild( &m_textPlayRecordHelp ); this->SortByDrawOrder(); @@ -1425,6 +1431,8 @@ void ScreenEdit::TransitionEditMode( EditMode em ) // Show/hide depending on em // m_Background.SetHidden( !PREFSMAN->m_bEditorShowBGChangesPlay || em == MODE_EDITING ); + m_sprUnderlay->SetHidden( em != MODE_EDITING ); + m_sprOverlay->SetHidden( em != MODE_EDITING ); m_textInputTips.SetHidden( em != MODE_EDITING ); m_textInfo.SetHidden( em != MODE_EDITING ); // Play the OnCommands again so that these will be re-hidden if the OnCommand hides them. @@ -1433,6 +1441,7 @@ void ScreenEdit::TransitionEditMode( EditMode em ) m_textInputTips.PlayCommand( "On" ); m_textInfo.PlayCommand( "On" ); } + m_textPlayRecordHelp.SetHidden( em != MODE_PLAYING ); m_SnapDisplay.SetHidden( em != MODE_EDITING ); m_NoteFieldEdit.SetHidden( em != MODE_EDITING ); m_NoteFieldRecord.SetHidden( em != MODE_RECORDING ); diff --git a/stepmania/src/ScreenEdit.h b/stepmania/src/ScreenEdit.h index e192611ae1..62d0a1f89d 100644 --- a/stepmania/src/ScreenEdit.h +++ b/stepmania/src/ScreenEdit.h @@ -161,6 +161,7 @@ protected: BitmapText m_textInputTips; BitmapText m_textInfo; // status information that changes + BitmapText m_textPlayRecordHelp; // keep track of where we are and what we're doing float m_fTrailingBeat; // this approaches GAMESTATE->m_fSongBeat, which is the actual beat