I've been trying to adjust this myself. It seems that no matter how I try and address invis status (setting isRegularInvis and isIVU) it always refereences the invis statuis of the toom that is running BoxHud. It correctly reflects those status - but applies them to all members. I've checked activeName, and it is the name of the group member coming from the Peer GRoup array. But invis just returns that status based on teh single char. Any ideas whazt I'm doing wrong? The Original code does nto work, by the way -it just looks at the bool value for invis.
function Character:drawNameButton(activeName)
local buttonText = self:getDisplayName()
local col = nil
local isActive = (self.Name == activeName) -- Check if this is the active character
if isActive then
if self.Properties.BotInZone then
if self.Properties['Me.Type'] == 'Corpse' then
col = state.Settings.Colors.NotInZone or {1, 0, 0}
buttonText = buttonText .. '\'s Corpse'
else
local member = mq.TLO.Group.Member(self.Name)
if member and member() then
local isRegularInvis = mq.TLO.Group.Member(self.Name).Invis(1)() -- Regular Invis
local isIVU = mq.TLO.Group.Member(self.Name).Invis(2)() -- Invis vs. Undead
if isRegularInvis and isIVU then
col = state.Settings.Colors.DoubleInvis or {1.0, 0.65, 0.0}
buttonText = '(' .. self:getDisplayName() .. '[DBL])'
elseif isRegularInvis then
col = state.Settings.Colors.Invis or {0.26, 0.98, 0.98}
buttonText = '(' .. self:getDisplayName() .. '[INV])'
elseif isIVU then
col = state.Settings.Colors.IVU or {0.95, 0.98, 0.26}
buttonText = '(' .. self:getDisplayName() .. '[IVU])'
else
col = state.Settings.Colors.InZone or {0, 1, 0}
end
else
col = state.Settings.Colors.NotInZone or {1, 0, 0}
end
end
else
col = state.Settings.Colors.NotInZone or {1, 0, 0}
end
-- Override color for active character (optional)
col = col or {1, 1, 1} -- Default to white if nil
-- You could modify the color slightly, e.g., make it brighter
col = {col[1] * 1.2, col[2] * 1.2, col[3] * 1.2} -- Example: brighter
col = col or {1, 1, 1} -- Safety default
ImGui.PushStyleColor(ImGuiCol.Text, col[1], col[2], col[3], 1)
if state.Settings.Columns.Name.IncludeLevel and self.Properties['Me.Level'] then
buttonText = buttonText .. ' (' .. self.Properties['Me.Level'] .. ')'
end
if ImGui.SmallButton(buttonText..'##'..self.Name) then
mq.cmdf('/squelch /dex %s /foreground', self.Name)
end
ImGui.PopStyleColor(1)
self:drawContextMenu()
end
end