+ }
+ }
+ at = g.getTransform();
+ g.popTransform();
+
+ R statusArea = new R(0, getHeight() - 150, getWidth(), getHeight());
+ g.color(0x0);
+ statusArea.fill(g);
+
+ double keyboardRatio = ((double)keyboard1.getWidth(null)) / ((double)keyboard1.getHeight(null));
+ g.g.drawImage(keyboard1,
+ (int)statusArea.minx(),
+ (int)statusArea.miny(),
+ (int)((keyboardRatio * 150)),
+ (int)(150),
+ null);
+
+ statusArea = statusArea.plus(keyboardRatio * 150 + 10, 0, 0, 0);
+ Inspector.draw(g, statusArea, selectedCell);
+
+ // map
+ R map = new R(getWidth() - 150, getHeight() - 150, getWidth(), getHeight());
+ map = map.plus(5, 5, -5, -5);
+ double mapw = map.width() / width;
+ double maph = map.height() / height;
+ P p1 = new P(0, 0).inverseTransform(at);
+ P p2 = new P(getWidth(), getHeight()-150).inverseTransform(at);
+ p1 = p1.scale(map.width() / (SIZE*width));
+ p2 = p2.scale(map.width() / (SIZE*width));
+ R rv = new R(map.minx() + p1.x,
+ map.maxy() - p1.y,
+ map.minx() + p2.x,
+ map.maxy() - p2.y);
+ for(int x=0; x<width; x++)
+ for(int y=0; y<height; y++) {
+ R rc = new R(map.minx() + x * mapw,
+ map.miny() + y * maph,
+ map.minx() + (x+1) * mapw - 1,
+ map.miny() + (y+1) * maph - 1);
+ if (selectedCell != null && selectedCell.row==(height-y-1) && selectedCell.col==x) g.color(0xffff00);
+ else if (rc.within(rv)) g.color(0x006600);
+ else g.color(0x444444);
+ rc.fill(g);