Why does the window I defined using the _make_custom_tooltip method have a black background when I am sure I have set transparency on its theme

  • Erich_L replied to this.
  • My current solution is as follows:

    func _enter_tree() -> void:
    	var par=get_parent()
    	var panel_n=StyleBoxLine.new()
    	panel_n.color=Color(0,0,0,0)
    	par.set_indexed("theme_override_styles/panel",panel_n)
    	get_viewport().transparent_bg=true
    	par.transparent=true

    It applies a new transparent panel style to replace the old one.
    This will make the background transparent and hopefully help people who encounter this problem

    xuran 老外欢迎,Like CSS, you might need to check if the value is being overridden by a setting in another place. Also- some more information might help us here help you. <3

    6 days later

    My current solution is as follows:

    func _enter_tree() -> void:
    	var par=get_parent()
    	var panel_n=StyleBoxLine.new()
    	panel_n.color=Color(0,0,0,0)
    	par.set_indexed("theme_override_styles/panel",panel_n)
    	get_viewport().transparent_bg=true
    	par.transparent=true

    It applies a new transparent panel style to replace the old one.
    This will make the background transparent and hopefully help people who encounter this problem