Finished work on chat nameplate format settings.

This commit is contained in:
rainbow napkin 2026-10-14 04:34:30 -04:00
parent 6346b8f148
commit cd5f168243
8 changed files with 94 additions and 5 deletions

View file

@ -680,4 +680,24 @@ class chatBox{
this.chatBuffer.scrollTop = this.chatBuffer.scrollHeight - Math.round(this.chatBuffer.getBoundingClientRect().height);
}
}
/**
* Re-render buffer from raw data (useful for settings changes)
*/
rerenderBuffer(){
//Yank existing messages from buffer, converting nodelist to array to avoid annoying behavior in for loops
const buffer = Array.from(this.chatBuffer.children);
//Iterate through all received messages
for(const message of buffer){
//Pull raw message data from saved message
const rawData = JSON.parse(message.dataset.rawData);
//Nuke the message
message.remove();
//Re-render chat out to the buffer
this.displayChat(rawData);
}
}
}