• 0

    posted a message on adibags iteratefilters() doesn't seem to check all filters.

    I'm banging my head on the wall not understanding why a simple compare isn't ever matching.

    When i run 

    -- Check for existing filter
    local function CheckFilter(newFilter)
    	print("\n---- " .. newFilter .. "------")
    	for i, filter in AdiBags:IterateFilters() do
    		local currentFilter = filter.uiName
    		print(i, newFilter, " = " .. currentFilter)
    		if newFilter == currentFilter then
    			print(newFilter .. " : is in use")
    			return true
    		end
    	end
    end

     I would expect the printout to show every filter and checking adibags filter tab shows a clear discrepancy.  My current work is HERE
    I know for sure the iterate isn't full functioning because I have several other filters in adibags that are never shown during the print routine.
    They show and work fine in adibags but don't print out in this one.

    Posted in: AddOn HELP!
  • 0

    posted a message on Minimap button confusion

    I'm sooooo confused.  I'm trying to put a new button on the minimap using libDBIcon-1.0.

    The existing code is awfully lengthy and doesn't create a nice button at all.

    I'm stuck on what to do after creating the icon variable.

    This is my first big addon so please pardon the dumbness.

     

    This is what's currently there...

    local MiniMapTexture = "Interface\\AddOns\\Healme\\images\\heartx64.tga"  -- Heart

    -- Register icon api
    local icon = LibStub("Interface\\AddOns\\Healme\\libs\\DBI\\LibDBIcon-1.0\\LibDBIcon-1.0")
    icon:Register("")

    function Healme_CreateMiniMapButton()
    local button = CreateFrame("Button", "HealmeMiniMap", Minimap)
    --button:SetFrameStrata("MEDIUM") -- needed or else appears underneath

    button.icon = button:CreateTexture("icon","BACKGROUND")
    button.overlay = button:CreateTexture("icon","OVERLAY")
    button.icon:SetAllPoints()
    button.overlay:SetAllPoints()

    local highlight = button:CreateTexture(nil, "HIGHLIGHT")
    highlight:SetBlendMode("ADD")
    highlight:SetPoint("CENTER", button, "CENTER")
    highlight:SetWidth(32)
    highlight:SetHeight(32)

    button:SetPushedTexture("Interface/Buttons/UI-Quickslot-Depress")

    highlight:SetTexture("Interface/Minimap/UI-Minimap-ZoomButton-Highlight")

    local tex = button:CreateTexture("MinimapButtonOverlay", "OVERLAY")
    tex:SetTexture("Interface/Minimap/MiniMap-TrackingBorder")
    tex:SetPoint("CENTER", button, "CENTER", 11, -11)
    tex:SetWidth(54)
    tex:SetHeight(54)

    button.icon:SetTexture(MiniMapTexture)

    button:EnableMouse(1)
    button:RegisterForDrag("RightButton")
    button:RegisterForClicks("LeftButtonUp")
    button:SetHeight(18)
    button:SetWidth(18)

    button:SetPoint("TOPLEFT","Minimap","TOPLEFT",62-(80*cos(5)),(80*sin(5))-62)

    button:SetScript("OnEnter", function(frame)
    GameTooltip:SetOwner(frame, "ANCHOR_LEFT")
    GameTooltip:SetText(Healme_AddonColor .. Healme_AddonName .. "|r |n|cFF55FF55Left Mouse |cFFFFFFFF" .. Healme_AddonName .. " Menu|n|cFF55FF55Right Mouse |cFFFFFFFFMove Button|n|cFF55FF55Shift & Left Mouse |cFFFFFFFF Toggle Frames")
    GameTooltip:Show()
    end)

    button:SetScript("OnLeave", function(frame)
    GameTooltip:Hide()
    end)

    -- [ Lua Only Approach For Making Dragable Frames (With Right Mouse Only) ]
    button:SetMovable(true)
    button:EnableMouse(true)
    local OnMouseDown = function(frame) if(IsMouseButtonDown("RightButton")) then frame:StartMoving() end end
    button:SetScript("OnMouseDown", OnMouseDown)
    button:SetScript("OnMouseUp",function(frame) frame:StopMovingOrSizing() end)

    button:SetScript("OnClick",function(frame) -------------------------

    if not (IsShiftKeyDown()) then
    Lib_ToggleDropDownMenu(1, nil, HealmeMenu, frame, 0, 0)
    end

    if (IsShiftKeyDown()) then
    Healme_ToggleAllFrames()
    end

    end) ------------------------------------------------------------------

    Healme_MMButton = button

    end
    Posted in: Map/Minimap AddOns
  • 0

    posted a message on How to localize common words

    How can I automatically localize common words like
    Bait

    leather

    tailoring

    mining

    etc.

    Posted in: WoW
  • To post a comment, please or register a new account.