public virtual void setStyle( ButtonStyle style )
{
this.style = style;
if( _mouseDown && !_isDisabled )
{
_background = style.down == null ? style.up : style.down;
}
else
{
if( _isDisabled && style.disabled != null )
_background = style.disabled;
else if( _isChecked && style.checkked != null )
_background = ( _mouseOver && style.checkedOver != null ) ? style.checkedOver : style.checkked;
else if( _mouseOver && style.over != null )
_background = style.over;
else
_background = style.up;
}
setBackground( _background );
}