v0.9.0: switched bitmaptext to use TextureCache
This commit is contained in:
parent
3c3a90d30a
commit
15ccffbe1f
|
@ -23,7 +23,6 @@ package com.watabou.noosa;
|
|||
|
||||
import com.badlogic.gdx.graphics.Pixmap;
|
||||
import com.watabou.gltextures.SmartTexture;
|
||||
import com.watabou.gltextures.TextureCache;
|
||||
import com.watabou.glwrap.Matrix;
|
||||
import com.watabou.glwrap.Quad;
|
||||
import com.watabou.glwrap.Vertexbuffer;
|
||||
|
@ -342,15 +341,15 @@ public class BitmapText extends Visual {
|
|||
return pixel != color;
|
||||
}
|
||||
|
||||
public static Font colorMarked( Pixmap bmp, int color, String chars ) {
|
||||
Font font = new Font( TextureCache.get( bmp ) );
|
||||
font.splitBy( bmp, bmp.getHeight(), color, chars );
|
||||
public static Font colorMarked( SmartTexture tex, int color, String chars ) {
|
||||
Font font = new Font( tex );
|
||||
font.splitBy( tex.bitmap, tex.height, color, chars );
|
||||
return font;
|
||||
}
|
||||
|
||||
public static Font colorMarked( Pixmap bmp, int height, int color, String chars ) {
|
||||
Font font = new Font( TextureCache.get( bmp ) );
|
||||
font.splitBy( bmp, height, color, chars );
|
||||
public static Font colorMarked( SmartTexture tex, int height, int color, String chars ) {
|
||||
Font font = new Font( tex );
|
||||
font.splitBy( tex.bitmap, height, color, chars );
|
||||
return font;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Languages;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.gltextures.TextureCache;
|
||||
import com.watabou.glwrap.Blending;
|
||||
import com.watabou.input.PointerEvent;
|
||||
import com.watabou.noosa.BitmapText;
|
||||
|
@ -40,7 +41,6 @@ import com.watabou.noosa.Gizmo;
|
|||
import com.watabou.noosa.Scene;
|
||||
import com.watabou.noosa.Visual;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
import com.watabou.utils.BitmapCache;
|
||||
import com.watabou.utils.Reflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -109,7 +109,7 @@ public class PixelScene extends Scene {
|
|||
|
||||
// 3x5 (6)
|
||||
pixelFont = Font.colorMarked(
|
||||
BitmapCache.get( Assets.Fonts.PIXELFONT), 0x00000000, BitmapText.Font.LATIN_FULL );
|
||||
TextureCache.get( Assets.Fonts.PIXELFONT), 0x00000000, BitmapText.Font.LATIN_FULL );
|
||||
pixelFont.baseLine = 6;
|
||||
pixelFont.tracking = -1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user