mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-30 03:03:53 +00:00
Allow home / end to jump to top / bottom of preset list.
This commit is contained in:
@ -119,7 +119,16 @@ void projectM::default_key_handler( projectMEvent event, projectMKeycode keycode
|
||||
|
||||
switch (keycode)
|
||||
{
|
||||
|
||||
case PROJECTM_K_HOME:
|
||||
if (renderer->showmenu) { // pageup only does something when the preset menu is active.
|
||||
selectPreset(0); // jump to top of presets.
|
||||
}
|
||||
break;
|
||||
case PROJECTM_K_END:
|
||||
if (renderer->showmenu) { // pageup only does something when the preset menu is active.
|
||||
selectPreset(m_presetLoader->size() - 1); // jump to bottom of presets.
|
||||
}
|
||||
break;
|
||||
case PROJECTM_K_PAGEUP:
|
||||
if (renderer->showmenu) { // pageup only does something when the preset menu is active.
|
||||
int upPreset = m_presetPos->lastIndex() - (renderer->textMenuPageSize / 2.0f); // jump up by page size / 2
|
||||
|
||||
Reference in New Issue
Block a user