ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   Please fix this lua for me (Repair Compare) (https://www.esoui.com/forums/showthread.php?t=1685)

Tonyleila 05/31/14 08:35 AM

Please fix this lua for me (Repair Compare)
 
Some weeks ago I requested at the CraftCompare AddOn to add the tooltips to the repair window.
I often just repair the gear I have equiped, I save the old parts for analysis.
Therefor I don't have to repair them. So I always have to remember what I have equiped when I repair items.

The Author Ckaotik replyed this some weeks ago but its not working for me (or I'm just to stupid to make an addon from it)?

Quote:

Originally Posted by ckaotik
Simply pop it into any addon, doesn't even have to be after EVENT_ADD_ON_LOADED.

Code:

ZO_PreHook(ZO_RepairWindowList.dataTypes[1], 'setupCallback', function(self, data, list)
        local icon = self:GetNamedChild('EquippedIndicator')
        if data.bagId == BAG_WORN then
                if not icon then
                        icon = wm:CreateControl(self:GetName()..'EquippedIndicator', self, CT_TEXTURE)
                        icon:SetAnchor(CENTER, self:GetNamedChild('ButtonIcon'), CENTER, 0, 0)
                        icon:SetDrawTier(DT_LOW)
                        icon:SetDimensions(50, 50)
                        icon:SetTexture('/esoui/art/actionbar/passiveabilityframe_round_over.dds')
                end
                icon:SetHidden(false)
        elseif icon then
                icon:SetHidden(true)
        end
end)

This will display a shiny blue circle behind equipped items when in a repair screen. Or so I hope it works :P

Sadly the code he posted here dosen't work for me. I just put it on the bottom of the craft compare lua and now Its not showing anything anymore (no items or names) in the repair window.

Maybe someone can upload this as an addon that works? That woud be great!

thelegendaryof 05/31/14 09:14 AM

Quote:

icon = wm:CreateControl(self:GetName()..'EquippedIndicator', self, CT_TEXTURE)

wm is undefined either you define it - or just use

Quote:

icon = WINDOW_MANAGER:CreateControl(self:GetName()..'EquippedIndicator', self, CT_TEXTURE)
and it works. :)

ckaotik 05/31/14 11:49 AM

Oops, guess I missed that. Thanks, thelegendaryof for solving the issue :)

Tonyleila 05/31/14 03:28 PM

Thank you! Can't test atm :( Not at home and the old ESO 3gb patch loads with 80kbs-120kbs here since 2 days -_-


All times are GMT -6. The time now is 02:59 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI