Exemplo n.º 1
0
  /**
   * @see
   *     poker.server.session.model.visual.Component#updateData(poker.server.session.model.data.ScreenData,
   *     poker.common.Rect, int, int, int)
   */
  public boolean updateData(ScreenData data, Rect win, int wx, int wy, int ax, int ay) {
    int x = offsetX;
    int y = offsetY;

    Icon icon = screen.getIcon(iconName);
    actual = icon.subRect(win, x, y).clone();

    valid = false;

    if (icon.match(actual)) {
      if (mode.equals("reject")) fail("icon found, rejected: ");
      else valid = true;
    } else if (mode.equals("require")) fail("icon not found, required: ");
    else valid = true;

    return modified(actual);
  }
Exemplo n.º 2
0
 public Region getRegion(int ax, int ay) {
   Icon icon = screen.getIcon(iconName);
   return new Region(this, ax + offsetX, ay + offsetY, icon.getWidth(), icon.getHeight());
 }