Add function to get appropriate SongPosition.
This restore highlighting areas in Song Timing. This does NOT readjust the highlighted area when timing modes are switched.
This commit is contained in:
+11
-2
@@ -1527,11 +1527,11 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
|||||||
break;
|
break;
|
||||||
case EDIT_BUTTON_LAY_SELECT:
|
case EDIT_BUTTON_LAY_SELECT:
|
||||||
{
|
{
|
||||||
const int iCurrentRow = BeatToNoteRow(GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat);
|
const int iCurrentRow = BeatToNoteRow(GetAppropriatePosition().m_fSongBeat);
|
||||||
if( m_NoteFieldEdit.m_iBeginMarker==-1 && m_NoteFieldEdit.m_iEndMarker==-1 )
|
if( m_NoteFieldEdit.m_iBeginMarker==-1 && m_NoteFieldEdit.m_iEndMarker==-1 )
|
||||||
{
|
{
|
||||||
// lay begin marker
|
// lay begin marker
|
||||||
m_NoteFieldEdit.m_iBeginMarker = BeatToNoteRow(GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat);
|
m_NoteFieldEdit.m_iBeginMarker = BeatToNoteRow(GetAppropriatePosition().m_fSongBeat);
|
||||||
}
|
}
|
||||||
else if( m_NoteFieldEdit.m_iEndMarker==-1 ) // only begin marker is laid
|
else if( m_NoteFieldEdit.m_iEndMarker==-1 ) // only begin marker is laid
|
||||||
{
|
{
|
||||||
@@ -3146,6 +3146,15 @@ TimingData & ScreenEdit::GetAppropriateTiming() const
|
|||||||
return m_pSong->m_SongTiming;
|
return m_pSong->m_SongTiming;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SongPosition & ScreenEdit::GetAppropriatePosition() const
|
||||||
|
{
|
||||||
|
if (GAMESTATE->m_bIsUsingStepTiming)
|
||||||
|
{
|
||||||
|
return GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position;
|
||||||
|
}
|
||||||
|
return GAMESTATE->m_Position;
|
||||||
|
}
|
||||||
|
|
||||||
inline void ScreenEdit::SetBeat(float fBeat)
|
inline void ScreenEdit::SetBeat(float fBeat)
|
||||||
{
|
{
|
||||||
if( !GAMESTATE->m_bIsUsingStepTiming )
|
if( !GAMESTATE->m_bIsUsingStepTiming )
|
||||||
|
|||||||
@@ -580,6 +580,10 @@ private:
|
|||||||
* @brief Retrieve the appropriate TimingData based on GAMESTATE.
|
* @brief Retrieve the appropriate TimingData based on GAMESTATE.
|
||||||
* @return the proper TimingData. */
|
* @return the proper TimingData. */
|
||||||
TimingData & GetAppropriateTiming() const;
|
TimingData & GetAppropriateTiming() const;
|
||||||
|
/**
|
||||||
|
* @brief Retrieve the appropriate SongPosition data based on GAMESTATE.
|
||||||
|
* @return the proper SongPosition. */
|
||||||
|
SongPosition & GetAppropriatePosition() const;
|
||||||
void SetBeat(float fBeat);
|
void SetBeat(float fBeat);
|
||||||
float GetBeat();
|
float GetBeat();
|
||||||
int GetRow();
|
int GetRow();
|
||||||
|
|||||||
Reference in New Issue
Block a user