v0.9.0: adjusted some icons, chromes, and ChangesScene

This commit is contained in:
Evan Debenham 2020-09-06 17:28:02 -04:00
parent 832df0324f
commit f82217ebbc
6 changed files with 52 additions and 36 deletions
core/src/main
assets/interfaces
java/com/shatteredpixel/shatteredpixeldungeon

Binary file not shown.

Before

(image error) Size: 1.1 KiB

After

(image error) Size: 1.1 KiB

Binary file not shown.

Before

(image error) Size: 10 KiB

After

(image error) Size: 10 KiB

View File

@ -49,19 +49,18 @@ public class Chrome {
case WINDOW_SILVER:
return new NinePatch( Asset, 86, 0, 22, 22, 7 );
case TOAST:
return new NinePatch( Asset, 22, 0, 18, 18, 5 );
return new NinePatch( Asset, 20, 0, 9, 9, 4 );
case TOAST_TR:
return new NinePatch( Asset, 40, 0, 18, 18, 5 );
case GREY_BUTTON_TR:
return new NinePatch( Asset, 20, 9, 9, 9, 4 );
case RED_BUTTON:
return new NinePatch( Asset, 58, 0, 6, 6, 2 );
return new NinePatch( Asset, 29, 0, 6, 6, 2 );
case GREY_BUTTON:
return new NinePatch( Asset, 58, 6, 6, 6, 2 );
return new NinePatch( Asset, 29, 6, 6, 6, 2 );
case TAG:
return new NinePatch( Asset, 22, 18, 16, 14, 3 );
case GEM:
return new NinePatch( Asset, 0, 32, 32, 32, 13 );
case GREY_BUTTON_TR:
return new NinePatch( Asset, 53, 20, 9, 9, 5 );
case SCROLL:
return new NinePatch( Asset, 32, 32, 32, 32, 5, 11, 5, 11 );
case TAB_SET:

View File

@ -27,9 +27,9 @@ import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
import com.shatteredpixel.shatteredpixeldungeon.ui.StyledButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.ChangeInfo;
import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.v0_1_X_Changes;
@ -76,11 +76,11 @@ public class ChangesScene extends PixelScene {
NinePatch panel = Chrome.get(Chrome.Type.TOAST);
int pw = 135 + panel.marginLeft() + panel.marginRight() - 2;
int ph = h - 35;
int ph = h - 36;
panel.size( pw, ph );
panel.x = (w - pw) / 2f;
panel.y = title.bottom() + 4;
panel.y = title.bottom() + 5;
align( panel );
add( panel );
@ -88,15 +88,18 @@ public class ChangesScene extends PixelScene {
switch (changesSelected){
case 0: default:
v0_8_X_Changes.addAllChanges(changeInfos);
//TODO
break;
case 1:
v0_7_X_Changes.addAllChanges(changeInfos);
v0_8_X_Changes.addAllChanges(changeInfos);
break;
case 2:
v0_6_X_Changes.addAllChanges(changeInfos);
v0_7_X_Changes.addAllChanges(changeInfos);
break;
case 3:
v0_6_X_Changes.addAllChanges(changeInfos);
break;
case 4:
v0_5_X_Changes.addAllChanges(changeInfos);
v0_4_X_Changes.addAllChanges(changeInfos);
v0_3_X_Changes.addAllChanges(changeInfos);
@ -153,11 +156,11 @@ public class ChangesScene extends PixelScene {
list.setRect(
panel.x + panel.marginLeft(),
panel.y + panel.marginTop() - 1,
panel.innerWidth(),
panel.innerWidth() + 2,
panel.innerHeight() + 2);
list.scrollTo(0, 0);
RedButton btn0_8 = new RedButton("v0.8"){
StyledButton btn0_9 = new StyledButton(Chrome.Type.GREY_BUTTON_TR, "v0.9"){
@Override
protected void onClick() {
super.onClick();
@ -167,11 +170,11 @@ public class ChangesScene extends PixelScene {
}
}
};
if (changesSelected == 0) btn0_8.textColor(Window.TITLE_COLOR);
btn0_8.setRect(list.left()-4f, list.bottom()+5, 32, 14);
add(btn0_8);
RedButton btn0_7 = new RedButton("v0.7"){
if (changesSelected != 0) btn0_9.textColor( 0xBBBBBB );
btn0_9.setRect(list.left()-4f, list.bottom(), 26, changesSelected == 0 ? 19 : 15);
addToBack(btn0_9);
StyledButton btn0_8 = new StyledButton(Chrome.Type.GREY_BUTTON_TR, "v0.8"){
@Override
protected void onClick() {
super.onClick();
@ -181,11 +184,11 @@ public class ChangesScene extends PixelScene {
}
}
};
if (changesSelected == 1) btn0_7.textColor(Window.TITLE_COLOR);
btn0_7.setRect(btn0_8.right() + 1, btn0_8.top(), 32, 14);
add(btn0_7);
if (changesSelected != 1) btn0_8.textColor( 0xBBBBBB );
btn0_8.setRect(btn0_9.right() + 1, list.bottom(), 26, changesSelected == 1 ? 19 : 15);
addToBack(btn0_8);
RedButton btn0_6 = new RedButton("v0.6"){
StyledButton btn0_7 = new StyledButton(Chrome.Type.GREY_BUTTON_TR, "v0.7"){
@Override
protected void onClick() {
super.onClick();
@ -195,11 +198,11 @@ public class ChangesScene extends PixelScene {
}
}
};
if (changesSelected == 2) btn0_6.textColor(Window.TITLE_COLOR);
btn0_6.setRect(btn0_7.right() + 1, btn0_8.top(), 32, 14);
add(btn0_6);
if (changesSelected != 2) btn0_7.textColor( 0xBBBBBB );
btn0_7.setRect(btn0_8.right() + 1, btn0_8.top(), 26, changesSelected == 2 ? 19 : 15);
addToBack(btn0_7);
RedButton btnOld = new RedButton("v0.5-0.1"){
StyledButton btn0_6 = new StyledButton(Chrome.Type.GREY_BUTTON_TR, "v0.6"){
@Override
protected void onClick() {
super.onClick();
@ -209,9 +212,23 @@ public class ChangesScene extends PixelScene {
}
}
};
if (changesSelected == 3) btnOld.textColor(Window.TITLE_COLOR);
btnOld.setRect(btn0_6.right() + 1, btn0_8.top(), 42, 14);
add(btnOld);
if (changesSelected != 3) btn0_6.textColor( 0xBBBBBB );
btn0_6.setRect(btn0_7.right() + 1, btn0_8.top(), 26, changesSelected == 3 ? 19 : 15);
addToBack(btn0_6);
StyledButton btnOld = new StyledButton(Chrome.Type.GREY_BUTTON_TR,"v0.1-5"){
@Override
protected void onClick() {
super.onClick();
if (changesSelected != 4) {
changesSelected = 4;
ShatteredPixelDungeon.seamlessResetScene();
}
}
};
if (changesSelected != 4) btnOld.textColor( 0xBBBBBB );
btnOld.setRect(btn0_6.right() + 1, btn0_8.top(), 33, changesSelected == 4 ? 19 : 15);
addToBack(btnOld);
Archs archs = new Archs();
archs.setSize( Camera.main.width, Camera.main.height );

View File

@ -237,7 +237,7 @@ public class NewsScene extends PixelScene {
bg.y = y;
text.maxWidth((int)width - bg.marginHor());
text.setPos(x + bg.marginLeft(), y + bg.marginTop());
text.setPos(x + bg.marginLeft(), y + bg.marginTop()+1);
height = (text.bottom()) - y;
@ -248,7 +248,7 @@ public class NewsScene extends PixelScene {
height = button.bottom() - y;
}
height += bg.marginBottom();
height += bg.marginBottom() + 1;
bg.size(width, height);
@ -291,8 +291,8 @@ public class NewsScene extends PixelScene {
text.setPos(x + bg.marginLeft() + 18, text.top());
if (date != null) {
date.x = x + width - bg.marginRight() - date.width() + 2;
date.y = y + height - bg.marginBottom() - date.height() + 3.5f;
date.x = x + width - bg.marginRight() - date.width() + 1;
date.y = y + height - bg.marginBottom() - date.height() + 2.5f;
align(date);
}
}

View File

@ -141,12 +141,12 @@ public class SupporterScene extends PixelScene {
bg.y = y;
text.maxWidth((int)width - bg.marginHor());
text.setPos(x + bg.marginLeft(), y + bg.marginTop());
text.setPos(x + bg.marginLeft(), y + bg.marginTop() + 1);
icon.y = text.bottom() - icon.height() + 4;
icon.x = x + 25;
height = (text.bottom() + 2) - y;
height = (text.bottom() + 3) - y;
height += bg.marginBottom();