Skip to content

Commit

Permalink
1.0.4
Browse files Browse the repository at this point in the history
fixed potential issue with location and size not saving correctly
  • Loading branch information
Noshei committed Dec 2, 2024
1 parent 8c83ea8 commit d87c80f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ WBL.defaults = {
xPos = 0,
yPos = 0,
relativePoint = "CENTER",
height = 300,
width = 500,
timeFormat = 5,
autoOpen = false,
autoclose = false,
Expand Down
7 changes: 6 additions & 1 deletion Display.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ WBL.Display = {}

function WBL:CreateDisplay()
local frame = CreateFrame("Frame", "WarbandBankLog_BaseFrame", UIParent, "WBLBaseFrameTemplate")
frame:ClearAllPoints()
frame:SetPoint(
WBL.db.profile.relativePoint,
UIParent,
WBL.db.profile.relativePoint,
WBL.db.profile.xPos,
WBL.db.profile.yPos
)
frame:SetSize(WBL.db.profile.width, WBL.db.profile.height)
frame.ResizeButton:SetOnResizeStoppedCallback(function()
WBL.db.profile.width, WBL.db.profile.height = frame:GetSize()
end)

function frame:stoppedMoving()
local rel, _, _, xPos, yPos = self:GetPoint()
WBL.db.profile.xPos = xPos
Expand Down
3 changes: 0 additions & 3 deletions Display.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ https://raw.githubusercontent.com/Gethe/wow-ui-source/live/Interface/FrameXML/UI

<Frame name="WBLBaseFrameTemplate" inherits="PortraitFrameTemplate" parent="UIParent" virtual="true" movable="true" resizable="true" clampedToScreen="true" hidden="true" toplevel="true">
<Size x="500" y="300"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Frames>
<EditBox parentKey="SearchBox" inherits="SearchBoxTemplate" autoFocus="false" historyLines="1" bytes="64" frameLevel="30">
<Size y="22"/>
Expand Down
2 changes: 1 addition & 1 deletion Warband-Bank-Log.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: Warband Bank Log
## Notes: Provides a log of which character added or removed items/gold from the Warband Bank
## Author: Noshei
## Version: 1.0.3
## Version: 1.0.4
## SavedVariables: WarbandBankLogDB, WarbandBankLogSettings
## AddonCompartmentFunc: WarbandBankLog_OnAddonCompartmentClick
## IconTexture: 1505935
Expand Down

0 comments on commit d87c80f

Please sign in to comment.