vanilla-wow-addons – Rev 1

Subversion Repositories:
Rev:

<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="LowHealth.lua" />

  <Frame name="LowHealthWarningFrame">
    <Scripts>
      <OnLoad>
        -- initialize data
        TNE_LowHealth_OnLoad()
        -- register meta events
        this:RegisterEvent("VARIABLES_LOADED")
        this:RegisterEvent("PLAYER_LEAVING_WORLD")
        this:RegisterEvent("PLAYER_ENTERING_WORLD")
      </OnLoad>
      <OnEvent>
        -- lazy filter for health/mana events
        if (arg1 and arg1 == "player") then
          TNE_LowHealth_OnEvent(event)
        -- handle meta events and zoning
        elseif (event == "VARIABLES_LOADED" or this.running) then
          TNE_LowHealth_ApplySettings(event == "PLAYER_LEAVING_WORLD")
          -- this.running is not true before VARIABLES_LOADED as we don't
          -- want to do anything until we have the correct settings
          this.running = true
        end
      </OnEvent>
    </Scripts>
  </Frame>

  <Frame name="LHTest1">
    <Layers>
      <Layer level="BACKGROUND">
        <Texture name="$parentTexture" file="Interface\AddOns\TNE_LowHealthWarning\Textures\lowhealth1.tga" alphaMode="ADD" />
      </Layer>
    </Layers>
  </Frame>

</Ui>