from PodSix.Resource import *
from Widget import Widget

class Label(Widget):
	def __init__(self, text=None, font="default", pos={}, color=[0, 0, 0]):
		Widget.__init__(self)
		self.text = text
		self.font = font
		self.color = color
		self.pos = pos
		self.over = False
	
	def Draw(self):
		self.rect = gfx.DrawText(self.text, self.pos, self.color, self.font)
		return self.rect
	
	def MouseMove(self, e):
		if not self.over and self.InRect(e.pos):
			self.over = True
			self.MouseOver(e)
		elif self.over and not self.InRect(e.pos):
			self.over = False
			self.MouseOut(e)
	
	def MouseDown(self, e):
		if self.rect and self.InRect(e.pos):
			self.triggered = True
			self.Pressed(e)
	
	def MouseOver(self, e):
		pass
	
	def MouseOut(self, e):
		pass
	
	def Pressed(self, e):
		pass


