Files
ice-hud/modules/PetInfo.lua
2010-10-27 13:47:36 +00:00

33 lines
898 B
Lua

local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local PetInfo = IceCore_CreateClass(IceTargetInfo)
-- Constructor --
function PetInfo.prototype:init()
PetInfo.super.prototype.init(self, "PetInfo", "pet")
end
function PetInfo.prototype:GetDefaultSettings()
local settings = PetInfo.super.prototype.GetDefaultSettings(self)
settings["enabled"] = false
settings["vpos"] = -150
settings["line2Tag"] = "[Level:DifficultyColor] [SmartRace:ClassColor] [HappyText:HappyColor] [PvPIcon] [InCombat ? 'Combat':Red]"
return settings
end
local function IcePetDropdown()
ToggleDropDownMenu(1, nil, PetFrameDropDown, "cursor")
end
function PetInfo.prototype:CreateFrame(redraw)
PetInfo.super.prototype.CreateFrame(self, redraw)
if not self.frame.menu or self.frame.menu ~= IcePetDropdown then
self.frame.menu = IcePetDropdown
end
end
-- Load us up
IceHUD.PetInfo = PetInfo:new()