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; return result;
end 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) function UnitXP_SP3_detoured_CombatText_AddMessage(message, scrollFunction, r, g, b, displayType, isStaggered)
if UnitXP_SP3_Addon["combatTextSP3"] then if UnitXP_SP3_Addon["combatTextSP3"] then
-- Reported by Heallios -- Reported by Heallios
@@ -418,6 +432,14 @@ local function UnitXP_SP3_reloadConfig()
xpsp3_checkButton_combatTextSP3:SetChecked(false); xpsp3_checkButton_combatTextSP3:SetChecked(false);
end 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 if UnitXP_SP3_Addon["cameraPinHeight"] then
UnitXP_SP3_setCameraPinHeight("enable"); UnitXP_SP3_setCameraPinHeight("enable");
xpsp3_checkButton_cameraPinHeight:SetChecked(true); xpsp3_checkButton_cameraPinHeight:SetChecked(true);
@@ -580,6 +602,14 @@ function UnitXP_SP3_UI_OnClick(widget)
end end
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 string.find(widget:GetName(), "_cameraPinHeight") then
if widget:GetChecked() then if widget:GetChecked() then
UnitXP_SP3_Addon["cameraPinHeight"] = true; UnitXP_SP3_Addon["cameraPinHeight"] = true;
@@ -710,7 +740,7 @@ end
function UnitXP_SP3_OnEvent(event) function UnitXP_SP3_OnEvent(event)
if event == "ADDON_LOADED" and arg1 == "UnitXP_SP3_Addon" then 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 if UnitXP_SP3_Addon == nil or UnitXP_SP3_Addon["dataVersion"] ~= dataVersion then
UnitXP_SP3_Addon = {}; UnitXP_SP3_Addon = {};
UnitXP_SP3_Addon["dataVersion"] = dataVersion; UnitXP_SP3_Addon["dataVersion"] = dataVersion;
@@ -728,7 +758,8 @@ function UnitXP_SP3_OnEvent(event)
UnitXP_SP3_Addon["weatherAlwaysClear"] = false; UnitXP_SP3_Addon["weatherAlwaysClear"] = false;
UnitXP_SP3_Addon["hideCritterNameplate"] = true; UnitXP_SP3_Addon["hideCritterNameplate"] = true;
UnitXP_SP3_Addon["combatTextSP3"] = false; 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"] = {};
UnitXP_SP3_Addon["notify_flashTaskbarIcon"]["PLAYER_REGEN_DISABLED"] = true; UnitXP_SP3_Addon["notify_flashTaskbarIcon"]["PLAYER_REGEN_DISABLED"] = true;
+27
View File
@@ -433,6 +433,33 @@ xsi:schemaLocation="http://www.blizzard.com/wow/ui/ C:\Projects\WoW\Bin\Interfac
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<CheckButton name="xpsp3_checkButton_hideEXPtext" inherits="UICheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="274" y="-250"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName().."Text"):SetText("Hide EXP Text");
</OnLoad>
<OnClick>
UnitXP_SP3_UI_OnClick(this);
</OnClick>
<OnEnter>
xpsp3tooltip:SetOwner(this, "ANCHOR_RIGHT");
xpsp3tooltip:SetText("Don't show that purple message when gaining experience point");
xpsp3tooltip:AddLine("Some people don't like it...",1,1,1);
xpsp3tooltip:Show();
</OnEnter>
<OnLeave>
xpsp3tooltip:Hide();
</OnLeave>
</Scripts>
</CheckButton>
<EditBox name="xpsp3_editBox_combatTextSP3_fontSize" letters="2" autoFocus="false" numeric="true"> <EditBox name="xpsp3_editBox_combatTextSP3_fontSize" letters="2" autoFocus="false" numeric="true">
<Size x="40" y="32" /> <Size x="40" y="32" />
<Anchors> <Anchors>