Ejemplo n.º 1
0
 protected void drawButton(LGraphics g, Button button, int row, int col, int rowNum, int colNum) {
   if (button.isVisible) {
     int cellWidth = (scaledWidth - 2 * PADDING_X) / colNum;
     int cellHeight = (scaledHeight - 2 * PADDING_Y) / rowNum;
     int absoluteX = x + PADDING_X + col * cellWidth;
     int absoluteY = y + PADDING_Y + row * cellHeight + (cellHeight - button.getHeight()) / 2;
     if (getCurWidth(row) > 0) absoluteX = getCurWidth(row) + 5;
     button.setDrawXY(absoluteX, absoluteY);
     button.draw(g);
     setCurWidth(row, absoluteX + button.getWidth());
   }
 }
Ejemplo n.º 2
0
 protected void drawButtonEx(LGraphics g, Button button, int x, int y) {
   if (button.isVisible) {
     button.setDrawXY(x + this.x, y + this.y);
     button.draw(g);
   }
 }