
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

  <Script file="Nightfall.lua" />

  <Frame name="NightfallEffectTemplate" hidden="true" setAllPoints="true" virtual="true">
    <Scripts>
      <OnLoad>
        this:SetAlpha(0)
      </OnLoad>
    </Scripts>
  </Frame>   

  <Frame name="NightfallFrame" parent="WorldFrame" setAllPoints="true">
    <Frames>
      <Frame name="$parentEffect1" inherits="NightfallEffectTemplate">
        <Layers>
          <Layer level="BACKGROUND">
            <Texture name="$parentTexture" file="Interface\Addons\LifeSafer_LowHealthWarning\Textures\flash1.tga" alphaMode="ADD" />
          </Layer>
        </Layers>
      </Frame>
      <Frame name="$parentEffect2" inherits="NightfallEffectTemplate">
        <Layers>
          <Layer level="BACKGROUND">
            <Texture name="$parentTexture" file="Interface\Addons\LifeSafer_LowHealthWarning\Textures\flash2.tga" alphaMode="ADD" />
          </Layer>
        </Layers>
      </Frame>
    </Frames>

    <Scripts>
      <OnLoad>
        LifeSafer_Nightfall_OnLoad()
        this:RegisterEvent("VARIABLES_LOADED")
      </OnLoad>
      <OnEvent>
        if (event == "VARIABLES_LOADED") then
          LifeSafer_Nightfall_ApplySettings()
        else
          LifeSafer_Nightfall_OnEvent(event)
        end
      </OnEvent>
    </Scripts>
  </Frame>

</Ui>
