#--------------------------------------------------------------------------
# * Set Icon
# icon : the icon to display
#--------------------------------------------------------------------------
def set_icon(icon)
if icon != @icon
self.contents.clear
self.contents.blt(0, 0, icon, icon.rect)
@icon = icon
end
end
#--------------------------------------------------------------------------
# * Set Icon Text
# icon : the icon to display
# text : the text to display
# align : alignement (0..flush left, 1..center, 2..flush right)
#--------------------------------------------------------------------------
def set_icon_text(icon, text, align = 0)
if icon != @icon or text != @text or align != @align
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, WLH, text, align)
self.contents.blt(0, 0, icon, icon.rect)
@icon = icon
@text = text
@align = align
end
end