Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var TextBox = function (position) {
- UI.makeControl(this);
- var local = this;
- this.hasFocus = false;
- this.curText = "";
- this.visibleText = "";
- this.visibleTextStart = 0;
- this.texQuad = new Quad({ });
- this.texQuad.setSize(256, 32);
- this.texQuad.setTexture("Interface\\ChatFrame\\UI-ChatInputBorder.blp");
- this.texQuad.setColor(0xFFFFFFFF);
- this.caretPos = 0;
- this.caretQuad = new Quad({});
- this.caretQuad.setSize(2, 15);
- this.caretQuad.setPosition(0, 0);
- this.caretQuad.setColor(0xFFFFFFFF);
- this.prevCaretStr = "";
- this.prevCaretLen = 0.0;
- this.isCaretVisible = true;
- this.caretEvent = new TimedEvent({ This: local, callback: (function(scope) { return function() { scope.caretUpdate(); };})(local), interval: 1000 });
- this.caretEvent.enable();
- this.curPosition = [0, 0];
- if (typeof position !== "undefined") {
- this.setPosition(position);
- this.curPosition = { x: position.x, y: position.y };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment