Example #1
0
 @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;
 }
Example #2
0
 @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));
 }
Example #3
0
 //	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);
 }
Example #4
0
 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);
 }
Example #5
0
 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);
 }