hide exp text
This commit is contained in:
+33
-2
@@ -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;
|
||||
|
||||
@@ -433,6 +433,33 @@ xsi:schemaLocation="http://www.blizzard.com/wow/ui/ C:\Projects\WoW\Bin\Interfac
|
||||
</Scripts>
|
||||
</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">
|
||||
<Size x="40" y="32" />
|
||||
<Anchors>
|
||||
|
||||
Reference in New Issue
Block a user