|
|
|
@ -1203,6 +1203,33 @@ void CUIMenu::OPShortcutHandler (TMenuEvent Event) |
|
|
|
|
|
|
|
|
|
void CUIMenu::PgmUpDownHandler (TMenuEvent Event) |
|
|
|
|
{ |
|
|
|
|
if (m_pMiniDexed->GetPerformanceProgramChange()) |
|
|
|
|
{ |
|
|
|
|
// Program Up/Down acts on performances
|
|
|
|
|
unsigned nLastPerformance = m_pMiniDexed->GetLastPerformance(); |
|
|
|
|
unsigned nPerformance = m_pMiniDexed->GetActualPerformanceID(); |
|
|
|
|
LOGNOTE("Performance actual=%d, last=%d", nPerformance, nLastPerformance); |
|
|
|
|
if (Event == MenuEventPgmDown) |
|
|
|
|
{ |
|
|
|
|
if (nPerformance > 0) |
|
|
|
|
{ |
|
|
|
|
m_pMiniDexed->SetNewPerformance(nPerformance-1); |
|
|
|
|
LOGNOTE("Performance new=%d, last=%d", nPerformance-1, nLastPerformance); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if (nPerformance < nLastPerformance-1) |
|
|
|
|
{ |
|
|
|
|
m_pMiniDexed->SetNewPerformance(nPerformance+1); |
|
|
|
|
LOGNOTE("Performance new=%d, last=%d", nPerformance+1, nLastPerformance); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
// Program Up/Down acts on voices within a TG.
|
|
|
|
|
|
|
|
|
|
// If we're on anything apart from the root menu,
|
|
|
|
|
// then find the current TG number. Otherwise assume TG1 (nTG=0).
|
|
|
|
|
unsigned nTG = 0; |
|
|
|
@ -1256,6 +1283,7 @@ void CUIMenu::PgmUpDownHandler (TMenuEvent Event) |
|
|
|
|
PgmUpDownHandler (MenuEventPgmDown); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CUIMenu::TGUpDownHandler (TMenuEvent Event) |
|
|
|
@ -1268,9 +1296,9 @@ void CUIMenu::TGUpDownHandler (TMenuEvent Event) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// If we're on anything apart from the root menu,
|
|
|
|
|
// If we're not in the root menu, then see if we are already in a TG menu,
|
|
|
|
|
// then find the current TG number. Otherwise assume TG1 (nTG=0).
|
|
|
|
|
if (m_MenuStackMenu[0] == s_MainMenu) { |
|
|
|
|
if (m_MenuStackMenu[0] == s_MainMenu && (m_pCurrentMenu == s_TGMenu) || (m_MenuStackMenu[1] == s_TGMenu)) { |
|
|
|
|
nTG = m_nMenuStackSelection[0]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|