From c3bcacae3ccd50b1b8df1653b6a8a7007d5a61a7 Mon Sep 17 00:00:00 2001 From: Thomas Shannon Date: Tue, 13 Feb 2024 19:33:46 -0700 Subject: [PATCH] 10.2.5 Update ToC Update Minor changes to settings. --- Core/Settings.lua | 12 ++++-------- nPlates.toc => nPlates_Mainline.toc | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) rename nPlates.toc => nPlates_Mainline.toc (95%) diff --git a/Core/Settings.lua b/Core/Settings.lua index 9ff21a4..17c194d 100644 --- a/Core/Settings.lua +++ b/Core/Settings.lua @@ -36,10 +36,6 @@ function nPlatesConfigMixin:OnLoad() self.name = C_AddOns.GetAddOnMetadata(addon, "Title") self.version = C_AddOns.GetAddOnMetadata(addon, "Version") - self.okay = self.SaveChanges - self.cancel = self.CancelChanges - self.default = self.RestoreDefaults - self.refresh = self.UpdatePanel local category, layout = Settings.RegisterCanvasLayoutCategory(self, self.name) category.ID = self.name @@ -58,7 +54,7 @@ function nPlatesConfigMixin:SaveProfileBackup() self.profileBackup = CopyTable(nPlatesDB) end -function nPlatesConfigMixin:SaveChanges() +function nPlatesConfigMixin:OnCommit() for _, control in pairs(self.controls) do if ( self:ShouldUpdate(control) ) then self.profileBackup[control.optionName] = control:GetValue() @@ -82,7 +78,7 @@ function nPlatesConfigMixin:CancelChanges() end end -function nPlatesConfigMixin:RestoreDefaults() +function nPlatesConfigMixin:OnDefault() for _, control in pairs(self.controls) do nPlatesDB[control.optionName] = nPlates.defaultOptions[control.optionName] control:Update() @@ -90,7 +86,7 @@ function nPlatesConfigMixin:RestoreDefaults() ReloadUI() end -function nPlatesConfigMixin:UpdatePanel() +function nPlatesConfigMixin:OnRefresh() for _, control in pairs(self.controls) do if ( control.SetControl ) then control:SetControl() @@ -700,5 +696,5 @@ function nPlatesConfigMixin:Init() end end - self:UpdatePanel() + self:OnRefresh() end diff --git a/nPlates.toc b/nPlates_Mainline.toc similarity index 95% rename from nPlates.toc rename to nPlates_Mainline.toc index be7da6e..ce1c894 100644 --- a/nPlates.toc +++ b/nPlates_Mainline.toc @@ -1,4 +1,4 @@ -## Interface: 100200 +## Interface: 100205 ## Title: |cffCC3333 n|rPlates ## Notes: Nameplates for NeavUI. ## Author: Grimsbain