Added a close button to editWeight
Kevin Lyles [10-01-09 - 22:37]
Added a close button to editWeight
diff --git a/WeightsWatcher.xml b/WeightsWatcher.xml
index 5f19758..1350928 100644
--- a/WeightsWatcher.xml
+++ b/WeightsWatcher.xml
@@ -35,6 +35,11 @@
</Layer>
</Layers>
<Frames>
+ <Button name="$parentCloseButton" parentKey="closeButton" inherits="UIPanelCloseButton">
+ <Anchors>
+ <Anchor point="TOPRIGHT"/>
+ </Anchors>
+ </Button>
<!--Invisible frame with scroll bar that does the scrolling-->
<ScrollFrame name="$parentScrollFrame" parentKey="scrollFrame" inherits="FauxScrollFrameTemplate">
<Size>
diff --git a/config.lua b/config.lua
index f005196..ee06ed7 100644
--- a/config.lua
+++ b/config.lua
@@ -25,7 +25,7 @@ function open_config()
end
function scrollBarUpdate()
- local numShown, i = 30
+ local numShown, i = 29
local offset = FauxScrollFrame_GetOffset(editWeight.scrollFrame)
-- print(offset)
FauxScrollFrame_Update(editWeight.scrollFrame, #(statButtonTable), numShown, 100)
@@ -36,7 +36,7 @@ function scrollBarUpdate()
if offset > #(statButtonTable) - numShown then
offset = #(statButtonTable) - numShown
end
- statButtonTable[1]:SetPoint("TOPLEFT", 5, 20 * offset)
+ statButtonTable[1]:SetPoint("TOPLEFT", 5, -20 + 20 * offset)
for i = 1, offset do
-- seems to be the only way to reliably update the positions of the buttons after these
statButtonTable[i]:Hide()