BFUILib.ConfigureModeEnabled();
BFUILib.ConfigureModeDisabled();
self:SetBackdropColor(unpack(BFConst.CreateBarOverlayColor));
tinsert(UISpecialFrames, self:GetName());
if (button == "LeftButton") then
local Left, Top = GetCursorPosition();
local Scale = UIParent:GetEffectiveScale();
if (BFUILib.CreateBarMode) then
BFUtil.NewBar(Left / Scale, Top / Scale);
elseif (BFUILib.CreateBonusBarMode) then
BFUtil.NewBonusBar(Left / Scale, Top / Scale);
end
end
BFUILib.ToggleCreateBarMode(true);
SetCursor("REPAIRNPC_CURSOR");
BFUILib.ToggleCreateBarMode(true);
self:SetBackdropColor(unpack(BFConst.DestroyBarOverlayColor));
tinsert(UISpecialFrames, self:GetName());
BFUILib.ToggleDestroyBarMode(true);
SetCursor("CAST_ERROR_CURSOR");
BFUILib.ToggleDestroyBarMode(true);
self:SetBackdropColor(unpack(BFConst.IconDragOverlayColor));
tinsert(UISpecialFrames, self:GetName());
SetCursor("ITEM_CURSOR");
BFUILib:StopDraggingIcon();
BFUILib:StopDraggingIcon();
RegisterStateDriver(self, "combat", "[combat] true; false");
RegisterStateDriver(self, "bar", "[overridebar] overridebar; [vehicleui] vehicleui; normal");