From e1e781bb2135ef78592226f1a3eaba4925702f1f Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 3 May 2021 16:38:41 -0700 Subject: :star: --- NET/worlds/console/ChatPart.java | 116 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 NET/worlds/console/ChatPart.java (limited to 'NET/worlds/console/ChatPart.java') diff --git a/NET/worlds/console/ChatPart.java b/NET/worlds/console/ChatPart.java new file mode 100644 index 0000000..1f7af6e --- /dev/null +++ b/NET/worlds/console/ChatPart.java @@ -0,0 +1,116 @@ +/* */ package NET.worlds.console; +/* */ +/* */ import NET.worlds.scape.FrameEvent; +/* */ import NET.worlds.scape.Pilot; +/* */ import java.awt.Container; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ChatPart +/* */ extends DuplexPart +/* */ { +/* */ private Window renderWindow; +/* */ private DefaultConsole console; +/* */ private static final String activateVCselfWhisper = "&|+debug= 0) && (ii < s.length() - 1) && (s.charAt(ii + 1) == 'u')) { +/* 45 */ Pilot.sendText(Console.parseUnicode(s)); +/* */ } else { +/* 47 */ Pilot.sendText(s); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void activate(Console c, Container f, Console prev) +/* */ { +/* 55 */ super.activate(c, f, prev); +/* */ +/* */ +/* 58 */ this.console = ((DefaultConsole)c); +/* */ } +/* */ +/* */ public void deactivate() +/* */ { +/* 63 */ super.deactivate(); +/* */ +/* */ +/* 66 */ this.renderWindow = null; +/* 67 */ this.console = null; +/* */ } +/* */ +/* */ public synchronized boolean handle(FrameEvent f) +/* */ { +/* 72 */ boolean ret = super.handle(f); +/* */ +/* */ +/* 75 */ if ((this.renderWindow == null) && (this.console != null)) { +/* 76 */ RenderCanvas rc = this.console.getRender(); +/* 77 */ if (rc != null) { +/* 78 */ Window w = rc.getWindow(); +/* 79 */ if (w != null) { +/* */ try { +/* 81 */ w.hookChatLine(this.line); +/* 82 */ this.renderWindow = w; +/* */ } +/* */ catch (WindowNotFoundException localWindowNotFoundException) {} +/* */ } +/* */ } +/* */ } +/* 88 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void triggerLocalDebug(String s) +/* */ { +/* 100 */ if (s.startsWith("&|+debug