private void doDraw(GFX g, Node node) {
    String text = "Welcome to Bedrock";
    String text2 = "by josh marinacci";
    g.drawImage(image, 0, 0);

    Stage s = node.getParent().getStage();

    double x = 0;
    double y = 0;

    x = (s.getWidth() - font.getWidth(text)) / 2;
    y = (s.getHeight() / 2) - font.getDescender();
    g.setPaint(FlatColor.BLACK);
    g.drawText(text, font, x + 4, y + 4);
    g.setPaint(FlatColor.WHITE);
    g.drawText(text, font, x, y);

    x = (s.getWidth() - font2.getWidth(text2)) / 2;
    y = y + font2.getAscender() + font2.getDescender();
    g.setPaint(FlatColor.BLACK);
    g.drawText(text2, font2, x + 4, y + 4);
    g.setPaint(FlatColor.WHITE);
    g.drawText(text2, font2, x, y);
  }
Beispiel #2
0
 @Override
 public void draw(GFX gfx) {
   gfx.drawImage(image, 0, 0);
 }