
-- standard button states ### should eventually be labels in the button movie clip
mouseRestUnChecked = 0
mouseOverUnChecked = 1
mouseDownUnChecked = 2  --#### dont have this frame yet
mouseRestChecked = 3
mouseOverChecked = 4
mouseDownChecked = 5  --#### dont have this frame yet

-- Button "class" which describes standard mouse interaction
function StandardRadioButton( buttonInstance )
	buttonInstance.Checked = false
	log( "Create" )
	
	function buttonInstance:OnMouseEnter( )
		log( "radio enter" )
	--	PlaySound( "Roll" )
		if( self.Checked ) then
			self:SetFrame( mouseOverChecked )
		else
			self:SetFrame( mouseOverUnChecked )
		end
	end
	
	function buttonInstance:OnMouseLeave( )
		if( self.Checked ) then
			self:SetFrame( mouseRestChecked )
		else
			self:SetFrame( mouseRestUnChecked )
		end
	end
	
	function buttonInstance:OnLeftMouseUp( )
		if( self.Checked ) then
			
			--self:SetFrame( mouseOverUnChecked )
		else
			PlaySound( "Click" )
			self.Checked = true
			self:SetFrame( mouseOverChecked )
			self:Pressed( )	
		end
	end
	
	function buttonInstance:OnLeftMouseDown( )
		if( self.Checked ) then
			self:SetFrame( mouseDownChecked )
		else
			self:SetFrame( mouseDownUnChecked )
		end
	end 
	
	function buttonInstance:UnCheck( )
		self.Checked = false
		self:SetFrame( mouseRestUnChecked )
	end 
	
	function buttonInstance:Check( )
		self.Checked = true
		self:SetFrame( mouseRestChecked )
	end 	
end
