import java.util.Random; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Graphics; import javax.microedition.lcdui.Image; import javax.microedition.lcdui.TextBox; public class M extends Canvas implements Runnable { public static Random RNG; public static Image I; public static M T; public static Graphics G; public static int KC; public static int KP; public static int[] IC; public static int tf_any; public static int cm_ok; public static int cm_back; public static Command cback; public static Command clicked; public static Command con; public static String path; public static String name; public void paint(Graphics var1) { var1.drawImage(I, 0, 0, 20); } public void run() { try { R(); } catch (Exception var1) { ; } } public void keyPressed(int var1) { KC = var1; KP = var1; } public void keyReleased(int var1) { KP = 0; } public static void R() throws Exception { RNG = new Random(); IC = new int[25]; KC = 0; KP = 0; tf_any = 0; cm_ok = 0; cm_back = 0; con = new Command(new String(), 1, 1); cback = new Command(new String(), 1, 1); clicked = new Command(new String(), 1, 1); path = new String(); name = new String(); FW.TB = new TextBox("Имя карты", "", 99, tf_any); Display.getDisplay(FW.fw).setCurrent(FW.TB); FW.CD = FW.TB; FW.TB.setCommandListener(FW.fw); con = new Command("OK", cm_ok, 0); cback = new Command("Назад", cm_back, 2); FW.CD.addCommand(con); FW.CD.addCommand(cback); M var10000 = T; T.repaint(); var10000.serviceRepaints(); do { Command var0 = FW.LC; FW.LC = null; clicked = var0; Thread.sleep((long)100); } while(clicked == null); if(clicked == con) { name = new String(FW.TB.getString() + ".lvl"); String var10001 = path; String var1 = name; path = new String(var10001 + var1); } Display.getDisplay(FW.fw).setCurrent(T); FW.CD = T; FW.fw.destroyApp(true); } }