public void draw(GOut g) { g.chcolor(24, 24, 16, 200); g.frect(Coord.z, sz); g.chcolor(); int y = 0; boolean sel = false; synchronized (msgs) { for (Message msg : msgs) { if ((selstart != null) && (msg == selstart.msg)) sel = true; int y1 = y - sb.val; int y2 = y1 + msg.sz().y; if ((y2 > 0) && (y1 < ih())) { if (sel) drawsel(g, msg, y1); g.image(msg.tex(), new Coord(0, y1)); } if ((selend != null) && (msg == selend.msg)) sel = false; y += msg.sz().y; } } sb.max = y - ih(); super.draw(g); }