mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-14 19:59:59 +01:00
Support for Shift-Tab to loop backward in list of sources.
This commit is contained in:
15
Mixer.cpp
15
Mixer.cpp
@@ -642,6 +642,21 @@ void Mixer::setCurrentNext()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Mixer::setCurrentPrevious()
|
||||||
|
{
|
||||||
|
if (session_->numSource() > 0) {
|
||||||
|
|
||||||
|
SourceList::iterator it = current_source_;
|
||||||
|
|
||||||
|
if (it == session_->begin()) {
|
||||||
|
it = session_->end();
|
||||||
|
}
|
||||||
|
|
||||||
|
it--;
|
||||||
|
setCurrentSource( it );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Mixer::unsetCurrentSource()
|
void Mixer::unsetCurrentSource()
|
||||||
{
|
{
|
||||||
// discard overlay for previously current source
|
// discard overlay for previously current source
|
||||||
|
|||||||
1
Mixer.h
1
Mixer.h
@@ -59,6 +59,7 @@ public:
|
|||||||
void setCurrentSource (Node *node);
|
void setCurrentSource (Node *node);
|
||||||
void setCurrentSource (uint64_t id);
|
void setCurrentSource (uint64_t id);
|
||||||
void setCurrentNext ();
|
void setCurrentNext ();
|
||||||
|
void setCurrentPrevious ();
|
||||||
void unsetCurrentSource ();
|
void unsetCurrentSource ();
|
||||||
|
|
||||||
void setCurrentIndex (int index);
|
void setCurrentIndex (int index);
|
||||||
|
|||||||
@@ -382,8 +382,12 @@ void UserInterface::handleKeyboard()
|
|||||||
else if (ImGui::IsKeyPressed( GLFW_KEY_INSERT ))
|
else if (ImGui::IsKeyPressed( GLFW_KEY_INSERT ))
|
||||||
navigator.togglePannelNew();
|
navigator.togglePannelNew();
|
||||||
// button tab to select next
|
// button tab to select next
|
||||||
else if (ImGui::IsKeyPressed( GLFW_KEY_TAB ))
|
else if (ImGui::IsKeyPressed( GLFW_KEY_TAB )) {
|
||||||
Mixer::manager().setCurrentNext();
|
if (shift_modifier_active)
|
||||||
|
Mixer::manager().setCurrentPrevious();
|
||||||
|
else
|
||||||
|
Mixer::manager().setCurrentNext();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user