diff --git a/Bartender4.lua b/Bartender4.lua index 3a4e35a..b0ce81e 100644 --- a/Bartender4.lua +++ b/Bartender4.lua @@ -107,3 +107,33 @@ function Bartender4.modulePrototype:ToggleOptions() end end Bartender4:SetDefaultModulePrototype(Bartender4.modulePrototype) + +local L_BT_LEFT = L["|cffffff00Click|r to toggle bar lock"] +local L_BT_RIGHT = L["|cffffff00Right-click|r to open the options menu"] + +LibStub("LibDataBroker-1.1"):NewDataObject("Bartender4", { + type = "launcher", + text = "Bartender4", + OnClick = function(_, msg) + if msg == "LeftButton" then + if Bartender4.Locked then + Bartender4["Unlock"](Bartender4) + else + Bartender4["Lock"](Bartender4) + end + elseif msg == "RightButton" then + if LibStub("AceConfigDialog-3.0").OpenFrames["Bartender4"] then + LibStub("AceConfigDialog-3.0"):Close("Bartender4") + else + LibStub("AceConfigDialog-3.0"):Open("Bartender4") + end + end + end, + icon = "Interface\\Icons\\INV_Drink_05", + OnTooltipShow = function(tooltip) + if not tooltip or not tooltip.AddLine then return end + tooltip:AddLine("Bartender4") + tooltip:AddLine(L_BT_LEFT) + tooltip:AddLine(L_BT_RIGHT) + end, +}) diff --git a/locale/deDE.lua b/locale/deDE.lua index 8a0d00d..44d4539 100644 --- a/locale/deDE.lua +++ b/locale/deDE.lua @@ -110,3 +110,5 @@ if not L then return end -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true -- L["Zoom"] = true +-- L["|cffffff00Click|r to toggle bar lock"] = true +-- L["|cffffff00Right-click|r to open the options menu"] = true diff --git a/locale/enUS.lua b/locale/enUS.lua index 70542a0..062905c 100644 --- a/locale/enUS.lua +++ b/locale/enUS.lua @@ -110,3 +110,5 @@ L["Visibility"] = true L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true L["Zoom"] = true +L["|cffffff00Click|r to toggle bar lock"] = true +L["|cffffff00Right-click|r to open the options menu"] = true diff --git a/locale/esES.lua b/locale/esES.lua index 3dbdfd3..dbdc745 100644 --- a/locale/esES.lua +++ b/locale/esES.lua @@ -110,3 +110,5 @@ if not L then return end -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true -- L["Zoom"] = true +-- L["|cffffff00Click|r to toggle bar lock"] = true +-- L["|cffffff00Right-click|r to open the options menu"] = true diff --git a/locale/frFR.lua b/locale/frFR.lua index c5be9bc..5b85113 100644 --- a/locale/frFR.lua +++ b/locale/frFR.lua @@ -110,3 +110,5 @@ L["Toggle the use of the right-click self-cast functionality."] = "Utilise ou no -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true L["Zoom"] = "Zoom" +-- L["|cffffff00Click|r to toggle bar lock"] = true +-- L["|cffffff00Right-click|r to open the options menu"] = true diff --git a/locale/koKR.lua b/locale/koKR.lua index 4d56aa1..737861a 100644 --- a/locale/koKR.lua +++ b/locale/koKR.lua @@ -110,3 +110,5 @@ L["Toggle the use of the right-click self-cast functionality."] = "우-클릭시 -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true L["Zoom"] = "확대" +-- L["|cffffff00Click|r to toggle bar lock"] = true +-- L["|cffffff00Right-click|r to open the options menu"] = true diff --git a/locale/ruRU.lua b/locale/ruRU.lua index 6a4e7c7..bd82fc3 100644 --- a/locale/ruRU.lua +++ b/locale/ruRU.lua @@ -110,3 +110,5 @@ L["Toggle the use of the right-click self-cast functionality."] = "Перекл -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true L["Zoom"] = "Увеличение" +-- L["|cffffff00Click|r to toggle bar lock"] = true +-- L["|cffffff00Right-click|r to open the options menu"] = true diff --git a/locale/zhCN.lua b/locale/zhCN.lua index 49f1186..f8dfa24 100644 --- a/locale/zhCN.lua +++ b/locale/zhCN.lua @@ -110,3 +110,5 @@ L["Toggle the use of the right-click self-cast functionality."] = "关闭/开启 -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true L["Zoom"] = "缩放" +-- L["|cffffff00Click|r to toggle bar lock"] = true +-- L["|cffffff00Right-click|r to open the options menu"] = true diff --git a/locale/zhTW.lua b/locale/zhTW.lua index 9fb148b..6cb0fd5 100644 --- a/locale/zhTW.lua +++ b/locale/zhTW.lua @@ -110,3 +110,5 @@ L["Toggle the use of the right-click self-cast functionality."] = "切換使用 -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true L["Zoom"] = "放大" +-- L["|cffffff00Click|r to toggle bar lock"] = true +-- L["|cffffff00Right-click|r to open the options menu"] = true