mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-15 12:20:01 +01:00
reorder ESC sequence
This commit is contained in:
@@ -363,16 +363,20 @@ void UserInterface::handleKeyboard()
|
|||||||
Mixer::manager().setView(View::TEXTURE);
|
Mixer::manager().setView(View::TEXTURE);
|
||||||
else if (ImGui::IsKeyPressed( GLFW_KEY_F12 ))
|
else if (ImGui::IsKeyPressed( GLFW_KEY_F12 ))
|
||||||
StartScreenshot();
|
StartScreenshot();
|
||||||
// button esc to toggle fullscreen
|
// button esc
|
||||||
else if (ImGui::IsKeyPressed( GLFW_KEY_ESCAPE )) {
|
else if (ImGui::IsKeyPressed( GLFW_KEY_ESCAPE )) {
|
||||||
|
// 1. escape fullscreen
|
||||||
if (Rendering::manager().mainWindow().isFullscreen())
|
if (Rendering::manager().mainWindow().isFullscreen())
|
||||||
Rendering::manager().mainWindow().exitFullscreen();
|
Rendering::manager().mainWindow().exitFullscreen();
|
||||||
|
// 2. hide panel
|
||||||
|
else if (navigator.pannelVisible())
|
||||||
|
navigator.hidePannel();
|
||||||
|
// 3. hide windows
|
||||||
else if (Settings::application.widget.preview || Settings::application.widget.media_player) {
|
else if (Settings::application.widget.preview || Settings::application.widget.media_player) {
|
||||||
Settings::application.widget.preview = false;
|
Settings::application.widget.preview = false;
|
||||||
Settings::application.widget.media_player = false;
|
Settings::application.widget.media_player = false;
|
||||||
}
|
}
|
||||||
else if (navigator.pannelVisible())
|
// 4. cancel selection
|
||||||
navigator.hidePannel();
|
|
||||||
else if (!Mixer::selection().empty()) {
|
else if (!Mixer::selection().empty()) {
|
||||||
Mixer::manager().unsetCurrentSource();
|
Mixer::manager().unsetCurrentSource();
|
||||||
Mixer::selection().clear();
|
Mixer::selection().clear();
|
||||||
@@ -389,7 +393,6 @@ void UserInterface::handleKeyboard()
|
|||||||
// Backspace to delete source
|
// Backspace to delete source
|
||||||
if (ImGui::IsKeyPressed( GLFW_KEY_BACKSPACE ) || ImGui::IsKeyPressed( GLFW_KEY_DELETE ))
|
if (ImGui::IsKeyPressed( GLFW_KEY_BACKSPACE ) || ImGui::IsKeyPressed( GLFW_KEY_DELETE ))
|
||||||
Mixer::manager().deleteSelection();
|
Mixer::manager().deleteSelection();
|
||||||
|
|
||||||
// button tab to select next
|
// button tab to select next
|
||||||
else if ( !alt_modifier_active && ImGui::IsKeyPressed( GLFW_KEY_TAB )) {
|
else if ( !alt_modifier_active && ImGui::IsKeyPressed( GLFW_KEY_TAB )) {
|
||||||
if (shift_modifier_active)
|
if (shift_modifier_active)
|
||||||
|
|||||||
Reference in New Issue
Block a user