public Text text() { BuddyWnd.Buddy b = getparent(GameUI.class).buddies.find(from); String nm = (b == null) ? "???" : (b.name); if ((r == null) || !nm.equals(cn)) { String msg = RichText.Parser.quote(String.format("%s: %s", nm, text)); if (Config.timestamp) { msg = Utils.timestamp(msg); } r = fnd.render(msg, w, TextAttribute.FOREGROUND, col); cn = nm; } return (r); }
public SimpleMessage(String text, Color col, int w) { if (Config.timestamp) text = Utils.timestamp(text); if (col == null) this.t = fnd.render(RichText.Parser.quote(text), w); else this.t = fnd.render(RichText.Parser.quote(text), w, TextAttribute.FOREGROUND, col); }