v0.4.3: switched to a better fix for graphics bugs with shadowbox

This commit is contained in:
Evan Debenham 2016-10-01 01:28:33 -04:00
parent 08371bfb91
commit 794648fa21
2 changed files with 6 additions and 8 deletions

View File

@ -67,14 +67,12 @@ public class SmartTexture extends Texture {
protected void generate() {
super.generate();
bitmap( bitmap, premultiplied );
super.filter( fModeMin, fModeMax );
super.wrap( wModeH, wModeV );
filter( fModeMin, fModeMax );
wrap( wModeH, wModeV );
}
@Override
public void filter(int minMode, int maxMode) {
if (fModeMin == minMode && fModeMax == maxMode) return;
fModeMin = minMode;
fModeMax = maxMode;
if (id != -1)
@ -83,8 +81,6 @@ public class SmartTexture extends Texture {
@Override
public void wrap( int s, int t ) {
if (wModeH == s && wModeV == t) return;
wModeH = s;
wModeV = t;
if (id != -1)

View File

@ -30,8 +30,10 @@ public class ShadowBox extends NinePatch {
public ShadowBox() {
super( Assets.SHADOW, 1 );
texture.filter( SmartTexture.LINEAR, SmartTexture.LINEAR );
//If this is the first time the texture is generated, set the filtering
if (texture.id == -1)
texture.filter( SmartTexture.LINEAR, SmartTexture.LINEAR );
scale.set( SIZE, SIZE );
}