Path: blob/main/replay/backend/overlays/MessageOverlay.ts
1030 views
import BaseOverlay from '~backend/overlays/BaseOverlay';1import { VIEW_Y_OFFSET } from '~shared/constants/design';23const width = 350;4export default class MessageOverlay extends BaseOverlay {5public static width = width;6constructor() {7super({8name: 'message-overlay',9bounds: {10width,11height: 200,12y: VIEW_Y_OFFSET + 100,13},14calcBounds(bounds) {15const height = Math.max(this.lastHeight, 200);16return {17width,18height: height + 20,19x: bounds.width / 2 - width / 2,20y: bounds.y + bounds.height / 2 - height,21};22},23});24}25}262728