diff --git a/SaftUI/frames/moveframes.lua b/SaftUI/frames/moveframes.lua
index 94ff959..293a766 100644
--- a/SaftUI/frames/moveframes.lua
+++ b/SaftUI/frames/moveframes.lua
@@ -16,12 +16,13 @@ local OnLoad = CreateFrame("Frame")
OnLoad:RegisterEvent("PLAYER_ENTERING_WORLD")
OnLoad:SetScript("OnEvent", function()
for frame, point in pairs(frames) do
- if not _G[frame]:IsUserPlaced() then
- _G[frame]:ClearAllPoints()
- _G[frame]:SetPoint(unpack(point))
+ if frame then
+ if not _G[frame]:IsUserPlaced() then
+ _G[frame]:ClearAllPoints()
+ _G[frame]:SetPoint(unpack(point))
+ end
end
end
-
FixVehicleButton()
end)
diff --git a/SaftUI/modules/actionbars.lua b/SaftUI/modules/actionbars.lua
index 4e87d62..dfd56a6 100644
--- a/SaftUI/modules/actionbars.lua
+++ b/SaftUI/modules/actionbars.lua
@@ -144,6 +144,7 @@ function T.UpdateAllActionBars()
end
do
+
local perRow = 10
local bar = _G["TukuiPetBar"]
bar:SetBackdrop(nil)
@@ -152,14 +153,17 @@ function T.UpdateAllActionBars()
for j=1, 10 do
local b = _G["PetActionButton"..j]
local bLast = _G["PetActionButton"..(j-1)]
- local bAbove = _G["PetActionButton"..(j-perRow)]
b:ClearAllPoints()
b:SetSize(bSize, bSize)
style(b)
if j == 1 then
b:SetPoint("LEFT", bar, "LEFT", 0, 0)
else
- b:SetPoint("LEFT", bLast, "RIGHT", bSpacing, 0)
+ if C.actionbar.verticalpet then
+ b:SetPoint("TOP", bLast, "BOTTOM", 0, -bSpacing)
+ else
+ b:SetPoint("LEFT", bLast, "RIGHT", bSpacing, 0)
+ end
end
end
@@ -228,13 +232,14 @@ LoadFrame:SetScript("OnEvent", function(self, event, addon)
if not SaftUISaved then SaftUISaved = {} end
if not SaftUISaved["ActionBars"] then SaftUISaved["ActionBars"] = {} end
- --Update Saved Variables when logging out\
+ --Update Saved Variables when logging out
local ab = SaftUISaved.ActionBars
ab.buttonsize = C.actionbar.buttonsize
ab.buttonspacing = C.actionbar.buttonspacing
ab.showhotkey = C.actionbar.hotkey
ab.showgrid = C.actionbar.showgrid
ab.barspecific = C.actionbar.barspecific
+ ab.verticalpet = C.actionbar.verticalpet
end
end)
@@ -320,7 +325,7 @@ function T.LoadActionBarMenu()
panel:SetTemplate()
panel:SetWidth(window:GetWidth()-10)
- panel:SetHeight(55)
+ panel:SetHeight(72)
local buttonSize = CreateFrame("Frame", nil, panel)
buttonSize:EnableMouse(true)
@@ -388,6 +393,22 @@ function T.LoadActionBarMenu()
T.UpdateAllActionBars()
end)
+ local verticalPet = CreateFrame("Frame", nil, panel)
+ verticalPet:EnableMouse(true)
+ verticalPet:SetSize(panel:GetWidth(), 18)
+ verticalPet:SetFrameLevel(panel:GetFrameLevel()+1)
+ verticalPet:SetPoint("TOP", hotKey, "BOTTOM", 0, 1)
+ verticalPet:AddText("text", "Vertical Pet Bar", "LEFT", verticalPet, "LEFT", 4, 1)
+ verticalPet.checkbox = CreateFrame("CheckButton", nil, verticalPet, "UICheckButtonTemplate")
+ T.SkinCheckBox(verticalPet.checkbox)
+ verticalPet.checkbox:SetChecked(C.actionbar.verticalpet)
+ verticalPet.checkbox:SetPoint("RIGHT", verticalPet, "RIGHT", -4, 0)
+ verticalPet.checkbox:SetSize(16,16)
+ verticalPet.checkbox:HookScript("OnClick", function(self)
+ C.actionbar.verticalpet = (self:GetChecked() and true) or false
+ T.UpdateAllActionBars()
+ end)
+
-- local showGrid = CreateFrame("Frame", nil, panel)
-- showGrid:EnableMouse(true)
-- showGrid:SetSize(panel:GetWidth(), 16)
diff --git a/SaftUI/modules/unitframes/groups/core.lua b/SaftUI/modules/unitframes/groups/core.lua
index 878dcd0..4bdcbd6 100644
--- a/SaftUI/modules/unitframes/groups/core.lua
+++ b/SaftUI/modules/unitframes/groups/core.lua
@@ -26,7 +26,7 @@ local function EditUnitAttributes(layout)
local width = C.unitframes.Groups[layout].width
local height = C.unitframes.Groups[layout].height
-
+ header:SetAttribute("showPlayer", true)
header:SetAttribute("initial-width", width)
header:SetAttribute("initial-height", height)
end
diff --git a/SaftUI/modules/unitframes/groups/general.lua b/SaftUI/modules/unitframes/groups/general.lua
index cd5b32c..a458672 100644
--- a/SaftUI/modules/unitframes/groups/general.lua
+++ b/SaftUI/modules/unitframes/groups/general.lua
@@ -16,4 +16,6 @@ T.groupframefuncs["general"] = function(self)
self.Power:SetPoint("BOTTOMLEFT", self, "BOTTOMLEFT", 2, 2)
self.Power:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -2, 2)
self.Power:SetFrameLevel(self.Health:GetFrameLevel()+2)
+
+ self:UpdateAllElements()
end
\ No newline at end of file