From 044899f52524523f70cad8840f073580d8220fa1 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Sat, 21 Feb 2009 15:53:41 +0100 Subject: [PATCH] Fixed initial positions for all bars --- ActionBar.lua | 2 +- BagBar.lua | 2 +- Bar.lua | 10 ++++++---- MicroMenu.lua | 4 ++-- PetBar.lua | 2 +- StanceBar.lua | 2 +- VehicleBar.lua | 8 ++++---- 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ActionBar.lua b/ActionBar.lua index eb5f6f8..beb1cfc 100644 --- a/ActionBar.lua +++ b/ActionBar.lua @@ -19,7 +19,7 @@ end function ActionBar:ApplyConfig(config) ButtonBar.ApplyConfig(self, config) - if not self.config.position then initialPosition(self) end + if not self.config.position.x then initialPosition(self) end self:UpdateButtons() self:UpdateSelfCast(true) diff --git a/BagBar.lua b/BagBar.lua index 8b3684a..a5bb565 100644 --- a/BagBar.lua +++ b/BagBar.lua @@ -43,7 +43,7 @@ end function BagBar:ApplyConfig(config) ButtonBar.ApplyConfig(self, config) - if not self.config.position then + if not self.config.position.x then self:ClearSetPoint("CENTER", 142, -18) self:SavePosition() end diff --git a/Bar.lua b/Bar.lua index 2c5d3bc..e5c5b5f 100644 --- a/Bar.lua +++ b/Bar.lua @@ -240,10 +240,12 @@ function Bar:UpgradeConfig() self:SetScale(pos.scale) local x, y, s = pos.x, pos.y, self:GetEffectiveScale() local point, relPoint = pos.point, pos.relPoint - x, y = x/s, y/s - self:ClearSetPoint(point, UIParent, relPoint, x, y) - self:SavePosition() - pos.relPoint = nil + if x and y and point and relPoint then + x, y = x/s, y/s + self:ClearSetPoint(point, UIParent, relPoint, x, y) + self:SavePosition() + pos.relPoint = nil + end end end if version < 3 then diff --git a/MicroMenu.lua b/MicroMenu.lua index 85dd842..82ecb3e 100644 --- a/MicroMenu.lua +++ b/MicroMenu.lua @@ -72,8 +72,8 @@ MicroMenuBar.vpad_offset = -21 function MicroMenuBar:ApplyConfig(config) ButtonBar.ApplyConfig(self, config) - if not self.config.position then - self:ClearSetPoint("CENTER", -105, 27) + if not self.config.position.x then + self:ClearSetPoint("CENTER", -105, 30) self:SavePosition() end diff --git a/PetBar.lua b/PetBar.lua index 31a53de..ac619d8 100644 --- a/PetBar.lua +++ b/PetBar.lua @@ -95,7 +95,7 @@ end function PetBar:ApplyConfig(config) ButtonBar.ApplyConfig(self, config) - if not self.config.position then + if not self.config.position.x then self:ClearSetPoint("CENTER", 0, 70) self:SavePosition() end diff --git a/StanceBar.lua b/StanceBar.lua index 149f44f..a27c3a7 100644 --- a/StanceBar.lua +++ b/StanceBar.lua @@ -208,7 +208,7 @@ end function StanceBar:ApplyConfig(config) ButtonBar.ApplyConfig(self, config) - if not self.config.position then + if not self.config.position.x then self:ClearSetPoint("CENTER", -55, -10) self:SavePosition() end diff --git a/VehicleBar.lua b/VehicleBar.lua index 0eb5e30..1a630e6 100644 --- a/VehicleBar.lua +++ b/VehicleBar.lua @@ -65,14 +65,14 @@ function VehicleBarMod:ApplyConfig() self.bar:ApplyConfig(self.db.profile) end -VehicleBar.button_width = 30 -VehicleBar.button_height = 30 +VehicleBar.button_width = 40 +VehicleBar.button_height = 40 VehicleBar.LBFOverride = true function VehicleBar:ApplyConfig(config) ButtonBar.ApplyConfig(self, config) - if not self.config.position then - self:ClearSetPoint("CENTER", -105, 27) + if not self.config.position.x then + self:ClearSetPoint("CENTER", 120, 27) self:SavePosition() end