v0.4.3: fixed some crash bugs with wndtextinput
This commit is contained in:
parent
4ffd6f9c83
commit
7e0fc9f2f0
|
@ -59,7 +59,8 @@ public class WndTextInput extends Window {
|
|||
this( title, initialValue, multiLine ? MAX_LEN_MULTI : MAX_LEN_SINGLE, multiLine, posTxt, negTxt);
|
||||
}
|
||||
|
||||
public WndTextInput(String title, String initialValue, int maxLength, final boolean multiLine, String posTxt, String negTxt){
|
||||
public WndTextInput(final String title, final String initialValue, final int maxLength,
|
||||
final boolean multiLine, final String posTxt, final String negTxt){
|
||||
super();
|
||||
|
||||
//need to offset to give space for the soft keyboard
|
||||
|
@ -76,6 +77,9 @@ public class WndTextInput extends Window {
|
|||
width = WIDTH;
|
||||
}
|
||||
|
||||
ShatteredPixelDungeon.instance.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
RenderedTextMultiline txtTitle = PixelScene.renderMultiline( title, 9 );
|
||||
txtTitle.maxWidth( width );
|
||||
txtTitle.hardlight( Window.TITLE_COLOR );
|
||||
|
@ -168,9 +172,6 @@ public class WndTextInput extends Window {
|
|||
//The text input exists in a separate view ontop of the normal game view.
|
||||
// It visually appears to be a part of the game window but is infact a separate
|
||||
// UI element from the game entirely.
|
||||
ShatteredPixelDungeon.instance.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
FrameLayout.LayoutParams layout = new FrameLayout.LayoutParams(
|
||||
(int)((width - MARGIN*2)*scaledZoom),
|
||||
(int)(inputHeight * scaledZoom),
|
||||
|
|
Loading…
Reference in New Issue
Block a user