Added UI focus tracking

This commit is contained in:
2024-02-25 19:47:13 +01:00
parent dc252ab5d3
commit 44fd041c60
10 changed files with 79 additions and 28 deletions

View File

@ -3,9 +3,15 @@ extends CheckButton
@export var layer_number: int
func _ready():
if !Global.camera:
return
set_pressed_no_signal(Global.camera.cull_mask & (1 << (layer_number - 1)))
func on_toggled(toggled_on: bool):
if !Global.camera:
return
if toggled_on:
Global.camera.cull_mask |= 1 << (layer_number - 1)
else: