@ -38,6 +38,7 @@ import com.jme3.material.Material;
import com.jme3.math.ColorRGBA ;
import com.jme3.math.ColorRGBA ;
import com.jme3.renderer.RenderManager ;
import com.jme3.renderer.RenderManager ;
import com.jme3.scene.Node ;
import com.jme3.scene.Node ;
import com.jme3.util.clone.Cloner ;
import java.util.regex.Matcher ;
import java.util.regex.Matcher ;
import java.util.regex.Pattern ;
import java.util.regex.Pattern ;
@ -84,6 +85,25 @@ public class BitmapText extends Node {
return clone ;
return clone ;
}
}
/ * *
* Called internally by com . jme3 . util . clone . Cloner . Do not call directly .
* /
@Override
public void cloneFields ( Cloner cloner , Object original ) {
for ( int i = 0 ; i < textPages . length ; i + + ) {
textPages [ i ] = cloner . clone ( textPages [ i ] ) ;
}
this . block = cloner . clone ( block ) ;
// Change in behavior: The 'letters' field was not cloned or recreated
// before. I'm not sure how this worked and suspect BitmapText was just
// not cloneable if you planned to change the text later. -pspeed
this . letters = new Letters ( font , block , letters . getQuad ( ) . isRightToLeft ( ) ) ;
// Just noticed BitmapText is not even writable/readable really...
// so I guess cloning doesn't come up that often.
}
public BitmapFont getFont ( ) {
public BitmapFont getFont ( ) {
return font ;
return font ;
}
}