Skip to content

Commit

Permalink
adding option to hide minimap button
Browse files Browse the repository at this point in the history
  • Loading branch information
mooreatv committed Oct 18, 2020
1 parent caba7af commit 8b89728
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 14 additions & 1 deletion AuctionDB/AuctionDB.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ ADB.savePosSuffix = "buttonPos" -- button pos is button.name .. savePosSuffix

function ADB:SetupMenu()
ADB:WipeFrame(ADB.mmb)
if ADB.hideMinimap then
ADB:Debug("Not showing minimap button per config")
return
else
ADB:Debug("Showing minimap button per config")
end
ADB.minimapButtonAngle = 0
local name = "AHDBminimapButton"
local b = ADB:minimapButton(ADB[name .. ADB.savePosSuffix], name, "Interface/Addons/AuctionDB/AuctionDB.blp")
Expand Down Expand Up @@ -541,9 +547,12 @@ function ADB:CreateOptionsPanel()
L["Shows, if checked, the big button prompting you to go do a scan; hides if unchecked."])
:Place(4, 20)

local hideMinimap = p:addCheckBox(L["Hide minimap button"],
L["When check the minimap button is hidden."]):PlaceRight(30)

local disableKeybinds = p:addCheckBox(L["Disable key bindings"],
L["Disable the automatic temporary keybinding when a scan is possible."])
:PlaceRight(40)
:PlaceRight(30)

local showText = p:addCheckBox(L["Show text about scan possible and commands"],
L["Shows or disable the text indicating a scan is possible" ..
Expand Down Expand Up @@ -594,6 +603,7 @@ function ADB:CreateOptionsPanel()
disableKeybinds:SetChecked(ADB.disableKeybinds)
showText:SetChecked(ADB.showText)
waitForSellers:SetChecked(ADB.ahWaitForSellers)
hideMinimap:SetChecked(ADB.hideMinimap)
end

function p:HandleOk()
Expand Down Expand Up @@ -623,6 +633,9 @@ function ADB:CreateOptionsPanel()
ADB:SetSaved("disableKeybinds", disableKeybinds:GetChecked())
ADB:SetSaved("showText", showText:GetChecked())
ADB:SetSaved("ahWaitForSellers", waitForSellers:GetChecked())
if ADB:SetSaved("hideMinimap", hideMinimap:GetChecked()) == 1 then
ADB:SetupMenu()
end
if ADB:SetSaved("allowLDBI", allowLDBI:GetChecked()) == 1 then
ADB:SetupMenu()
end
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Coming next:
- Your input/suggestions welcome !
- See open issues for ideas https://github.com/mooreatv/AuctionDB/issues

v1.04.00 Oct 18th 2020
- Added option to hide minimap button in config `/ahdb conf`

v1.03.01 Aug 8th 2020
- Misc dev mode improvements: Seen filter for lowbid is now a set and corrected whisper message.

Expand Down

0 comments on commit 8b89728

Please sign in to comment.