Skip to content

Commit

Permalink
Updated LibOpenRaid and DetailsFramework
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Oct 9, 2022
1 parent 9974a87 commit 944178f
Show file tree
Hide file tree
Showing 126 changed files with 15,464 additions and 15,457 deletions.
2 changes: 1 addition & 1 deletion API Custom Displays.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ checkTop is for some special cases when the top value needs to be calculated imm
nameComplement is a string to add on the end of the actor's name, for instance, in cases where the actor is a spell and its name is generated by the container.
returns the current value for the actor.

container:SetValue (actor, amount, nameComplement)
container:SetValue(actor, amount, nameComplement)
actor is any actor object or any other table containing a member "name" or "id", e.g. {name = "Jeff"} {id = 186451}
amount is the amount to set to this actor on the container.
nameComplement is a string to add on the end of the actor's name, for instance, in cases where the actor is a spell and its name is generated by the container.
Expand Down
2 changes: 1 addition & 1 deletion API.lua
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ checkTop is for some special cases when the top value needs to be calculated imm
nameComplement is a string to add on the end of the actor's name, for instance, in cases where the actor is a spell and its name is generated by the container.
returns the current value for the actor.
container:SetValue (actor, amount, nameComplement)
container:SetValue(actor, amount, nameComplement)
actor is any actor object or any other table containing a member "name" or "id", e.g. {name = "Jeff"} {id = 186451}
amount is the amount to set to this actor on the container.
nameComplement is a string to add on the end of the actor's name, for instance, in cases where the actor is a spell and its name is generated by the container.
Expand Down
342 changes: 171 additions & 171 deletions Libs/DF/auras.lua

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions Libs/DF/button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,17 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)

--frame width
local smember_width = function(_object, _value)
return _object.button:SetWidth (_value)
return _object.button:SetWidth(_value)
end

--frame height
local smember_height = function(_object, _value)
return _object.button:SetHeight (_value)
return _object.button:SetHeight(_value)
end

--text
local smember_text = function(_object, _value)
return _object.button.text:SetText (_value)
return _object.button.text:SetText(_value)
end

--function
Expand All @@ -197,7 +197,7 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)

--text color
local smember_textcolor = function(_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
return _object.button.text:SetTextColor (_value1, _value2, _value3, _value4)
end

Expand All @@ -213,24 +213,24 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)

--texture
local smember_texture = function(_object, _value)
if (type (_value) == "table") then
if (type(_value) == "table") then
local _value1, _value2, _value3, _value4 = unpack (_value)
if (_value1) then
_object.button:SetNormalTexture (_value1)
_object.button:SetNormalTexture(_value1)
end
if (_value2) then
_object.button:SetHighlightTexture (_value2, "ADD")
_object.button:SetHighlightTexture(_value2, "ADD")
end
if (_value3) then
_object.button:SetPushedTexture (_value3)
_object.button:SetPushedTexture(_value3)
end
if (_value4) then
_object.button:SetDisabledTexture (_value4)
end
else
_object.button:SetNormalTexture (_value)
_object.button:SetHighlightTexture (_value, "ADD")
_object.button:SetPushedTexture (_value)
_object.button:SetNormalTexture(_value)
_object.button:SetHighlightTexture(_value, "ADD")
_object.button:SetPushedTexture(_value)
_object.button:SetDisabledTexture (_value)
end
return
Expand All @@ -251,13 +251,13 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
--text align
local smember_textalign = function(_object, _value)
if (_value == "left" or _value == "<") then
_object.button.text:SetPoint ("left", _object.button, "left", 2, 0)
_object.button.text:SetPoint("left", _object.button, "left", 2, 0)
_object.capsule_textalign = "left"
elseif (_value == "center" or _value == "|") then
_object.button.text:SetPoint ("center", _object.button, "center", 0, 0)
_object.button.text:SetPoint("center", _object.button, "center", 0, 0)
_object.capsule_textalign = "center"
elseif (_value == "right" or _value == ">") then
_object.button.text:SetPoint ("right", _object.button, "right", -2, 0)
_object.button.text:SetPoint("right", _object.button, "right", -2, 0)
_object.capsule_textalign = "right"
end
end
Expand Down Expand Up @@ -407,7 +407,7 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
self.icon:SetPoint("left", self.widget, "left", 4 + (leftPadding or 0), 0)
self.icon.leftPadding = leftPadding or 0
self.widget.text:ClearAllPoints()
self.widget.text:SetPoint ("left", self.icon, "right", textDistance or 2, 0 + (textHeight or 0))
self.widget.text:SetPoint("left", self.icon, "right", textDistance or 2, 0 + (textHeight or 0))
end

if (type(texture) == "string") then
Expand Down Expand Up @@ -919,9 +919,9 @@ end

local textWidth = buttonObject.button.text:GetStringWidth()
if (textWidth > width - 15 and buttonObject.button.text:GetText() ~= "") then
if (shortMethod == false) then --> if is false, do not use auto resize
if (shortMethod == false) then --if is false, do not use auto resize
--do nothing
elseif (not shortMethod) then --> if the value is omitted, use the default resize
elseif (not shortMethod) then --if the value is omitted, use the default resize
local new_width = textWidth + 15
buttonObject.button:SetWidth(new_width)

Expand Down
8 changes: 4 additions & 4 deletions Libs/DF/cooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ function DF:CreateCoolTip()
end
end

--> main frame
--main frame
local frame1 = GameCooltipFrame1
if (not GameCooltipFrame1) then
frame1 = CreateFrame("Frame", "GameCooltipFrame1", UIParent, "BackdropTemplate")
Expand All @@ -310,7 +310,7 @@ function DF:CreateCoolTip()

createTooltipFrames(frame1)

--> secondary frame
--secondary frame
local frame2 = GameCooltipFrame2
if (not GameCooltipFrame2) then
frame2 = CreateFrame("Frame", "GameCooltipFrame2", UIParent, "BackdropTemplate")
Expand Down Expand Up @@ -1863,13 +1863,13 @@ function DF:CreateCoolTip()

if (centerY) then
if (centerY + helpScreenHeight > screenHeight) then
--> out of top side
--out of top side
local moveDownOffset = (centerY + helpScreenHeight) - screenHeight
gameCooltip.internal_y_mod = -moveDownOffset
return gameCooltip:SetMyPoint(host, 0, -moveDownOffset)

elseif (centerY - helpScreenHeight < 0) then
--> out of bottom side
--out of bottom side
local moveUpOffset = centerY - helpScreenHeight
gameCooltip.internal_y_mod = moveUpOffset * -1
return gameCooltip:SetMyPoint(host, 0, moveUpOffset * -1)
Expand Down
16 changes: 8 additions & 8 deletions Libs/DF/dropdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ DF:Mixin(DropDownMetaFunctions, DF.FrameMixin)
end

------------------------------------------------------------------------------------------------------------
--> members
--members

--selected value
local gmember_value = function(object)
Expand Down Expand Up @@ -910,7 +910,7 @@ function DF:BuildDropDownFontList(onClick, icon, iconTexcoord, iconSize)
end

------------------------------------------------------------------------------------------------------------
--> template
--template

function DropDownMetaFunctions:SetTemplate(template)
self.template = template
Expand Down Expand Up @@ -991,7 +991,7 @@ function DropDownMetaFunctions:RefreshDropIcon()
end

------------------------------------------------------------------------------------------------------------
--> object constructor
--object constructor

function DF:CreateDropDown(parent, func, default, width, height, member, name, template)
return DF:NewDropDown(parent, parent, name, member, width, height, func, default, template)
Expand Down Expand Up @@ -1150,11 +1150,11 @@ function DF:CreateNewDropdownFrame(parent, name)
newDropdownFrame.text = text

local arrowHightlight = newDropdownFrame:CreateTexture("$parent_ArrowTexture2", "OVERLAY", nil, 2)
arrowHightlight:SetPoint ("right", newDropdownFrame, "right", 5, -1)
arrowHightlight:SetBlendMode ("ADD")
arrowHightlight:SetTexture ([[Interface\Buttons\UI-ScrollBar-ScrollDownButton-Highlight]])
arrowHightlight:SetPoint("right", newDropdownFrame, "right", 5, -1)
arrowHightlight:SetBlendMode("ADD")
arrowHightlight:SetTexture([[Interface\Buttons\UI-ScrollBar-ScrollDownButton-Highlight]])
arrowHightlight:Hide()
arrowHightlight:SetSize (32, 28)
arrowHightlight:SetSize(32, 28)
newDropdownFrame.arrowTexture2 = arrowHightlight

local arrowTexture = newDropdownFrame:CreateTexture("$parent_ArrowTexture", "OVERLAY", nil, 1)
Expand Down Expand Up @@ -1190,7 +1190,7 @@ function DF:CreateNewDropdownFrame(parent, name)
child:SetSize(150, 150)
child:SetPoint("topleft", scroll, "topleft", 0, 0)
child:SetBackdrop(childBackdrop)
child:SetBackdropColor (0, 0, 0, 1)
child:SetBackdropColor(0, 0, 0, 1)

local backgroundTexture = child:CreateTexture(nil, "background")
backgroundTexture:SetAllPoints()
Expand Down
Loading

0 comments on commit 944178f

Please sign in to comment.