v0.3.1a: updated the examien button toast to better explain it
This commit is contained in:
committed by
Evan Debenham
parent
e853c8c6ab
commit
ba2a4f9328
@@ -30,34 +30,34 @@ public class Toast extends Component {
|
|||||||
|
|
||||||
private static final float MARGIN_HOR = 2;
|
private static final float MARGIN_HOR = 2;
|
||||||
private static final float MARGIN_VER = 2;
|
private static final float MARGIN_VER = 2;
|
||||||
|
|
||||||
protected NinePatch bg;
|
protected NinePatch bg;
|
||||||
protected SimpleButton close;
|
protected SimpleButton close;
|
||||||
protected BitmapText text;
|
protected BitmapText text;
|
||||||
|
|
||||||
public Toast( String text ) {
|
public Toast( String text ) {
|
||||||
super();
|
super();
|
||||||
text( text );
|
text( text );
|
||||||
|
|
||||||
width = this.text.width() + close.width() + bg.marginHor() + MARGIN_HOR * 3;
|
width = this.text.width() + close.width() + bg.marginHor() + MARGIN_HOR * 3;
|
||||||
height = Math.max( this.text.height(), close.height() ) + bg.marginVer() + MARGIN_VER * 2;
|
height = Math.max( this.text.height(), close.height() ) + bg.marginVer() + MARGIN_VER * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createChildren() {
|
protected void createChildren() {
|
||||||
super.createChildren();
|
super.createChildren();
|
||||||
|
|
||||||
bg = Chrome.get( Chrome.Type.TOAST_TR );
|
bg = Chrome.get( Chrome.Type.TOAST_TR );
|
||||||
add( bg );
|
add( bg );
|
||||||
|
|
||||||
close = new SimpleButton( Icons.get( Icons.CLOSE ) ) {
|
close = new SimpleButton( Icons.get( Icons.CLOSE ) ) {
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
onClose();
|
onClose();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
add( close );
|
add( close );
|
||||||
|
|
||||||
text = PixelScene.createText( 8 );
|
text = PixelScene.createMultiline(8);
|
||||||
add( text );
|
add( text );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ public class Toolbar extends Component {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String prompt() {
|
public String prompt() {
|
||||||
return "Select a cell to examine";
|
return "Press again to search\nPress a tile to examine";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user