From 7d4456f75a28958afb6131fa6efd16553b814fdd Mon Sep 17 00:00:00 2001 From: Michael Tindal Date: Wed, 13 Mar 2013 19:37:20 -0400 Subject: [PATCH] .hgignore for Sortokk's bitch ass, and spirit datatext. --- .gitignore | 2 + .hgignore | 167 ++++++++++++++++++++++++++++++++ ElvUI_SLE/modules/datatexts/spirit.lua | 35 +++++++ 3 files changed, 204 insertions(+) create mode 100644 .hgignore create mode 100755 ElvUI_SLE/modules/datatexts/spirit.lua diff --git a/.gitignore b/.gitignore index 5ebd21a..5684484 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,5 @@ pip-log.txt # Mac crap .DS_Store + +*.sublime* diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..e28c89d --- /dev/null +++ b/.hgignore @@ -0,0 +1,167 @@ +syntax: glob + +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Rr]elease/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.vspscc +.builds +*.dotCover + +## TODO: If you have NuGet Package Restore enabled, uncomment this +#packages/ + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp + +# ReSharper is a .NET coding add-in +_ReSharper* + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish + +# Others +[Bb]in +[Oo]bj +sql +TestResults +*.Cache +ClientBin +stylecop.* +~$* +*.dbmdl +Generated_Code #added for RIA/Silverlight projects + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML + + + +############ +## Windows +############ + +# Windows image file caches +Thumbs.db + +# Folder config file +Desktop.ini + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg + +# Mac crap +.DS_Store + +*.sublime* diff --git a/ElvUI_SLE/modules/datatexts/spirit.lua b/ElvUI_SLE/modules/datatexts/spirit.lua new file mode 100755 index 0000000..ed67131 --- /dev/null +++ b/ElvUI_SLE/modules/datatexts/spirit.lua @@ -0,0 +1,35 @@ +local E, L, V, P, G, _ = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore +local DT = E:GetModule('DataTexts') + +local displayNumberString = '' +local lastPanel; +local join = string.join + +local function OnEvent(self, event, unit) + local _,spirit = UnitStat("player",5) + self.text:SetFormattedText(displayNumberString, "Spirit", spirit) + + lastPanel = self +end + +local function ValueColorUpdate(hex, r, g, b) + displayNumberString = join("", "%s: ", hex, "%d|r") + + if lastPanel ~= nil then + OnEvent(lastPanel) + end +end +E['valueColorUpdateFuncs'][ValueColorUpdate] = true + +--[[ + DT:RegisterDatatext(name, events, eventFunc, updateFunc, clickFunc, onEnterFunc, onLeaveFunc) + + name - name of the datatext (required) + events - must be a table with string values of event names to register + eventFunc - function that gets fired when an event gets triggered + updateFunc - onUpdate script target function + click - function to fire when clicking the datatext + onEnterFunc - function to fire OnEnter + onLeaveFunc - function to fire OnLeave, if not provided one will be set for you that hides the tooltip. +]] +DT:RegisterDatatext('Spirit', {"UNIT_STATS", "UNIT_AURA", "FORGE_MASTER_ITEM_CHANGED", "ACTIVE_TALENT_GROUP_CHANGED", "PLAYER_TALENT_UPDATE"}, OnEvent) \ No newline at end of file -- 1.7.9.5