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
|
return metrics.width
|
||||||
}
|
}
|
||||||
|
|
||||||
chatBubble.width = calculateTextWidth(data.message, 'Arial', 13) + 15
|
chatBubble.width = calculateTextWidth(data.message.substring(0, 90), 'Arial', 13) + 15
|
||||||
chatText.setText(data.message)
|
|
||||||
|
// setText but with max. char limit of 90
|
||||||
|
chatText.setText(data.message.substring(0, 90))
|
||||||
|
|
||||||
charChatContainer.setVisible(true)
|
charChatContainer.setVisible(true)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user