Fixed the copy and delete buttons in the weights config to be positioned correctly even if the parent container size changes
Kevin Lyles [07-29-10 - 06:49]
Fixed the copy and delete buttons in the weights config to be positioned correctly even if the parent container size changes
diff --git a/weights.xml b/weights.xml
index 743bd91..e3abd6b 100644
--- a/weights.xml
+++ b/weights.xml
@@ -553,17 +553,15 @@
<Size>
<AbsDimension x="80" y="22"/>
</Size>
- <Anchors>
- <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentSaveButton">
- <Offset>
- <AbsDimension x="27"/>
- </Offset>
- </Anchor>
- </Anchors>
<Scripts>
<OnClick>
ww_configNewWeight(self:GetParent().weightFrame.category.class, "Copy of " .. self:GetParent().weightFrame.name, self:GetParent().statList)
</OnClick>
+ <OnLoad>
+ local relTo = self:GetParent().saveButton
+ local _, _, _, relToXOffset = relTo:GetPoint(1)
+ self:SetPoint("CENTER", relTo, (self:GetParent():GetWidth() - self:GetWidth() - 2 * relToXOffset) / 3, 0)
+ </OnLoad>
</Scripts>
</Button>
<!--Reset button-->
@@ -589,17 +587,15 @@
<Size>
<AbsDimension x="80" y="22"/>
</Size>
- <Anchors>
- <Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parentResetButton">
- <Offset>
- <AbsDimension x="-27"/>
- </Offset>
- </Anchor>
- </Anchors>
<Scripts>
<OnClick>
ww_configDeleteWeight()
</OnClick>
+ <OnLoad>
+ local relTo = self:GetParent().resetButton
+ local _, _, _, relToXOffset = relTo:GetPoint(1)
+ self:SetPoint("CENTER", relTo, (self:GetWidth() - 2 * relToXOffset - self:GetParent():GetWidth()) / 3, 0)
+ </OnLoad>
</Scripts>
</Button>
<!--used to hold a series of stat frames to maintain absolute position when scrolling-->