[APP] Disable toggle fullscreen double click while rendering dialogs
This commit is contained in:
@@ -1073,6 +1073,10 @@ void EmulatorWindow::OnKeyDown(ui::KeyEvent& e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EmulatorWindow::OnMouseDown(const ui::MouseEvent& e) {
|
void EmulatorWindow::OnMouseDown(const ui::MouseEvent& e) {
|
||||||
|
if (imgui_drawer_->IsAnyDialogOpen()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (e.button() == ui::MouseEvent::Button::kLeft) {
|
if (e.button() == ui::MouseEvent::Button::kLeft) {
|
||||||
ToggleFullscreenOnDoubleClick();
|
ToggleFullscreenOnDoubleClick();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,8 @@ class ImGuiDrawer : public WindowInputListener, public UIDrawer {
|
|||||||
void LoadInputSystem(hid::InputSystem* input_system);
|
void LoadInputSystem(hid::InputSystem* input_system);
|
||||||
void SetGuideButtonAction(std::function<void(uint8_t)> func);
|
void SetGuideButtonAction(std::function<void(uint8_t)> func);
|
||||||
|
|
||||||
|
bool IsAnyDialogOpen() const { return !dialogs_.empty(); };
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnKeyDown(KeyEvent& e) override;
|
void OnKeyDown(KeyEvent& e) override;
|
||||||
void OnKeyUp(KeyEvent& e) override;
|
void OnKeyUp(KeyEvent& e) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user