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 if data["eventFunc"] then
panel:SetScript("OnEvent", function() panel:SetScript("OnEvent", function()
data["eventFunc"](this, event, arg1, arg2, arg3) data["eventFunc"](this, event)
end) end)
data["eventFunc"](panel, "ELVUI_FORCE_RUN") data["eventFunc"](panel, "ELVUI_FORCE_RUN")
end end
@@ -210,7 +210,7 @@ function DT:AssignPanelToDataText(panel, data)
if data["onClick"] then if data["onClick"] then
panel:SetScript("OnClick", function() panel:SetScript("OnClick", function()
data["onClick"](this, arg1) data["onClick"](this)
end) end)
end end
+2 -2
View File
@@ -98,11 +98,11 @@ local function BuildFriendTable(total)
end end
end end
local function OnEvent(self, event, message) local function OnEvent(self, event)
local _, onlineFriends = GetNumberFriends() local _, onlineFriends = GetNumberFriends()
if event == "CHAT_MSG_SYSTEM" then 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 end
dataValid = false dataValid = false
+2 -2
View File
@@ -34,8 +34,8 @@ local function OnEvent(self)
ElvDB["gold"][E.myrealm][E.myname] = NewMoney ElvDB["gold"][E.myrealm][E.myname] = NewMoney
end end
local function OnClick(self, btn) local function OnClick(self)
if btn == "RightButton" and IsShiftKeyDown() then if arg1 == "RightButton" and IsShiftKeyDown() then
ElvDB.gold = nil ElvDB.gold = nil
OnEvent(self) OnEvent(self)
DT.tooltip:Hide() DT.tooltip:Hide()
+6 -6
View File
@@ -103,20 +103,20 @@ local eventHandlers = {
end, end,
["PLAYER_GUILD_UPDATE"] = GuildRoster, ["PLAYER_GUILD_UPDATE"] = GuildRoster,
-- our guild message of the day changed -- our guild message of the day changed
["GUILD_MOTD"] = function(self, arg1) ["GUILD_MOTD"] = function(self)
guildMotD = arg1 guildMotD = arg1
end, end,
["ELVUI_FORCE_RUN"] = function() ["ELVUI_FORCE_RUN"] = E.noop,
GuildRoster()
end, -- Temporarily
["ELVUI_COLOR_UPDATE"] = E.noop, ["ELVUI_COLOR_UPDATE"] = E.noop,
["PLAYER_LOGIN"] = GuildRoster, -- Temporarily
} }
local function OnEvent(self, event, arg1) local function OnEvent(self, event)
lastPanel = self lastPanel = self
if IsInGuild() then if IsInGuild() then
eventHandlers[event](self, arg1) eventHandlers[event](self, event)
self.text:SetText(format(displayString, getn(guildTable))) self.text:SetText(format(displayString, getn(guildTable)))
else else
+3 -3
View File
@@ -45,10 +45,10 @@ local function ToggleGameMenuFrame()
end end
end end
local function OnClick(_, btn) local function OnClick()
if btn == "RightButton" then if arg1 == "RightButton" then
collectgarbage() collectgarbage()
elseif btn == "LeftButton" then elseif arg1 == "LeftButton" then
ToggleGameMenuFrame() ToggleGameMenuFrame()
end end
end end