Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
mudlet:chat_capture_window [2021/07/13 23:45] – Further refinements of Mudlet capture settings paradoxmudlet:chat_capture_window [2023/11/05 22:08] – [Advanced: Adding Timestamps] math
Line 19: Line 19:
     height = "5c",     height = "5c",
     dockPosition = "top",     dockPosition = "top",
 +    autoWrap = true,
   })   })
   chat_window:setFontSize(getFontSize())   chat_window:setFontSize(getFontSize())
Line 47: Line 48:
   - Click save item.   - Click save item.
   - You may need to reconnect to the MUD to get the window to appear.    - You may need to reconnect to the MUD to get the window to appear. 
 +
 +===== Advanced: Adding Timestamps =====
 +
 +To add timestamps to your chat capture window, replace
 +<code>
 +copy()
 +chat_window:appendBuffer()
 +</code>
 +in the previous examples with
 +<code>
 +echo("chat_window", string.format("%s: %s\n", getTime(true), getSelection())
 +</code>
 +Check the Mudlet Lua documentation to see more formatting options for getTime().
  
 ===== Capture Additional Channels ===== ===== Capture Additional Channels =====
  
-TBD+To capture additional channels to the same window simply add more capture patterns to the trigger.
  
 ===== Styling the Capture Window ===== ===== Styling the Capture Window =====
  
-TBD+Here's an example of adding additional styling to the chat capture window. 
 + 
 +**NOTE: Requires Mudlet 4.10+ and Linux - will not work on older Mudlet or MacOS/Windows** 
 + 
 +  - Open the "scripts" page again by clicking the button in the toolbar. 
 +  - Change your "Chat Capture Window" script (or whatever you named it!) to add a ''chat_window:setStyleSheet'' fragment:<code> 
 +  chat_window = Geyser.UserWindow:new({ 
 +    name = "chat_window", 
 +    titleText = "CHATS", 
 +    docked = true, 
 +    height = "5c", 
 +    dockPosition = "top", 
 +  }) 
 + 
 +  chat_window:setStyleSheet([[ 
 +    background-color: black; 
 +    border-width: 2px; 
 +    border-color: #005c28; 
 +    border-style: groove; 
 +    border-radius: 2; 
 +  ]]) 
 + 
 +  chat_window:setFontSize(getFontSize()) 
 +  return 1 
 +end 
 + 
 +make_chat_window() 
 +</code>