Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!


From WowAce Wiki
Jump to: navigation, search
Lib: StickyFrames-2.0
A library to manage snappy dragging & sticking of frames across multiple mods.
TOC 2.4 (20400)
Category Libraries
Author Sorata
Credits LibStickyFrames-1.0 by Toadkiller, Original StickyFrames code by Cladhaire; FlyPaper code by Tuller; LegoBlock code by Shadowed, JoshBorke, rophy123, Tekkub et al.
Betas Ace SVN Zip
Changelog FishEye

A library to manage snappy dragging & sticking of frames across multiple mods.


LibStickyFrames-2.0 vs LibStickyFrames-1.0

  • Complete API Change
  • Insets are taken into account when checking overlapping.
  • Overlays are created by the mod and recycled when not in use
  • Grouping can be added, it's potentially very powerful yet can be very simple
  • Overlays are coloured based on whether the frames are enabled or not, hidden or can be attached to when being dragged
  • Callbacks is moved to CallbackHandler-1.0
  • Callback for clicking on an overlay which allows the mod to decide whether to enable, disable or hide as well as other things
  • Assuming the frame is anchored, when insets are updated the positioning of the frame is updated along with any frames attached to it
  • Shows hidden frames temprarily when the sticky group is set and hides them when the sticky group is unset.

The vision:

Many mods have invisible display areas or otherwise draggable frames that I need to lay out in my UI so that they do not overlap & thus can exist in harmony. All mods with such frames will one day use this lib to accomplish the following:

  • When I start dragging a bar around in Bartender3 or AutoBar, or the raid warnings frames from Deadly Boss Mods, BigWigs or other display frames from Quartz, SCT, etc. then all these frames go green & red and so on & I can see exactly where I can drag to & thus snap to or stick to so I can lay out my interface with or without overlap as I desire.
  • Once the sticking code goes in it is even more beautiful since I can just drag a few frames around at that point without destroying my careful layout or getting hosed with a ui scale change...
  • Since the dragging interface is standard, I am not uselessly trying ctrl-alt-shift-left&right-button drag just to move some frame around.
  • All these hard to access frames suddenly become easily accesible.

Design goals:

  • A consistent drag experience across implementing mods.
  • Snapping & sticking to all registered frames + select Blizzard frames.
  • Visibility & Labeling of all frames of interest while dragging (except for the Blizzard frames?)
  • Private Clusters
    • Private Clusters stick only to themselves.
    • Private Clusters have a supplied or calculated clusterFrame which participates in general sticking.
  • Grouped Frames
    • Groups of frames that are stuck together can be dragged by dragging any member of the group
  • Consistent interface for all these operations, including modifier keys for sticking or not snapping or unsticking etc.

Planned Features:

  • Make frame snapping more intelligent

Origin of the Species

This is based on code from:

StickyFrames by Cladhaire.

LegoBlock by Tekkub & JoshBorke.

FlyPaper by Tuller.

All teleported together into the BrindleFly thing otherwise know as LibStickyFrames by Toadkiller.

And enhanced by Sorata.