You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would also make it possible to support Drag re-ordering. Below is half an implementation.
localfunctionLineFactory(elementData)
return"ScrollBoxDragLineTemplate"endlocalfunctionAnchoringHandler(anchorFrame, candidateFrame, candidateArea)
ifcandidateArea==DragIntersectionArea.AbovethenanchorFrame:SetPoint("BOTTOMLEFT", candidateFrame, "TOPLEFT", 0, 0)
anchorFrame:SetPoint("BOTTOMRIGHT", candidateFrame, "TOPRIGHT", 0, 0)
elseifcandidateArea==DragIntersectionArea.BelowthenanchorFrame:SetPoint("TOPLEFT", candidateFrame, "BOTTOMLEFT", 0, 0)
anchorFrame:SetPoint("TOPRIGHT", candidateFrame, "BOTTOMRIGHT", 0, 0)
endend-- This inits the object that the cursor drags around representing the source buttonlocalfunctionInitializer(button, sourceButton)
-- want to call the original button initializer but disable all the interactivityend-- This creates the object that the cursor drags around representing the source buttonlocalfunctionCursorFactory(elementData)
return"PandaGemEntryTemplate", InitializerendlocaldragBehavior=ScrollUtil.AddLinearDragBehavior(ScrollBox, CursorFactory, LineFactory, AnchoringHandler)
dragBehavior:SetReorderable(true)
dragBehavior:SetDragRelativeToCursor(true)
dragBehavior:SetNotifyDragSource(
function (sourceFrame, drag)
sourceFrame:SetAlpha(dragand.5or1)
sourceFrame:DesaturateHierarchy(dragand1or0)
sourceFrame:SetMouseMotionEnabled(notdrag)
end)
dragBehavior:SetNotifyDragCandidates(
function (candidateFrame, drag)
candidateFrame:SetMouseMotionEnabled(notdrag)
end)
dragBehavior:SetSourceDragCondition(
function (sourceFrame, sourceElementData)
returntrueend)
The text was updated successfully, but these errors were encountered:
Inherit from WoWScrollBox list also add an EventFrame scrollbar.
This would also make it possible to support Drag re-ordering. Below is half an implementation.
The text was updated successfully, but these errors were encountered: