Skip to content

Commit

Permalink
Feat: ME filter tag
Browse files Browse the repository at this point in the history
* You can now use ME as a filter tag.
* setting a filter to just ME will make it look for your name, this is useful if monitoring things like Crits, or someone mentioning your name.
  • Loading branch information
grimmier378 committed Mar 22, 2024
1 parent 1f4c587 commit 2d24d2a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 45 deletions.
26 changes: 0 additions & 26 deletions default_settings.lua
@@ -1,30 +1,4 @@
return {
['Colors'] = {
['color_header'] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 1,
},
['color_headHov'] = {
[1] = 0.049999999999999996,
[2] = 0.049999999999999996,
[3] = 0.049999999999999996,
[4] = 0.8999999999999997,
},
['color_headAct'] = {
[1] = 0.049999999999999996,
[2] = 0.049999999999999996,
[3] = 0.049999999999999996,
[4] = 0.8999999999999997,
},
['color_WinBg'] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 1,
},
},
['Channels'] = {
[2] = {
['Scale'] = 1.5,
Expand Down
40 changes: 21 additions & 19 deletions init.lua
Expand Up @@ -10,10 +10,10 @@ local serverName = string.gsub(mq.TLO.EverQuest.Server(), ' ', '_') or ''
local myName = mq.TLO.Me.DisplayName() or ''
local addChannel = false
local tempSettings = {}
local color_header = {0,0,0,1}
local color_headHov = {0.05,0.05,0.05,0.9}
local color_headAct = {0.05,0.05,0.05,0.9}
local color_WinBg = {0,0,0,1}
-- local color_header = {0,0,0,1}
-- local color_headHov = {0.05,0.05,0.05,0.9}
-- local color_headAct = {0.05,0.05,0.05,0.9}
-- local color_WinBg = {0,0,0,1}
local useTheme, timeStamps = false, true
local zBuffer = 1000 -- the buffer size for the Zoom chat buffer.
local ChatWin = {
Expand Down Expand Up @@ -92,13 +92,11 @@ local function loadSettings()
end
writeSettings(ChatWin.SettingsFile, ChatWin.Settings)
if ChatWin.Settings['Colors'] then
color_header = ChatWin.Settings['Colors']['color_header']
color_headHov = ChatWin.Settings['Colors']['color_headHov']
color_headAct = ChatWin.Settings['Colors']['color_headAct']
color_WinBg = ChatWin.Settings['Colors']['color_WinBg']
useTheme = true
ChatWin.Settings['Colors'] = {}
writeSettings(ChatWin.SettingsFile, ChatWin.Settings)
-- useTheme = true
else
useTheme = false
-- useTheme = false
-- ChatWin.Settings['Colors'] = {}
-- ChatWin.Settings['Colors']['color_WinBg'] = color_header
-- ChatWin.Settings['Colors']['color_header'] = color_headHov
Expand Down Expand Up @@ -145,6 +143,10 @@ function ChatWin.EventChat(channelID, eventName, line)
for fID, fData in pairs(eventDetails.Filters) do
if fID > 0 then
local fString = fData.filterString
if fString == 'ME' then
local ME = mq.TLO.Me.DisplayName()
fString = ME
end
if string.find(line, fString) then
colorVec = fData.color
end
Expand Down Expand Up @@ -193,14 +195,14 @@ function ChatWin.GUI()
local windowName = 'My Chat##'..myName
ImGui.SetNextWindowSize(ImVec2(640, 480), ImGuiCond.FirstUseEver)
ImGui.PushStyleVar(ImGuiStyleVar.WindowPadding, ImVec2(1, 0));
if useTheme then
ImGui.PushStyleColor(ImGuiCol.WindowBg,color_WinBg[1],color_WinBg[2],color_WinBg[3],color_WinBg[4])
ImGui.PushStyleColor(ImGuiCol.Header, color_header[1],color_header[2],color_header[3],color_header[4])
ImGui.PushStyleColor(ImGuiCol.HeaderHovered,color_headHov[1],color_headHov[2],color_headHov[3],color_headHov[4])
ImGui.PushStyleColor(ImGuiCol.HeaderActive,color_headAct[1],color_headAct[2],color_headAct[3],color_headAct[4])
ImGui.PushStyleColor(ImGuiCol.TableRowBg, color_WinBg[1],color_WinBg[2],color_WinBg[3],color_WinBg[4])
ImGui.PushStyleColor(ImGuiCol.TableRowBgAlt,color_WinBg[1],color_WinBg[2],color_WinBg[3],color_WinBg[4])
end
-- if useTheme then
-- ImGui.PushStyleColor(ImGuiCol.WindowBg,color_WinBg[1],color_WinBg[2],color_WinBg[3],color_WinBg[4])
-- ImGui.PushStyleColor(ImGuiCol.Header, color_header[1],color_header[2],color_header[3],color_header[4])
-- ImGui.PushStyleColor(ImGuiCol.HeaderHovered,color_headHov[1],color_headHov[2],color_headHov[3],color_headHov[4])
-- ImGui.PushStyleColor(ImGuiCol.HeaderActive,color_headAct[1],color_headAct[2],color_headAct[3],color_headAct[4])
-- ImGui.PushStyleColor(ImGuiCol.TableRowBg, color_WinBg[1],color_WinBg[2],color_WinBg[3],color_WinBg[4])
-- ImGui.PushStyleColor(ImGuiCol.TableRowBgAlt,color_WinBg[1],color_WinBg[2],color_WinBg[3],color_WinBg[4])
-- end
if ImGui.Begin(windowName, ChatWin.openGUI, ChatWin.winFlags) then
-- Main menu bar
if ImGui.BeginMenuBar() then
Expand Down Expand Up @@ -362,7 +364,7 @@ function ChatWin.GUI()
ImGui.SetKeyboardFocusHere(-1)
end
end
if useTheme then ImGui.PopStyleColor(6) end
-- if useTheme then ImGui.PopStyleColor(6) end
ImGui.End()
ImGui.PopStyleVar()
end
Expand Down

0 comments on commit 2d24d2a

Please sign in to comment.