Browse Source

update

main
Justin Senn 2 years ago
parent
commit
6da135760b
  1. 24
      src/main/java/Snake/TextView.java

24
src/main/java/Snake/TextView.java

@ -4,6 +4,30 @@ import java.awt.*;
public class TextView implements Drawable
{
public enum AnchorType { Left, Center, Right };
private String text;
private Point position;
private boolean visible;
private AnchorType anchor;
public TextView(String text, Point position)
{
this(text, position, true);
}
public TextView(String text, Point position, boolean visible)
{
this.text = text;
this.position = position;
this.visible = visible;
this.anchor = AnchorType.Center;
}
@Override
public void draw(Graphics g)

Loading…
Cancel
Save