this.nodes = []; this.cursorX = 0; this.cursorY = 0; this.cursorOn = false; // create the cursor var font = LzFontManager.getFont("thefont", null); this.cursor = new LzView(); this.cursor.construct(this.textarea, {}); this.cursor.setBGColor(this.textarea.bgcolor); this.cursor.setAttribute("width", 5); this.cursor.setAttribute("height", font.height+font.descent+font.ascent-2); 0) { input.setText(input.text.substring(0, input.text.length-1)); this.positionCursor(); } } else if (n >= 32 && n <= 126) { input.setText(input.text + ch); this.positionCursor(); } } ]]> this.addText(cmd); this.addBR(); this.inputHandler(cmd.toLowerCase()); this.waitingForInput = false; this.inputHandler = null; // this.textarea.addText("\n"); this.addText("\n"); // Debug.write("setFixedText2 " + n); if (this.cursorOn) this.cursor.setBGColor("0x000000") else this.cursor.setBGColor(this.textarea.bgcolor); this.cursor.setAttribute("x", this.textarea.inputText.x + this.textarea.inputText.width-1); this.cursor.setAttribute("y", this.textarea.inputText.y); 0) newnodes[newnodes.length] = this.nodes[j]; else this.nodes[j].destroy(); } this.cursorY -= offset; this.nodes = newnodes; ]]> 0) { // flush the buffer i = this.outputBuffer.length; } else flush = false; if (i == -1) return false; line = this.outputBuffer.substring(0, i); // remove the line from the buffer this.outputBuffer = this.outputBuffer.substring(i+1, this.outputBuffer.length); lst = line.split(" "); var comps = []; var totalw = 0; for (var c = 0; c < lst.length; c++) { var word = lst[c]; var txtcomp = new LzText(); txtcomp.construct(this.textarea, {}); txtcomp.setAttribute("clip", true); txtcomp.setText(word); //txtcomp.setBGColor("0xfff0f0"); if (this.cursorX+txtcomp.width > this.textarea.width) { // space the previous components out - full justify var extra = (this.textarea.width-totalw)/comps.length; for (var j = 0; j < comps.length; j++) { comps[j].setAttribute("x", comps[j].x+extra*j); } comps = []; totalw = 0; // newline this.cursorX = 0; this.cursorY += txtcomp.height; this.shiftPage(); } txtcomp.setAttribute("x", this.cursorX); txtcomp.setAttribute("y", this.cursorY); this.cursorX += txtcomp.width; comps[comps.length] = txtcomp; totalw += txtcomp.width; this.nodes[this.nodes.length] = txtcomp; } // newline if (!flush) { var font = LzFontManager.getFont("thefont", null); this.cursorX = 0; this.cursorY += font.height+font.ascent+font.descent; this.shiftPage(); } return true; ]]> ").join(">"); txt = txt.split("<").join("<"); if (this.boldText) txt = "" + txt + ""; if (this.italicText) txt = "" + txt + ""; this.outputBuffer += txt; while (this.outputLine(false)); ]]> Debug.write("DEBUG: setReverseText"); Debug.write("DEBUG: setFixedText"); Debug.write("DEBUG: setWindow " + n); this.currentWindow = n; Debug.write("DEBUG: splitUpper " + n); Debug.write("DEBUG: readLine"); this.textarea.inputText.setText(""); this.waitingForInput = true; this.inputHandler = handler; this.flushBuffer(); // position the input area this.textarea.inputText.setAttribute("x", this.cursorX); this.textarea.inputText.setAttribute("y", this.cursorY); // position the cursor this.cursorOn = true; this.positionCursor(); Debug.write("DEBUG: setCursor"); Debug.write("ERROR: " + txt); Debug.write("DEBUG: " + txt);