Mouse_entered calling object

Godot Version

4.3

Question

I have a panel that i want to change the background on when the user mouse is over it.

I have the mouse_entered signal called from the panel but problem is i cannot find out how to reference the calling panel from inside the mouse_entered.

get_parent returns the panels parent, but how do i get the actual panel where the mouse enter occured?

Add a script to the panel and connect to a function there.
From there, fire a signal that sends self.

signal mouse_over_panel(panel:Panel)
func _on_mouse_enter():   
   mouse_over_panel.emit(self)

I was not able to get the signal to connect to the same script it was created in, but i was able to just call the handle function and it worked,


func handle_spell_slot_mouse_over_panel(spellSlotPanel):
	var styleBox: StyleBoxFlat = spellSlotPanel.get_theme_stylebox("panel").duplicate()
	styleBox.set("bg_color", Color(0.0, 1.0, 1.0))	
	spellSlotPanel.add_theme_stylebox_override("panel", styleBox)

func _on_panel_mouse_entered() -> void:	
	handle_spell_slot_mouse_over_panel(self)