Skip to content

Commit

Permalink
10.2.5 Update
Browse files Browse the repository at this point in the history
ToC Update
Minor changes to settings.
  • Loading branch information
Grimsbain committed Feb 14, 2024
1 parent 99075b1 commit c3bcaca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions Core/Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand All @@ -82,15 +78,15 @@ 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()
end
ReloadUI()
end

function nPlatesConfigMixin:UpdatePanel()
function nPlatesConfigMixin:OnRefresh()
for _, control in pairs(self.controls) do
if ( control.SetControl ) then
control:SetControl()
Expand Down Expand Up @@ -700,5 +696,5 @@ function nPlatesConfigMixin:Init()
end
end

self:UpdatePanel()
self:OnRefresh()
end
2 changes: 1 addition & 1 deletion nPlates.toc → nPlates_Mainline.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100200
## Interface: 100205
## Title: |cffCC3333 n|rPlates
## Notes: Nameplates for NeavUI.
## Author: Grimsbain
Expand Down

0 comments on commit c3bcaca

Please sign in to comment.