v0.6.2b: corrected alignment of the languages icon
This commit is contained in:
parent
dc460c3e18
commit
988f3dbe96
|
@ -22,6 +22,7 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.scenes;
|
package com.shatteredpixel.shatteredpixeldungeon.scenes;
|
||||||
|
|
||||||
import android.opengl.GLES20;
|
import android.opengl.GLES20;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites;
|
||||||
|
@ -157,7 +158,7 @@ public class TitleScene extends PixelScene {
|
||||||
add( btnPrefs );
|
add( btnPrefs );
|
||||||
|
|
||||||
LanguageButton btnLang = new LanguageButton();
|
LanguageButton btnLang = new LanguageButton();
|
||||||
btnLang.setPos(16, 1);
|
btnLang.setRect(16, 0, 16, 15);
|
||||||
add( btnLang );
|
add( btnLang );
|
||||||
|
|
||||||
ExitButton btnExit = new ExitButton();
|
ExitButton btnExit = new ExitButton();
|
||||||
|
|
|
@ -152,7 +152,7 @@ public enum Icons {
|
||||||
icon.frame( icon.texture.uvRect( 79, 40, 94, 56 ) );
|
icon.frame( icon.texture.uvRect( 79, 40, 94, 56 ) );
|
||||||
break;
|
break;
|
||||||
case LANGS:
|
case LANGS:
|
||||||
icon.frame( icon.texture.uvRect( 94, 40, 110, 56 ) );
|
icon.frame( icon.texture.uvRect( 94, 42, 110, 51 ) );
|
||||||
break;
|
break;
|
||||||
case CHALLENGE_OFF:
|
case CHALLENGE_OFF:
|
||||||
icon.frame( icon.texture.uvRect( 78, 16, 102, 40 ) );
|
icon.frame( icon.texture.uvRect( 78, 16, 102, 40 ) );
|
||||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndLangs;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndLangs;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
|
@ -33,13 +34,6 @@ public class LanguageButton extends Button {
|
||||||
|
|
||||||
private Image image;
|
private Image image;
|
||||||
|
|
||||||
public LanguageButton() {
|
|
||||||
super();
|
|
||||||
|
|
||||||
width = image.width;
|
|
||||||
height = image.height;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createChildren() {
|
protected void createChildren() {
|
||||||
super.createChildren();
|
super.createChildren();
|
||||||
|
@ -83,8 +77,9 @@ public class LanguageButton extends Button {
|
||||||
protected void layout() {
|
protected void layout() {
|
||||||
super.layout();
|
super.layout();
|
||||||
|
|
||||||
image.x = x;
|
image.x = x + (width - image.width)/2f;
|
||||||
image.y = y;
|
image.y = y + (height - image.height)/2f;
|
||||||
|
PixelScene.align(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user