Shrink text in chat panes and add local chat capture

This commit is contained in:
Matt Wagner 2021-06-05 23:22:29 -07:00
parent e230c9c36d
commit 36fa2d654e
4 changed files with 38 additions and 5 deletions

2
mfile
View File

@ -1,4 +1,4 @@
{
"package": "lotj-ui",
"version": "v2.0.2"
"version": "v2.0.3"
}

View File

@ -10,7 +10,7 @@ function lotj.chat.setup()
autoWrap = false,
color = "black",
scrollBar = true,
fontSize = 14,
fontSize = 12,
}, contentsContainer)
-- Set the wrap at a few characters short of the full width to avoid the scroll bar showing over text
@ -23,12 +23,14 @@ function lotj.chat.setup()
end
end
function lotj.chat.routeMessage(type)
function lotj.chat.routeMessage(type, skipAllTab)
selectCurrentLine()
copy()
lotj.chat[type]:cecho("<reset>"..getTime(true, "hh:mm:ss").." ")
lotj.chat[type]:appendBuffer()
if not skipAllTab then
lotj.chat.all:cecho("<reset>"..getTime(true, "hh:mm:ss").." ")
lotj.chat.all:appendBuffer()
end
end

View File

@ -116,6 +116,7 @@ function lotj.layout.setup()
local lowerTabList = {}
table.insert(lowerTabList, {keyword = "all", label = "All"})
table.insert(lowerTabList, {keyword = "local", label = "Local"})
table.insert(lowerTabList, {keyword = "commnet", label = "CommNet"})
table.insert(lowerTabList, {keyword = "clan", label = "Clan"})
table.insert(lowerTabList, {keyword = "ooc", label = "OOC"})

View File

@ -1,4 +1,34 @@
[
{
"name": "local",
"patterns": [
{
"pattern": "^.+ (says|asks|exclaims|whispers to you)(, in .+)? '.*'$",
"type": "regex"
},
{
"pattern": "^'.*' .+ (says|asks|exclaims)(, in .+)?.$",
"type": "regex"
},
{
"pattern": "^You .*(say|ask|exclaim)(, in .+)? '.*'$",
"type": "regex"
},
{
"pattern": "^'.*' you .*(say|ask|exclaim)(, in .+)?.$",
"type": "regex"
},
{
"pattern": "^.+ speaks in your mind '.*'$",
"type": "regex"
},
{
"pattern": "^You speak through your mind '.*'$",
"type": "regex"
}
],
"script": "lotj.chat.routeMessage(\"local\")"
},
{
"name": "commnet",
"patterns": [