protected void addSubtitle ( ChatGlyph rec ) { // scroll up the old subtitles Rectangle r = rec . getBounds ( ) ; scrollUpSubtitles ( - r . height - _logic . getSubtitleSpacing ( rec . getType ( ) ) ) ; // put this one in place Rectangle vbounds = _target . getViewBounds ( ) ; rec . setLocation ( vbounds . x + _subtitleXSpacing , vbounds . y + vbounds . height - _subtitleYSpacing - r . height ) ; // add it to our list and to our media panel rec . setDim ( _dimmed ) ; _subtitles . add ( rec ) ; _target . addAnimation ( rec ) ; }
Add a subtitle for display now .