extends TextureRect var is_mouse_enter:bool=false signal click(data:Dictionary) var data:Dictionary={ } # Called when the node enters the scene tree for the first time. func _ready() -> void: pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: pass func _input(event: InputEvent) -> void: if event.is_action_pressed("mouse_left") and is_mouse_enter: click.emit(data) func _get_drag_data(at_position: Vector2) -> Variant: var texture_rect=TextureRect.new() texture_rect.texture=Global.get_texture(data["texture"]) set_drag_preview(texture_rect) return data func _on_mouse_entered() -> void: is_mouse_enter=true pass # Replace with function body. func _on_mouse_exited() -> void: is_mouse_enter=false pass # Replace with function body.