hide exp text

This commit is contained in:
konaka
2025-10-01 13:55:05 +08:00
parent c54b3c43d6
commit 119f8c3789
2 changed files with 60 additions and 2 deletions
+33 -2
View File
@@ -137,6 +137,20 @@ local function UnitXP_SP3_setModernNameplateDistance(enable)
return result;
end
local function UnitXP_SP3_setHideEXPtext(enable)
local test, result = pcall(UnitXP, "hideEXPtext", enable);
if not test then
if not skipUpdateMessage then
skipUpdateMessage = true;
UnitXP_SP3_Print(
"UnitXP_SP3.dll failed to execute \"hideEXPtext\". You might need to update UnitXP_SP3.dll to support this method.");
end
return false;
end
return result;
end
function UnitXP_SP3_detoured_CombatText_AddMessage(message, scrollFunction, r, g, b, displayType, isStaggered)
if UnitXP_SP3_Addon["combatTextSP3"] then
-- Reported by Heallios
@@ -418,6 +432,14 @@ local function UnitXP_SP3_reloadConfig()
xpsp3_checkButton_combatTextSP3:SetChecked(false);
end
if UnitXP_SP3_Addon["hideEXPtext"] then
UnitXP_SP3_setHideEXPtext("enable");
xpsp3_checkButton_hideEXPtext:SetChecked(true);
else
UnitXP_SP3_setHideEXPtext("disable");
xpsp3_checkButton_hideEXPtext:SetChecked(false);
end
if UnitXP_SP3_Addon["cameraPinHeight"] then
UnitXP_SP3_setCameraPinHeight("enable");
xpsp3_checkButton_cameraPinHeight:SetChecked(true);
@@ -580,6 +602,14 @@ function UnitXP_SP3_UI_OnClick(widget)
end
end
if string.find(widget:GetName(), "_hideEXPtext") then
if widget:GetChecked() then
UnitXP_SP3_Addon["hideEXPtext"] = true;
else
UnitXP_SP3_Addon["hideEXPtext"] = false;
end
end
if string.find(widget:GetName(), "_cameraPinHeight") then
if widget:GetChecked() then
UnitXP_SP3_Addon["cameraPinHeight"] = true;
@@ -710,7 +740,7 @@ end
function UnitXP_SP3_OnEvent(event)
if event == "ADDON_LOADED" and arg1 == "UnitXP_SP3_Addon" then
local dataVersion = 28;
local dataVersion = 29;
if UnitXP_SP3_Addon == nil or UnitXP_SP3_Addon["dataVersion"] ~= dataVersion then
UnitXP_SP3_Addon = {};
UnitXP_SP3_Addon["dataVersion"] = dataVersion;
@@ -728,7 +758,8 @@ function UnitXP_SP3_OnEvent(event)
UnitXP_SP3_Addon["weatherAlwaysClear"] = false;
UnitXP_SP3_Addon["hideCritterNameplate"] = true;
UnitXP_SP3_Addon["combatTextSP3"] = false;
UnitXP_SP3_Addon["combatTextSP3_fontSize"] = 36;
UnitXP_SP3_Addon["combatTextSP3_fontSize"] = 40;
UnitXP_SP3_Addon["hideEXPtext"] = false;
UnitXP_SP3_Addon["notify_flashTaskbarIcon"] = {};
UnitXP_SP3_Addon["notify_flashTaskbarIcon"]["PLAYER_REGEN_DISABLED"] = true;