Set char. limit of 90 to chat bubble
This commit is contained in:
parent
b4403f3267
commit
6cee0b93e6
@ -90,8 +90,10 @@ gameStore.connection?.on('chat:message', (data: ChatMessage) => {
|
||||
return metrics.width
|
||||
}
|
||||
|
||||
chatBubble.width = calculateTextWidth(data.message, 'Arial', 13) + 15
|
||||
chatText.setText(data.message)
|
||||
chatBubble.width = calculateTextWidth(data.message.substring(0, 90), 'Arial', 13) + 15
|
||||
|
||||
// setText but with max. char limit of 90
|
||||
chatText.setText(data.message.substring(0, 90))
|
||||
|
||||
charChatContainer.setVisible(true)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user