tool
extends Control

class_name UISlot

export (Color) var backcolor setget set_backcolor, get_backcolor
export (bool) var updownAtClick = false

func set_backcolor(value):
	backcolor = value
	$ui_rect.color = value

func get_backcolor():
	return $ui_rect.color

func _gui_input(event):
	if event is InputEventMouseMotion:
		return
		
	if updownAtClick and event.is_pressed():
		if event.button_index == BUTTON_LEFT:
			high()
		elif event.button_index == BUTTON_RIGHT:
			low()

func low():
	pass

func high():
	pass
