#include "tools.hpp" tool_picker::~tool_picker() { delete old_pal; delete map; for (int i=0;iwidth(wm)>iw) iw=icons[i]->width(wm); if (icons[i]->height(wm)>ih) ih=icons[i]->height(wm); } map=new filter(icon_palette,pal); old_pal=icon_palette->copy(); reconfigure(); } void tool_picker::draw_item(window_manager *wm, image *screen, int x, int y, int num, int active) { if (!active) screen->bar(x,y,x+iw-1,y+ih-1,wm->black()); else screen->bar(x,y,x+iw-1,y+ih-1,wm->bright_color()); icons[num]->draw(screen,x,y,wm,map); }