Hi there,
Just wanna say that I totally love Pinco's UI.
Something that (in my eyes) is missing from it though is the possibility to filter mobiles/items with multiple names. For example in bedlam I want to focus on the named monsters (Red Death, Master xxx, Sir yyy, Lady zzz).
So I changed the 2 locations in Pinco's UI to be able to set a filter "red|master|sir|lady" and it will only show me those. Much easier for provo AND looting.
I used the pipe symbol as this is what's used in regular expressions for alternatives and I think its quite easy to pick up.
Changed in EnhancePack.CreateObjectHandles:
Changed in MobilesOnScreen.UpdateAnchors :
Possible optimization would be if matchesFilter = true, then skip rest of for loop altogether, but I don't know Lua at all and dont know how one would do that. (jumps? break?)
Pinco: If you like the change please include it in your UI (this bit is public domain). That would be most awesome!
Just wanna say that I totally love Pinco's UI.
Something that (in my eyes) is missing from it though is the possibility to filter mobiles/items with multiple names. For example in bedlam I want to focus on the named monsters (Red Death, Master xxx, Sir yyy, Lady zzz).
So I changed the 2 locations in Pinco's UI to be able to set a filter "red|master|sir|lady" and it will only show me those. Much easier for provo AND looting.
I used the pipe symbol as this is what's used in regular expressions for alternatives and I think its quite easy to pick up.
Changed in EnhancePack.CreateObjectHandles:
Code:
if (ObjectHandleToggleWindow.CurrentFilter ~= "" and name and name ~= "" and name ~= L"") then
local matchesFilter = false
for filtrs in wstring.gmatch(ObjectHandleToggleWindow.CurrentFilter, L"[^|]+") do
if wstring.find(wstring.lower(name), wstring.lower(filtrs)) then
matchesFilter = true
end
end
if not matchesFilter then
UnregisterWindowData(WindowData.ObjectInfo.Type, objectId)
continue
end
end
Code:
if (MobilesOnScreen.STRFilter ~= "") then -- filter
local matchesFilter = false
for filtrs in wstring.gmatch(MobilesOnScreen.STRFilter, L"[^|]+") do
if wstring.find(wstring.lower(data.MobName), wstring.lower(filtrs)) then
matchesFilter = true
end
end
if not matchesFilter then
MobilesOnScreen.RemoveHealthBar(mobileId)
continue
end
end
Pinco: If you like the change please include it in your UI (this bit is public domain). That would be most awesome!