v0.3.4: added a new 'rendered text' image type

This commit is contained in:
Evan Debenham 2016-01-10 20:56:50 -05:00 committed by Evan Debenham
parent f9b270447f
commit cae5957ef4

View File

@ -33,8 +33,8 @@ import com.watabou.noosa.BitmapTextMultiline;
import com.watabou.noosa.Camera;
import com.watabou.noosa.ColorBlock;
import com.watabou.noosa.Game;
import com.watabou.noosa.RenderedText;
import com.watabou.noosa.Scene;
import com.watabou.noosa.Visual;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.effects.BadgeBanner;
@ -188,6 +188,18 @@ public class PixelScene extends Scene {
return result;
}
public static RenderedText renderText( int size ) {
RenderedText result = new RenderedText( size*defaultZoom);
result.scale.set(1/(float)defaultZoom);
return result;
}
public static RenderedText renderText( String text, int size ) {
RenderedText result = new RenderedText( text, size*defaultZoom);
result.scale.set(1/(float)defaultZoom);
return result;
}
public static boolean noFade = false;
protected void fadeIn() {
if (noFade) {