Skip to content

Commit

Permalink
merge the favorite/unfavorite shortcuts into one
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 23, 2017
1 parent ca7b6d7 commit 249c16a
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions src/ScreenSelectMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,31 +467,21 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input )
return true;
}
}
else if (bHoldingCtrl && c == 'U' && m_MusicWheel.IsSettled())
{
// Unfavorite the currently selected song. -Not Kyz
Song* unfav_me_biatch = m_MusicWheel.GetSelectedSong();
if (unfav_me_biatch) {
Profile *pProfile = PROFILEMAN->GetProfile(PLAYER_1);
if (unfav_me_biatch) {
Profile *pProfile = PROFILEMAN->GetProfile(PLAYER_1);
unfav_me_biatch->SetFavorited(false);
pProfile->RemoveFromFavorites(GAMESTATE->m_pCurSteps[PLAYER_1]->GetChartKey());
Message msg("FavoritesUpdated");
MESSAGEMAN->Broadcast(msg);
m_MusicWheel.ChangeMusic(0);
return true;
}
}
}
else if (bHoldingCtrl && c == 'F' && m_MusicWheel.IsSettled() && input.type == IET_FIRST_PRESS)
{
// Favorite the currently selected song. -Not Kyz
Song* fav_me_biatch = m_MusicWheel.GetSelectedSong();
if (fav_me_biatch && !fav_me_biatch->IsFavorited()) {
if (fav_me_biatch) {
Profile *pProfile = PROFILEMAN->GetProfile(PLAYER_1);
fav_me_biatch->SetFavorited(true);
pProfile->AddToFavorites(GAMESTATE->m_pCurSteps[PLAYER_1]->GetChartKey());

if (!fav_me_biatch->IsFavorited()) {
fav_me_biatch->SetFavorited(true);
pProfile->AddToFavorites(GAMESTATE->m_pCurSteps[PLAYER_1]->GetChartKey());
}
else {
fav_me_biatch->SetFavorited(false);
pProfile->RemoveFromFavorites(GAMESTATE->m_pCurSteps[PLAYER_1]->GetChartKey());
}
Message msg("FavoritesUpdated");
MESSAGEMAN->Broadcast(msg);
m_MusicWheel.ChangeMusic(0);
Expand Down

0 comments on commit 249c16a

Please sign in to comment.