Moved the creation of the guiFont into a separate
method that can be overridden by subclasses. This isn't really complicated enough to move to an app state and the fact that the field is exposed is already sort of "unclean" anyway. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9240 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
8eae2cfd8a
commit
511a11fc7c
@ -173,12 +173,20 @@ public abstract class SimpleApplication extends Application {
|
|||||||
this.showSettings = showSettings;
|
this.showSettings = showSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the font that will be set to the guiFont field
|
||||||
|
* and subsequently set as the font for the stats text.
|
||||||
|
*/
|
||||||
|
protected BitmapFont loadGuiFont() {
|
||||||
|
return assetManager.loadFont("Interface/Fonts/Default.fnt");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
super.initialize();
|
super.initialize();
|
||||||
|
|
||||||
// Several things rely on having this
|
// Several things rely on having this
|
||||||
guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt");
|
guiFont = loadGuiFont();
|
||||||
|
|
||||||
guiNode.setQueueBucket(Bucket.Gui);
|
guiNode.setQueueBucket(Bucket.Gui);
|
||||||
guiNode.setCullHint(CullHint.Never);
|
guiNode.setCullHint(CullHint.Never);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user