From 75eff54637e96623a6fe36367032cc1684a9bf16 Mon Sep 17 00:00:00 2001 From: Continuity Date: Tue, 8 Oct 2024 23:12:00 +0200 Subject: [PATCH] - options for larger namepaltes --- Plater_ChangeLog.lua | 6 +++ options/Plater_O_Advanced.lua | 84 +++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/Plater_ChangeLog.lua b/Plater_ChangeLog.lua index c05adaf2..33e6eca1 100644 --- a/Plater_ChangeLog.lua +++ b/Plater_ChangeLog.lua @@ -8,6 +8,12 @@ function Plater.GetChangelogTable() if (not Plater.ChangeLogTable) then Plater.ChangeLogTable = { + {1728421735, "New Feature", "Oct 8th, 2024", "Adding 'Larger Nameplates' and the corresponding base nameplate scale optiosn to the advanced tab.", "cont1nuity"}, + {1728421735, "Backend Change", "Oct 7th, 2024", "Cleanup of old unused aura update code.", "cont1nuity"}, + {1728421735, "Backend Change", "Oct 7th, 2024", "Removing LibClassicDuration as it was no longer in use.", "cont1nuity"}, + {1728421735, "Backend Change", "Oct 7th, 2024", "Less frequent group unit updates for tank scanning against event spam.", "cont1nuity"}, + {1728421735, "Backend Change", "Oct 7th, 2024", "Adding additional performance units for Palace.", "cont1nuity"}, + {1727794055, "Bug Fix", "Oct 1st, 2024", "Ensure soft-interact options work on all client versions now.", "cont1nuity"}, {1727794055, "Bug Fix", "Sept 25th, 2024", "Don't cache game objects in the npc-cache.", "cont1nuity"}, {1727794055, "Bug Fix", "Sept 25th, 2024", "Fix Warlock execute.", "cont1nuity"}, diff --git a/options/Plater_O_Advanced.lua b/options/Plater_O_Advanced.lua index fdaae0e8..c5fe0891 100644 --- a/options/Plater_O_Advanced.lua +++ b/options/Plater_O_Advanced.lua @@ -476,6 +476,90 @@ function platerInternal.CreateAdvancedOptions() nocombat = true, }, + {type = "label", get = function() return "Selection Space Scaling:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")}, + { + type = "toggle", + get = function() + local hScale = GetCVarNumberOrDefault("NamePlateHorizontalScale"); + local vScale = GetCVarNumberOrDefault("NamePlateVerticalScale"); + local cScale = GetCVarNumberOrDefault("NamePlateClassificationScale"); + return not (ApproximatelyEqual(hScale, 1) and ApproximatelyEqual(vScale, 1) and ApproximatelyEqual(cScale, 1)); + end, + set = function (self, fixedparam, value) + if value then + SetCVar("NamePlateHorizontalScale", 1.4); + SetCVar("NamePlateVerticalScale", 2.7); + SetCVar("NamePlateClassificationScale", 1.25); + else + SetCVar("NamePlateHorizontalScale", 1); + SetCVar("NamePlateVerticalScale", 1); + SetCVar("NamePlateClassificationScale", 1); + end + PlaterOptionsPanelFrame.RefreshOptionsFrame() + end, + name = "Larger Nameplates" .. CVarIcon, + desc = "Increases the blizzard base nameplate scaling (which is impacting the selection space and default blizzard nameplate size)." .. CVarDesc, + nocombat = true, + }, + { + type = "range", + get = function() return tonumber (GetCVar ("NamePlateVerticalScale")) end, + set = function (self, fixedparam, value) + if (not InCombatLockdown()) then + SetCVar ("NamePlateVerticalScale", value) + else + Plater:Msg (L["OPTIONS_ERROR_CVARMODIFY"]) + end + end, + min = 0.3, + max = 3, + step = 0.1, + thumbscale = 1.7, + usedecimals = true, + name = "Base Vertical Scale" .. CVarIcon, + desc = "Increases the blizzard base nameplate scaling height (which is impacting the selection space and default blizzard nameplate size)." .. CVarDesc, + nocombat = true, + }, + { + type = "range", + get = function() return tonumber (GetCVar ("NamePlateHorizontalScale")) end, + set = function (self, fixedparam, value) + if (not InCombatLockdown()) then + SetCVar ("NamePlateHorizontalScale", value) + else + Plater:Msg (L["OPTIONS_ERROR_CVARMODIFY"]) + end + end, + min = 0.3, + max = 2, + step = 0.1, + thumbscale = 1.7, + usedecimals = true, + name = "Base Horizontal Scale" .. CVarIcon, + desc = "Increases the blizzard base nameplate scaling height (which is impacting the selection space and default blizzard nameplate size)." .. CVarDesc, + nocombat = true, + }, + { + type = "range", + get = function() return tonumber (GetCVar ("NamePlateClassificationScale")) end, + set = function (self, fixedparam, value) + if (not InCombatLockdown()) then + SetCVar ("NamePlateClassificationScale", value) + else + Plater:Msg (L["OPTIONS_ERROR_CVARMODIFY"]) + end + end, + min = 0.3, + max = 1.5, + step = 0.1, + thumbscale = 1.7, + usedecimals = true, + name = "Base Classification Scale" .. CVarIcon, + desc = "Increases the blizzard base nameplate classification scaling (which is impacting the selection space and default blizzard nameplate size)." .. CVarDesc, + nocombat = true, + }, + + {type = "label", get = function() return "Enemy Box Selection Space:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")}, { type = "range",