Broker/minimap icon => toggle on/off #93


  • New
  • Enhancment
Closed
Assigned to moonfann
  • _ForgeUser2083408 created this issue Feb 28, 2013

    What is the enhancement in mind? How should it look and feel?

    1. pressing the flower right now opens up only the addon options panel, but instead of this (at least instead of left-click (right-click options are fine)), I would LOVE if it turned all the tracking icons on minimap and worldmap off/on (toggle). As a nice touch, the broker icon could also swap to red (status:icons on) / grey (status: icons off).

    Whereas I love the addon, on times it's rather impossible to see anything else on world map (like where my raid members are in kun-lai summit for killing Sha) when the entire center of the zone is one big flowerfield) or in the city, when all the borders are covered with flower icons. AND it's rather frustrating to go to options and turn everything on/off separadetly, every time you want to see something.

    (yes I know, I can bind keys to toggle everything on and off, but still, I don't want to bind anything, I want mouse clickable toggle button that does this. On top of that, why there are 2 separate keybinds for this? Couldnt you add ONE single keybind that toggles both on and off?)

    2. The "flower" icon that appears right now only in broker, could also be doubled as minimap icon (for those who dont use any panels and bars) with option to disable it ofc.

  • _ForgeUser2083408 added the tags New Enhancment Feb 28, 2013
  • _ForgeUser2083408 edited title Feb 28, 2013
  • moonfann posted a comment Feb 28, 2013

    there are 2 seperate keybindings as 99% of the time the world map icons are fine for me, but when running around i toggle minimap often while farming before a raid.

  • _ForgeUser2083408 posted a comment Mar 1, 2013

    @kagaro: Go

    still, I would love if you added the toggle functionality to broker icon :)

  • Phanx posted a comment May 28, 2013

    Here's the modification I've been making to Config.lua after every update to make the Broker plugin useful for toggling icons, as I already have enough keybindings to assign and remember across every character I play, and don't have keyboard space or brain space to dedicate two bindings to toggling GatherMate icons.

    Replace lines 1349-1353:

        local launcher = DataBroker:NewDataObject("GatherMate2", {
            type = "launcher",
            icon = "Interface\\AddOns\\GatherMate2\\Artwork\\Icon.tga",
            OnClick = openOptions,
        })
    

    With this:

        local launcher = DataBroker:NewDataObject("GatherMate2", {
            type = "launcher",
            icon = "Interface\\AddOns\\GatherMate2\\Artwork\\Icon.tga",
            OnClick = function(obj, btn)
                if btn == "RightButton" then
                    return openOptions()
                elseif IsShiftKeyDown() then
                    GatherMate2.db.profile.showWorldMap = not GatherMate2.db.profile.showWorldMap
                else
                    GatherMate2.db.profile.showMinimap = not GatherMate2.db.profile.showMinimap
                end
                Config:UpdateConfig()
            end,
            OnTooltipShow = function(tip)
                tip:AddLine("GatherMate2")
                tip:AddLine(" ")
                tip:AddDoubleLine("Minimap Icons:", GatherMate2.db.profile.showMinimap and (GREEN_FONT_COLOR_CODE .. "Enabled|r") or (GRAY_FONT_COLOR_CODE .. "Disabled|r"))
                tip:AddDoubleLine("World Map Icons:", GatherMate2.db.profile.showWorldMap and (GREEN_FONT_COLOR_CODE .. "Enabled|r") or (GRAY_FONT_COLOR_CODE .. "Disabled|r"))
                tip:AddLine(" ")
                tip:AddLine("Click to toggle minimap icons.")
                tip:AddLine("Shift-click to toggle world map icons.")
                tip:AddLine("Right-click to open the options window.")
                tip:Show()
            end,
        })
    

    Kagaro/Nevcairiel -- any objections to me committing this patch (along with appropriate modifications to support localization)? I can't think of any reason why there would be objections, but who knows... :P


    Edited May 28, 2013
  • moonfann posted a comment May 29, 2013

    Go for it Phanx, ive just not had the time to get anything done lately. work is kicking my ass

  • Phanx posted a comment May 29, 2013

    Need the following localization keys added:

    L["Enabled"] = true
    L["Disabled"] = true
    L["Minimap Icons"] = true
    L["World Map Icons"] = true
    L["Click to toggle minimap icons."] = true
    L["Shift-click to toggle world map icons."] = true
    L["Right-click for options."] = true

    I'm just hardcoding them into GatherMate2-enUS.lua for now; I'll remove them once the keys are in the system.

  • moonfann posted a comment May 30, 2013

    I imported them into the locaization system

  • Phanx posted a comment Jun 1, 2013

    Committed. Ticket can be closed.


To post a comment, please login or register a new account.