mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Implemented TAB navigation to switch source.
This commit is contained in:
13
Mixer.cpp
13
Mixer.cpp
@@ -394,6 +394,19 @@ void Mixer::setCurrentSource(int index)
|
||||
setCurrentSource( session_->find(index) );
|
||||
}
|
||||
|
||||
void Mixer::setCurrentNext()
|
||||
{
|
||||
SourceList::iterator it = current_source_;
|
||||
|
||||
it++;
|
||||
|
||||
if (it == session_->end()) {
|
||||
it = session_->begin();
|
||||
}
|
||||
|
||||
setCurrentSource( it );
|
||||
}
|
||||
|
||||
void Mixer::unsetCurrentSource()
|
||||
{
|
||||
// discard overlay for previously current source
|
||||
|
||||
1
Mixer.h
1
Mixer.h
@@ -48,6 +48,7 @@ public:
|
||||
void setCurrentSource(Node *node);
|
||||
void setCurrentSource(int index);
|
||||
void setCurrentSource(Source *s);
|
||||
void setCurrentNext();
|
||||
void unsetCurrentSource();
|
||||
void cloneCurrentSource();
|
||||
void deleteCurrentSource();
|
||||
|
||||
@@ -279,6 +279,9 @@ void UserInterface::handleKeyboard()
|
||||
// button home to toggle menu
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_INSERT ))
|
||||
navigator.togglePannelNew();
|
||||
// button tab to select next
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_TAB ))
|
||||
Mixer::manager().setCurrentNext();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user