v2.0.2: adjusted lang warning in changes scene, now shows in all layouts

This commit is contained in:
Evan Debenham
2023-04-12 14:09:45 -04:00
parent ea461d24df
commit bcf7db0e73
3 changed files with 12 additions and 4 deletions

View File

@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Languages;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
@@ -122,9 +123,7 @@ public class ChangesScene extends PixelScene {
rightScroll.content().add(changeTitle);
String body = Messages.get(this, "right_body");
if (Messages.lang() != Languages.ENGLISH){
body += "\n\n_" + Messages.get(this, "lang_warn") + "_";
}
changeBody = PixelScene.renderTextBlock(body, 6);
changeBody.maxWidth(pw - panel.marginHor());
changeBody.setPos(0, changeTitle.bottom()+2);
@@ -139,6 +138,12 @@ public class ChangesScene extends PixelScene {
add( panel );
final ArrayList<ChangeInfo> changeInfos = new ArrayList<>();
if (Messages.lang() != Languages.ENGLISH){
ChangeInfo langWarn = new ChangeInfo("", true, Messages.get(this, "lang_warn"));
langWarn.hardlight(CharSprite.WARNING);
changeInfos.add(langWarn);
}
switch (changesSelected){
case 0: default:

View File

@@ -64,6 +64,9 @@ public class ChangeInfo extends Component {
public void hardlight( int color ){
title.hardlight( color );
if (text != null){
text.hardlight(color);
}
}
public void addButton( ChangeButton button ){

View File

@@ -76,7 +76,7 @@ public class v2_X_Changes {
changes.hardlight(Window.TITLE_COLOR);
changeInfos.add(changes);
changes = new ChangeInfo("", false, null);
changes = new ChangeInfo("v2.0.2", false, null);
changes.hardlight(Window.TITLE_COLOR);
changeInfos.add(changes);