Hide all notifications of a specific type

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,728
Location
Near Portsmouth, UK
So you've just declared war, and your notification list is now flooded with "CS X has declared war on you", "CS X has declared war on CS Y", and other (largely redundant) messages.

You could Right-Click on every one, but that gets boring. The following small code snippet allows you to Shift-Right-Click on one and remove all of the same type (so shift-right-click on any "CS X has declared war on CS Y" and they all will be removed from the notification list)

Lives in C:\Program Files (x86)\Steam\SteamApps\common\sid meier's civilization v\assets\UI\InGame\WorldView\NotificationPanel.lua and replaces the existing GenericRightClick() function

Code:
function GenericRightClick ( Id )
  local bShift = UIManager:GetShift();

  if (bShift) then
    if (g_ActiveNotifications[Id] ~= nil) then
      local type = g_ActiveNotifications[Id]

      for i,_ in pairs(g_ActiveNotifications) do
        if (g_ActiveNotifications[i] == type) then
          UI.RemoveNotification(i)
        end
      end
    end
  else
    UI.RemoveNotification(Id)
  end
end
 
Back
Top Bottom