paulloz / godot-colorblindness

A colorblindness simulator to help you design for everyone.
MIT License
117 stars 6 forks source link

Mouse input bug #3

Closed byjtew closed 3 years ago

byjtew commented 3 years ago

If you place the Colorblind canvas as a parent or even root of your scene, you may not be able to use any screen input. To fix this you need to add the IGNORE property to the inner Colorblind's ColorRect node like this:

func _ready():
    self.add_child(self.rect)

    self.rect.rect_min_size = self.rect.get_viewport_rect().size
    self.rect.material = load("res://addons/paulloz.colorblindness/colorblindness.material")
    self.rect.set_mouse_filter(2) # ADD THIS LINE
    if self.temp:
        self.Type = self.temp
        self.temp = null

    self.get_tree().root.connect('size_changed', self, '_on_viewport_size_changed')
paulloz commented 3 years ago

👌 This is an oversight from my part. It's done on master (96e2576) and will be packaged in the next release.
Thanks for the report.