From 58e6f6a14d5d0e6625f2043ce580f9edd621d9d5 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Tue, 23 Sep 2014 14:06:59 +0400 Subject: [PATCH] Well. I derped --- ElvUI_SLE/modules/farm.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ElvUI_SLE/modules/farm.lua b/ElvUI_SLE/modules/farm.lua index 27d8b4e..c689fe8 100644 --- a/ElvUI_SLE/modules/farm.lua +++ b/ElvUI_SLE/modules/farm.lua @@ -416,6 +416,14 @@ function F:UpdateLayout(event, unit) --don't touch ResizeFrames() end +local function AutoTarget(button) + local container, slot = SLE:BagSearch(button.itemId) + if container and slot then + button:SetAttribute("type", "macro") + button:SetAttribute("macrotext", format("/targetexact %s \n/use %s %s", L["Tilled Soil"], container, slot)) + end +end + local function onClick(self, mousebutton) if mousebutton == "LeftButton" then if InCombatLockdown() and not self.macro then @@ -445,7 +453,7 @@ end local function onEnter(self) GameTooltip:SetOwner(self, 'ANCHOR_TOPLEFT', 2, 4) GameTooltip:ClearLines() - GameTooltip:AddDoubleLine(self.sortname) + GameTooltip:AddLine("|cffFFFFFF"..self.sortname.."|r") if self.allowDrop then GameTooltip:AddLine(L['Right-click to drop the item.']) end @@ -456,13 +464,7 @@ local function onLeave() GameTooltip:Hide() end -local function AutoTarget(button) - local container, slot = SLE:BagSearch(button.itemId) - if container and slot then - button:SetAttribute("type", "macro") - button:SetAttribute("macrotext", format("/targetexact %s \n/use %s %s", L["Tilled Soil"], container, slot)) - end -end + local function CreateFarmButton(index, owner, buttonType, name, texture, allowDrop, id) size = E.db.sle.farm.size -- 1.7.9.5