hey together,
so i'm working on my UI and having this small little problem.
button to show or hide recount. this works without any problems.
but now i wanted a right click functionality.
idea was born and with it the problem
Code:-- Meter --------------------------------------------------------------------------- ------------------------------------------------------------------------------------ local MyMeterButton = MyAddonButtonTemplate(nil, MyMinimapButton, 60, 18, "LEFT",-67,0) MyMeterButton:RegisterForClicks("LeftButtonUp", "RightButtonUp") local s = MyMeterButton:CreateFontString(nil,"ARTWORK") s:SetFont("Interface\\Addons\\zMedia\\fonts\\HOOGE.TTF", 14, "OUTLINE") s:SetPoint("CENTER", 0, 0) s:SetTextColor(1,1,1,1) s:SetText("Meter") MyRecountLock = function() if Recount:LockWindows(true) then Recount:LockWindows(false) else Recount:LockWindows(true) end end MyMeterButton:SetScript("OnClick", function(self, button) if button == "LeftButton" then ToggleFrame(Recount_MainWindow) elseif button == "RightButton" then MyRecountLock() end end) if cfg.COLORING == "Class" then MyMeterButton:SetScript("OnEnter", function(self) s:SetTextColor(c.r,c.g,c.b,1) end) elseif cfg.COLORING == "Custom" then MyMeterButton:SetScript("OnEnter", function(self) s:SetTextColor(unpack(cfg.CUSTOMColor)) end) else MyMeterButton:SetScript("OnEnter", function(self) s:SetTextColor(1,1,1,1) end) end MyMeterButton:SetScript("OnLeave", function(self) s:SetTextColor(1,1,1,1) end)
thats what i have. last try was this MyRecountLock function but it did not work.
how can i solve this problem? how cant i add "/recount lock" in my on click script. think thats the easiest solution.
i'm hope someone can help me
p.s.
i know it's slash and not shlash![]()

MMO-Champion
Reply With Quote
