Skip to content

Commit

Permalink
Fixed an error while trying to move the window by clicking and holdin…
Browse files Browse the repository at this point in the history
…g on a window line
  • Loading branch information
Tercioo committed Oct 9, 2022
1 parent 944178f commit b588d5e
Show file tree
Hide file tree
Showing 95 changed files with 1,630 additions and 1,662 deletions.
14 changes: 7 additions & 7 deletions API UI.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

local instance = Details:GetInstance (number)
local instance = Details:GetInstance(number)
returns the window object.

=============================================================
Expand Down Expand Up @@ -32,7 +32,7 @@ side = number, 1 = top side of the window, 2 = bottom.
instance:MicroDisplaysLock (is_locked)
is_locked = boolean, true is the micro displays are locked and cannot interact with the mouse.

instance:SetAutoHideMenu (enabled)
instance:SetAutoHideMenu(enabled)
enabled = boolean, if true, the buttons on window's title bar auto hide when the player isn't interacting with the window.

instance:SetBackdropTexture (texturename)
Expand All @@ -51,7 +51,7 @@ shadow = boolean, draw the outline shadow to the text.
instance:LeftMenuAnchorSide (side)
side = number, 1 = left, 2 = right, set the anchor point for buttons on window's title bar.

instance:SetFrameStrata (strata)
instance:SetFrameStrata(strata)
strata = string, "BACKGROUND", "LOW", "MEDIUM", "HIGH" or "DIALOG".

instance:ChangeSkin (skin_name)
Expand Down Expand Up @@ -146,7 +146,7 @@ direction = 1 top to bottom / 2 bottom to top
instance:HideStatusBar() // instance:ShowStatusBar()
Show or hide the statusbar for the window.

instance:StatusBarColor (r, g, b, a, no_save)
instance:StatusBarColor(r, g, b, a, no_save)
r, g, b, a = number, color to set,
no_save = boolean, if true, the values isn't set on the instance config table.

Expand Down Expand Up @@ -180,7 +180,7 @@ clickfunc = table {function, param1, param2, "left" or "right" button}

--------------------

Details:SetTooltipBackdrop (border_texture, border_size, border_color)
Details:SetTooltipBackdrop(border_texture, border_size, border_color)
border_texture = string, border name for SharedMedia.
border_size = number, border size.
border_color = table {r, g, b, a}
Expand All @@ -204,7 +204,7 @@ returns a table with instances objects of all instances inside the group.

--------------------

Details:SetWindowUpdateSpeed (interval, nosave)
Details:SetWindowUpdateSpeed(interval, nosave)
set the update speed of all windows, if nosave is true, it won't save this change (apply only).

Details:SetUseAnimations (enabled, nosave)
Expand All @@ -231,7 +231,7 @@ Open Forge Window.
Details:OpenRaidHistoryWindow()
Open Raid History Window.

Details.switch:ShowMe (instance object)
Details.switch:ShowMe(instance object)
Open the bookmark panel on the top of the desired window.

Details.switch:CloseMe()
Expand Down
6 changes: 3 additions & 3 deletions API.txt
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ there is two ways for do this:
for i, actor in damageContainer:ListActors() do
local amount = actor.targets [targetName]
if (amount and amount >= 1) then
tinsert (actorsAmount, {name = actor:name(), total = amount})
tinsert(actorsAmount, {name = actor:name(), total = amount})
end
end

Expand Down Expand Up @@ -705,7 +705,7 @@ end
local source = damageContainer:GetActor (sourceNpc)
local felfireVolleySpell = source:GetSpell (targetSpell)
if (felfireVolleySpell) then
for playerName, amount in pairs (felfireVolleySpell.targets) do
for playerName, amount in pairs(felfireVolleySpell.targets) do
--players who took damage from this ability
--now this result may be placed on a external table or .custom may also be used
local targetActor = damageContainer:GetActor (playerName)
Expand Down Expand Up @@ -755,7 +755,7 @@ Details.cache_npc_ids [90409] = npcName --for details!
for i, actor in damageContainer:ListActors() do
actor.custom = 0
end
for playerName, _ in pairs (actor.damage_from) do
for playerName, _ in pairs(actor.damage_from) do
local player = damageContainer:GetActor (playerName)
if (player:IsPlayer()) then --we only want players. pets always has their damage merged on its owner damage.
player.custom = actor.targets [npcName]
Expand Down
42 changes: 21 additions & 21 deletions Libs/DF/auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
DF.LoadingAuraAlertFrame = CreateFrame("frame", "DetailsFrameworkLoadingAurasAlert", UIParent, "BackdropTemplate")
DF.LoadingAuraAlertFrame:SetSize(340, 75)
DF.LoadingAuraAlertFrame:SetPoint("center")
DF.LoadingAuraAlertFrame:SetFrameStrata ("TOOLTIP")
DF.LoadingAuraAlertFrame:SetFrameStrata("TOOLTIP")
DF:ApplyStandardBackdrop (DF.LoadingAuraAlertFrame)
DF.LoadingAuraAlertFrame:SetBackdropBorderColor(1, 0.8, 0.1)

Expand Down Expand Up @@ -698,7 +698,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t

if not flag then
GameCooltip2:Preset (2)
GameCooltip2:SetOwner (self, "left", "right", 2, 0)
GameCooltip2:SetOwner(self, "left", "right", 2, 0)
GameCooltip2:SetOption("TextSize", 10)

local spellName, _, spellIcon = GetSpellInfo(value)
Expand All @@ -720,7 +720,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t

if (spellsWithSameName) then
GameCooltip2:Preset (2)
GameCooltip2:SetOwner (self, "left", "right", 2, 0)
GameCooltip2:SetOwner(self, "left", "right", 2, 0)
GameCooltip2:SetOption("TextSize", 10)

for i, spellID in ipairs(spellsWithSameName) do
Expand Down Expand Up @@ -779,7 +779,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local lineOnEnter = function(self)
self:SetBackdropColor(unpack (backdropColor_OnEnter))

--GameTooltip:SetOwner (self, "ANCHOR_CURSOR")
--GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
--GameTooltip:SetSpellByID(self.SpellID)
--GameTooltip:AddLine (" ")
--GameTooltip:Show()
Expand Down Expand Up @@ -842,11 +842,11 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
function scroll:DoRefresh()
local t = {}
local added = {}
for spellID, flag in pairs (scroll.OriginalData) do
for spellID, flag in pairs(scroll.OriginalData) do
local spellName, _, spellIcon = GetSpellInfo(spellID)
if (spellName and not added[tonumber(spellID) or 0]) then
local lowerSpellName = spellName:lower()
tinsert (t, {spellID, spellName, spellIcon, lowerSpellName, flag})
tinsert(t, {spellID, spellName, spellIcon, lowerSpellName, flag})
added[tonumber(spellID) or 0] = true
end
end
Expand Down Expand Up @@ -956,7 +956,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
self:SetBackdropColor(unpack (backdrop_color_on_enter))
local spellid = select (7, GetSpellInfo(self.value))
if (spellid) then
GameTooltip:SetOwner (self, "ANCHOR_CURSOR")
GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
GameTooltip:SetSpellByID(spellid)
GameTooltip:AddLine (" ")
GameTooltip:Show()
Expand Down Expand Up @@ -1090,12 +1090,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local spellID = get_spellID_from_string (spellName)

if (spellID) then
tinsert (f.db.aura_tracker.buff, spellID)
tinsert(f.db.aura_tracker.buff, spellID)
--[[
if not tonumber(spellName) then
tinsert (f.db.aura_tracker.buff, spellName)
tinsert(f.db.aura_tracker.buff, spellName)
else
tinsert (f.db.aura_tracker.buff, spellID)
tinsert(f.db.aura_tracker.buff, spellID)
end
]]--
else
Expand All @@ -1110,12 +1110,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
return
end

tinsert (f.db.aura_tracker.buff, spellID)
tinsert(f.db.aura_tracker.buff, spellID)
--[[
if not tonumber(text) then
tinsert (f.db.aura_tracker.buff, text)
tinsert(f.db.aura_tracker.buff, text)
else
tinsert (f.db.aura_tracker.buff, spellID)
tinsert(f.db.aura_tracker.buff, spellID)
end
]]--
end
Expand All @@ -1137,12 +1137,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local spellID = get_spellID_from_string (spellName)

if (spellID) then
tinsert (f.db.aura_tracker.debuff, spellID)
tinsert(f.db.aura_tracker.debuff, spellID)
--[[
if not tonumber(spellName) then
tinsert (f.db.aura_tracker.debuff, spellName)
tinsert(f.db.aura_tracker.debuff, spellName)
else
tinsert (f.db.aura_tracker.debuff, spellID)
tinsert(f.db.aura_tracker.debuff, spellID)
end
]]--
else
Expand All @@ -1157,14 +1157,14 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
return
end

tinsert (f.db.aura_tracker.debuff, spellID)
tinsert(f.db.aura_tracker.debuff, spellID)
--[[
if not tonumber(text) then
print(text)
tinsert (f.db.aura_tracker.debuff, text)
tinsert(f.db.aura_tracker.debuff, text)
else
print(spellID)
tinsert (f.db.aura_tracker.debuff, spellID)
tinsert(f.db.aura_tracker.debuff, spellID)
end
]]--
end
Expand Down Expand Up @@ -1247,9 +1247,9 @@ function DF:GetAllPlayerSpells (include_lower_case)
local spellType, spellId = GetSpellBookItemInfo (index, "player")
if (spellType == "SPELL") then
local spellName = GetSpellInfo(spellId)
tinsert (playerSpells, spellName)
tinsert(playerSpells, spellName)
if (include_lower_case) then
tinsert (playerSpells, lower (spellName))
tinsert(playerSpells, lower (spellName))
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion Libs/DF/colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ do
return defaultColors
end

for colorName, colorTable in pairs (defaultColors) do
for colorName, colorTable in pairs(defaultColors) do
DF.alias_text_colors [colorName] = colorTable
end

Expand Down
Loading

0 comments on commit b588d5e

Please sign in to comment.