File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
frontend/src/components/world/PhaserObjects Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ import { ChatMessage } from "../../../classes/TextConversation"
33const CHAT_BUBBLE_DURATION = 5000 ;
44const TEXT_SCROLL_DELAY = 50 ;
55const MAX_MESSAGE_LENGTH = 20 ;
6+ const BUBBLE_BACKGROUND_COLORS = {
7+ Universal : '#89CFF0' ,
8+ Proximity : '#F8C8DC' ,
9+ Direct : '#85e085' ,
10+ } ;
611
712/**
813 * Object for creating chat bubbles on a phaser scene
@@ -24,6 +29,7 @@ export default class ChatBubble {
2429 * @param value the new chat message that the chat bubble should render
2530 */
2631 public setMessage ( value : ChatMessage ) {
32+ this . bubbleText . setBackgroundColor ( BUBBLE_BACKGROUND_COLORS [ value . chatType ] ) ;
2733 if ( this . timer ) {
2834 clearTimeout ( this . timer )
2935 }
You can’t perform that action at this time.
0 commit comments