From d87c80f8ed239cb75e79a190f93b749793b1c263 Mon Sep 17 00:00:00 2001 From: Noshei <8866000+Noshei@users.noreply.github.com> Date: Sun, 1 Dec 2024 22:32:51 -0700 Subject: [PATCH] 1.0.4 fixed potential issue with location and size not saving correctly --- Config.lua | 2 ++ Display.lua | 7 ++++++- Display.xml | 3 --- Warband-Bank-Log.toc | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Config.lua b/Config.lua index fe36697..185c8d5 100644 --- a/Config.lua +++ b/Config.lua @@ -6,6 +6,8 @@ WBL.defaults = { xPos = 0, yPos = 0, relativePoint = "CENTER", + height = 300, + width = 500, timeFormat = 5, autoOpen = false, autoclose = false, diff --git a/Display.lua b/Display.lua index 2c36bc3..da3d24b 100644 --- a/Display.lua +++ b/Display.lua @@ -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 diff --git a/Display.xml b/Display.xml index 2059bc5..f5337c8 100644 --- a/Display.xml +++ b/Display.xml @@ -3,9 +3,6 @@ https://raw.githubusercontent.com/Gethe/wow-ui-source/live/Interface/FrameXML/UI - - - diff --git a/Warband-Bank-Log.toc b/Warband-Bank-Log.toc index 978f1cb..445014e 100644 --- a/Warband-Bank-Log.toc +++ b/Warband-Bank-Log.toc @@ -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