Skip to content

Commit

Permalink
Bug fixes for wotlk
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Sep 26, 2022
1 parent dd8da2d commit 57133d3
Show file tree
Hide file tree
Showing 9 changed files with 350 additions and 324 deletions.
2 changes: 1 addition & 1 deletion Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


local dversion = 366
local dversion = 367
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)

Expand Down
7 changes: 6 additions & 1 deletion Libs/DF/mixins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ local doublePoint = {
["bottoms"] = true,
["bottom-top"] = true,
["top-bottom"] = true,
["right-left"] = true,
}

DF.SetPointMixin = {
SetPoint = function(object, anchorName1, anchorObject, anchorName2, xOffset, yOffset)
if (doublePoint[anchorName1]) then
object:ClearAllPoints()
local anchorTo
if (anchorObject) then
if (anchorObject and type(anchorObject) == "table") then
xOffset, yOffset = anchorName2 or 0, xOffset or 0
anchorTo = anchorObject.widget or anchorObject
else
Expand Down Expand Up @@ -64,6 +65,10 @@ DF.SetPointMixin = {
elseif (anchorName1 == "top-bottom") then
object:SetPoint("topleft", anchorTo, "bottomleft", xOffset, -yOffset)
object:SetPoint("topright", anchorTo, "bottomright", -xOffset, -yOffset)

elseif (anchorName1 == "right-left") then
object:SetPoint("topright", anchorTo, "topleft", xOffset, -yOffset)
object:SetPoint("bottomright", anchorTo, "bottomright", xOffset, yOffset)
end

return
Expand Down
2 changes: 1 addition & 1 deletion boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
_detalhes.BFACORE = 131 --core version on BFA launch
_detalhes.SHADOWLANDSCORE = 143 --core version on Shadowlands launch
--
_detalhes.dragonflight_beta_version = 34
_detalhes.dragonflight_beta_version = 35

Details = _detalhes

Expand Down
2 changes: 1 addition & 1 deletion core/gears.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3043,5 +3043,5 @@ end
local timePlayerFrame = CreateFrame("frame")
timePlayerFrame:RegisterEvent("TIME_PLAYED_MSG")
timePlayerFrame:SetScript("OnEvent", function()
C_Timer.After(0, function() print(Details.GetPlayTimeOnClassString()) end)
--C_Timer.After(0, function() print(Details.GetPlayTimeOnClassString()) end)
end)
8 changes: 2 additions & 6 deletions core/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,8 @@
bigdog:SetPoint ("bottomleft", custom_window, "bottomleft", 0, 1)
bigdog:SetAlpha (0.3)

local dogGradient = menuBackground:CreateTexture(nil, "artwork")
dogGradient:SetPoint("bottomleft", menuBackground, "bottomleft", 0, 0)
dogGradient:SetPoint("bottomright", menuBackground, "bottomright", 0, 0)
dogGradient:SetColorTexture(1, 1, 1, 1)
dogGradient:SetGradient("vertical", {["r"] = 0, ["g"] = 0, ["b"] = 0, ["a"] = 1}, {["r"] = 0, ["g"] = 0, ["b"] = 0, ["a"] = 0})
dogGradient:SetHeight(95)
local gradientBelowTheLine = DetailsFramework:CreateTexture(menuBackground, {gradient = "vertical", fromColor = {0, 0, 0, 0.45}, toColor = "transparent"}, 1, 95, "artwork", {0, 1, 0, 1}, "dogGradient")
gradientBelowTheLine:SetPoint("bottoms")

local bigdogRow = menuBackground:CreateTexture (nil, "artwork")
bigdogRow:SetPoint ("bottomleft", menuBackground, "bottomleft", 1, 1)
Expand Down
7 changes: 7 additions & 0 deletions frames/window_options2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,13 @@ function Details.options.InitializeOptionsWindow(instance)
realBackdropAreaFrame:SetPoint("topleft", f, "topleft", 150, -27)
realBackdropAreaFrame:SetSize(770, 570)

local leftGradient = DetailsFramework:CreateTexture(sectionFrame, {gradient = "horizontal", fromColor = {0, 0, 0, 0}, toColor = {0, 0, 0, 0.3}}, 10, 1, "artwork", {0, 1, 0, 1}, "leftGradient")
leftGradient:SetPoint("right-left", realBackdropAreaFrame, 1)

local bottomGradient = DetailsFramework:CreateTexture(realBackdropAreaFrame, {gradient = "vertical", fromColor = {0, 0, 0, 1}, toColor = {0, 0, 0, 0}}, 1, 20, "artwork", {0, 1, 0, 1}, "bottomGradient")
bottomGradient.sublevel = 7
bottomGradient:SetPoint("bottoms")

sectionFrame.name = sectionsName[sectionId]
--tinsert(f.sectionFramesContainer, sectionFrame)
f.sectionFramesContainer[sectionId] = sectionFrame
Expand Down
22 changes: 20 additions & 2 deletions frames/window_options2_sections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+20, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -1077,6 +1078,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -1423,7 +1425,7 @@ do
name = Loc ["STRING_COLOR"],
desc = Loc ["STRING_OPTIONS_BAR_COLOR_DESC"],
},

{--background uses class colors
type = "toggle",
get = function() return currentInstance.row_info.texture_background_class_color end,
Expand Down Expand Up @@ -1791,7 +1793,8 @@ do
}

sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+20, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+40, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

tinsert(Details.optionsSection, buildSection)
Expand Down Expand Up @@ -2151,6 +2154,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)

local separatorOption = sectionFrame.widget_list[23]
Expand Down Expand Up @@ -2703,6 +2707,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -3086,6 +3091,7 @@ do

}
sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -3200,6 +3206,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)

do --> micro displays
Expand Down Expand Up @@ -3833,6 +3840,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -4073,6 +4081,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -4449,6 +4458,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
refreshToggleAnchor()
end
Expand Down Expand Up @@ -4597,6 +4607,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -5016,6 +5027,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)

sectionFrame:SetScript("OnShow", function()
Expand Down Expand Up @@ -5347,6 +5359,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(autoSwitchFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)


Expand Down Expand Up @@ -5929,6 +5942,7 @@ do --raid tools
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -6208,6 +6222,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX + 350, startY - 20, heightSize + 300, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -6369,6 +6384,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -6789,6 +6805,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down Expand Up @@ -6875,6 +6892,7 @@ do
}

sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

Expand Down
Loading

0 comments on commit 57133d3

Please sign in to comment.