Quantcast WoWInterface - View Single Post - KgPanels custom SideBar script
View Single Post
09-24-19, 11:06 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,170
It could be something as simple as adjusting the SetPoint of the side bar when the button is clicked

Something OnClick like:
Lua Code:
  1. local point = SideBarFrame:GetPoint(1)
  2. SideBarFrame:ClearAllpoints()
  3. if point == "LEFT" then
  4.     SideBarFrame:SetPoint("RIGHT", UIParent, "LEFT")
  5. else
  6.     SideBarFrame:SetPoint("LEFT", UIParent, "LEFT")
  7. end

The button would be attached to the left of the SideBar panel and "move" with it.

You might want to change:
Code:
if point == "LEFT" then
from "LEFT" to "RIGHT" depending on which side of the SideBar you initially attach to the left of UIParent.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 09-24-19 at 12:22 PM.
  Reply With Quote