diff --git a/RaidNotifier.lua b/RaidNotifier.lua
index b81ce24..2211f1d 100644
--- a/RaidNotifier.lua
+++ b/RaidNotifier.lua
@@ -5,7 +5,7 @@ local RaidNotifier = RaidNotifier
RaidNotifier.Name = "RaidNotifier"
RaidNotifier.DisplayName = "Raid Notifier"
-RaidNotifier.Version = "2.1.2"
+RaidNotifier.Version = "2.1.3"
RaidNotifier.Author = "|c009ad6Kyoma, Woeler, silentgecko|r"
RaidNotifier.SV_Name = "RNVars"
RaidNotifier.SV_Version = 4
@@ -444,7 +444,7 @@ do ----------------------
end
EVENT_MANAGER:RegisterForEvent(self.Name, EVENT_PLAYER_COMBAT_STATE, OnCombatStateChanged)
- UI.AddFragment()
+ --UI.AddFragment()
listening = true
-- Ultimate exchanging
@@ -467,7 +467,8 @@ do ----------------------
EVENT_MANAGER:UnregisterForEvent(self.Name, EVENT_BOSSES_CHANGED)
EVENT_MANAGER:UnregisterForEvent(self.Name, EVENT_PLAYER_COMBAT_STATE)
- UI.RemoveFragment()
+ --UI.RemoveFragment()
+ UI.HideAllElements()
listening = false
self.raidId = 0
self.raidDifficulty = 0
@@ -498,13 +499,14 @@ do ----------------------
end
-- UI Elements
+ UI.RegisterElement(RaidNotifierUI:GetNamedChild("UltimateWindow"), self.Vars.ultimate.hidden)
UI.RegisterElement(RaidNotifierUI:GetNamedChild("GlyphWindow"))
- --UI.RegisterElement(RaidNotifierUI:GetNamedChild("UltimateWindow"), self.Vars.ultimate.hidden)
- UI.RegisterElement(RaidNotifierUltimateWindow, self.Vars.ultimate.hidden)
-
if (self.Vars.mawLorkhaj.zhaj_glyphs_invert) then
UI.InvertGlyphs()
end
+ UI.LoadElements()
+ UI.AddFragment() --always add fragment now
+
-- These aren't needed anymore since we now start & stop Raid Notifier solely based on being in the raid zone
--EVENT_MANAGER:RegisterForEvent(self.Name, EVENT_RAID_TRIAL_STARTED, function(...) self:RegisterEvents() end)
diff --git a/RaidNotifier.txt b/RaidNotifier.txt
index a6eace2..92e308c 100644
--- a/RaidNotifier.txt
+++ b/RaidNotifier.txt
@@ -1,7 +1,7 @@
## Title: |cEFEBBERaidNotifier|r
## Description: Displays on-screen notifications on different events during trials.
## Author: |c009ad6Kyoma, Woeler, silentgecko|r
-## Version: 2.1.2
+## Version: 2.1.3
## APIVersion: 100019
## SavedVariables: RNVars
## OptionalDependsOn: LibAddonMenu-2.0 LibMapPing LibGPS2 LibGroupSocket
diff --git a/RaidNotifier.xml b/RaidNotifier.xml
index fcfa81c..7bd3b72 100644
--- a/RaidNotifier.xml
+++ b/RaidNotifier.xml
@@ -64,27 +64,27 @@
-
-
-
-
- self.label = self:GetNamedChild("Label")
- self.category = "ultimate"
- self.setting = "ulti_window"
-
-
-
-
-
-
+
+
+
+
+
+ self.label = self:GetNamedChild("Label")
+ self.category = "ultimate"
+ self.setting = "ulti_window"
+
+
+
+
+
diff --git a/UI.lua b/UI.lua
index 6bf6356..b5a6855 100644
--- a/UI.lua
+++ b/UI.lua
@@ -14,7 +14,6 @@ do
end
HUD_SCENE:AddFragment(UI_FRAGMENT)
HUD_UI_SCENE:AddFragment(UI_FRAGMENT)
- UI.LoadElements()
end
function UI.RemoveFragment()
if not UI_FRAGMENT then
@@ -55,6 +54,13 @@ do
control:SetHidden(hidden)
end
end
+
+ function UI.HideAllElements()
+ local parent = RaidNotifierUI
+ for k, elem in pairs(elements) do
+ elem:SetHidden(true)
+ end
+ end
function UI.GetElement(category, setting)
return elements[GetKey(category, setting)]