/trunk/OneCompanion/frames
bgFile = [[Interface\Buttons\UI-SliderBar-Background]], |
edgeFile = [[Interface\Buttons\UI-SliderBar-Border]], |
tile = true, tileSize = 8, edgeSize = 8, |
insets = { left = 3, right = 3, top = 3, bottom = 3 } } |
insets = { left = 3, right = 3, top = 3, bottom = 3 } |
} |
texture:SetAllPoints(breanni) |
texture:SetTexture([[Interface\AddOns\OneCompanion\textures\breanni]]) |
breanni:SetPoint(self.db.profile.sizes.breannipt, UIParent, self.db.profile.sizes.breannirpt, self.db.profile.sizes.breannix, self.db.profile.sizes.breanniy) |
slider:SetValueStep(0.001) |
slider:SetValue(0) |
slider:SetScript("OnValueChanged", function(this) |
local max = child:GetHeight() - scrollindex:GetHeight() |
local val = this:GetValue() * max |
local max_ = child:GetHeight() - scrollindex:GetHeight() |
local val = this:GetValue() * max_ |
if math.abs(scrollindex:GetVerticalScroll() - val) < 1 then |
return |
end |
j:Hide() |
end |
for i = 1, mount + critter do |
local slot = CreateFrame("Button", "OneCompanionSlot" .. i, fra.child, "BankItemButtonGenericTemplate") |
local slot = CreateFrame("CheckButton", "OneCompanionSlot" .. i, fra.child, "BankItemButtonGenericTemplate") |
local cool = CreateFrame("Cooldown", "OneCompanionSlot" .. i .. "Cooldown", slot, "CooldownFrameTemplate") |
local texture, type, petID = slot:CreateTexture("OneCompanionTexture" .. i), nil, nil |
if i <= mount then type = "MOUNT" petID = i else type = "CRITTER" petID = i - mount end |
if i <= mount then type = "MOUNT" petID = i |
else type = "CRITTER" petID = i - mount end |
local creatureID, creatureName, spellID, icon, active = GetCompanionInfo(type, petID) |
slot.cool, slot.type, slot.petID, slot.creatureID, slot.creatureName, slot.spellID, slot.active = cool, type, petID, creatureID, creatureName, spellID, active |
cool:SetAllPoints(slot) |
fra.model:Show() |
fra.ShowSlider() |
fra.modelindex:SetCreature(creatureID) |
elseif SpellCanTargetItem() then |
self:Print("Will be implemented when Blizzard will. Yet you can enchant mounts only when they are in you inventory before learning them.") |
else |
local creatureID, creatureName, spellID, icon, active = GetCompanionInfo(type, petID) |
if active then |