john-science / DecafMUD

Web-based MUD Client for the Discworld MUD
MIT License
2 stars 2 forks source link

Add a Pane for Chats #2

Open john-science opened 5 years ago

john-science commented 5 years ago

Add a (probably optional) pane to the top of the DecafMUD window that shows all of the player-to-player chats during gameplay.

This feature is essential to being able to play the game in groups, where chats are important but also easily lost in the spam of many simultaneous actions.

john-science commented 5 years ago

It looks to me like most of the work would have to happen in decafmud.display.standard.js. This is where the Display plugin is defined. It will mean adding an optional div to the pane that is visible (or not) based on a menu click.

Complications: The Display currently only assumes one scroll bar. I am thinking the new UI should be split with a horizontal bar so the top 25% / 30% of the Window is chat only .

This chat pane should capture all tells, replies, and group chats. With double extra bonuses to catch guild chat and talker channels.

john-science commented 5 years ago

Step 1) Add a new div for chat logging Step 2) Un-break the main log div when the above is visible Step 3) Add a menu item to show/hide the chat log div (without breaking things) Step 4) Copy all chat, guild chat, talker, tell, reply to the chat_log Step 5) Test on various machines

john-science commented 5 years ago

To show/hide an entire div, everything inside, and collapse the space it should take up:

document.getElementById("myDiv").setAttribute("hidden","");
document.getElementById("myDiv").removeAttribute("hidden")