Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewport catches mouse events despite being under Canvas Layer #45400

Closed
haaldor opened this issue Jan 23, 2021 · 1 comment
Closed

Viewport catches mouse events despite being under Canvas Layer #45400

haaldor opened this issue Jan 23, 2021 · 1 comment

Comments

@haaldor
Copy link

haaldor commented Jan 23, 2021

Godot version:

3.2.3.stable.official

OS/device including version:

GPU: GeForce GTX 1060 6GB
Using GLES2, happens on GLES3 as well.

Issue description:

What happened:

When using Viewport to draw world and CanvasLayer to draw overlay, controls in Viewport are catching mouse input events despite being drawn under overlay.

What is expected:

Canvas layer should be one catching mouse events, as it is drawn on top.

Steps to reproduce:

  1. Create new project
  2. Add nodes as following:
- Node2D
-- Viewport Container (set rect_size to window size, f.e. 1024/600 )
--- Viewport (set size to match parent's rect_size)
---- Button (can add script to print something on pressed() signal to check it)
-- Canvas Layer
--- LineEdit
  1. Save and play. LineEdit is not getting any inputs on where button is, despite being drawn over the button

Minimal reproduction project:

Viewport_canvas_layer_bug.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants