2022-05-24 21:31:30 +02:00
extends TextureButton
const MUTE_NORMAL = preload ( " res://user_interface/tool_bar/icons/mute.png " )
const MUTE_HOVER = preload ( " res://user_interface/tool_bar/icons/mute_hover.png " )
const MUTE_PRESSED = preload ( " res://user_interface/tool_bar/icons/mute_pressed.png " )
const UNMUTE_NORMAL = preload ( " res://user_interface/tool_bar/icons/unmute.png " )
const UNMUTE_HOVER = preload ( " res://user_interface/tool_bar/icons/unmute_hover.png " )
const UNMUTE_PRESSED = preload ( " res://user_interface/tool_bar/icons/unmute_pressed.png " )
onready var mute_dash = get_node ( " MuteDash " )
func _on_pressed ( ) :
if Call . muted :
Call . muted = false
mute_dash . visible = false
texture_normal = MUTE_NORMAL
texture_hover = MUTE_HOVER
texture_pressed = MUTE_PRESSED
else :
Call . muted = true
mute_dash . visible = true
texture_normal = UNMUTE_NORMAL
2022-06-05 14:22:08 +02:00
texture_hover = UNMUTE_NORMAL
2022-05-24 21:31:30 +02:00
texture_pressed = UNMUTE_PRESSED
2022-06-05 14:22:08 +02:00
func _on_mouse_exited ( ) :
if Call . muted :
texture_hover = UNMUTE_HOVER