mirror of
https://gitlab.com/square-game-liberation-front/F.E.I.S.git
synced 2024-11-12 02:00:53 +01:00
Don't scroll the song if imgui could be using it
This commit is contained in:
parent
cddbfbcd31
commit
6c84d46432
10
src/main.cpp
10
src/main.cpp
@ -31,6 +31,7 @@
|
||||
#include "file_dialogs.hpp"
|
||||
#include "history_item.hpp"
|
||||
#include "imgui_extras.hpp"
|
||||
#include "imgui_internal.h"
|
||||
#include "marker.hpp"
|
||||
#include "markers.hpp"
|
||||
#include "mp3_reader.hpp"
|
||||
@ -145,6 +146,12 @@ int main() {
|
||||
case sf::Event::MouseWheelScrolled:
|
||||
switch (event.mouseWheelScroll.wheel) {
|
||||
case sf::Mouse::Wheel::VerticalWheel: {
|
||||
if (ImGui::GetIO().WantCaptureMouse) {
|
||||
const auto window = ImGui::GetCurrentContext()->HoveredWindow;
|
||||
if (window and not(window->Flags & ImGuiWindowFlags_NoScrollWithMouse)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (editor_state) {
|
||||
auto delta = static_cast<int>(
|
||||
std::floor(event.mouseWheelScroll.delta));
|
||||
@ -164,6 +171,9 @@ int main() {
|
||||
}
|
||||
break;
|
||||
case sf::Event::KeyPressed:
|
||||
if (ImGui::GetIO().WantCaptureKeyboard) {
|
||||
break;
|
||||
}
|
||||
switch (event.key.code) {
|
||||
/*
|
||||
* Selection related stuff
|
||||
|
Loading…
Reference in New Issue
Block a user