32 lines
974 B
GDScript
32 lines
974 B
GDScript
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
|
|
texture_hover = UNMUTE_NORMAL
|
|
texture_pressed = UNMUTE_PRESSED
|
|
|
|
|
|
func _on_mouse_exited():
|
|
if Call.muted:
|
|
texture_hover = UNMUTE_HOVER
|