mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-22 15:49:59 +01:00
Use CTRL+F to toggle Fullscreen for all window types
Main window and output windows use same keyboard shortcut for uniformity.
This commit is contained in:
@@ -1184,8 +1184,9 @@ void Control::sendOutputStatus(const IpEndpointName &remoteEndpoint)
|
|||||||
|
|
||||||
void Control::keyboardCalback(GLFWwindow* w, int key, int, int action, int mods)
|
void Control::keyboardCalback(GLFWwindow* w, int key, int, int action, int mods)
|
||||||
{
|
{
|
||||||
if (UserInterface::manager().keyboardAvailable() && !mods )
|
if (UserInterface::manager().keyboardAvailable())
|
||||||
{
|
{
|
||||||
|
if ( !mods ) {
|
||||||
int _key = layoutKey(key);
|
int _key = layoutKey(key);
|
||||||
Control::manager().input_access_.lock();
|
Control::manager().input_access_.lock();
|
||||||
if (_key >= GLFW_KEY_A && _key <= GLFW_KEY_Z) {
|
if (_key >= GLFW_KEY_A && _key <= GLFW_KEY_Z) {
|
||||||
@@ -1196,12 +1197,13 @@ void Control::keyboardCalback(GLFWwindow* w, int key, int, int action, int mods)
|
|||||||
Control::manager().input_active[INPUT_NUMPAD_FIRST + _key - GLFW_KEY_KP_0] = action > GLFW_RELEASE;
|
Control::manager().input_active[INPUT_NUMPAD_FIRST + _key - GLFW_KEY_KP_0] = action > GLFW_RELEASE;
|
||||||
Control::manager().input_values[INPUT_NUMPAD_FIRST + _key - GLFW_KEY_KP_0] = action > GLFW_RELEASE ? 1.f : 0.f;
|
Control::manager().input_values[INPUT_NUMPAD_FIRST + _key - GLFW_KEY_KP_0] = action > GLFW_RELEASE ? 1.f : 0.f;
|
||||||
}
|
}
|
||||||
else if (_key == GLFW_KEY_ESCAPE && action == GLFW_PRESS )
|
|
||||||
{
|
|
||||||
Rendering::manager().window(w)->exitFullscreen();
|
|
||||||
}
|
|
||||||
Control::manager().input_access_.unlock();
|
Control::manager().input_access_.unlock();
|
||||||
}
|
}
|
||||||
|
else if ( key == GLFW_KEY_F && action == GLFW_PRESS && mods == GLFW_MOD_CONTROL )
|
||||||
|
{
|
||||||
|
Rendering::manager().window(w)->toggleFullscreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Control::inputActive (uint id)
|
bool Control::inputActive (uint id)
|
||||||
|
|||||||
@@ -167,10 +167,8 @@ static void OutputWindowEvent( GLFWwindow *w, int button, int action, int)
|
|||||||
// exit fullscreen if its the case
|
// exit fullscreen if its the case
|
||||||
if (glfwGetWindowMonitor(w) != nullptr)
|
if (glfwGetWindowMonitor(w) != nullptr)
|
||||||
Rendering::manager().window(w)->exitFullscreen();
|
Rendering::manager().window(w)->exitFullscreen();
|
||||||
|
// show main window
|
||||||
// show main window in DISPLAYS view to
|
else
|
||||||
// indicate how to manipulate output window
|
|
||||||
Mixer::manager().setView(View::DISPLAYS);
|
|
||||||
Rendering::manager().mainWindow().show();
|
Rendering::manager().mainWindow().show();
|
||||||
}
|
}
|
||||||
// for next double clic detection
|
// for next double clic detection
|
||||||
|
|||||||
@@ -350,9 +350,6 @@ void UserInterface::handleKeyboard()
|
|||||||
if (clipboard != nullptr && strlen(clipboard) > 0)
|
if (clipboard != nullptr && strlen(clipboard) > 0)
|
||||||
Mixer::manager().paste(clipboard);
|
Mixer::manager().paste(clipboard);
|
||||||
}
|
}
|
||||||
else if (ImGui::IsKeyPressed( Control::layoutKey(GLFW_KEY_F), false )) {
|
|
||||||
Rendering::manager().mainWindow().toggleFullscreen();
|
|
||||||
}
|
|
||||||
else if (ImGui::IsKeyPressed( Control::layoutKey(GLFW_KEY_M), false )) {
|
else if (ImGui::IsKeyPressed( Control::layoutKey(GLFW_KEY_M), false )) {
|
||||||
Settings::application.widget.stats = !Settings::application.widget.stats;
|
Settings::application.widget.stats = !Settings::application.widget.stats;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user