Can someone please tell me why I cant type in the edit text bar that shows up when i use this mod?
Its a part of an upcoming mod pack
Conditions:
Everything shows up fine, but when I tap the text box while running the code, my keyboard doesnt show up, and therefor i cannot type in it.
I am certain it is the code, as other EditTexts from other scripts work.
Please provide me with an answer to my problem, and perhaps the fixed code itself.
Thanks! Ill give +1's to detailed, useful, or working answers.
/*
TimeLord Mod
by Darth377
for use with the
Darth377 modPack
*/
var simpleGUI
var menu;
ModPE.setItem(460,"nether_star",0,"Time Warper");
function newLevel() {
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
ctx.runOnUiThread(new java.lang.Runnable({ run: function() {
try{
simpleGUI = new android.widget.PopupWindow();
var mlayout = new android.widget.RelativeLayout(ctx);
var mbutton = new android.widget.Button(ctx);
mbutton.setText("Warp Time");
//button.setWidth(75);
//button.setHeight(75);
mbutton.setOnClickListener(new android.view.View.OnClickListener({
onClick: function(viewarg) {
mainMenu();
simpleGUI.dismiss();
}
}));
mlayout.addView(mbutton);
simpleGUI.setContentView(mlayout);
simpleGUI.setWidth(75);
simpleGUI.setHeight(75);
simpleGUI.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT));
simpleGUI.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 20, 90);
}catch(err){
print("Error: "+err);
}
} }));
}
function mainMenu(){
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
ctx.runOnUiThread(new java.lang.Runnable({ run: function(){
try{
var menuLayout = new android.widget.LinearLayout(ctx);
menuLayout.setOrientation(1);
var button = new android.widget.Button(ctx);
var edittext = new android.widget.EditText(ctx);
var applybtn = new android.widget.Button(ctx);
var title = new android.widget.TextView(ctx);
title.setText(" Time Warper\n");
title.setTextSize(24);
applybtn.setText("Apply");
edittext.setHint("GameSpeed, default is 20");
applybtn.setOnClickListener(new android.view.View.OnClickListener({
onClick: function(viewarg){
ModPE.setGameSpeed(parseInt(edittext.getText()));
}
}));
button.setText("Exit");
button.setOnClickListener(new android.view.View.OnClickListener({
onClick: function(viewarg){
menu.dismiss();
newLevel();
}
}));
menuLayout.addView(title);
menuLayout.addView(edittext);
menuLayout.addView(applybtn);
menuLayout.addView(button);
//Add more buttons in this section
menu = new android.widget.PopupWindow(menuLayout, ctx.getWindowManager().getDefaultDisplay().getWidth()/2, ctx.getWindowManager().getDefaultDisplay().getHeight());
menu.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.BLACK));
menu.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 0, 0);
}catch(error){
print("An error occured: " + error);
}
}}));
}
function leaveGame(){
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
ctx.runOnUiThread(new java.lang.Runnable({ run: function() {
if(simpleGUI != null){
simpleGUI.dismiss();
}
if(menu != null) {
menu.dismiss();
}
}}));
}
I apologize if the formatting is messed up, I am on my kindle atm
Can someone please tell me why I cant type in the edit text bar that shows up when i use this mod?
Its a part of an upcoming mod pack
Conditions:
Everything shows up fine, but when I tap the text box while running the code, my keyboard doesnt show up, and therefor i cannot type in it.
I apologize if the formatting is messed up, I am on my kindle atm
function mainMenu(){
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
ctx.runOnUiThread(new java.lang.Runnable({ run: function(){
try{
var dialog = new android.app.Dialog(ctx);
var scroll = new andriod.app.Dialog(ctx);
var dlayout = new
function mainMenu(){
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
ctx.runOnUiThread(new java.lang.Runnable({ run: function(){
try{
var dialog = new android.app.Dialog(ctx);
var scroll = new andriod.app.Dialog(ctx);
var dlayout = new
Its a part of an upcoming mod pack
Conditions:
Everything shows up fine, but when I tap the text box while running the code, my keyboard doesnt show up, and therefor i cannot type in it.
I am certain it is the code, as other EditTexts from other scripts work.
Please provide me with an answer to my problem, and perhaps the fixed code itself.
Thanks! Ill give +1's to detailed, useful, or working answers.
/* TimeLord Mod by Darth377 for use with the Darth377 modPack */ var simpleGUI var menu; ModPE.setItem(460,"nether_star",0,"Time Warper"); function newLevel() { var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function() { try{ simpleGUI = new android.widget.PopupWindow(); var mlayout = new android.widget.RelativeLayout(ctx); var mbutton = new android.widget.Button(ctx); mbutton.setText("Warp Time"); //button.setWidth(75); //button.setHeight(75); mbutton.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg) { mainMenu(); simpleGUI.dismiss(); } })); mlayout.addView(mbutton); simpleGUI.setContentView(mlayout); simpleGUI.setWidth(75); simpleGUI.setHeight(75); simpleGUI.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT)); simpleGUI.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 20, 90); }catch(err){ print("Error: "+err); } } })); } function mainMenu(){ var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function(){ try{ var menuLayout = new android.widget.LinearLayout(ctx); menuLayout.setOrientation(1); var button = new android.widget.Button(ctx); var edittext = new android.widget.EditText(ctx); var applybtn = new android.widget.Button(ctx); var title = new android.widget.TextView(ctx); title.setText(" Time Warper\n"); title.setTextSize(24); applybtn.setText("Apply"); edittext.setHint("GameSpeed, default is 20"); applybtn.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ ModPE.setGameSpeed(parseInt(edittext.getText())); } })); button.setText("Exit"); button.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ menu.dismiss(); newLevel(); } })); menuLayout.addView(title); menuLayout.addView(edittext); menuLayout.addView(applybtn); menuLayout.addView(button); //Add more buttons in this section menu = new android.widget.PopupWindow(menuLayout, ctx.getWindowManager().getDefaultDisplay().getWidth()/2, ctx.getWindowManager().getDefaultDisplay().getHeight()); menu.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.BLACK)); menu.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 0, 0); }catch(error){ print("An error occured: " + error); } }})); } function leaveGame(){ var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function() { if(simpleGUI != null){ simpleGUI.dismiss(); } if(menu != null) { menu.dismiss(); } }})); }I apologize if the formatting is messed up, I am on my kindle atm
Follow @Darth377Apps
Please check out my Twitter account!

I have been working on a few games!
Give me ALL THE INTERNETS!
Why we call TBPM ?-Three boys play minecraft
Awesomeeee!
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumDoes the popup window need a flag to force it to show keyboard?
http://developer.android.com/reference/android/widget/PopupWindow.html has a few flags to specify the visibility of the keyboard when the window is focused.
To be honest, I had this problem when trying to implement 0.8.0-style text input, and ended up just forcing the keyboard to show using the http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html InputMethodManager: https://github.com/zhuowei/MCPELauncher/blob/master/src/com/mojang/minecraftpe/MainActivity.java#L1150
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
/*
TimeLord Mod
by Darth377
for use with the
Darth377 modPack
*/
var simpleGUI
var menu;
ModPE.setItem(460,"nether_star",0,"Time Warper");
function newLevel() {
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
ctx.runOnUiThread(new java.lang.Runnable({ run: function() {
try{
simpleGUI = new android.widget.PopupWindow();
var mlayout = new android.widget.RelativeLayout(ctx);
var mbutton = new android.widget.Button(ctx);
mbutton.setText("Warp Time");
//button.setWidth(75);
//button.setHeight(75);
mbutton.setOnClickListener(new android.view.View.OnClickListener({
onClick: function(viewarg) {
mainMenu();
simpleGUI.dismiss();
}
}));
mlayout.addView(mbutton);
simpleGUI.setContentView(mlayout);
simpleGUI.setWidth(75);
simpleGUI.setHeight(75);
simpleGUI.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT));
simpleGUI.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 20, 90);
}catch(err){
print("Error: "+err);
}
} }));
}
function mainMenu(){
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
ctx.runOnUiThread(new java.lang.Runnable({ run: function(){
try{
var dialog = new android.app.Dialog(ctx);
var scroll = new andriod.app.Dialog(ctx);
var dlayout = new
}
function leaveGame(){
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
ctx.runOnUiThread(new java.lang.Runnable({ run: function() {
if(simpleGUI != null){
simpleGUI.dismiss();
}
if(menu != null) {
menu.dismiss();
}
}}));
}
latest version. Ill check out your links, 500.WIP changing the thing to dialog
Follow @Darth377Apps
Please check out my Twitter account!

I have been working on a few games!
Give me ALL THE INTERNETS!
Latest version? What do you want now? And when you defined "scroll" you wrote "andriod"
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
/* TimeLord Mod by Darth377 for use with the Darth377 modPack */ var simpleGUI var menu; ModPE.setItem(460,"nether_star",0,"Time Warper"); function newLevel() { var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function() { try{ simpleGUI = new android.widget.PopupWindow(); var mlayout = new android.widget.RelativeLayout(ctx); var mbutton = new android.widget.Button(ctx); mbutton.setText("Warp Time"); //button.setWidth(75); //button.setHeight(75); mbutton.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg) { mainMenu(); } })); mlayout.addView(mbutton); simpleGUI.setContentView(mlayout); simpleGUI.setWidth(75); simpleGUI.setHeight(75); simpleGUI.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT)); simpleGUI.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 20, 90); }catch(err){ print("Error: "+err); } } })); } function mainMenu(){ var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function(){ try{ var dialog = new android.app.Dialog(ctx); var scroll = new android.app.Dialog(ctx); var dLayout = new android.widget.LinearLayout(ctx); var gameSpeed = new android.widget.EditText(ctx); var applybtn = new android.widget.Button(ctx); var exit = new android.widget.Button(ctx); gameSpeed.setHint("Game Speed. Default is 20"); gameSpeed.setInputType(android.text.InputType.TYPE_CLASS_NUMBER); applybtn.setText("Apply!"); exit.setText("exit"); dialog.setTitle("Warp Time"); dLayout.setOrientation(android.widget.LinearLayout.VERTICAL); dLayout.addView(gameSpeed); dLayout.addView(applybtn); dLayout.addView(exit); dialog.setContentView(dLayout); applybtn.setOnClickListener(new android.view.View.OnClickListener( { onClick: function(view) { var speed = gameSpeed.getText(); ModPE.setGameSpeed(speed); } })); exit.setOnClickListener(new android.view.View.OnClickListener( { onClick: function(view) { dialog.dismiss(); } })); dialog.show(); } catch(e){ for(var i = 30; i > 1; i--) { print(""+e); } } } })); } function leaveGame(){ var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function() { if(simpleGUI != null){ simpleGUI.dismiss(); } if(menu != null) { menu.dismiss(); } }})); }But ModPE.setGameSpeed isn't
working.
Follow @Darth377Apps
Please check out my Twitter account!

I have been working on a few games!
Give me ALL THE INTERNETS!
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
keyboard show up, no text