v1.2.0: added a little arrow to the inventory button in the full UI
This commit is contained in:
parent
44e145c9d4
commit
d2f139e6fa
|
@ -145,6 +145,8 @@ public class Toolbar extends Component {
|
||||||
add(btnInventory = new Tool(0, 0, 24, 26) {
|
add(btnInventory = new Tool(0, 0, 24, 26) {
|
||||||
private CurrencyIndicator ind;
|
private CurrencyIndicator ind;
|
||||||
|
|
||||||
|
private Image arrow;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
if (SPDSettings.interfaceSize() == 2){
|
if (SPDSettings.interfaceSize() == 2){
|
||||||
|
@ -170,12 +172,22 @@ public class Toolbar extends Component {
|
||||||
super.createChildren();
|
super.createChildren();
|
||||||
ind = new CurrencyIndicator();
|
ind = new CurrencyIndicator();
|
||||||
add(ind);
|
add(ind);
|
||||||
|
|
||||||
|
arrow = Icons.get(Icons.COMPASS);
|
||||||
|
arrow.originToCenter();
|
||||||
|
arrow.visible = SPDSettings.interfaceSize() == 2;
|
||||||
|
arrow.tint(0x3D2E18, 1f);
|
||||||
|
add(arrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void layout() {
|
protected void layout() {
|
||||||
super.layout();
|
super.layout();
|
||||||
ind.fill(this);
|
ind.fill(this);
|
||||||
|
|
||||||
|
arrow.x = left() + (width - arrow.width())/2;
|
||||||
|
arrow.y = bottom()-arrow.height-1;
|
||||||
|
arrow.angle = bottom() == camera().height ? 0 : 180;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user