Add centering back into edit/practice mode playback.

This commit is contained in:
Brandon W
2024-09-23 16:12:04 -04:00
committed by teejusb
parent bcd7e8e1d2
commit 7b2f0338b8
4 changed files with 34 additions and 2 deletions
+21
View File
@@ -1525,6 +1525,27 @@ void ScreenEdit::Init()
SetDirty(true);
}
// There are two conditions for centering the notefield.
// 1. We're in EditMode
// 2. We're in PracticeMode, the preference is enabled,
// sylte is OnePlayerOneSide, and the theme allows it.
//
// If the "center_enabled" check is modified, also modify
// ScreenGameplay::Center1Player().
ThemeMetric<bool> allow_center;
allow_center.Load("ScreenGameplay", "AllowCenter1Player");
bool center_enabled = (Preference<bool>::GetPreferenceByName("Center1Player")->Get()
&& GAMESTATE->GetCurrentStyle(PLAYER_INVALID)->m_StyleType
== StyleType_OnePlayerOneSide)
&& GAMESTATE->m_PlayMode != PLAY_MODE_BATTLE
&& GAMESTATE->m_PlayMode != PLAY_MODE_RAVE
&& allow_center;
bool edit_mode_screen = (m_sName == "ScreenEdit");
player_manager_.SetCenter(edit_mode_screen || center_enabled);
player_manager_.AddPlayers(m_NoteDataEdit);
player_manager_.AddPlayersToActorFrame(*this);
TransitionEditState(STATE_EDITING);