public void clicked(int mode, int color, int sz, int tileIndex, int pixelIndex){
    switch(mode){
        case DO_NOTHING_MODE:
            // nothing
            break;
        case DRAW_PIXEL_MODE:
            paintPixelArea(color, sz, tileIndex, pixelIndex, true);
            break;
        case DRAW_LINE_MODE:
            // nothing
            break;
        case DRAW_RECT_MODE:
            // nothing
            break;
        case FILL_RECT_MODE:
            // nothing
            break;
        case DRAW_CIRCLE_MODE:
            // nothing
            break;
        case FILL_CIRCLE_MODE:
            // nothing
            break;
        case ERASE_MODE:
            paintPixelArea(0, sz, tileIndex, pixelIndex, true);
            break;
        default:
            break;
    }
}