@Override public Rectangle getDirty(Rectangle rect) { if (shape == null) rect.set(0, 0, 0, 0); else { int px = 0, py = 0; if (parent != null) { px = parent.getX(); py = parent.getY(); } rect.set( x + px - shape.getXLeft(), y + py - shape.getYAbove(), shape.getWidth(), shape.getHeight()); rect.enlarge(1 + EConst.c_tilesize / 2); } return rect; }
@Override public void paintOutline(int pix) { int px = 0, py = 0; if (parent != null) { px = parent.getX(); py = parent.getY(); } shape.paintRleOutline(gwin.getWin(), x + px, y + py, ShapeID.getSpecialPixel(pix)); }
// GameRender.Paintable @Override public void paint() { int px = 0, py = 0; if (parent != null) { px = parent.getX(); py = parent.getY(); } shape.paint(gwin.getWin(), x + px, y + py); }
public void paint() { int px = 0; int py = 0; if (parent != null) { px = parent.getX(); py = parent.getY(); } if (pushed) onShape.paint(gwin.getWin(), x + px, y + py); else shape.paint(gwin.getWin(), x + px, y + py); }
public boolean onWidget(int mx, int my) { mx -= parent.getX() + x; // Get point rel. to gump. my -= parent.getY() + y; return shape != null && shape.hasPoint(mx, my); }