public synchronized void showPopupMessage(String msg) {
if (getWorld() != null) {
Util.debugMsg("UI Popup Msg: " + msg);
TransientMessage msgObject = new TransientMessage(msg);
double offsetX = -(msgObject.getWidth() - myPNode.getWidth()) / 2d;
Point2D position = objectToSky(new Point2D.Double(offsetX, -5));
msgObject.setOffset(position);
getWorld().getSky().addChild(msgObject);
long currentTime = System.currentTimeMillis();
long delay = TIME_BETWEEN_POPUPS - (currentTime - lastPopupTime);
if (delay < 0) {
delay = 0;
}
msgObject.popup(delay);
lastPopupTime = currentTime + delay;
}
}