// mouse.js
function draw_rect_on_pos(e){
    get_pos(e);
    draw_moji_on_pos();

}

function get_pos(e) {
    mx = e.offsetX;
    my = e.offsetY;
    print("x:" + mx + "  y:" + my );
}

function draw_moji_on_pos() {
    let i, j;
    let x, y;
    let c;
    ctx.fillStyle = "blue";
    //ctx.fillRect(mx,my,20,20);
    c = "0";
    x = (mx-KOUSHI_ofs_x) / KOUSHI_width;
    y = (my-KOUSHI_ofs_y) / KOUSHI_height;
    i = Math.floor(x);
    j = Math.floor(y);
    draw_moji_ij( c, i, j);
    if( i>=0 && i<=10 && j==10){
        sel_num = i+1;
        disp_select_moji();
        c = i+1;
        draw_moji_ij( c, 9, 9);
    }
}
