update dt

This commit is contained in:
Bunny67
2018-07-23 17:31:48 +03:00
parent 2af649d399
commit 88052dd29f
5 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -196,7 +196,7 @@ function DT:AssignPanelToDataText(panel, data)
if data["eventFunc"] then
panel:SetScript("OnEvent", function()
data["eventFunc"](this, event, arg1, arg2, arg3)
data["eventFunc"](this, event)
end)
data["eventFunc"](panel, "ELVUI_FORCE_RUN")
end
@@ -210,7 +210,7 @@ function DT:AssignPanelToDataText(panel, data)
if data["onClick"] then
panel:SetScript("OnClick", function()
data["onClick"](this, arg1)
data["onClick"](this)
end)
end
+2 -2
View File
@@ -98,11 +98,11 @@ local function BuildFriendTable(total)
end
end
local function OnEvent(self, event, message)
local function OnEvent(self, event)
local _, onlineFriends = GetNumberFriends()
if event == "CHAT_MSG_SYSTEM" then
if not (find(message, friendOnline) or find(message, friendOffline)) then return end
if not (find(arg1, friendOnline) or find(arg1, friendOffline)) then return end
end
dataValid = false
+2 -2
View File
@@ -34,8 +34,8 @@ local function OnEvent(self)
ElvDB["gold"][E.myrealm][E.myname] = NewMoney
end
local function OnClick(self, btn)
if btn == "RightButton" and IsShiftKeyDown() then
local function OnClick(self)
if arg1 == "RightButton" and IsShiftKeyDown() then
ElvDB.gold = nil
OnEvent(self)
DT.tooltip:Hide()
+6 -6
View File
@@ -103,20 +103,20 @@ local eventHandlers = {
end,
["PLAYER_GUILD_UPDATE"] = GuildRoster,
-- our guild message of the day changed
["GUILD_MOTD"] = function(self, arg1)
["GUILD_MOTD"] = function(self)
guildMotD = arg1
end,
["ELVUI_FORCE_RUN"] = function()
GuildRoster()
end, -- Temporarily
["ELVUI_FORCE_RUN"] = E.noop,
["ELVUI_COLOR_UPDATE"] = E.noop,
["PLAYER_LOGIN"] = GuildRoster, -- Temporarily
}
local function OnEvent(self, event, arg1)
local function OnEvent(self, event)
lastPanel = self
if IsInGuild() then
eventHandlers[event](self, arg1)
eventHandlers[event](self, event)
self.text:SetText(format(displayString, getn(guildTable)))
else
+3 -3
View File
@@ -45,10 +45,10 @@ local function ToggleGameMenuFrame()
end
end
local function OnClick(_, btn)
if btn == "RightButton" then
local function OnClick()
if arg1 == "RightButton" then
collectgarbage()
elseif btn == "LeftButton" then
elseif arg1 == "LeftButton" then
ToggleGameMenuFrame()
end
end