Skip to content

Commit

Permalink
Version 2.1.3
Browse files Browse the repository at this point in the history
- Changed how the UI fragment is handled to allow the Ultimate Window to be used outside of trials. Use "/rnulti on|off".
- Fixed UI error on first countdown in HoF 4th boss. (DevMode)
  • Loading branch information
kyoma committed Jul 18, 2017
1 parent b6680a4 commit 8c5aed8
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 23 deletions.
14 changes: 8 additions & 6 deletions RaidNotifier.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -444,7 +444,7 @@ do ----------------------
end
EVENT_MANAGER:RegisterForEvent(self.Name, EVENT_PLAYER_COMBAT_STATE, OnCombatStateChanged)

UI.AddFragment()
--UI.AddFragment()
listening = true

-- Ultimate exchanging
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion RaidNotifier.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
30 changes: 15 additions & 15 deletions RaidNotifier.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,27 @@
</TopLevelControl>


<TopLevelControl name="RaidNotifierUltimateWindow" movable="true" mouseEnabled="true" resizeToFitDescendents="true" hidden="true" clampedToScreen ="true">
<Dimensions x="250" y="200" />
<Anchor point="TOPLEFT" relativeTo="GuiRoot" offsetX="100" offsetY="600" />
<OnInitialized>
self.label = self:GetNamedChild("Label")
self.category = "ultimate"
self.setting = "ulti_window"
</OnInitialized>
<Controls>
<Label name="$(parent)Label" font="ZoFontWinH3">
<Anchor point="TOPLEFT" offsetX="8" offsetY="8" text="TMP42" />
</Label>
</Controls>
</TopLevelControl>

<TopLevelControl name="RaidNotifierUI" hidden="true" mouseEnabled="true">
<Anchor point="TOPLEFT" relativeTo="GuiRoot" relativePoint="TOPLEFT" />
<Controls>
<Label name="$(parent)CenterAnnounce" font="ZoFontCenterScreenAnnounceLarge" hidden="true">
<Anchor point="CENTER" relativeTo="GuiRoot" offsetY="-100"/>
</Label>

<Control name="$(parent)UltimateWindow" movable="true" mouseEnabled="true" resizeToFitDescendents="true" hidden="true" clampedToScreen ="true">
<Dimensions x="250" y="200" />
<Anchor point="TOPLEFT" relativeTo="GuiRoot" offsetX="100" offsetY="600" />
<OnInitialized>
self.label = self:GetNamedChild("Label")
self.category = "ultimate"
self.setting = "ulti_window"
</OnInitialized>
<Controls>
<Label name="$(parent)Label" font="ZoFontWinH3">
<Anchor point="TOPLEFT" offsetX="8" offsetY="8" text="TMP42" />
</Label>
</Controls>
</Control>

<Control name="$(parent)GlyphWindow" movable="true" mouseEnabled="true" hidden="true" clampedToScreen ="true">
<Dimensions x="240" y="170" />
Expand Down
8 changes: 7 additions & 1 deletion UI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit 8c5aed8

Please sign in to comment.