Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Oct 23, 2020
1 parent 4cf0bf3 commit 701baee
Show file tree
Hide file tree
Showing 22 changed files with 718 additions and 95 deletions.
2 changes: 1 addition & 1 deletion Libs/DF/LibDFramework-1.0.toc
@@ -1,4 +1,4 @@
## Interface: 80000
## Interface: 90001
## Title: Lib: LibDFramework-1.0
## Notes: Base Framework for many Addons

Expand Down
Binary file removed Libs/DF/background.tga
Binary file not shown.
Binary file removed Libs/DF/border_1.tga
Binary file not shown.
Binary file removed Libs/DF/border_2.tga
Binary file not shown.
Binary file removed Libs/DF/border_3.tga
Binary file not shown.
2 changes: 0 additions & 2 deletions Libs/DF/button.lua
Expand Up @@ -1071,8 +1071,6 @@ function DF:NewButton (parent, container, name, member, w, h, func, param1, para
build_button (ButtonObject.button)

ButtonObject.widget = ButtonObject.button

--ButtonObject.button:SetBackdrop ({bgFile = DF.folder .. "background", tileSize = 64, edgeFile = DF.folder .. "border_2", edgeSize = 10, insets = {left = 1, right = 1, top = 1, bottom = 1}})
ButtonObject.button:SetBackdropColor (0, 0, 0, 0.4)
ButtonObject.button:SetBackdropBorderColor (1, 1, 1, 1)

Expand Down
31 changes: 16 additions & 15 deletions Libs/DF/cooltip.lua
Expand Up @@ -289,11 +289,12 @@ function DF:CreateCoolTip()
--> build widgets for frame
build_main_frame (frame1)

GameCooltipFrame1_FrameBackgroundCenter:SetTexture (DF.folder .. "cooltip_background")
--is this still in use?
GameCooltipFrame1_FrameBackgroundCenter:SetTexture ([[Interface\Tooltips\UI-Tooltip-Background]])
GameCooltipFrame1_FrameBackgroundCenter:SetTexCoord (0.10546875, 0.89453125, 0, 1)
GameCooltipFrame1_FrameBackgroundLeft:SetTexture (DF.folder .. "cooltip_background")
GameCooltipFrame1_FrameBackgroundLeft:SetTexture ([[Interface\Tooltips\UI-Tooltip-Background]])
GameCooltipFrame1_FrameBackgroundLeft:SetTexCoord (0, 0.103515625, 0, 1)
GameCooltipFrame1_FrameBackgroundRight:SetTexture (DF.folder .. "cooltip_background")
GameCooltipFrame1_FrameBackgroundRight:SetTexture ([[Interface\Tooltips\UI-Tooltip-Background]])
GameCooltipFrame1_FrameBackgroundRight:SetTexCoord (0.896484375, 1, 0, 1)

--> secondary frame
Expand All @@ -319,11 +320,12 @@ function DF:CreateCoolTip()

frame2:SetPoint ("bottomleft", frame1, "bottomright", 4, 0)

GameCooltipFrame2_FrameBackgroundCenter:SetTexture (DF.folder .. "cooltip_background")
--is this still in use?
GameCooltipFrame2_FrameBackgroundCenter:SetTexture ([[Interface\Tooltips\UI-Tooltip-Background]])
GameCooltipFrame2_FrameBackgroundCenter:SetTexCoord (0.10546875, 0.89453125, 0, 1)
GameCooltipFrame2_FrameBackgroundLeft:SetTexture (DF.folder .. "cooltip_background")
GameCooltipFrame2_FrameBackgroundLeft:SetTexture ([[Interface\Tooltips\UI-Tooltip-Background]])
GameCooltipFrame2_FrameBackgroundLeft:SetTexCoord (0, 0.103515625, 0, 1)
GameCooltipFrame2_FrameBackgroundRight:SetTexture (DF.folder .. "cooltip_background")
GameCooltipFrame2_FrameBackgroundRight:SetTexture ([[Interface\Tooltips\UI-Tooltip-Background]])
GameCooltipFrame2_FrameBackgroundRight:SetTexCoord (0.896484375, 1, 0, 1)

CoolTip.frame1 = frame1
Expand Down Expand Up @@ -3335,23 +3337,23 @@ function DF:CreateCoolTip()
end
end
return ture
return true
end
--> all done
CoolTip:ClearAllOptions()
-- local preset2_backdrop = {bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = DF.folder .. "border_3", tile=true,
-- edgeSize = 16, tileSize = 64, insets = {left = 3, right = 3, top = 4, bottom = 4}}
local preset2_backdrop = {bgFile = DF.folder .. "background", edgeFile = [[Interface\Buttons\WHITE8X8]], tile = true,
edgeSize = 1, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local preset2_backdrop = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,
tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local default_backdrop_color = {0.09019, 0.09019, 0.18823, 0.8}
local default_backdropborder_color = {1, 1, 1, 1}
local gray_table = {0.37, 0.37, 0.37, 0.95}
local white_table = {1, 1, 1, 1}
local black_table = {0.2, 0.2, 0.2, 1}
local backdropColorPreset2 = {.2, .2, .2, 1}
local borderColorPreset2 = {.2, .2, .2, 1}
function CoolTip:Preset (number)
self:Reset()
Expand All @@ -3373,11 +3375,10 @@ function DF:CreateCoolTip()
self:SetOption ("ButtonsYMod", -4)
self:SetOption ("YSpacingMod", -4)
self:SetOption ("IgnoreButtonAutoHeight", true)
self:SetColor (1, 0.5, 0.5, 0.5, 0)
self:SetBackdrop (1, preset2_backdrop, gray_table, black_table)
self:SetBackdrop (2, preset2_backdrop, gray_table, black_table)
self:SetBackdrop (1, preset2_backdrop, backdropColorPreset2, borderColorPreset2)
self:SetBackdrop (2, preset2_backdrop, backdropColorPreset2, borderColorPreset2)
end
end
Expand Down
Binary file removed Libs/DF/cooltip_background.tga
Binary file not shown.
Binary file removed Libs/DF/feedback_sites.tga
Binary file not shown.
7 changes: 4 additions & 3 deletions Libs/DF/fw.lua
@@ -1,5 +1,6 @@

local dversion = 211

local dversion = 212

local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
Expand Down Expand Up @@ -1445,7 +1446,7 @@ end
line_widgets_created = 0
max_x = 0
end

if widget_created then
widget_created:Show()
end
Expand Down Expand Up @@ -2049,7 +2050,7 @@ end
options_frame:SetPoint ("center", UIParent, "center")

options_frame:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16,
edgeFile = DF.folder .. "border_2", edgeSize = 32,
edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,
insets = {left = 1, right = 1, top = 1, bottom = 1}})
options_frame:SetBackdropColor (0, 0, 0, .7)

Expand Down
Binary file removed Libs/DF/icons.tga
Binary file not shown.
Binary file removed Libs/DF/mail.tga
Binary file not shown.
102 changes: 55 additions & 47 deletions Libs/DF/panel.lua
Expand Up @@ -1713,8 +1713,8 @@ function DF:IconPick (callback, close_when_select, param1, param2)
self.icon:SetBlendMode ("BLEND")
end

local backdrop = {bgFile = DF.folder .. "background", tile = true, tileSize = 16,
insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10}
local backdrop = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16,
insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1}

for i = 0, 9 do
local newcheck = CreateFrame ("Button", "DetailsFrameworkIconPickFrameButton"..(i+1), DF.IconPickFrame, "BackdropTemplate")
Expand Down Expand Up @@ -2033,12 +2033,14 @@ function DF:CreateSimplePanel (parent, w, h, title, name, panel_options, db)
local close = CreateFrame ("button", name and name .. "CloseButton", title_bar)
close:SetFrameLevel (DF.FRAMELEVEL_OVERLAY)
close:SetSize (16, 16)
close:SetNormalTexture (DF.folder .. "icons")
close:SetHighlightTexture (DF.folder .. "icons")
close:SetPushedTexture (DF.folder .. "icons")
close:GetNormalTexture():SetTexCoord (0, 16/128, 0, 1)
close:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1)
close:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)

close:SetNormalTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
close:SetHighlightTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
close:SetPushedTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
close:GetNormalTexture():SetDesaturated(true)
close:GetHighlightTexture():SetDesaturated(true)
close:GetPushedTexture():SetDesaturated(true)

close:SetAlpha (0.7)
close:SetScript ("OnClick", simple_panel_close_click)
f.Close = close
Expand All @@ -2065,7 +2067,7 @@ function DF:CreateSimplePanel (parent, w, h, title, name, panel_options, db)
end

local Panel1PxBackdrop = {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 64,
edgeFile = DF.folder .. "border_3", edgeSize = 9, insets = {left = 2, right = 2, top = 3, bottom = 3}}
edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, insets = {left = 2, right = 2, top = 3, bottom = 3}}

local Panel1PxOnClickClose = function (self)
self:GetParent():Hide()
Expand All @@ -2075,9 +2077,9 @@ local Panel1PxOnToggleLock = function (self)
self.IsLocked = false
self:SetMovable (true)
self:EnableMouse (true)
self.Lock:GetNormalTexture():SetTexCoord (32/128, 48/128, 0, 1)
self.Lock:GetHighlightTexture():SetTexCoord (32/128, 48/128, 0, 1)
self.Lock:GetPushedTexture():SetTexCoord (32/128, 48/128, 0, 1)
self.Lock:GetNormalTexture():SetTexCoord (16/64, 32/64, 0, 1)
self.Lock:GetHighlightTexture():SetTexCoord (16/32, 32/64, 0, 1)
self.Lock:GetPushedTexture():SetTexCoord (16/64, 32/64, 0, 1)
if (self.OnUnlock) then
self:OnUnlock()
end
Expand All @@ -2088,9 +2090,9 @@ local Panel1PxOnToggleLock = function (self)
self.IsLocked = true
self:SetMovable (false)
self:EnableMouse (false)
self.Lock:GetNormalTexture():SetTexCoord (16/128, 32/128, 0, 1)
self.Lock:GetHighlightTexture():SetTexCoord (16/128, 32/128, 0, 1)
self.Lock:GetPushedTexture():SetTexCoord (16/128, 32/128, 0, 1)
self.Lock:GetNormalTexture():SetTexCoord (0/64, 16/64, 0, 1)
self.Lock:GetHighlightTexture():SetTexCoord (0/64, 16/64, 0, 1)
self.Lock:GetPushedTexture():SetTexCoord (0/64, 16/64, 0, 1)
if (self.OnLock) then
self:OnLock()
end
Expand Down Expand Up @@ -2205,22 +2207,28 @@ function DF:Create1PxPanel (parent, w, h, title, name, config, title_anchor, no_

local close = CreateFrame ("button", name and name .. "CloseButton", f, "BackdropTemplate")
close:SetSize (16, 16)
close:SetNormalTexture (DF.folder .. "icons")
close:SetHighlightTexture (DF.folder .. "icons")
close:SetPushedTexture (DF.folder .. "icons")
close:GetNormalTexture():SetTexCoord (0, 16/128, 0, 1)
close:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1)
close:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)
close:SetNormalTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
close:SetHighlightTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
close:SetPushedTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
close:GetNormalTexture():SetDesaturated(true)
close:GetHighlightTexture():SetDesaturated(true)
close:GetPushedTexture():SetDesaturated(true)
close:SetAlpha (0.7)

local lock = CreateFrame ("button", name and name .. "LockButton", f, "BackdropTemplate")
lock:SetSize (16, 16)
lock:SetNormalTexture (DF.folder .. "icons")
lock:SetHighlightTexture (DF.folder .. "icons")
lock:SetPushedTexture (DF.folder .. "icons")
lock:GetNormalTexture():SetTexCoord (32/128, 48/128, 0, 1)
lock:GetHighlightTexture():SetTexCoord (32/128, 48/128, 0, 1)
lock:GetPushedTexture():SetTexCoord (32/128, 48/128, 0, 1)
lock:SetNormalTexture ([[Interface\GLUES\CharacterSelect\Glues-AddOn-Icons]])
lock:SetHighlightTexture ([[Interface\GLUES\CharacterSelect\Glues-AddOn-Icons]])
lock:SetPushedTexture ([[Interface\GLUES\CharacterSelect\Glues-AddOn-Icons]])
lock:GetNormalTexture():SetDesaturated(true)
lock:GetHighlightTexture():SetDesaturated(true)
lock:GetPushedTexture():SetDesaturated(true)
--lock:GetNormalTexture():SetBlendMode("ADD")
--lock:GetHighlightTexture():SetBlendMode("ADD")
--lock:GetPushedTexture():SetBlendMode("ADD")
--lock:GetNormalTexture():SetTexCoord(73/256, 105/256, 64/128, 110/)
--lock:GetHighlightTexture():SetTexCoord(73/256, 105/256, 64/128, 110/)
--lock:GetPushedTexture():SetTexCoord(73/256, 105/256, 64/128, 110/)
lock:SetAlpha (0.7)

close:SetPoint ("topright", f, "topright", -3, -3)
Expand Down Expand Up @@ -2438,12 +2446,12 @@ function DF:CreateOptionsButton (parent, callback, name)

local b = CreateFrame ("button", name, parent, "BackdropTemplate")
b:SetSize (14, 14)
b:SetNormalTexture (DF.folder .. "icons")
b:SetHighlightTexture (DF.folder .. "icons")
b:SetPushedTexture (DF.folder .. "icons")
b:GetNormalTexture():SetTexCoord (48/128, 64/128, 0, 1)
b:GetHighlightTexture():SetTexCoord (48/128, 64/128, 0, 1)
b:GetPushedTexture():SetTexCoord (48/128, 64/128, 0, 1)
b:SetNormalTexture ([[Interface\GossipFrame\BinderGossipIcon]])
b:SetHighlightTexture ([[Interface\GossipFrame\BinderGossipIcon]])
b:SetPushedTexture ([[Interface\GossipFrame\BinderGossipIcon]])
b:GetNormalTexture():SetDesaturated(true)
b:GetHighlightTexture():SetDesaturated(true)
b:GetPushedTexture():SetDesaturated(true)
b:SetAlpha (0.7)

b:SetScript ("OnClick", callback)
Expand All @@ -2466,10 +2474,6 @@ end
function DF:CreateFeedbackButton (parent, callback, name)
local b = CreateFrame ("button", name, parent, "BackdropTemplate")
b:SetSize (12, 13)
b:SetNormalTexture (DF.folder .. "mail")
b:SetPushedTexture (DF.folder .. "mail")
b:SetHighlightTexture (DF.folder .. "mail")

b:SetScript ("OnClick", callback)
b:SetScript ("OnEnter", function (self)
GameCooltip2:Reset()
Expand All @@ -2479,12 +2483,14 @@ function DF:CreateFeedbackButton (parent, callback, name)
b:SetScript ("OnLeave", function (self)
GameCooltip2:Hide()
end)

print("Framework:CreateFeedbackButton() is deprecated.")

return b
end

local backdrop_fb_line = {bgFile = DF.folder .. "background", edgeFile = DF.folder .. "border_3",
tile = true, tileSize = 64, edgeSize = 8, insets = {left = 2, right = 2, top = 2, bottom = 2}}
local backdrop_fb_line = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,
tile = true, tileSize = 64, insets = {left = 2, right = 2, top = 2, bottom = 2}}

local on_enter_feedback = function (self)
self:SetBackdropColor (1, 1, 0, 0.5)
Expand Down Expand Up @@ -5062,12 +5068,14 @@ function DF:CreateTitleBar (f, titleText)

local closeButton = CreateFrame ("button", titleBar:GetName() and titleBar:GetName() .. "CloseButton" or nil, titleBar, "BackdropTemplate")
closeButton:SetSize (16, 16)
closeButton:SetNormalTexture (DF.folder .. "icons")
closeButton:SetHighlightTexture (DF.folder .. "icons")
closeButton:SetPushedTexture (DF.folder .. "icons")
closeButton:GetNormalTexture():SetTexCoord (0, 16/128, 0, 1)
closeButton:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1)
closeButton:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)

closeButton:SetNormalTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
closeButton:SetHighlightTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
closeButton:SetPushedTexture ([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
closeButton:GetNormalTexture():SetDesaturated(true)
closeButton:GetHighlightTexture():SetDesaturated(true)
closeButton:GetPushedTexture():SetDesaturated(true)

closeButton:SetAlpha (0.7)
closeButton:SetScript ("OnClick", simple_panel_close_click) --upvalue from this file

Expand Down Expand Up @@ -6387,7 +6395,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
GameCooltip2:SetColor (1, 0.5, 0.5, 0.5, 0)
local preset2_backdrop = {bgFile = DF.folder .. "background", edgeFile = [[Interface\Buttons\WHITE8X8]], tile = true, edgeSize = 1, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local preset2_backdrop = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Buttons\WHITE8X8]], tile = true, edgeSize = 1, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local gray_table = {0.37, 0.37, 0.37, 0.95}
local black_table = {0.2, 0.2, 0.2, 1}
GameCooltip2:SetBackdrop (1, preset2_backdrop, gray_table, black_table)
Expand Down Expand Up @@ -6485,7 +6493,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
GameCooltip2:SetColor (1, 0.5, 0.5, 0.5, 0)
local preset2_backdrop = {bgFile = DF.folder .. "background", edgeFile = [[Interface\Buttons\WHITE8X8]], tile = true, edgeSize = 1, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local preset2_backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeFile = [[Interface\Buttons\WHITE8X8]], tile = true, edgeSize = 1, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local gray_table = {0.37, 0.37, 0.37, 0.95}
local black_table = {0.2, 0.2, 0.2, 1}
GameCooltip2:SetBackdrop (1, preset2_backdrop, gray_table, black_table)
Expand Down
4 changes: 4 additions & 0 deletions Libs/DF/spells.lua
Expand Up @@ -250,8 +250,10 @@ DF.CooldownsBySpec = {
--DEMON HUNTER
--havoc
[577] = {

[200166] = 1, --Metamorphosis
[198589] = 2, --Blur

[196555] = 2, --Netherwalk (talent)
[196718] = 4, --Darkness
[188501] = 5, --Spectral Sight
Expand Down Expand Up @@ -633,8 +635,10 @@ DF.CooldownsInfo = {
[221562] = {cooldown = 45, duration = 5, talent = false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate

--> demon hunter

[200166] = {cooldown = 240, duration = 30, talent = false, charges = 1, class = "DEMONHUNTER", type = 1}, --Metamorphosis
[198589] = {cooldown = 60, duration = 10, talent = false, charges = 1, class = "DEMONHUNTER", type = 2}, --Blur

[196555] = {cooldown = 120, duration = 5, talent = 21865, charges = 1, class = "DEMONHUNTER", type = 2}, --Netherwalk (talent)
[196718] = {cooldown = 180, duration = 8, talent = false, charges = 1, class = "DEMONHUNTER", type = 4}, --Darkness
[187827] = {cooldown = 180, duration = 15, talent = false, charges = 1, class = "DEMONHUNTER", type = 2}, --Metamorphosis
Expand Down
11 changes: 5 additions & 6 deletions Libs/DF/textentry.lua
Expand Up @@ -672,20 +672,19 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
TextEntryObject.enabled_text_color = {TextEntryObject.editbox:GetTextColor()}
TextEntryObject.onleave_backdrop = {TextEntryObject.editbox:GetBackdropColor()}
TextEntryObject.onleave_backdrop_border_color = {TextEntryObject.editbox:GetBackdropBorderColor()}

TextEntryObject.func = func
TextEntryObject.param1 = param1
TextEntryObject.param2 = param2
TextEntryObject.next = nil
TextEntryObject.space = space
TextEntryObject.tab_on_enter = false

TextEntryObject.label = _G [name .. "_Desc"]

TextEntryObject.editbox:SetBackdrop ({bgFile = DF.folder .. "background", tileSize = 64, edgeFile = DF.folder .. "border_2", edgeSize = 10, insets = {left = 1, right = 1, top = 1, bottom = 1}})
TextEntryObject.editbox:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, insets = {left = 1, right = 1, top = 1, bottom = 1}})
TextEntryObject.editbox:SetBackdropColor (.2, .2, .2, 1)

--> hooks

TextEntryObject.HookList = {
OnEnter = {},
OnLeave = {},
Expand Down
4 changes: 2 additions & 2 deletions boot.lua
Expand Up @@ -4,8 +4,8 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")

_detalhes.build_counter = 7930
_detalhes.alpha_build_counter = 7930 --if this is higher than the regular counter, use it instead
_detalhes.build_counter = 7932
_detalhes.alpha_build_counter = 7932 --if this is higher than the regular counter, use it instead
_detalhes.game_version = "v9.0.1"
_detalhes.userversion = "v9.0.1." .. _detalhes.build_counter
_detalhes.realversion = 143 --core version, this is used to check API version for scripts and plugins (see alias below)
Expand Down

0 comments on commit 701baee

Please sign in to comment.