For fast works I would like to use something like a Constructor that has already the default-font loaded
and text initalized:
BitmapText text = new BitmapText("Hallo");
Here the patch:
Index: src/com/jmex/angelfont/BitmapText.java
===================================================================
--- src/com/jmex/angelfont/BitmapText.java (revision 4766)
+++ src/com/jmex/angelfont/BitmapText.java (working copy)
@@ -75,8 +75,25 @@
private boolean rightToLeft = false;
+
+ private static BitmapFont defaultFont = null;
+
+
/**
*
+ * Constructor initializes with defaultFont and writing from left to right
+ *
+ * @param text
+ * inital-text for the BitmapText
+ */
+ public BitmapText(String text)
+ {
+ this(defaultFont==null?defaultFont=BitmapFontLoader.loadDefaultFont():defaultFont,false);
+ setText(text);
+ update();
+ }
+ /**
+ *
* Constructor sets up and initializes the text with zero length
*
* @param font