From 60ef8a38afae6525775f770518eb7808d9dfd041 Mon Sep 17 00:00:00 2001 From: Andrew6810 <16847730+andrew6180@users.noreply.github.com> Date: Fri, 21 Oct 2022 07:09:01 -0700 Subject: [PATCH] init --- ElvUI/Bindings.xml | 17 + ElvUI/Core/API.lua | 260 + ElvUI/Core/Animation.lua | 294 + ElvUI/Core/AprilFools.lua | 369 + ElvUI/Core/Commands.lua | 280 + ElvUI/Core/Config.lua | 509 + ElvUI/Core/Cooldowns.lua | 320 + ElvUI/Core/Core.lua | 1211 +++ ElvUI/Core/Distributor.lua | 602 ++ ElvUI/Core/Dropdown.lua | 88 + ElvUI/Core/Fonts.lua | 99 + ElvUI/Core/Install.lua | 936 ++ ElvUI/Core/Load_Core.xml | 24 + ElvUI/Core/Math.lua | 460 + ElvUI/Core/ModuleCopy.lua | 276 + ElvUI/Core/Movers.lua | 527 ++ ElvUI/Core/PixelPerfect.lua | 91 + ElvUI/Core/PluginInstaller.lua | 458 + ElvUI/Core/Smoothie.lua | 142 + ElvUI/Core/StaticPopups.lua | 1142 +++ ElvUI/Core/StatusReport.lua | 208 + ElvUI/Core/Tags.lua | 756 ++ ElvUI/Core/Toolkit.lua | 346 + ElvUI/Core/Tutorials.lua | 120 + ElvUI/Developer/Frame.lua | 280 + ElvUI/Developer/Load_Developer.xml | 6 + ElvUI/Developer/ReloadUI.lua | 8 + ElvUI/Developer/Table.lua | 30 + ElvUI/Developer/Test.lua | 5 + ElvUI/ElvUI.toc | 19 + ElvUI/Init.lua | 426 + ElvUI/Layout/Layout.lua | 521 ++ ElvUI/Layout/Load_Layout.xml | 3 + .../Ace3/AceAddon-3.0/AceAddon-3.0.lua | 674 ++ .../Ace3/AceAddon-3.0/AceAddon-3.0.xml | 4 + .../Ace3/AceComm-3.0/AceComm-3.0.lua | 308 + .../Ace3/AceComm-3.0/AceComm-3.0.xml | 5 + .../Ace3/AceComm-3.0/ChatThrottleLib.lua | 517 + .../Ace3/AceConsole-3.0/AceConsole-3.0.lua | 250 + .../Ace3/AceConsole-3.0/AceConsole-3.0.xml | 4 + ElvUI/Libraries/Ace3/AceDB-3.0/AceDB-3.0.lua | 741 ++ ElvUI/Libraries/Ace3/AceDB-3.0/AceDB-3.0.xml | 4 + .../Ace3/AceEvent-3.0/AceEvent-3.0.lua | 126 + .../Ace3/AceEvent-3.0/AceEvent-3.0.xml | 4 + .../Ace3/AceHook-3.0/AceHook-3.0.lua | 511 + .../Ace3/AceHook-3.0/AceHook-3.0.xml | 4 + .../Ace3/AceLocale-3.0/AceLocale-3.0.lua | 143 + .../Ace3/AceLocale-3.0/AceLocale-3.0.xml | 4 + .../AceSerializer-3.0/AceSerializer-3.0.lua | 281 + .../AceSerializer-3.0/AceSerializer-3.0.xml | 4 + .../Ace3/AceTimer-3.0/AceTimer-3.0.lua | 327 + .../Ace3/AceTimer-3.0/AceTimer-3.0.xml | 4 + .../CallbackHandler-1.0.lua | 238 + ElvUI/Libraries/Ace3/LibStub/LibStub.lua | 51 + ElvUI/Libraries/HealPredict/healpredict.lua | 542 ++ .../LibActionButton-1.0.lua | 1297 +++ ElvUI/Libraries/LibAnim/LibAnim.lua | 1195 +++ .../LibAuraInfo-1.0/LibAuraInfo-1.0.lua | 1132 +++ ElvUI/Libraries/LibAuraInfo-1.0/lib.xml | 8 + .../Libraries/LibAuraInfo-1.0/spellIdData.lua | 3332 +++++++ .../Libraries/LibBase64-1.0/LibBase64-1.0.lua | 164 + ElvUI/Libraries/LibChatAnims/LibChatAnims.lua | 191 + ElvUI/Libraries/LibCompress/LibCompress.lua | 1254 +++ .../LibDataBroker/LibDataBroker-1.1.lua | 90 + .../LibDualSpec-1.0/LibDualSpec-1.0.lua | 328 + .../LibElvUIPlugin-1.0/LibElvUIPlugin-1.0.lua | 335 + .../CustomSearch-1.0/CustomSearch-1.0.lua | 203 + .../LibItemSearch-1.2/LibItemSearch-1.2.lua | 287 + .../LibItemSearch-1.2/LibItemSearch-1.2.xml | 6 + .../LibItemSearch-1.2/Unfit-1.0/Unfit-1.0.lua | 40 + .../LibSharedMedia-3.0/LibSharedMedia-3.0.lua | 245 + .../LibSimpleSticky/LibSimpleSticky.lua | 296 + .../LibSpellRange-1.0/LibSpellRange-1.0.lua | 235 + .../LibTranslit-1.0/LibTranslit-1.0.lua | 113 + ElvUI/Libraries/Load_Libraries.xml | 31 + ElvUI/Libraries/UTF8/UTF8.xml | 5 + ElvUI/Libraries/UTF8/utf8.lua | 318 + ElvUI/Libraries/UTF8/utf8data.lua | 1860 ++++ ElvUI/Libraries/oUF/LICENSE | 25 + ElvUI/Libraries/oUF/blizzard.lua | 112 + ElvUI/Libraries/oUF/colors.lua | 212 + .../oUF/elements/additionalpower.lua | 259 + .../oUF/elements/assistantindicator.lua | 103 + ElvUI/Libraries/oUF/elements/auras.lua | 611 ++ ElvUI/Libraries/oUF/elements/castbar.lua | 544 ++ .../oUF/elements/combatindicator.lua | 102 + ElvUI/Libraries/oUF/elements/combopoints.lua | 127 + .../oUF/elements/grouproleindicator.lua | 107 + .../oUF/elements/happinessindicator.lua | 116 + ElvUI/Libraries/oUF/elements/health.lua | 380 + .../oUF/elements/leaderindicator.lua | 107 + .../oUF/elements/masterlooterindicator.lua | 124 + ElvUI/Libraries/oUF/elements/portrait.lua | 148 + ElvUI/Libraries/oUF/elements/power.lua | 427 + ElvUI/Libraries/oUF/elements/powerenergy.lua | 321 + ElvUI/Libraries/oUF/elements/powerrage.lua | 321 + ElvUI/Libraries/oUF/elements/pvpindicator.lua | 118 + .../oUF/elements/raidroleindicator.lua | 115 + .../oUF/elements/raidtargetindicator.lua | 102 + ElvUI/Libraries/oUF/elements/range.lua | 137 + .../oUF/elements/readycheckindicator.lua | 161 + .../oUF/elements/restingindicator.lua | 100 + ElvUI/Libraries/oUF/elements/runes.lua | 264 + ElvUI/Libraries/oUF/elements/tags.lua | 872 ++ .../oUF/elements/threatindicator.lua | 134 + ElvUI/Libraries/oUF/events.lua | 120 + ElvUI/Libraries/oUF/factory.lua | 71 + ElvUI/Libraries/oUF/finalize.lua | 4 + ElvUI/Libraries/oUF/init.lua | 3 + ElvUI/Libraries/oUF/oUF.xml | 87 + ElvUI/Libraries/oUF/ouf.lua | 808 ++ ElvUI/Libraries/oUF/private.lua | 26 + ElvUI/Libraries/oUF/units.lua | 19 + .../oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua | 381 + .../oUF_AuraWatch/oUF_AuraWatch.lua | 424 + .../oUF_Plugins/oUF_Cutaway/oUF_Cutaway.lua | 298 + .../oUF_DebuffHighlight.lua | 89 + .../oUF_Plugins/oUF_Fader/oUF_Fader.lua | 342 + .../Libraries/oUF_Plugins/oUF_GPS/oUF_GPS.lua | 178 + .../LibHealComm-4.0/LibHealComm-4.0.lua | 2963 ++++++ .../oUF_HealComm4/oUF_HealComm4.lua | 216 + .../oUF_HealComm4/oUF_HealComm4.xml | 3 + ElvUI/Libraries/oUF_Plugins/oUF_Plugins.xml | 12 + .../oUF_RaidDebuffs/oUF_RaidDebuffs.lua | 245 + .../LibResComm-1.0/LibResComm-1.0.lua | 411 + .../oUF_Plugins/oUF_ResComm/oUF_ResComm.lua | 175 + .../oUF_Plugins/oUF_ResComm/oUF_ResComm.xml | 4 + .../oUF_Plugins/oUF_Trinkets/oUF_Trinkets.lua | 100 + ElvUI/Locales/Load_Locales.xml | 11 + ElvUI/Locales/deDE.lua | 331 + ElvUI/Locales/enUS.lua | 333 + ElvUI/Locales/esMX.lua | 330 + ElvUI/Locales/frFR.lua | 331 + ElvUI/Locales/koKR.lua | 331 + ElvUI/Locales/ptBR.lua | 331 + ElvUI/Locales/ruRU.lua | 330 + ElvUI/Locales/zhCN.lua | 331 + ElvUI/Locales/zhTW.lua | 330 + ElvUI/Media/Arrows/Arrow0.tga | Bin 0 -> 2096 bytes ElvUI/Media/Arrows/Arrow1.tga | Bin 0 -> 1617 bytes ElvUI/Media/Arrows/Arrow10.tga | Bin 0 -> 1481 bytes ElvUI/Media/Arrows/Arrow11.tga | Bin 0 -> 1114 bytes ElvUI/Media/Arrows/Arrow12.tga | Bin 0 -> 1566 bytes ElvUI/Media/Arrows/Arrow13.tga | Bin 0 -> 1046 bytes ElvUI/Media/Arrows/Arrow14.tga | Bin 0 -> 1264 bytes ElvUI/Media/Arrows/Arrow15.tga | Bin 0 -> 2390 bytes ElvUI/Media/Arrows/Arrow16.tga | Bin 0 -> 1550 bytes ElvUI/Media/Arrows/Arrow17.tga | Bin 0 -> 2810 bytes ElvUI/Media/Arrows/Arrow18.tga | Bin 0 -> 2292 bytes ElvUI/Media/Arrows/Arrow19.tga | Bin 0 -> 1331 bytes ElvUI/Media/Arrows/Arrow2.tga | Bin 0 -> 1882 bytes ElvUI/Media/Arrows/Arrow20.tga | Bin 0 -> 2770 bytes ElvUI/Media/Arrows/Arrow21.tga | Bin 0 -> 1864 bytes ElvUI/Media/Arrows/Arrow22.tga | Bin 0 -> 2648 bytes ElvUI/Media/Arrows/Arrow23.tga | Bin 0 -> 2388 bytes ElvUI/Media/Arrows/Arrow24.tga | Bin 0 -> 2492 bytes ElvUI/Media/Arrows/Arrow25.tga | Bin 0 -> 2604 bytes ElvUI/Media/Arrows/Arrow26.tga | Bin 0 -> 3162 bytes ElvUI/Media/Arrows/Arrow27.tga | Bin 0 -> 3254 bytes ElvUI/Media/Arrows/Arrow28.tga | Bin 0 -> 1179 bytes ElvUI/Media/Arrows/Arrow29.tga | Bin 0 -> 1533 bytes ElvUI/Media/Arrows/Arrow3.tga | Bin 0 -> 2970 bytes ElvUI/Media/Arrows/Arrow30.tga | Bin 0 -> 2520 bytes ElvUI/Media/Arrows/Arrow31.tga | Bin 0 -> 1223 bytes ElvUI/Media/Arrows/Arrow32.tga | Bin 0 -> 2558 bytes ElvUI/Media/Arrows/Arrow33.tga | Bin 0 -> 2078 bytes ElvUI/Media/Arrows/Arrow34.tga | Bin 0 -> 1768 bytes ElvUI/Media/Arrows/Arrow35.tga | Bin 0 -> 2293 bytes ElvUI/Media/Arrows/Arrow36.tga | Bin 0 -> 1866 bytes ElvUI/Media/Arrows/Arrow37.tga | Bin 0 -> 1215 bytes ElvUI/Media/Arrows/Arrow38.tga | Bin 0 -> 2180 bytes ElvUI/Media/Arrows/Arrow39.tga | Bin 0 -> 1858 bytes ElvUI/Media/Arrows/Arrow4.tga | Bin 0 -> 2340 bytes ElvUI/Media/Arrows/Arrow40.tga | Bin 0 -> 2287 bytes ElvUI/Media/Arrows/Arrow41.tga | Bin 0 -> 3107 bytes ElvUI/Media/Arrows/Arrow42.tga | Bin 0 -> 2364 bytes ElvUI/Media/Arrows/Arrow43.tga | Bin 0 -> 1857 bytes ElvUI/Media/Arrows/Arrow44.tga | Bin 0 -> 2204 bytes ElvUI/Media/Arrows/Arrow45.tga | Bin 0 -> 1792 bytes ElvUI/Media/Arrows/Arrow46.tga | Bin 0 -> 2007 bytes ElvUI/Media/Arrows/Arrow47.tga | Bin 0 -> 1898 bytes ElvUI/Media/Arrows/Arrow48.tga | Bin 0 -> 2028 bytes ElvUI/Media/Arrows/Arrow49.tga | Bin 0 -> 2810 bytes ElvUI/Media/Arrows/Arrow5.tga | Bin 0 -> 2160 bytes ElvUI/Media/Arrows/Arrow50.tga | Bin 0 -> 2152 bytes ElvUI/Media/Arrows/Arrow51.tga | Bin 0 -> 2394 bytes ElvUI/Media/Arrows/Arrow52.tga | Bin 0 -> 1913 bytes ElvUI/Media/Arrows/Arrow53.tga | Bin 0 -> 2654 bytes ElvUI/Media/Arrows/Arrow54.tga | Bin 0 -> 2548 bytes ElvUI/Media/Arrows/Arrow55.tga | Bin 0 -> 2522 bytes ElvUI/Media/Arrows/Arrow56.tga | Bin 0 -> 2310 bytes ElvUI/Media/Arrows/Arrow57.tga | Bin 0 -> 2619 bytes ElvUI/Media/Arrows/Arrow58.tga | Bin 0 -> 2392 bytes ElvUI/Media/Arrows/Arrow59.tga | Bin 0 -> 2344 bytes ElvUI/Media/Arrows/Arrow6.tga | Bin 0 -> 2844 bytes ElvUI/Media/Arrows/Arrow60.tga | Bin 0 -> 2138 bytes ElvUI/Media/Arrows/Arrow61.tga | Bin 0 -> 1812 bytes ElvUI/Media/Arrows/Arrow62.tga | Bin 0 -> 1796 bytes ElvUI/Media/Arrows/Arrow63.tga | Bin 0 -> 1910 bytes ElvUI/Media/Arrows/Arrow64.tga | Bin 0 -> 1142 bytes ElvUI/Media/Arrows/Arrow65.tga | Bin 0 -> 1731 bytes ElvUI/Media/Arrows/Arrow66.tga | Bin 0 -> 1468 bytes ElvUI/Media/Arrows/Arrow67.tga | Bin 0 -> 1956 bytes ElvUI/Media/Arrows/Arrow68.tga | Bin 0 -> 2332 bytes ElvUI/Media/Arrows/Arrow69.tga | Bin 0 -> 2366 bytes ElvUI/Media/Arrows/Arrow7.tga | Bin 0 -> 1614 bytes ElvUI/Media/Arrows/Arrow70.tga | Bin 0 -> 2694 bytes ElvUI/Media/Arrows/Arrow71.tga | Bin 0 -> 2470 bytes ElvUI/Media/Arrows/Arrow72.tga | Bin 0 -> 2712 bytes ElvUI/Media/Arrows/Arrow8.tga | Bin 0 -> 1960 bytes ElvUI/Media/Arrows/Arrow9.tga | Bin 0 -> 1346 bytes ElvUI/Media/Arrows/ArrowRed.tga | Bin 0 -> 10467 bytes ElvUI/Media/Arrows/OldArrow2.tga | Bin 0 -> 1166 bytes ElvUI/Media/Arrows/RLArrow.tga | Bin 0 -> 4140 bytes ElvUI/Media/ChatEmojis/Angry.tga | Bin 0 -> 1590 bytes ElvUI/Media/ChatEmojis/Blush.tga | Bin 0 -> 1798 bytes ElvUI/Media/ChatEmojis/BrokenHeart.tga | Bin 0 -> 1484 bytes ElvUI/Media/ChatEmojis/CallMe.tga | Bin 0 -> 1386 bytes ElvUI/Media/ChatEmojis/Cry.tga | Bin 0 -> 1820 bytes ElvUI/Media/ChatEmojis/Facepalm.tga | Bin 0 -> 3240 bytes ElvUI/Media/ChatEmojis/Grin.tga | Bin 0 -> 1828 bytes ElvUI/Media/ChatEmojis/Heart.tga | Bin 0 -> 912 bytes ElvUI/Media/ChatEmojis/HeartEyes.tga | Bin 0 -> 1598 bytes ElvUI/Media/ChatEmojis/Joy.tga | Bin 0 -> 2104 bytes ElvUI/Media/ChatEmojis/Kappa.tga | Bin 0 -> 3433 bytes ElvUI/Media/ChatEmojis/Meaw.tga | Bin 0 -> 3257 bytes ElvUI/Media/ChatEmojis/MiddleFinger.tga | Bin 0 -> 1106 bytes ElvUI/Media/ChatEmojis/Murloc.tga | Bin 0 -> 3660 bytes ElvUI/Media/ChatEmojis/OkHand.tga | Bin 0 -> 1484 bytes ElvUI/Media/ChatEmojis/OpenMouth.tga | Bin 0 -> 1422 bytes ElvUI/Media/ChatEmojis/Poop.tga | Bin 0 -> 1691 bytes ElvUI/Media/ChatEmojis/Rage.tga | Bin 0 -> 1586 bytes ElvUI/Media/ChatEmojis/SadKitty.tga | Bin 0 -> 3669 bytes ElvUI/Media/ChatEmojis/Scream.tga | Bin 0 -> 2246 bytes ElvUI/Media/ChatEmojis/ScreamCat.tga | Bin 0 -> 2310 bytes ElvUI/Media/ChatEmojis/SemiColon.tga | Bin 0 -> 1070 bytes ElvUI/Media/ChatEmojis/SlightFrown.tga | Bin 0 -> 1382 bytes ElvUI/Media/ChatEmojis/Smile.tga | Bin 0 -> 1726 bytes ElvUI/Media/ChatEmojis/Smirk.tga | Bin 0 -> 1618 bytes ElvUI/Media/ChatEmojis/Sob.tga | Bin 0 -> 2250 bytes ElvUI/Media/ChatEmojis/StuckOutTongue.tga | Bin 0 -> 1670 bytes .../ChatEmojis/StuckOutTongueClosedEyes.tga | Bin 0 -> 1850 bytes ElvUI/Media/ChatEmojis/Sunglasses.tga | Bin 0 -> 1630 bytes ElvUI/Media/ChatEmojis/Thinking.tga | Bin 0 -> 1784 bytes ElvUI/Media/ChatEmojis/ThumbsUp.tga | Bin 0 -> 1681 bytes ElvUI/Media/ChatEmojis/Wink.tga | Bin 0 -> 1670 bytes ElvUI/Media/ChatEmojis/ZZZ.tga | Bin 0 -> 1078 bytes ElvUI/Media/ChatLogos/Bathrobe.tga | Bin 0 -> 895 bytes ElvUI/Media/ChatLogos/ElvBlue.tga | Bin 0 -> 1490 bytes ElvUI/Media/ChatLogos/ElvGreen.tga | Bin 0 -> 1502 bytes ElvUI/Media/ChatLogos/ElvMelon.tga | Bin 0 -> 1560 bytes ElvUI/Media/ChatLogos/ElvOrange.tga | Bin 0 -> 1530 bytes ElvUI/Media/ChatLogos/ElvPink.tga | Bin 0 -> 1521 bytes ElvUI/Media/ChatLogos/ElvPurple.tga | Bin 0 -> 1509 bytes ElvUI/Media/ChatLogos/ElvRainbow.tga | Bin 0 -> 1557 bytes ElvUI/Media/ChatLogos/ElvRed.tga | Bin 0 -> 1517 bytes ElvUI/Media/ChatLogos/ElvYellow.tga | Bin 0 -> 1489 bytes ElvUI/Media/ChatLogos/HelloKitty.tga | Bin 0 -> 5344 bytes ElvUI/Media/ChatLogos/Illuminati.tga | Bin 0 -> 1320 bytes ElvUI/Media/ChatLogos/MrHankey.tga | Bin 0 -> 2782 bytes ElvUI/Media/ChatLogos/Rainbow.tga | Bin 0 -> 3695 bytes ElvUI/Media/ChatLogos/TyroneBiggums.tga | Bin 0 -> 2902 bytes ElvUI/Media/Fonts/ActionMan.ttf | Bin 0 -> 49408 bytes ElvUI/Media/Fonts/ContinuumMedium.ttf | Bin 0 -> 46584 bytes ElvUI/Media/Fonts/DieDieDie.ttf | Bin 0 -> 383352 bytes ElvUI/Media/Fonts/Expressway.ttf | Bin 0 -> 99820 bytes ElvUI/Media/Fonts/Homespun.ttf | Bin 0 -> 21196 bytes ElvUI/Media/Fonts/Invisible.ttf | Bin 0 -> 12076 bytes ElvUI/Media/Fonts/PTSansNarrow.ttf | Bin 0 -> 316044 bytes ElvUI/Media/Load_Media.xml | 3 + ElvUI/Media/SharedMedia.lua | 159 + ElvUI/Media/Sounds/AwwCrap.ogg | Bin 0 -> 12925 bytes ElvUI/Media/Sounds/BbqAss.ogg | Bin 0 -> 35023 bytes ElvUI/Media/Sounds/DumbShit.ogg | Bin 0 -> 25963 bytes ElvUI/Media/Sounds/HarlemShake.ogg | Bin 0 -> 514249 bytes ElvUI/Media/Sounds/HelloKitty.ogg | Bin 0 -> 684252 bytes ElvUI/Media/Sounds/MamaWeekends.ogg | Bin 0 -> 19821 bytes ElvUI/Media/Sounds/RunFast.ogg | Bin 0 -> 17455 bytes ElvUI/Media/Sounds/SndIncMsg.ogg | Bin 0 -> 9477 bytes ElvUI/Media/Sounds/StopRunningSlimBall.ogg | Bin 0 -> 19388 bytes ElvUI/Media/Sounds/Warning.ogg | Bin 0 -> 13371 bytes ElvUI/Media/Sounds/Whisper.ogg | Bin 0 -> 20381 bytes ElvUI/Media/Sounds/YankieBangBang.ogg | Bin 0 -> 33992 bytes ElvUI/Media/Textures/Alliance-Logo-Small.blp | Bin 0 -> 2564 bytes ElvUI/Media/Textures/Alliance-Logo.blp | Bin 0 -> 88580 bytes ElvUI/Media/Textures/ArrowRight.tga | Bin 0 -> 942 bytes ElvUI/Media/Textures/BagJunkIcon.blp | Bin 0 -> 2536 bytes ElvUI/Media/Textures/Black8x8.tga | Bin 0 -> 300 bytes ElvUI/Media/Textures/Broom.blp | Bin 0 -> 3916 bytes ElvUI/Media/Textures/ExitVehicle.tga | Bin 0 -> 1901 bytes ElvUI/Media/Textures/HelloKitty.tga | Bin 0 -> 163018 bytes ElvUI/Media/Textures/Highlight.tga | Bin 0 -> 32812 bytes ElvUI/Media/Textures/Horde-Logo-Small.blp | Bin 0 -> 2564 bytes ElvUI/Media/Textures/Horde-Logo.blp | Bin 0 -> 88580 bytes ElvUI/Media/Textures/Leader.tga | Bin 0 -> 7293 bytes ElvUI/Media/Textures/LevelUpTex.blp | Bin 0 -> 350724 bytes ElvUI/Media/Textures/Melli.tga | Bin 0 -> 16428 bytes ElvUI/Media/Textures/Minimalist.tga | Bin 0 -> 1278 bytes ElvUI/Media/Textures/Minus.tga | Bin 0 -> 118 bytes ElvUI/Media/Textures/MinusButton.tga | Bin 0 -> 575 bytes ElvUI/Media/Textures/PVP-Icons.blp | Bin 0 -> 44860 bytes ElvUI/Media/Textures/Pause.tga | Bin 0 -> 629 bytes ElvUI/Media/Textures/Play.tga | Bin 0 -> 666 bytes ElvUI/Media/Textures/Plus.tga | Bin 0 -> 178 bytes ElvUI/Media/Textures/PlusButton.tga | Bin 0 -> 537 bytes ElvUI/Media/Textures/Raid-Icon-Rez.blp | Bin 0 -> 6660 bytes ElvUI/Media/Textures/Reset.tga | Bin 0 -> 428 bytes ElvUI/Media/Textures/Resting1.tga | Bin 0 -> 1697 bytes ElvUI/Media/Textures/RoleIcons.tga | Bin 0 -> 37601 bytes ElvUI/Media/Textures/SkullIcon.tga | Bin 0 -> 6535 bytes ElvUI/Media/Textures/Smooth.tga | Bin 0 -> 14664 bytes ElvUI/Media/Textures/StreamBackground.blp | Bin 0 -> 6660 bytes ElvUI/Media/Textures/StreamCircle.blp | Bin 0 -> 6660 bytes ElvUI/Media/Textures/StreamFrame.blp | Bin 0 -> 6660 bytes ElvUI/Media/Textures/StreamSpark.blp | Bin 0 -> 6660 bytes ElvUI/Media/Textures/arrow.tga | Bin 0 -> 913 bytes ElvUI/Media/Textures/arrowup.tga | Bin 0 -> 660 bytes ElvUI/Media/Textures/bagQuestIcon.tga | Bin 0 -> 6660 bytes ElvUI/Media/Textures/close.tga | Bin 0 -> 2197 bytes ElvUI/Media/Textures/combat.tga | Bin 0 -> 2542 bytes ElvUI/Media/Textures/copy.tga | Bin 0 -> 715 bytes ElvUI/Media/Textures/cross.tga | Bin 0 -> 666 bytes ElvUI/Media/Textures/dps.tga | Bin 0 -> 2344 bytes ElvUI/Media/Textures/glowTex.tga | Bin 0 -> 7372 bytes ElvUI/Media/Textures/healer.tga | Bin 0 -> 1034 bytes ElvUI/Media/Textures/helloKittyChat.tga | Bin 0 -> 20747 bytes ElvUI/Media/Textures/logo.tga | Bin 0 -> 131116 bytes ElvUI/Media/Textures/mail.tga | Bin 0 -> 558 bytes ElvUI/Media/Textures/nameplates.BLP | Bin 0 -> 33940 bytes ElvUI/Media/Textures/normTex.tga | Bin 0 -> 28523 bytes ElvUI/Media/Textures/normTex2.tga | Bin 0 -> 14664 bytes ElvUI/Media/Textures/raidicons.blp | Bin 0 -> 88580 bytes ElvUI/Media/Textures/resting.tga | Bin 0 -> 2337 bytes ElvUI/Media/Textures/spark.tga | Bin 0 -> 826 bytes ElvUI/Media/Textures/tank.tga | Bin 0 -> 2208 bytes ElvUI/Modules/ActionBars/ActionBars.lua | 997 ++ ElvUI/Modules/ActionBars/Bind.lua | 392 + ElvUI/Modules/ActionBars/Load_ActionBars.xml | 8 + ElvUI/Modules/ActionBars/MicroBar.lua | 194 + ElvUI/Modules/ActionBars/PetBar.lua | 308 + ElvUI/Modules/ActionBars/StanceBar.lua | 330 + ElvUI/Modules/ActionBars/TotemBar.lua | 347 + ElvUI/Modules/Auras/Auras.lua | 648 ++ ElvUI/Modules/Auras/Load_Auras.xml | 3 + ElvUI/Modules/Bags/BagBar.lua | 181 + ElvUI/Modules/Bags/Bags.lua | 1867 ++++ ElvUI/Modules/Bags/Load_Bags.xml | 5 + ElvUI/Modules/Bags/Sort.lua | 906 ++ ElvUI/Modules/Blizzard/AlertFrame.lua | 138 + ElvUI/Modules/Blizzard/Blizzard.lua | 109 + ElvUI/Modules/Blizzard/CaptureBar.lua | 63 + ElvUI/Modules/Blizzard/ColorPicker.lua | 388 + ElvUI/Modules/Blizzard/Durability.lua | 27 + ElvUI/Modules/Blizzard/GM.lua | 12 + ElvUI/Modules/Blizzard/Kill.lua | 10 + ElvUI/Modules/Blizzard/Load_Blizzard.xml | 11 + ElvUI/Modules/Blizzard/Vehicle.lua | 50 + ElvUI/Modules/Blizzard/WatchFrame.lua | 50 + ElvUI/Modules/Chat/Chat.lua | 2033 ++++ ElvUI/Modules/Chat/Load_Chat.xml | 3 + ElvUI/Modules/DataBars/DataBars.lua | 63 + ElvUI/Modules/DataBars/Experience.lua | 182 + ElvUI/Modules/DataBars/Load_DataBars.xml | 5 + ElvUI/Modules/DataBars/PetExperience.lua | 145 + ElvUI/Modules/DataBars/Reputation.lua | 145 + ElvUI/Modules/DataTexts/Achievement.lua | 32 + ElvUI/Modules/DataTexts/Armor.lua | 58 + ElvUI/Modules/DataTexts/AttackPower.lua | 73 + ElvUI/Modules/DataTexts/Avoidance.lua | 122 + ElvUI/Modules/DataTexts/Bags.lua | 91 + ElvUI/Modules/DataTexts/Battleground.lua | 91 + ElvUI/Modules/DataTexts/CombatTime.lua | 42 + ElvUI/Modules/DataTexts/ConfigElvUI.lua | 72 + ElvUI/Modules/DataTexts/Coordinates.lua | 36 + ElvUI/Modules/DataTexts/Crit.lua | 71 + ElvUI/Modules/DataTexts/DPS.lua | 90 + ElvUI/Modules/DataTexts/DataTexts.lua | 347 + ElvUI/Modules/DataTexts/Durability.lua | 94 + ElvUI/Modules/DataTexts/Friends.lua | 292 + ElvUI/Modules/DataTexts/Gold.lua | 164 + ElvUI/Modules/DataTexts/Guild.lua | 328 + ElvUI/Modules/DataTexts/HPS.lua | 87 + ElvUI/Modules/DataTexts/Haste.lua | 76 + ElvUI/Modules/DataTexts/Hit.lua | 40 + ElvUI/Modules/DataTexts/HonorableKills.lua | 27 + ElvUI/Modules/DataTexts/Load_DataTexts.xml | 27 + ElvUI/Modules/DataTexts/Regen.lua | 35 + ElvUI/Modules/DataTexts/Resilience.lua | 39 + ElvUI/Modules/DataTexts/SpellPower.lua | 34 + ElvUI/Modules/DataTexts/System.lua | 231 + ElvUI/Modules/DataTexts/Time.lua | 275 + ElvUI/Modules/Load_Modules.xml | 15 + ElvUI/Modules/Maps/Load_Maps.xml | 4 + ElvUI/Modules/Maps/Minimap.lua | 533 ++ ElvUI/Modules/Maps/Worldmap.lua | 259 + ElvUI/Modules/Misc/AFK.lua | 348 + ElvUI/Modules/Misc/ChatBubbles.lua | 262 + ElvUI/Modules/Misc/DebugTools.lua | 162 + ElvUI/Modules/Misc/Load_Misc.xml | 13 + ElvUI/Modules/Misc/Loot.lua | 352 + ElvUI/Modules/Misc/LootRoll.lua | 474 + ElvUI/Modules/Misc/Misc.lua | 355 + ElvUI/Modules/Misc/RaidBuffReminder.lua | 395 + ElvUI/Modules/Misc/RaidMarker.lua | 104 + ElvUI/Modules/Misc/RaidUtility.lua | 225 + ElvUI/Modules/Misc/Threat.lua | 176 + ElvUI/Modules/Misc/TotemBar.lua | 181 + ElvUI/Modules/Nameplates/Elements/Auras.lua | 463 + ElvUI/Modules/Nameplates/Elements/CastBar.lua | 358 + .../Nameplates/Elements/ComboPoints.lua | 119 + .../Nameplates/Elements/CutawayHealth.lua | 61 + ElvUI/Modules/Nameplates/Elements/Elite.lua | 53 + ElvUI/Modules/Nameplates/Elements/Glow.lua | 193 + .../Nameplates/Elements/HealerIcon.lua | 31 + .../Modules/Nameplates/Elements/HealthBar.lua | 213 + .../Modules/Nameplates/Elements/Highlight.lua | 34 + .../Modules/Nameplates/Elements/IconFrame.lua | 82 + ElvUI/Modules/Nameplates/Elements/Level.lua | 39 + ElvUI/Modules/Nameplates/Elements/Name.lua | 124 + .../Modules/Nameplates/Elements/RaidIcon.lua | 19 + ElvUI/Modules/Nameplates/Load_Nameplates.xml | 17 + ElvUI/Modules/Nameplates/Nameplates.lua | 1169 +++ ElvUI/Modules/Nameplates/StyleFilter.lua | 883 ++ ElvUI/Modules/Skins/Addons/Ace3.lua | 491 + ElvUI/Modules/Skins/Addons/Load_Addons.xml | 3 + ElvUI/Modules/Skins/Blizzard/Achievement.lua | 540 ++ ElvUI/Modules/Skins/Blizzard/Alerts.lua | 73 + ElvUI/Modules/Skins/Blizzard/Arena.lua | 40 + .../Modules/Skins/Blizzard/ArenaRegistrar.lua | 87 + ElvUI/Modules/Skins/Blizzard/AuctionHouse.lua | 381 + ElvUI/Modules/Skins/Blizzard/BGMap.lua | 75 + ElvUI/Modules/Skins/Blizzard/BGScore.lua | 101 + ElvUI/Modules/Skins/Blizzard/Bags.lua | 295 + ElvUI/Modules/Skins/Blizzard/Barber.lua | 29 + ElvUI/Modules/Skins/Blizzard/Binding.lua | 41 + .../Skins/Blizzard/BlizzardOptions.lua | 624 ++ ElvUI/Modules/Skins/Blizzard/Calendar.lua | 395 + ElvUI/Modules/Skins/Blizzard/Character.lua | 810 ++ ElvUI/Modules/Skins/Blizzard/Debug.lua | 60 + ElvUI/Modules/Skins/Blizzard/DressingRoom.lua | 50 + ElvUI/Modules/Skins/Blizzard/Friends.lua | 685 ++ ElvUI/Modules/Skins/Blizzard/GMChat.lua | 118 + ElvUI/Modules/Skins/Blizzard/Glyph.lua | 101 + ElvUI/Modules/Skins/Blizzard/Gossip.lua | 93 + ElvUI/Modules/Skins/Blizzard/GuildBank.lua | 214 + .../Modules/Skins/Blizzard/GuildRegistrar.lua | 46 + ElvUI/Modules/Skins/Blizzard/Help.lua | 144 + ElvUI/Modules/Skins/Blizzard/Inspect.lua | 190 + ElvUI/Modules/Skins/Blizzard/LFD.lua | 340 + ElvUI/Modules/Skins/Blizzard/LFR.lua | 104 + .../Modules/Skins/Blizzard/Load_Blizzard.xml | 52 + ElvUI/Modules/Skins/Blizzard/Loot.lua | 198 + ElvUI/Modules/Skins/Blizzard/Macro.lua | 131 + ElvUI/Modules/Skins/Blizzard/Mail.lua | 301 + ElvUI/Modules/Skins/Blizzard/Merchant.lua | 237 + ElvUI/Modules/Skins/Blizzard/MirrorTimers.lua | 54 + ElvUI/Modules/Skins/Blizzard/Misc.lua | 302 + ElvUI/Modules/Skins/Blizzard/Petition.lua | 40 + ElvUI/Modules/Skins/Blizzard/PvP.lua | 155 + ElvUI/Modules/Skins/Blizzard/Quest.lua | 437 + ElvUI/Modules/Skins/Blizzard/Raid.lua | 152 + ElvUI/Modules/Skins/Blizzard/Socket.lua | 90 + ElvUI/Modules/Skins/Blizzard/Spellbook.lua | 209 + ElvUI/Modules/Skins/Blizzard/Stable.lua | 83 + ElvUI/Modules/Skins/Blizzard/Tabard.lua | 59 + ElvUI/Modules/Skins/Blizzard/Talent.lua | 115 + ElvUI/Modules/Skins/Blizzard/Taxi.lua | 36 + ElvUI/Modules/Skins/Blizzard/TimeManager.lua | 100 + ElvUI/Modules/Skins/Blizzard/Tooltip.lua | 45 + ElvUI/Modules/Skins/Blizzard/Trade.lua | 146 + ElvUI/Modules/Skins/Blizzard/Tradeskill.lua | 264 + ElvUI/Modules/Skins/Blizzard/Trainer.lua | 136 + ElvUI/Modules/Skins/Blizzard/Tutorial.lua | 44 + ElvUI/Modules/Skins/Blizzard/WatchFrame.lua | 157 + .../Skins/Blizzard/WorldStateFrame.lua | 84 + ElvUI/Modules/Skins/Blizzard/Worldmap.lua | 198 + ElvUI/Modules/Skins/Load_Skins.xml | 5 + ElvUI/Modules/Skins/Skins.lua | 1011 ++ ElvUI/Modules/Tooltip/Load_Tooltip.xml | 3 + ElvUI/Modules/Tooltip/Tooltip.lua | 714 ++ ElvUI/Modules/UnitFrames/ConfigEnviroment.lua | 315 + .../Modules/UnitFrames/Elements/AuraBars.lua | 280 + ElvUI/Modules/UnitFrames/Elements/Auras.lua | 529 ++ .../UnitFrames/Elements/BuffIndicator.lua | 241 + ElvUI/Modules/UnitFrames/Elements/CastBar.lua | 423 + .../Modules/UnitFrames/Elements/ClassBars.lua | 411 + .../UnitFrames/Elements/CombatIndicator.lua | 54 + .../UnitFrames/Elements/ComboPoints.lua | 293 + .../UnitFrames/Elements/CustomText.lua | 52 + ElvUI/Modules/UnitFrames/Elements/Cutaway.lua | 87 + .../UnitFrames/Elements/DebuffHighlight.lua | 65 + .../Modules/UnitFrames/Elements/FrameGlow.lua | 431 + ElvUI/Modules/UnitFrames/Elements/GPS.lua | 42 + .../Modules/UnitFrames/Elements/Happiness.lua | 127 + .../Modules/UnitFrames/Elements/HealComm.lua | 167 + ElvUI/Modules/UnitFrames/Elements/Health.lua | 419 + .../Modules/UnitFrames/Elements/InfoPanel.lua | 61 + .../UnitFrames/Elements/Load_Elements.xml | 35 + ElvUI/Modules/UnitFrames/Elements/Name.lua | 50 + .../Modules/UnitFrames/Elements/Portrait.lua | 139 + ElvUI/Modules/UnitFrames/Elements/Power.lua | 345 + .../UnitFrames/Elements/PowerEnergy.lua | 311 + .../Modules/UnitFrames/Elements/PowerRage.lua | 298 + ElvUI/Modules/UnitFrames/Elements/PvPIcon.lua | 70 + .../UnitFrames/Elements/PvPIndicator.lua | 21 + .../UnitFrames/Elements/RaidDebuffs.lua | 65 + .../Modules/UnitFrames/Elements/RaidIcon.lua | 33 + .../UnitFrames/Elements/RaidRoleIcons.lua | 131 + ElvUI/Modules/UnitFrames/Elements/Range.lua | 177 + .../UnitFrames/Elements/ReadyCheckIcon.lua | 31 + .../UnitFrames/Elements/RestingIndicator.lua | 57 + .../UnitFrames/Elements/ResurrectionIcon.lua | 35 + .../Modules/UnitFrames/Elements/RoleIcons.lua | 83 + ElvUI/Modules/UnitFrames/Elements/Threat.lua | 162 + ElvUI/Modules/UnitFrames/Elements/Trinket.lua | 36 + ElvUI/Modules/UnitFrames/Groups/Arena.lua | 152 + ElvUI/Modules/UnitFrames/Groups/Assist.lua | 189 + ElvUI/Modules/UnitFrames/Groups/Boss.lua | 152 + .../Modules/UnitFrames/Groups/Load_Groups.xml | 10 + ElvUI/Modules/UnitFrames/Groups/Party.lua | 290 + ElvUI/Modules/UnitFrames/Groups/Raid.lua | 243 + ElvUI/Modules/UnitFrames/Groups/Raid40.lua | 247 + ElvUI/Modules/UnitFrames/Groups/RaidPets.lua | 189 + ElvUI/Modules/UnitFrames/Groups/Tank.lua | 189 + ElvUI/Modules/UnitFrames/Load_UnitFrames.xml | 33 + ElvUI/Modules/UnitFrames/UnitFrames.lua | 1419 +++ ElvUI/Modules/UnitFrames/Units/Focus.lua | 137 + .../Modules/UnitFrames/Units/FocusTarget.lua | 109 + ElvUI/Modules/UnitFrames/Units/Load_Units.xml | 10 + ElvUI/Modules/UnitFrames/Units/Pet.lua | 127 + ElvUI/Modules/UnitFrames/Units/PetTarget.lua | 104 + ElvUI/Modules/UnitFrames/Units/Player.lua | 237 + ElvUI/Modules/UnitFrames/Units/Target.lua | 163 + .../Modules/UnitFrames/Units/TargetTarget.lua | 109 + .../UnitFrames/Units/TargetTargetTarget.lua | 106 + ElvUI/Settings/Filters/Load_Filters.xml | 4 + ElvUI/Settings/Filters/NamePlate.lua | 171 + ElvUI/Settings/Filters/UnitFrame.lua | 610 ++ ElvUI/Settings/Global.lua | 220 + ElvUI/Settings/Load_Config.xml | 6 + ElvUI/Settings/Private.lua | 146 + ElvUI/Settings/Profile.lua | 4336 +++++++++ ElvUI_OptionsUI/ActionBars.lua | 1133 +++ ElvUI_OptionsUI/Auras.lua | 413 + ElvUI_OptionsUI/Bags.lua | 838 ++ ElvUI_OptionsUI/Chat.lua | 718 ++ ElvUI_OptionsUI/Cooldown.lua | 317 + ElvUI_OptionsUI/Core.lua | 491 + ElvUI_OptionsUI/DataBars.lua | 227 + ElvUI_OptionsUI/DataTexts.lua | 389 + ElvUI_OptionsUI/ElvUI_OptionsUI.toc | 27 + ElvUI_OptionsUI/Filters.lua | 1461 +++ ElvUI_OptionsUI/General.lua | 718 ++ .../Ace3/AceConfig-3.0/AceConfig-3.0.lua | 58 + .../Ace3/AceConfig-3.0/AceConfig-3.0.xml | 8 + .../AceConfigCmd-3.0/AceConfigCmd-3.0.lua | 794 ++ .../AceConfigCmd-3.0/AceConfigCmd-3.0.xml | 4 + .../AceConfigDialog-3.0.lua | 2080 +++++ .../AceConfigDialog-3.0.xml | 4 + .../AceConfigRegistry-3.0.lua | 384 + .../AceConfigRegistry-3.0.xml | 4 + .../AceDBOptions-3.0/AceDBOptions-3.0.lua | 460 + .../AceDBOptions-3.0/AceDBOptions-3.0.xml | 4 + .../Libraries/Ace3/AceGUI-3.0/AceGUI-3.0.lua | 1054 +++ .../Libraries/Ace3/AceGUI-3.0/AceGUI-3.0.xml | 29 + .../AceGUIContainer-BlizOptionsGroup.lua | 138 + .../widgets/AceGUIContainer-DropDownGroup.lua | 157 + .../widgets/AceGUIContainer-Frame.lua | 316 + .../widgets/AceGUIContainer-InlineGroup.lua | 103 + .../widgets/AceGUIContainer-ScrollFrame.lua | 215 + .../widgets/AceGUIContainer-SimpleGroup.lua | 69 + .../widgets/AceGUIContainer-TabGroup.lua | 349 + .../widgets/AceGUIContainer-TreeGroup.lua | 705 ++ .../widgets/AceGUIContainer-Window.lua | 336 + .../widgets/AceGUIWidget-Button-ElvUI.lua | 179 + .../widgets/AceGUIWidget-Button.lua | 103 + .../widgets/AceGUIWidget-CheckBox.lua | 295 + .../widgets/AceGUIWidget-ColorPicker.lua | 205 + .../widgets/AceGUIWidget-DropDown-Items.lua | 471 + .../widgets/AceGUIWidget-DropDown.lua | 768 ++ .../widgets/AceGUIWidget-EditBox.lua | 263 + .../widgets/AceGUIWidget-Heading.lua | 78 + .../AceGUI-3.0/widgets/AceGUIWidget-Icon.lua | 140 + .../widgets/AceGUIWidget-InteractiveLabel.lua | 94 + .../widgets/AceGUIWidget-Keybinding.lua | 249 + .../AceGUI-3.0/widgets/AceGUIWidget-Label.lua | 179 + .../widgets/AceGUIWidget-MultiLineEditBox.lua | 366 + .../widgets/AceGUIWidget-Slider.lua | 283 + .../BackgroundWidget.lua | 235 + .../BorderWidget.lua | 230 + .../FontWidget.lua | 216 + .../SoundWidget.lua | 264 + .../StatusbarWidget.lua | 233 + .../prototypes.lua | 266 + .../AceGUI-3.0-SharedMediaWidgets/widget.xml | 9 + ElvUI_OptionsUI/Libraries/Load_Libraries.xml | 6 + ElvUI_OptionsUI/Locales/Load_Locales.xml | 11 + ElvUI_OptionsUI/Locales/deDE.lua | 1394 +++ ElvUI_OptionsUI/Locales/enUS.lua | 1393 +++ ElvUI_OptionsUI/Locales/esMX.lua | 1388 +++ ElvUI_OptionsUI/Locales/frFR.lua | 1388 +++ ElvUI_OptionsUI/Locales/koKR.lua | 1429 +++ ElvUI_OptionsUI/Locales/ptBR.lua | 1388 +++ ElvUI_OptionsUI/Locales/ruRU.lua | 1393 +++ ElvUI_OptionsUI/Locales/zhCN.lua | 1391 +++ ElvUI_OptionsUI/Locales/zhTW.lua | 1393 +++ ElvUI_OptionsUI/Maps.lua | 581 ++ ElvUI_OptionsUI/ModuleControl.lua | 602 ++ ElvUI_OptionsUI/Nameplates.lua | 4156 +++++++++ ElvUI_OptionsUI/Skins.lua | 309 + ElvUI_OptionsUI/Tags.lua | 72 + ElvUI_OptionsUI/Tooltip.lua | 367 + ElvUI_OptionsUI/UnitFrames.lua | 8276 +++++++++++++++++ README.md | 4 +- 614 files changed, 138573 insertions(+), 2 deletions(-) create mode 100644 ElvUI/Bindings.xml create mode 100644 ElvUI/Core/API.lua create mode 100644 ElvUI/Core/Animation.lua create mode 100644 ElvUI/Core/AprilFools.lua create mode 100644 ElvUI/Core/Commands.lua create mode 100644 ElvUI/Core/Config.lua create mode 100644 ElvUI/Core/Cooldowns.lua create mode 100644 ElvUI/Core/Core.lua create mode 100644 ElvUI/Core/Distributor.lua create mode 100644 ElvUI/Core/Dropdown.lua create mode 100644 ElvUI/Core/Fonts.lua create mode 100644 ElvUI/Core/Install.lua create mode 100644 ElvUI/Core/Load_Core.xml create mode 100644 ElvUI/Core/Math.lua create mode 100644 ElvUI/Core/ModuleCopy.lua create mode 100644 ElvUI/Core/Movers.lua create mode 100644 ElvUI/Core/PixelPerfect.lua create mode 100644 ElvUI/Core/PluginInstaller.lua create mode 100644 ElvUI/Core/Smoothie.lua create mode 100644 ElvUI/Core/StaticPopups.lua create mode 100644 ElvUI/Core/StatusReport.lua create mode 100644 ElvUI/Core/Tags.lua create mode 100644 ElvUI/Core/Toolkit.lua create mode 100644 ElvUI/Core/Tutorials.lua create mode 100644 ElvUI/Developer/Frame.lua create mode 100644 ElvUI/Developer/Load_Developer.xml create mode 100644 ElvUI/Developer/ReloadUI.lua create mode 100644 ElvUI/Developer/Table.lua create mode 100644 ElvUI/Developer/Test.lua create mode 100644 ElvUI/ElvUI.toc create mode 100644 ElvUI/Init.lua create mode 100644 ElvUI/Layout/Layout.lua create mode 100644 ElvUI/Layout/Load_Layout.xml create mode 100644 ElvUI/Libraries/Ace3/AceAddon-3.0/AceAddon-3.0.lua create mode 100644 ElvUI/Libraries/Ace3/AceAddon-3.0/AceAddon-3.0.xml create mode 100644 ElvUI/Libraries/Ace3/AceComm-3.0/AceComm-3.0.lua create mode 100644 ElvUI/Libraries/Ace3/AceComm-3.0/AceComm-3.0.xml create mode 100644 ElvUI/Libraries/Ace3/AceComm-3.0/ChatThrottleLib.lua create mode 100644 ElvUI/Libraries/Ace3/AceConsole-3.0/AceConsole-3.0.lua create mode 100644 ElvUI/Libraries/Ace3/AceConsole-3.0/AceConsole-3.0.xml create mode 100644 ElvUI/Libraries/Ace3/AceDB-3.0/AceDB-3.0.lua create mode 100644 ElvUI/Libraries/Ace3/AceDB-3.0/AceDB-3.0.xml create mode 100644 ElvUI/Libraries/Ace3/AceEvent-3.0/AceEvent-3.0.lua create mode 100644 ElvUI/Libraries/Ace3/AceEvent-3.0/AceEvent-3.0.xml create mode 100644 ElvUI/Libraries/Ace3/AceHook-3.0/AceHook-3.0.lua create mode 100644 ElvUI/Libraries/Ace3/AceHook-3.0/AceHook-3.0.xml create mode 100644 ElvUI/Libraries/Ace3/AceLocale-3.0/AceLocale-3.0.lua create mode 100644 ElvUI/Libraries/Ace3/AceLocale-3.0/AceLocale-3.0.xml create mode 100644 ElvUI/Libraries/Ace3/AceSerializer-3.0/AceSerializer-3.0.lua create mode 100644 ElvUI/Libraries/Ace3/AceSerializer-3.0/AceSerializer-3.0.xml create mode 100644 ElvUI/Libraries/Ace3/AceTimer-3.0/AceTimer-3.0.lua create mode 100644 ElvUI/Libraries/Ace3/AceTimer-3.0/AceTimer-3.0.xml create mode 100644 ElvUI/Libraries/Ace3/CallbackHandler-1.0/CallbackHandler-1.0.lua create mode 100644 ElvUI/Libraries/Ace3/LibStub/LibStub.lua create mode 100644 ElvUI/Libraries/HealPredict/healpredict.lua create mode 100644 ElvUI/Libraries/LibActionButton-1.0/LibActionButton-1.0.lua create mode 100644 ElvUI/Libraries/LibAnim/LibAnim.lua create mode 100644 ElvUI/Libraries/LibAuraInfo-1.0/LibAuraInfo-1.0.lua create mode 100644 ElvUI/Libraries/LibAuraInfo-1.0/lib.xml create mode 100644 ElvUI/Libraries/LibAuraInfo-1.0/spellIdData.lua create mode 100644 ElvUI/Libraries/LibBase64-1.0/LibBase64-1.0.lua create mode 100644 ElvUI/Libraries/LibChatAnims/LibChatAnims.lua create mode 100644 ElvUI/Libraries/LibCompress/LibCompress.lua create mode 100644 ElvUI/Libraries/LibDataBroker/LibDataBroker-1.1.lua create mode 100644 ElvUI/Libraries/LibDualSpec-1.0/LibDualSpec-1.0.lua create mode 100644 ElvUI/Libraries/LibElvUIPlugin-1.0/LibElvUIPlugin-1.0.lua create mode 100644 ElvUI/Libraries/LibItemSearch-1.2/CustomSearch-1.0/CustomSearch-1.0.lua create mode 100644 ElvUI/Libraries/LibItemSearch-1.2/LibItemSearch-1.2.lua create mode 100644 ElvUI/Libraries/LibItemSearch-1.2/LibItemSearch-1.2.xml create mode 100644 ElvUI/Libraries/LibItemSearch-1.2/Unfit-1.0/Unfit-1.0.lua create mode 100644 ElvUI/Libraries/LibSharedMedia-3.0/LibSharedMedia-3.0.lua create mode 100644 ElvUI/Libraries/LibSimpleSticky/LibSimpleSticky.lua create mode 100644 ElvUI/Libraries/LibSpellRange-1.0/LibSpellRange-1.0.lua create mode 100644 ElvUI/Libraries/LibTranslit-1.0/LibTranslit-1.0.lua create mode 100644 ElvUI/Libraries/Load_Libraries.xml create mode 100644 ElvUI/Libraries/UTF8/UTF8.xml create mode 100644 ElvUI/Libraries/UTF8/utf8.lua create mode 100644 ElvUI/Libraries/UTF8/utf8data.lua create mode 100644 ElvUI/Libraries/oUF/LICENSE create mode 100644 ElvUI/Libraries/oUF/blizzard.lua create mode 100644 ElvUI/Libraries/oUF/colors.lua create mode 100644 ElvUI/Libraries/oUF/elements/additionalpower.lua create mode 100644 ElvUI/Libraries/oUF/elements/assistantindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/auras.lua create mode 100644 ElvUI/Libraries/oUF/elements/castbar.lua create mode 100644 ElvUI/Libraries/oUF/elements/combatindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/combopoints.lua create mode 100644 ElvUI/Libraries/oUF/elements/grouproleindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/happinessindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/health.lua create mode 100644 ElvUI/Libraries/oUF/elements/leaderindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/masterlooterindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/portrait.lua create mode 100644 ElvUI/Libraries/oUF/elements/power.lua create mode 100644 ElvUI/Libraries/oUF/elements/powerenergy.lua create mode 100644 ElvUI/Libraries/oUF/elements/powerrage.lua create mode 100644 ElvUI/Libraries/oUF/elements/pvpindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/raidroleindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/raidtargetindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/range.lua create mode 100644 ElvUI/Libraries/oUF/elements/readycheckindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/restingindicator.lua create mode 100644 ElvUI/Libraries/oUF/elements/runes.lua create mode 100644 ElvUI/Libraries/oUF/elements/tags.lua create mode 100644 ElvUI/Libraries/oUF/elements/threatindicator.lua create mode 100644 ElvUI/Libraries/oUF/events.lua create mode 100644 ElvUI/Libraries/oUF/factory.lua create mode 100644 ElvUI/Libraries/oUF/finalize.lua create mode 100644 ElvUI/Libraries/oUF/init.lua create mode 100644 ElvUI/Libraries/oUF/oUF.xml create mode 100644 ElvUI/Libraries/oUF/ouf.lua create mode 100644 ElvUI/Libraries/oUF/private.lua create mode 100644 ElvUI/Libraries/oUF/units.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_AuraWatch/oUF_AuraWatch.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_Cutaway/oUF_Cutaway.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_Fader/oUF_Fader.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_GPS/oUF_GPS.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_HealComm4/LibHealComm-4.0/LibHealComm-4.0.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_HealComm4/oUF_HealComm4.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_HealComm4/oUF_HealComm4.xml create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_Plugins.xml create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_ResComm/LibResComm-1.0/LibResComm-1.0.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_ResComm/oUF_ResComm.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_ResComm/oUF_ResComm.xml create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_Trinkets/oUF_Trinkets.lua create mode 100644 ElvUI/Locales/Load_Locales.xml create mode 100644 ElvUI/Locales/deDE.lua create mode 100644 ElvUI/Locales/enUS.lua create mode 100644 ElvUI/Locales/esMX.lua create mode 100644 ElvUI/Locales/frFR.lua create mode 100644 ElvUI/Locales/koKR.lua create mode 100644 ElvUI/Locales/ptBR.lua create mode 100644 ElvUI/Locales/ruRU.lua create mode 100644 ElvUI/Locales/zhCN.lua create mode 100644 ElvUI/Locales/zhTW.lua create mode 100644 ElvUI/Media/Arrows/Arrow0.tga create mode 100644 ElvUI/Media/Arrows/Arrow1.tga create mode 100644 ElvUI/Media/Arrows/Arrow10.tga create mode 100644 ElvUI/Media/Arrows/Arrow11.tga create mode 100644 ElvUI/Media/Arrows/Arrow12.tga create mode 100644 ElvUI/Media/Arrows/Arrow13.tga create mode 100644 ElvUI/Media/Arrows/Arrow14.tga create mode 100644 ElvUI/Media/Arrows/Arrow15.tga create mode 100644 ElvUI/Media/Arrows/Arrow16.tga create mode 100644 ElvUI/Media/Arrows/Arrow17.tga create mode 100644 ElvUI/Media/Arrows/Arrow18.tga create mode 100644 ElvUI/Media/Arrows/Arrow19.tga create mode 100644 ElvUI/Media/Arrows/Arrow2.tga create mode 100644 ElvUI/Media/Arrows/Arrow20.tga create mode 100644 ElvUI/Media/Arrows/Arrow21.tga create mode 100644 ElvUI/Media/Arrows/Arrow22.tga create mode 100644 ElvUI/Media/Arrows/Arrow23.tga create mode 100644 ElvUI/Media/Arrows/Arrow24.tga create mode 100644 ElvUI/Media/Arrows/Arrow25.tga create mode 100644 ElvUI/Media/Arrows/Arrow26.tga create mode 100644 ElvUI/Media/Arrows/Arrow27.tga create mode 100644 ElvUI/Media/Arrows/Arrow28.tga create mode 100644 ElvUI/Media/Arrows/Arrow29.tga create mode 100644 ElvUI/Media/Arrows/Arrow3.tga create mode 100644 ElvUI/Media/Arrows/Arrow30.tga create mode 100644 ElvUI/Media/Arrows/Arrow31.tga create mode 100644 ElvUI/Media/Arrows/Arrow32.tga create mode 100644 ElvUI/Media/Arrows/Arrow33.tga create mode 100644 ElvUI/Media/Arrows/Arrow34.tga create mode 100644 ElvUI/Media/Arrows/Arrow35.tga create mode 100644 ElvUI/Media/Arrows/Arrow36.tga create mode 100644 ElvUI/Media/Arrows/Arrow37.tga create mode 100644 ElvUI/Media/Arrows/Arrow38.tga create mode 100644 ElvUI/Media/Arrows/Arrow39.tga create mode 100644 ElvUI/Media/Arrows/Arrow4.tga create mode 100644 ElvUI/Media/Arrows/Arrow40.tga create mode 100644 ElvUI/Media/Arrows/Arrow41.tga create mode 100644 ElvUI/Media/Arrows/Arrow42.tga create mode 100644 ElvUI/Media/Arrows/Arrow43.tga create mode 100644 ElvUI/Media/Arrows/Arrow44.tga create mode 100644 ElvUI/Media/Arrows/Arrow45.tga create mode 100644 ElvUI/Media/Arrows/Arrow46.tga create mode 100644 ElvUI/Media/Arrows/Arrow47.tga create mode 100644 ElvUI/Media/Arrows/Arrow48.tga create mode 100644 ElvUI/Media/Arrows/Arrow49.tga create mode 100644 ElvUI/Media/Arrows/Arrow5.tga create mode 100644 ElvUI/Media/Arrows/Arrow50.tga create mode 100644 ElvUI/Media/Arrows/Arrow51.tga create mode 100644 ElvUI/Media/Arrows/Arrow52.tga create mode 100644 ElvUI/Media/Arrows/Arrow53.tga create mode 100644 ElvUI/Media/Arrows/Arrow54.tga create mode 100644 ElvUI/Media/Arrows/Arrow55.tga create mode 100644 ElvUI/Media/Arrows/Arrow56.tga create mode 100644 ElvUI/Media/Arrows/Arrow57.tga create mode 100644 ElvUI/Media/Arrows/Arrow58.tga create mode 100644 ElvUI/Media/Arrows/Arrow59.tga create mode 100644 ElvUI/Media/Arrows/Arrow6.tga create mode 100644 ElvUI/Media/Arrows/Arrow60.tga create mode 100644 ElvUI/Media/Arrows/Arrow61.tga create mode 100644 ElvUI/Media/Arrows/Arrow62.tga create mode 100644 ElvUI/Media/Arrows/Arrow63.tga create mode 100644 ElvUI/Media/Arrows/Arrow64.tga create mode 100644 ElvUI/Media/Arrows/Arrow65.tga create mode 100644 ElvUI/Media/Arrows/Arrow66.tga create mode 100644 ElvUI/Media/Arrows/Arrow67.tga create mode 100644 ElvUI/Media/Arrows/Arrow68.tga create mode 100644 ElvUI/Media/Arrows/Arrow69.tga create mode 100644 ElvUI/Media/Arrows/Arrow7.tga create mode 100644 ElvUI/Media/Arrows/Arrow70.tga create mode 100644 ElvUI/Media/Arrows/Arrow71.tga create mode 100644 ElvUI/Media/Arrows/Arrow72.tga create mode 100644 ElvUI/Media/Arrows/Arrow8.tga create mode 100644 ElvUI/Media/Arrows/Arrow9.tga create mode 100644 ElvUI/Media/Arrows/ArrowRed.tga create mode 100644 ElvUI/Media/Arrows/OldArrow2.tga create mode 100644 ElvUI/Media/Arrows/RLArrow.tga create mode 100644 ElvUI/Media/ChatEmojis/Angry.tga create mode 100644 ElvUI/Media/ChatEmojis/Blush.tga create mode 100644 ElvUI/Media/ChatEmojis/BrokenHeart.tga create mode 100644 ElvUI/Media/ChatEmojis/CallMe.tga create mode 100644 ElvUI/Media/ChatEmojis/Cry.tga create mode 100644 ElvUI/Media/ChatEmojis/Facepalm.tga create mode 100644 ElvUI/Media/ChatEmojis/Grin.tga create mode 100644 ElvUI/Media/ChatEmojis/Heart.tga create mode 100644 ElvUI/Media/ChatEmojis/HeartEyes.tga create mode 100644 ElvUI/Media/ChatEmojis/Joy.tga create mode 100644 ElvUI/Media/ChatEmojis/Kappa.tga create mode 100644 ElvUI/Media/ChatEmojis/Meaw.tga create mode 100644 ElvUI/Media/ChatEmojis/MiddleFinger.tga create mode 100644 ElvUI/Media/ChatEmojis/Murloc.tga create mode 100644 ElvUI/Media/ChatEmojis/OkHand.tga create mode 100644 ElvUI/Media/ChatEmojis/OpenMouth.tga create mode 100644 ElvUI/Media/ChatEmojis/Poop.tga create mode 100644 ElvUI/Media/ChatEmojis/Rage.tga create mode 100644 ElvUI/Media/ChatEmojis/SadKitty.tga create mode 100644 ElvUI/Media/ChatEmojis/Scream.tga create mode 100644 ElvUI/Media/ChatEmojis/ScreamCat.tga create mode 100644 ElvUI/Media/ChatEmojis/SemiColon.tga create mode 100644 ElvUI/Media/ChatEmojis/SlightFrown.tga create mode 100644 ElvUI/Media/ChatEmojis/Smile.tga create mode 100644 ElvUI/Media/ChatEmojis/Smirk.tga create mode 100644 ElvUI/Media/ChatEmojis/Sob.tga create mode 100644 ElvUI/Media/ChatEmojis/StuckOutTongue.tga create mode 100644 ElvUI/Media/ChatEmojis/StuckOutTongueClosedEyes.tga create mode 100644 ElvUI/Media/ChatEmojis/Sunglasses.tga create mode 100644 ElvUI/Media/ChatEmojis/Thinking.tga create mode 100644 ElvUI/Media/ChatEmojis/ThumbsUp.tga create mode 100644 ElvUI/Media/ChatEmojis/Wink.tga create mode 100644 ElvUI/Media/ChatEmojis/ZZZ.tga create mode 100644 ElvUI/Media/ChatLogos/Bathrobe.tga create mode 100644 ElvUI/Media/ChatLogos/ElvBlue.tga create mode 100644 ElvUI/Media/ChatLogos/ElvGreen.tga create mode 100644 ElvUI/Media/ChatLogos/ElvMelon.tga create mode 100644 ElvUI/Media/ChatLogos/ElvOrange.tga create mode 100644 ElvUI/Media/ChatLogos/ElvPink.tga create mode 100644 ElvUI/Media/ChatLogos/ElvPurple.tga create mode 100644 ElvUI/Media/ChatLogos/ElvRainbow.tga create mode 100644 ElvUI/Media/ChatLogos/ElvRed.tga create mode 100644 ElvUI/Media/ChatLogos/ElvYellow.tga create mode 100644 ElvUI/Media/ChatLogos/HelloKitty.tga create mode 100644 ElvUI/Media/ChatLogos/Illuminati.tga create mode 100644 ElvUI/Media/ChatLogos/MrHankey.tga create mode 100644 ElvUI/Media/ChatLogos/Rainbow.tga create mode 100644 ElvUI/Media/ChatLogos/TyroneBiggums.tga create mode 100644 ElvUI/Media/Fonts/ActionMan.ttf create mode 100644 ElvUI/Media/Fonts/ContinuumMedium.ttf create mode 100644 ElvUI/Media/Fonts/DieDieDie.ttf create mode 100644 ElvUI/Media/Fonts/Expressway.ttf create mode 100644 ElvUI/Media/Fonts/Homespun.ttf create mode 100644 ElvUI/Media/Fonts/Invisible.ttf create mode 100644 ElvUI/Media/Fonts/PTSansNarrow.ttf create mode 100644 ElvUI/Media/Load_Media.xml create mode 100644 ElvUI/Media/SharedMedia.lua create mode 100644 ElvUI/Media/Sounds/AwwCrap.ogg create mode 100644 ElvUI/Media/Sounds/BbqAss.ogg create mode 100644 ElvUI/Media/Sounds/DumbShit.ogg create mode 100644 ElvUI/Media/Sounds/HarlemShake.ogg create mode 100644 ElvUI/Media/Sounds/HelloKitty.ogg create mode 100644 ElvUI/Media/Sounds/MamaWeekends.ogg create mode 100644 ElvUI/Media/Sounds/RunFast.ogg create mode 100644 ElvUI/Media/Sounds/SndIncMsg.ogg create mode 100644 ElvUI/Media/Sounds/StopRunningSlimBall.ogg create mode 100644 ElvUI/Media/Sounds/Warning.ogg create mode 100644 ElvUI/Media/Sounds/Whisper.ogg create mode 100644 ElvUI/Media/Sounds/YankieBangBang.ogg create mode 100644 ElvUI/Media/Textures/Alliance-Logo-Small.blp create mode 100644 ElvUI/Media/Textures/Alliance-Logo.blp create mode 100644 ElvUI/Media/Textures/ArrowRight.tga create mode 100644 ElvUI/Media/Textures/BagJunkIcon.blp create mode 100644 ElvUI/Media/Textures/Black8x8.tga create mode 100644 ElvUI/Media/Textures/Broom.blp create mode 100644 ElvUI/Media/Textures/ExitVehicle.tga create mode 100644 ElvUI/Media/Textures/HelloKitty.tga create mode 100644 ElvUI/Media/Textures/Highlight.tga create mode 100644 ElvUI/Media/Textures/Horde-Logo-Small.blp create mode 100644 ElvUI/Media/Textures/Horde-Logo.blp create mode 100644 ElvUI/Media/Textures/Leader.tga create mode 100644 ElvUI/Media/Textures/LevelUpTex.blp create mode 100644 ElvUI/Media/Textures/Melli.tga create mode 100644 ElvUI/Media/Textures/Minimalist.tga create mode 100644 ElvUI/Media/Textures/Minus.tga create mode 100644 ElvUI/Media/Textures/MinusButton.tga create mode 100644 ElvUI/Media/Textures/PVP-Icons.blp create mode 100644 ElvUI/Media/Textures/Pause.tga create mode 100644 ElvUI/Media/Textures/Play.tga create mode 100644 ElvUI/Media/Textures/Plus.tga create mode 100644 ElvUI/Media/Textures/PlusButton.tga create mode 100644 ElvUI/Media/Textures/Raid-Icon-Rez.blp create mode 100644 ElvUI/Media/Textures/Reset.tga create mode 100644 ElvUI/Media/Textures/Resting1.tga create mode 100644 ElvUI/Media/Textures/RoleIcons.tga create mode 100644 ElvUI/Media/Textures/SkullIcon.tga create mode 100644 ElvUI/Media/Textures/Smooth.tga create mode 100644 ElvUI/Media/Textures/StreamBackground.blp create mode 100644 ElvUI/Media/Textures/StreamCircle.blp create mode 100644 ElvUI/Media/Textures/StreamFrame.blp create mode 100644 ElvUI/Media/Textures/StreamSpark.blp create mode 100644 ElvUI/Media/Textures/arrow.tga create mode 100644 ElvUI/Media/Textures/arrowup.tga create mode 100644 ElvUI/Media/Textures/bagQuestIcon.tga create mode 100644 ElvUI/Media/Textures/close.tga create mode 100644 ElvUI/Media/Textures/combat.tga create mode 100644 ElvUI/Media/Textures/copy.tga create mode 100644 ElvUI/Media/Textures/cross.tga create mode 100644 ElvUI/Media/Textures/dps.tga create mode 100644 ElvUI/Media/Textures/glowTex.tga create mode 100644 ElvUI/Media/Textures/healer.tga create mode 100644 ElvUI/Media/Textures/helloKittyChat.tga create mode 100644 ElvUI/Media/Textures/logo.tga create mode 100644 ElvUI/Media/Textures/mail.tga create mode 100644 ElvUI/Media/Textures/nameplates.BLP create mode 100644 ElvUI/Media/Textures/normTex.tga create mode 100644 ElvUI/Media/Textures/normTex2.tga create mode 100644 ElvUI/Media/Textures/raidicons.blp create mode 100644 ElvUI/Media/Textures/resting.tga create mode 100644 ElvUI/Media/Textures/spark.tga create mode 100644 ElvUI/Media/Textures/tank.tga create mode 100644 ElvUI/Modules/ActionBars/ActionBars.lua create mode 100644 ElvUI/Modules/ActionBars/Bind.lua create mode 100644 ElvUI/Modules/ActionBars/Load_ActionBars.xml create mode 100644 ElvUI/Modules/ActionBars/MicroBar.lua create mode 100644 ElvUI/Modules/ActionBars/PetBar.lua create mode 100644 ElvUI/Modules/ActionBars/StanceBar.lua create mode 100644 ElvUI/Modules/ActionBars/TotemBar.lua create mode 100644 ElvUI/Modules/Auras/Auras.lua create mode 100644 ElvUI/Modules/Auras/Load_Auras.xml create mode 100644 ElvUI/Modules/Bags/BagBar.lua create mode 100644 ElvUI/Modules/Bags/Bags.lua create mode 100644 ElvUI/Modules/Bags/Load_Bags.xml create mode 100644 ElvUI/Modules/Bags/Sort.lua create mode 100644 ElvUI/Modules/Blizzard/AlertFrame.lua create mode 100644 ElvUI/Modules/Blizzard/Blizzard.lua create mode 100644 ElvUI/Modules/Blizzard/CaptureBar.lua create mode 100644 ElvUI/Modules/Blizzard/ColorPicker.lua create mode 100644 ElvUI/Modules/Blizzard/Durability.lua create mode 100644 ElvUI/Modules/Blizzard/GM.lua create mode 100644 ElvUI/Modules/Blizzard/Kill.lua create mode 100644 ElvUI/Modules/Blizzard/Load_Blizzard.xml create mode 100644 ElvUI/Modules/Blizzard/Vehicle.lua create mode 100644 ElvUI/Modules/Blizzard/WatchFrame.lua create mode 100644 ElvUI/Modules/Chat/Chat.lua create mode 100644 ElvUI/Modules/Chat/Load_Chat.xml create mode 100644 ElvUI/Modules/DataBars/DataBars.lua create mode 100644 ElvUI/Modules/DataBars/Experience.lua create mode 100644 ElvUI/Modules/DataBars/Load_DataBars.xml create mode 100644 ElvUI/Modules/DataBars/PetExperience.lua create mode 100644 ElvUI/Modules/DataBars/Reputation.lua create mode 100644 ElvUI/Modules/DataTexts/Achievement.lua create mode 100644 ElvUI/Modules/DataTexts/Armor.lua create mode 100644 ElvUI/Modules/DataTexts/AttackPower.lua create mode 100644 ElvUI/Modules/DataTexts/Avoidance.lua create mode 100644 ElvUI/Modules/DataTexts/Bags.lua create mode 100644 ElvUI/Modules/DataTexts/Battleground.lua create mode 100644 ElvUI/Modules/DataTexts/CombatTime.lua create mode 100644 ElvUI/Modules/DataTexts/ConfigElvUI.lua create mode 100644 ElvUI/Modules/DataTexts/Coordinates.lua create mode 100644 ElvUI/Modules/DataTexts/Crit.lua create mode 100644 ElvUI/Modules/DataTexts/DPS.lua create mode 100644 ElvUI/Modules/DataTexts/DataTexts.lua create mode 100644 ElvUI/Modules/DataTexts/Durability.lua create mode 100644 ElvUI/Modules/DataTexts/Friends.lua create mode 100644 ElvUI/Modules/DataTexts/Gold.lua create mode 100644 ElvUI/Modules/DataTexts/Guild.lua create mode 100644 ElvUI/Modules/DataTexts/HPS.lua create mode 100644 ElvUI/Modules/DataTexts/Haste.lua create mode 100644 ElvUI/Modules/DataTexts/Hit.lua create mode 100644 ElvUI/Modules/DataTexts/HonorableKills.lua create mode 100644 ElvUI/Modules/DataTexts/Load_DataTexts.xml create mode 100644 ElvUI/Modules/DataTexts/Regen.lua create mode 100644 ElvUI/Modules/DataTexts/Resilience.lua create mode 100644 ElvUI/Modules/DataTexts/SpellPower.lua create mode 100644 ElvUI/Modules/DataTexts/System.lua create mode 100644 ElvUI/Modules/DataTexts/Time.lua create mode 100644 ElvUI/Modules/Load_Modules.xml create mode 100644 ElvUI/Modules/Maps/Load_Maps.xml create mode 100644 ElvUI/Modules/Maps/Minimap.lua create mode 100644 ElvUI/Modules/Maps/Worldmap.lua create mode 100644 ElvUI/Modules/Misc/AFK.lua create mode 100644 ElvUI/Modules/Misc/ChatBubbles.lua create mode 100644 ElvUI/Modules/Misc/DebugTools.lua create mode 100644 ElvUI/Modules/Misc/Load_Misc.xml create mode 100644 ElvUI/Modules/Misc/Loot.lua create mode 100644 ElvUI/Modules/Misc/LootRoll.lua create mode 100644 ElvUI/Modules/Misc/Misc.lua create mode 100644 ElvUI/Modules/Misc/RaidBuffReminder.lua create mode 100644 ElvUI/Modules/Misc/RaidMarker.lua create mode 100644 ElvUI/Modules/Misc/RaidUtility.lua create mode 100644 ElvUI/Modules/Misc/Threat.lua create mode 100644 ElvUI/Modules/Misc/TotemBar.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/Auras.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/CastBar.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/ComboPoints.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/CutawayHealth.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/Elite.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/Glow.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/HealerIcon.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/HealthBar.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/Highlight.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/IconFrame.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/Level.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/Name.lua create mode 100644 ElvUI/Modules/Nameplates/Elements/RaidIcon.lua create mode 100644 ElvUI/Modules/Nameplates/Load_Nameplates.xml create mode 100644 ElvUI/Modules/Nameplates/Nameplates.lua create mode 100644 ElvUI/Modules/Nameplates/StyleFilter.lua create mode 100644 ElvUI/Modules/Skins/Addons/Ace3.lua create mode 100644 ElvUI/Modules/Skins/Addons/Load_Addons.xml create mode 100644 ElvUI/Modules/Skins/Blizzard/Achievement.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Alerts.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Arena.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/ArenaRegistrar.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/AuctionHouse.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/BGMap.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/BGScore.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Bags.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Barber.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Binding.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/BlizzardOptions.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Calendar.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Character.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Debug.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/DressingRoom.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Friends.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/GMChat.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Glyph.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Gossip.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/GuildBank.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/GuildRegistrar.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Help.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Inspect.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/LFD.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/LFR.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Load_Blizzard.xml create mode 100644 ElvUI/Modules/Skins/Blizzard/Loot.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Macro.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Mail.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Merchant.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/MirrorTimers.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Misc.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Petition.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/PvP.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Quest.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Raid.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Socket.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Spellbook.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Stable.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Tabard.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Talent.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Taxi.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/TimeManager.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Tooltip.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Trade.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Tradeskill.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Trainer.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Tutorial.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/WatchFrame.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/WorldStateFrame.lua create mode 100644 ElvUI/Modules/Skins/Blizzard/Worldmap.lua create mode 100644 ElvUI/Modules/Skins/Load_Skins.xml create mode 100644 ElvUI/Modules/Skins/Skins.lua create mode 100644 ElvUI/Modules/Tooltip/Load_Tooltip.xml create mode 100644 ElvUI/Modules/Tooltip/Tooltip.lua create mode 100644 ElvUI/Modules/UnitFrames/ConfigEnviroment.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/AuraBars.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/Auras.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/BuffIndicator.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/CastBar.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/ClassBars.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/CombatIndicator.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/ComboPoints.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/CustomText.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/Cutaway.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/DebuffHighlight.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/FrameGlow.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/GPS.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/Happiness.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/HealComm.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/Health.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/InfoPanel.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/Load_Elements.xml create mode 100644 ElvUI/Modules/UnitFrames/Elements/Name.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/Portrait.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/Power.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/PowerEnergy.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/PowerRage.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/PvPIcon.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/PvPIndicator.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/RaidDebuffs.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/RaidIcon.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/RaidRoleIcons.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/Range.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/ReadyCheckIcon.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/RestingIndicator.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/ResurrectionIcon.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/RoleIcons.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/Threat.lua create mode 100644 ElvUI/Modules/UnitFrames/Elements/Trinket.lua create mode 100644 ElvUI/Modules/UnitFrames/Groups/Arena.lua create mode 100644 ElvUI/Modules/UnitFrames/Groups/Assist.lua create mode 100644 ElvUI/Modules/UnitFrames/Groups/Boss.lua create mode 100644 ElvUI/Modules/UnitFrames/Groups/Load_Groups.xml create mode 100644 ElvUI/Modules/UnitFrames/Groups/Party.lua create mode 100644 ElvUI/Modules/UnitFrames/Groups/Raid.lua create mode 100644 ElvUI/Modules/UnitFrames/Groups/Raid40.lua create mode 100644 ElvUI/Modules/UnitFrames/Groups/RaidPets.lua create mode 100644 ElvUI/Modules/UnitFrames/Groups/Tank.lua create mode 100644 ElvUI/Modules/UnitFrames/Load_UnitFrames.xml create mode 100644 ElvUI/Modules/UnitFrames/UnitFrames.lua create mode 100644 ElvUI/Modules/UnitFrames/Units/Focus.lua create mode 100644 ElvUI/Modules/UnitFrames/Units/FocusTarget.lua create mode 100644 ElvUI/Modules/UnitFrames/Units/Load_Units.xml create mode 100644 ElvUI/Modules/UnitFrames/Units/Pet.lua create mode 100644 ElvUI/Modules/UnitFrames/Units/PetTarget.lua create mode 100644 ElvUI/Modules/UnitFrames/Units/Player.lua create mode 100644 ElvUI/Modules/UnitFrames/Units/Target.lua create mode 100644 ElvUI/Modules/UnitFrames/Units/TargetTarget.lua create mode 100644 ElvUI/Modules/UnitFrames/Units/TargetTargetTarget.lua create mode 100644 ElvUI/Settings/Filters/Load_Filters.xml create mode 100644 ElvUI/Settings/Filters/NamePlate.lua create mode 100644 ElvUI/Settings/Filters/UnitFrame.lua create mode 100644 ElvUI/Settings/Global.lua create mode 100644 ElvUI/Settings/Load_Config.xml create mode 100644 ElvUI/Settings/Private.lua create mode 100644 ElvUI/Settings/Profile.lua create mode 100644 ElvUI_OptionsUI/ActionBars.lua create mode 100644 ElvUI_OptionsUI/Auras.lua create mode 100644 ElvUI_OptionsUI/Bags.lua create mode 100644 ElvUI_OptionsUI/Chat.lua create mode 100644 ElvUI_OptionsUI/Cooldown.lua create mode 100644 ElvUI_OptionsUI/Core.lua create mode 100644 ElvUI_OptionsUI/DataBars.lua create mode 100644 ElvUI_OptionsUI/DataTexts.lua create mode 100644 ElvUI_OptionsUI/ElvUI_OptionsUI.toc create mode 100644 ElvUI_OptionsUI/Filters.lua create mode 100644 ElvUI_OptionsUI/General.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceConfig-3.0/AceConfig-3.0.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceConfig-3.0/AceConfig-3.0.xml create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceDBOptions-3.0/AceDBOptions-3.0.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceDBOptions-3.0/AceDBOptions-3.0.xml create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/AceGUI-3.0.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/AceGUI-3.0.xml create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIContainer-Window.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-Button-ElvUI.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-Button.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-Label.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua create mode 100644 ElvUI_OptionsUI/Libraries/Ace3/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua create mode 100644 ElvUI_OptionsUI/Libraries/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua create mode 100644 ElvUI_OptionsUI/Libraries/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua create mode 100644 ElvUI_OptionsUI/Libraries/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua create mode 100644 ElvUI_OptionsUI/Libraries/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua create mode 100644 ElvUI_OptionsUI/Libraries/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua create mode 100644 ElvUI_OptionsUI/Libraries/AceGUI-3.0-SharedMediaWidgets/prototypes.lua create mode 100644 ElvUI_OptionsUI/Libraries/AceGUI-3.0-SharedMediaWidgets/widget.xml create mode 100644 ElvUI_OptionsUI/Libraries/Load_Libraries.xml create mode 100644 ElvUI_OptionsUI/Locales/Load_Locales.xml create mode 100644 ElvUI_OptionsUI/Locales/deDE.lua create mode 100644 ElvUI_OptionsUI/Locales/enUS.lua create mode 100644 ElvUI_OptionsUI/Locales/esMX.lua create mode 100644 ElvUI_OptionsUI/Locales/frFR.lua create mode 100644 ElvUI_OptionsUI/Locales/koKR.lua create mode 100644 ElvUI_OptionsUI/Locales/ptBR.lua create mode 100644 ElvUI_OptionsUI/Locales/ruRU.lua create mode 100644 ElvUI_OptionsUI/Locales/zhCN.lua create mode 100644 ElvUI_OptionsUI/Locales/zhTW.lua create mode 100644 ElvUI_OptionsUI/Maps.lua create mode 100644 ElvUI_OptionsUI/ModuleControl.lua create mode 100644 ElvUI_OptionsUI/Nameplates.lua create mode 100644 ElvUI_OptionsUI/Skins.lua create mode 100644 ElvUI_OptionsUI/Tags.lua create mode 100644 ElvUI_OptionsUI/Tooltip.lua create mode 100644 ElvUI_OptionsUI/UnitFrames.lua diff --git a/ElvUI/Bindings.xml b/ElvUI/Bindings.xml new file mode 100644 index 0000000..7c22127 --- /dev/null +++ b/ElvUI/Bindings.xml @@ -0,0 +1,17 @@ + + + RaidMark_HotkeyPressed(keystate) + + + FarmMode() + + + HideLeftChat() + + + HideRightChat() + + + HideBothChat() + + \ No newline at end of file diff --git a/ElvUI/Core/API.lua b/ElvUI/Core/API.lua new file mode 100644 index 0000000..df1756c --- /dev/null +++ b/ElvUI/Core/API.lua @@ -0,0 +1,260 @@ +local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB + +--Lua functions +local _G = _G +local wipe, date = wipe, date +local format, select, type, ipairs, pairs = format, select, type, ipairs, pairs +local strmatch, strfind, tonumber, tostring = strmatch, strfind, tonumber, tostring +--WoW API / Variables +local GetCVarBool = GetCVarBool +local GetFunctionCPUUsage = GetFunctionCPUUsage +local RequestBattlefieldScoreData = RequestBattlefieldScoreData +local UnitGroupRolesAssigned = UnitGroupRolesAssigned +local UnitHasVehicleUI = UnitHasVehicleUI +local IsInInstance = IsInInstance + +E.Role = "Melee" -- TODO: Load locally, or save per specialization. + +do -- other non-english locales require this + E.UnlocalizedClasses = {} + for k, v in pairs(_G.LOCALIZED_CLASS_NAMES_MALE) do E.UnlocalizedClasses[v] = k end + for k, v in pairs(_G.LOCALIZED_CLASS_NAMES_FEMALE) do E.UnlocalizedClasses[v] = k end + + function E:UnlocalizedClassName(className) + return (className and className ~= "") and E.UnlocalizedClasses[className] + end +end + +function E:ScanTooltipTextures(clean, grabTextures) + local textures + for i = 1, 10 do + local tex = _G["ElvUI_ScanTooltipTexture"..i] + local texture = tex and tex:GetTexture() + if texture then + if grabTextures then + if not textures then textures = {} end + textures[i] = texture + end + if clean then + tex:SetTexture() + end + end + end + + return textures +end + +function E:GetPlayerRole() + local isTank, isHealer, isDamage = UnitGroupRolesAssigned("player") + + if isTank or isHealer or isDamage then + return isTank and "TANK" or isHealer and "HEALER" or isDamage and "DAMAGER" + else + return "DAMAGER" -- Assume dps role; Nothing better for ascension. + end +end + +do + --local Masque = E.Libs.Masque + local LBFGroupToTableElement = { + ["ActionBars"] = "actionbar", + ["Auras"] = "auras" + } + + function E:LBFCallback(SkinID, _, _, Group) + if not E.private then return end + + local element = LBFGroupToTableElement[Group] + if element then + if E.private[element].lbf.enable then + E.private[element].lbf.skin = SkinID + end + end + end + + if LBF then + LBF:RegisterSkinCallback("ElvUI", E.LBFCallback, E) + end +end + +do + local CPU_USAGE = {} + local function CompareCPUDiff(showall, minCalls) + local greatestUsage, greatestCalls, greatestName, newName, newFunc + local greatestDiff, lastModule, mod, usage, calls, diff = 0 + + for name, oldUsage in pairs(CPU_USAGE) do + newName, newFunc = strmatch(name, "^([^:]+):(.+)$") + if not newFunc then + E:Print("CPU_USAGE:", name, newFunc) + else + if newName ~= lastModule then + mod = E:GetModule(newName, true) or E + lastModule = newName + end + usage, calls = GetFunctionCPUUsage(mod[newFunc], true) + diff = usage - oldUsage + if showall and (calls > minCalls) then + E:Print("Name("..name..") Calls("..calls..") Diff("..(diff > 0 and format("%.3f", diff) or 0)..")") + end + if (diff > greatestDiff) and calls > minCalls then + greatestName, greatestUsage, greatestCalls, greatestDiff = name, usage, calls, diff + end + end + end + + if greatestName then + E:Print(greatestName.." had the CPU usage of: "..(greatestUsage > 0 and format("%.3f", greatestUsage) or 0).."ms. And has been called "..greatestCalls.." times.") + else + E:Print("CPU Usage: No CPU Usage differences found.") + end + + wipe(CPU_USAGE) + end + + function E:GetTopCPUFunc(msg) + if not GetCVarBool("scriptProfile") then + E:Print("For `/cpuusage` to work, you need to enable script profiling via: `/console scriptProfile 1` then reload. Disable after testing by setting it back to 0.") + return + end + + local module, showall, delay, minCalls = strmatch(msg, "^(%S+)%s*(%S*)%s*(%S*)%s*(.*)$") + local checkCore, mod = (not module or module == "") and "E" + + showall = (showall == "true" and true) or false + delay = (delay == "nil" and nil) or tonumber(delay) or 5 + minCalls = (minCalls == "nil" and nil) or tonumber(minCalls) or 15 + + wipe(CPU_USAGE) + if module == "all" then + for moduName, modu in pairs(self.modules) do + for funcName, func in pairs(modu) do + if (funcName ~= "GetModule") and (type(func) == "function") then + CPU_USAGE[moduName..":"..funcName] = GetFunctionCPUUsage(func, true) + end + end + end + else + if not checkCore then + mod = self:GetModule(module, true) + if not mod then + self:Print(module.." not found, falling back to checking core.") + mod, checkCore = self, "E" + end + else + mod = self + end + for name, func in pairs(mod) do + if (name ~= "GetModule") and type(func) == "function" then + CPU_USAGE[(checkCore or module)..":"..name] = GetFunctionCPUUsage(func, true) + end + end + end + + self:Delay(delay, CompareCPUDiff, showall, minCalls) + self:Print("Calculating CPU Usage differences (module: "..(checkCore or module)..", showall: "..tostring(showall)..", minCalls: "..tostring(minCalls)..", delay: "..tostring(delay)..")") + end +end + +function E:RegisterObjectForVehicleLock(object, originalParent) + if not object or not originalParent then + E:Print("Error. Usage: RegisterObjectForVehicleLock(object, originalParent)") + return + end + + object = _G[object] or object + --Entering/Exiting vehicles will often happen in combat. + --For this reason we cannot allow protected objects. + if object.IsProtected and object:IsProtected() then + E:Print("Error. Object is protected and cannot be changed in combat.") + return + end + + --Check if we are already in a vehicles + if UnitHasVehicleUI("player") then + object:SetParent(E.HiddenFrame) + end + + --Add object to table + E.VehicleLocks[object] = originalParent +end + +function E:UnregisterObjectForVehicleLock(object) + if not object then + E:Print("Error. Usage: UnregisterObjectForVehicleLock(object)") + return + end + + object = _G[object] or object + --Check if object was registered to begin with + if not E.VehicleLocks[object] then return end + + --Change parent of object back to original parent + local originalParent = E.VehicleLocks[object] + if originalParent then + object:SetParent(originalParent) + end + + --Remove object from table + E.VehicleLocks[object] = nil +end + +function E:EnterVehicleHideFrames(_, unit) + if unit ~= "player" then return end + + for object in pairs(E.VehicleLocks) do + object:SetParent(E.HiddenFrame) + end +end + +function E:ExitVehicleShowFrames(_, unit) + if unit ~= "player" then return end + + for object, originalParent in pairs(E.VehicleLocks) do + object:SetParent(originalParent) + end +end + +function E:RequestBGInfo() + RequestBattlefieldScoreData() +end + +function E:PLAYER_ENTERING_WORLD() + if not self.MediaUpdated then + self:UpdateMedia() + self.MediaUpdated = true + end + + local _, instanceType = IsInInstance() + if instanceType == "pvp" then + self.BGTimer = self:ScheduleRepeatingTimer("RequestBGInfo", 5) + self:RequestBGInfo() + elseif self.BGTimer then + self:CancelTimer(self.BGTimer) + self.BGTimer = nil + end +end + +function E:PLAYER_LEVEL_UP(_, level) + E.mylevel = level +end + +function E:LoadAPI() + self:RegisterEvent("PLAYER_LEVEL_UP") + self:RegisterEvent("PLAYER_ENTERING_WORLD") + self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnterVehicleHideFrames") + self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitVehicleShowFrames") + self:RegisterEvent("UI_SCALE_CHANGED", "PixelScaleChanged") + + do -- setup cropIcon texCoords + local opt = E.db.general.cropIcon + local modifier = 0.04 * opt + for i, v in ipairs(E.TexCoords) do + if i % 2 == 0 then + E.TexCoords[i] = v - modifier + else + E.TexCoords[i] = v + modifier + end + end + end +end \ No newline at end of file diff --git a/ElvUI/Core/Animation.lua b/ElvUI/Core/Animation.lua new file mode 100644 index 0000000..e92562c --- /dev/null +++ b/ElvUI/Core/Animation.lua @@ -0,0 +1,294 @@ +------------------------------------------------------------------------ +-- Animation Functions +------------------------------------------------------------------------ +local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB + +--Lua functions +local random, next, unpack, strsub = random, next, unpack, strsub +--WoW API / Variables + +E.AnimShake = {{-9,7,-7,12}, {-5,9,-9,5}, {-5,7,-7,5}, {-9,9,-9,9}, {-5,7,-7,5}, {-9,7,-9,5}} +E.AnimShakeH = {-5,5,-2,5,-2,5} + +function E:FlashLoopFinished(requested) + if not requested then self:Play() end +end + +function E:RandomAnimShake(index) + local s = E.AnimShake[index] + return random(s[1], s[2]), random(s[3], s[4]) +end + +function E:SetUpAnimGroup(obj, Type, ...) + if not Type then Type = "Flash" end + + if strsub(Type, 1, 5) == "Flash" then + obj.anim = obj:CreateAnimationGroup("Flash") + obj.anim.fadein = obj.anim:CreateAnimation("ALPHA", "FadeIn") + obj.anim.fadein:SetChange(1) + obj.anim.fadein:SetOrder(2) + + obj.anim.fadeout = obj.anim:CreateAnimation("ALPHA", "FadeOut") + obj.anim.fadeout:SetChange(-1) + obj.anim.fadeout:SetOrder(1) + + if Type == "FlashLoop" then + obj.anim:SetScript("OnFinished", E.FlashLoopFinished) + end + elseif strsub(Type, 1, 5) == "Shake" then + local shake = obj:CreateAnimationGroup(Type) + shake:SetLooping("REPEAT") + shake.path = shake:CreateAnimation("Path") + + if Type == "Shake" then + shake.path:SetDuration(0.7) + obj.shake = shake + elseif Type == "ShakeH" then + shake.path:SetDuration(2) + obj.shakeh = shake + end + + for i = 1, 6 do + shake.path[i] = shake.path:CreateControlPoint() + + if Type == "Shake" then + shake.path[i]:SetOffset(E:RandomAnimShake(i)) + else + shake.path[i]:SetOffset(E.AnimShakeH[i], 0) + end + end + shake.path[1]:SetOrder(1) + shake.path[2]:SetOrder(2) + shake.path[3]:SetOrder(3) + shake.path[4]:SetOrder(4) + shake.path[5]:SetOrder(5) + shake.path[6]:SetOrder(6) + else + local x, y, duration, customName = ... + if not customName then customName = "anim" end + + local anim = obj:CreateAnimationGroup("Move_In") + obj[customName] = anim + + anim.in1 = anim:CreateAnimation("Translation") + anim.in1:SetDuration(0) + anim.in1:SetOrder(1) + anim.in1:SetOffset(E:Scale(x), E:Scale(y)) + + anim.in2 = anim:CreateAnimation("Translation") + anim.in2:SetDuration(duration) + anim.in2:SetOrder(2) + anim.in2:SetSmoothing("OUT") + anim.in2:SetOffset(E:Scale(-x), E:Scale(-y)) + + anim.out1 = obj:CreateAnimationGroup("Move_Out") + anim.out1:SetScript("OnFinished", function() obj:Hide() end) + + anim.out2 = anim.out1:CreateAnimation("Translation") + anim.out2:SetDuration(duration) + anim.out2:SetOrder(1) + anim.out2:SetSmoothing("IN") + anim.out2:SetOffset(E:Scale(x), E:Scale(y)) + end +end + +function E:Shake(obj) + if not obj.shake then + E:SetUpAnimGroup(obj, "Shake") + end + + obj.shake:Play() +end + +function E:StopShake(obj) + if obj.shake then + obj.shake:Finish() + end +end + +function E:ShakeHorizontal(obj) + if not obj.shakeh then + E:SetUpAnimGroup(obj, "ShakeH") + end + + obj.shakeh:Play() +end + +function E:StopShakeHorizontal(obj) + if obj.shakeh then + obj.shakeh:Finish() + end +end + +function E:Flash(obj, duration, loop) + if not obj.anim then + E:SetUpAnimGroup(obj, loop and "FlashLoop" or "Flash") + end + + if not obj.anim:IsPlaying() then + obj.anim.fadein:SetDuration(duration) + obj.anim.fadeout:SetDuration(duration) + obj.anim:Play() + end +end + +function E:StopFlash(obj) + if obj.anim and obj.anim:IsPlaying() then + obj.anim:Stop() + end +end + +function E:SlideIn(obj, customName) + if not customName then customName = "anim" end + if not obj[customName] then return end + + obj[customName].out1:Stop() + obj[customName]:Play() + obj:Show() +end + +function E:SlideOut(obj, customName) + if not customName then customName = "anim" end + if not obj[customName] then return end + + obj[customName]:Finish() + obj[customName]:Stop() + obj[customName].out1:Play() +end + +local FADEFRAMES, FADEMANAGER = {}, CreateFrame("FRAME") +FADEMANAGER.delay = 0.05 + +function E:UIFrameFade_OnUpdate(elapsed) + FADEMANAGER.timer = (FADEMANAGER.timer or 0) + elapsed + + if FADEMANAGER.timer > FADEMANAGER.delay then + FADEMANAGER.timer = 0 + + for frame, info in next, FADEFRAMES do + -- Reset the timer if there isn't one, this is just an internal counter + if frame:IsVisible() then + info.fadeTimer = (info.fadeTimer or 0) + (elapsed + FADEMANAGER.delay) + else + info.fadeTimer = info.timeToFade + 1 + end + + -- If the fadeTimer is less then the desired fade time then set the alpha otherwise hold the fade state, call the finished function, or just finish the fade + if info.fadeTimer < info.timeToFade then + if info.mode == "IN" then + frame:SetAlpha((info.fadeTimer / info.timeToFade) * info.diffAlpha + info.startAlpha) + else + frame:SetAlpha(((info.timeToFade - info.fadeTimer) / info.timeToFade) * info.diffAlpha + info.endAlpha) + end + else + frame:SetAlpha(info.endAlpha) + + -- If there is a fadeHoldTime then wait until its passed to continue on + if info.fadeHoldTime and info.fadeHoldTime > 0 then + info.fadeHoldTime = info.fadeHoldTime - elapsed + else + -- Complete the fade and call the finished function if there is one + E:UIFrameFadeRemoveFrame(frame) + + if info.finishedFunc then + if info.finishedArgs then + info.finishedFunc(unpack(info.finishedArgs)) + else -- optional method + info.finishedFunc(info.finishedArg1, info.finishedArg2, info.finishedArg3, info.finishedArg4, info.finishedArg5) + end + + if not info.finishedFuncKeep then + info.finishedFunc = nil + end + end + end + end + end + + if not next(FADEFRAMES) then + FADEMANAGER:SetScript("OnUpdate", nil) + end + end +end + +-- Generic fade function +function E:UIFrameFade(frame, info) + if not frame then return end + + frame.fadeInfo = info + + if not info.mode then + info.mode = "IN" + end + + if info.mode == "IN" then + if not info.startAlpha then info.startAlpha = 0 end + if not info.endAlpha then info.endAlpha = 1 end + if not info.diffAlpha then info.diffAlpha = info.endAlpha - info.startAlpha end + else + if not info.startAlpha then info.startAlpha = 1 end + if not info.endAlpha then info.endAlpha = 0 end + if not info.diffAlpha then info.diffAlpha = info.startAlpha - info.endAlpha end + end + + frame:SetAlpha(info.startAlpha) + + if not frame:IsProtected() then + frame:Show() + end + + if not FADEFRAMES[frame] then + FADEFRAMES[frame] = info -- read below comment + FADEMANAGER:SetScript("OnUpdate", E.UIFrameFade_OnUpdate) + else + FADEFRAMES[frame] = info -- keep these both, we need this updated in the event its changed to another ref from a plugin or sth, don't move it up! + end +end + +-- Convenience function to do a simple fade in +function E:UIFrameFadeIn(frame, timeToFade, startAlpha, endAlpha) + if not frame then return end + + if frame.FadeObject then + frame.FadeObject.fadeTimer = nil + else + frame.FadeObject = {} + end + + frame.FadeObject.mode = "IN" + frame.FadeObject.timeToFade = timeToFade + frame.FadeObject.startAlpha = startAlpha + frame.FadeObject.endAlpha = endAlpha + frame.FadeObject.diffAlpha = endAlpha - startAlpha + + E:UIFrameFade(frame, frame.FadeObject) +end + +-- Convenience function to do a simple fade out +function E:UIFrameFadeOut(frame, timeToFade, startAlpha, endAlpha) + if not frame then return end + + if frame.FadeObject then + frame.FadeObject.fadeTimer = nil + else + frame.FadeObject = {} + end + + frame.FadeObject.mode = "OUT" + frame.FadeObject.timeToFade = timeToFade + frame.FadeObject.startAlpha = startAlpha + frame.FadeObject.endAlpha = endAlpha + frame.FadeObject.diffAlpha = startAlpha - endAlpha + + E:UIFrameFade(frame, frame.FadeObject) +end + +function E:UIFrameFadeRemoveFrame(frame) + if frame and FADEFRAMES[frame] then + if frame.FadeObject then + frame.FadeObject.fadeTimer = nil + end + + FADEFRAMES[frame] = nil + end +end \ No newline at end of file diff --git a/ElvUI/Core/AprilFools.lua b/ElvUI/Core/AprilFools.lua new file mode 100644 index 0000000..c3e5d9d --- /dev/null +++ b/ElvUI/Core/AprilFools.lua @@ -0,0 +1,369 @@ +--[[ + Collection of previous april fools pranks + + Harlem Shake: Try it out with the command /harlemshake + Hello Kitty: Try it out with the command /hellokitty (pay attention to the popups, read what it says) +]] + +local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB +local UF = E:GetModule("UnitFrames") +local AB = E:GetModule("ActionBars") + +--Lua functions +local _G = _G +local pairs = pairs +local twipe, tinsert = wipe, tinsert +--WoW API / Variables +local CreateFrame = CreateFrame +local DoEmote = DoEmote +local GetCVar, SetCVar = GetCVar, SetCVar +local PlayMusic, StopMusic = PlayMusic, StopMusic +local SendChatMessage = SendChatMessage +local NUM_PET_ACTION_SLOTS = NUM_PET_ACTION_SLOTS + +--Harlem Shake (Activate with command: /harlemshake) +--People really seemed to like this one. We got a lot of positive responses. +do + function E:StopHarlemShake() + E.isMassiveShaking = nil + StopMusic() + SetCVar("Sound_EnableAllSound", self.oldEnableAllSound) + SetCVar("Sound_EnableMusic", self.oldEnableMusic) + + self:StopShakeHorizontal(ElvUI_StaticPopup1) + for _, object in pairs(self.massiveShakeObjects) do + if object then + self:StopShake(object) + end + end + + if E.massiveShakeTimer then + E:CancelTimer(E.massiveShakeTimer) + end + + E.global.aprilFools = true + E:StaticPopup_Hide("HARLEM_SHAKE") + twipe(self.massiveShakeObjects) + DoEmote("Dance") + end + + function E:DoTheHarlemShake() + E.isMassiveShaking = true + ElvUI_StaticPopup1Button1:Enable() + + for _, object in pairs(self.massiveShakeObjects) do + if object and object:IsShown() then + self:Shake(object) + end + end + + E.massiveShakeTimer = E:ScheduleTimer("StopHarlemShake", 42.5) + SendChatMessage("DO THE HARLEM SHAKE!", "YELL") + end + + function E:BeginHarlemShake() + DoEmote("Dance") + ElvUI_StaticPopup1Button1:Disable() + self:ShakeHorizontal(ElvUI_StaticPopup1) + self.oldEnableAllSound = GetCVar("Sound_EnableAllSound") + self.oldEnableMusic = GetCVar("Sound_EnableMusic") + + SetCVar("Sound_EnableAllSound", 1) + SetCVar("Sound_EnableMusic", 1) + PlayMusic(E.Media.Sounds.HarlemShake) + E:ScheduleTimer("DoTheHarlemShake", 15.5) + + self.massiveShakeObjects = {} + tinsert(self.massiveShakeObjects, GameTooltip) + tinsert(self.massiveShakeObjects, Minimap) + tinsert(self.massiveShakeObjects, WatchFrame) + tinsert(self.massiveShakeObjects, LeftChatPanel) + tinsert(self.massiveShakeObjects, RightChatPanel) + tinsert(self.massiveShakeObjects, LeftChatToggleButton) + tinsert(self.massiveShakeObjects, RightChatToggleButton) + + if ElvUI_ReputationBar then + tinsert(self.massiveShakeObjects, ElvUI_ReputationBar) + end + if ElvUI_ExperienceBar then + tinsert(self.massiveShakeObjects, ElvUI_ExperienceBar) + end + + for unit in pairs(UF.units) do + tinsert(self.massiveShakeObjects, UF[unit]) + end + + for _, header in pairs(UF.headers) do + tinsert(self.massiveShakeObjects, header) + end + + for _, bar in pairs(AB.handledBars) do + for i = 1, #bar.buttons do + tinsert(self.massiveShakeObjects, bar.buttons[i]) + end + end + + if ElvUI_StanceBar then + for i = 1, #ElvUI_StanceBar.buttons do + tinsert(self.massiveShakeObjects, ElvUI_StanceBar.buttons[i]) + end + end + + for i = 1, NUM_PET_ACTION_SLOTS do + local button = _G["PetActionButton"..i] + if button then + tinsert(self.massiveShakeObjects, button) + end + end + end + + function E:HarlemShakeToggle() + self:StaticPopup_Show("HARLEM_SHAKE") + end +end + +--Hello Kitty (Activate with command: /hellokitty) +--This is one of those pranks where you either love it or hate it I think +--Unfortunately there was a bug which caused some of the hello kitty changes to stick, +-- when they should have reverted to the original settings. This bug was fixed later on. +do + local function OnDragStart(self) + self:StartMoving() + end + + local function OnDragStop(self) + self:StopMovingOrSizing() + end + + local function OnUpdate(self, elapsed) + if self.elapsed and self.elapsed > 0.1 then + self.tex:SetTexCoord((self.curFrame - 1) * 0.1, 0, (self.curFrame - 1) * 0.1, 1, self.curFrame * 0.1, 0, self.curFrame * 0.1, 1) + + if self.countUp then + self.curFrame = self.curFrame + 1 + else + self.curFrame = self.curFrame - 1 + end + + if self.curFrame > 10 then + self.countUp = false + self.curFrame = 9 + elseif self.curFrame < 1 then + self.countUp = true + self.curFrame = 2 + end + self.elapsed = 0 + else + self.elapsed = (self.elapsed or 0) + elapsed + end + end + + function E:SetupHelloKitty() + if not self.db.tempSettings then + self.db.tempSettings = {} + end + + --Store old settings + local t = self.db.tempSettings + local c = self.db.general.backdropcolor + if self:HelloKittyFixCheck() then + E:HelloKittyFix() + else + self.oldEnableAllSound = GetCVar("Sound_EnableAllSound") + self.oldEnableMusic = GetCVar("Sound_EnableMusic") + + t.backdropcolor = {r = c.r, g = c.g, b = c.b} + c = self.db.general.backdropfadecolor + t.backdropfadecolor = {r = c.r, g = c.g, b = c.b, a = c.a} + c = self.db.general.bordercolor + t.bordercolor = {r = c.r, g = c.g, b = c.b} + c = self.db.general.valuecolor + t.valuecolor = {r = c.r, g = c.g, b = c.b} + + t.panelBackdropNameLeft = self.db.chat.panelBackdropNameLeft + t.panelBackdropNameRight = self.db.chat.panelBackdropNameRight + + c = self.db.unitframe.colors.health + t.health = {r = c.r, g = c.g, b = c.b} + t.healthclass = self.db.unitframe.colors.healthclass + + c = self.db.unitframe.colors.castColor + t.castColor = {r = c.r, g = c.g, b = c.b} + t.transparentCastbar = self.db.unitframe.colors.transparentCastbar + + c = self.db.unitframe.colors.auraBarBuff + t.auraBarBuff = {r = c.r, g = c.g, b = c.b} + t.transparentAurabars = self.db.unitframe.colors.transparentAurabars + + --Apply new settings + self.db.general.backdropfadecolor = {r = 131/255, g = 36/255, b = 130/255, a = 0.36} + self.db.general.backdropcolor = {r = 223/255, g = 76/255, b = 188/255} + self.db.general.bordercolor = {r = 223/255, g = 217/255, b = 47/255} + self.db.general.valuecolor = {r = 223/255, g = 217/255, b = 47/255} + + self.db.chat.panelBackdropNameLeft = E.Media.Textures.HelloKittyChat + self.db.chat.panelBackdropNameRight = E.Media.Textures.HelloKittyChat + + self.db.unitframe.colors.castColor = {r = 223/255, g = 76/255, b = 188/255} + self.db.unitframe.colors.transparentCastbar = true + + self.db.unitframe.colors.auraBarBuff = {r = 223/255, g = 76/255, b = 188/255} + self.db.unitframe.colors.transparentAurabars = true + + self.db.unitframe.colors.health = {r = 223/255, g = 76/255, b = 188/255} + self.db.unitframe.colors.healthclass = false + + SetCVar("Sound_EnableAllSound", 1) + SetCVar("Sound_EnableMusic", 1) + PlayMusic(E.Media.Sounds.HelloKitty) + E:StaticPopup_Show("HELLO_KITTY_END") + + self.db.general.kittys = true + self:CreateKittys() + + self:UpdateAll() + end + end + + function E:RestoreHelloKitty() + --Store old settings + self.db.general.kittys = false + if HelloKittyLeft then + HelloKittyLeft:Hide() + HelloKittyRight:Hide() + end + + if not self.db.tempSettings then return end + if self:HelloKittyFixCheck() then + self:HelloKittyFix() + self.db.tempSettings = nil + return + end + local c = self.db.tempSettings.backdropcolor + self.db.general.backdropcolor = {r = c.r, g = c.g, b = c.b} + + c = self.db.tempSettings.backdropfadecolor + self.db.general.backdropfadecolor = {r = c.r, g = c.g, b = c.b, a = (c.a or 0.8)} + + c = self.db.tempSettings.bordercolor + self.db.general.bordercolor = {r = c.r, g = c.g, b = c.b} + + c = self.db.tempSettings.valuecolor + self.db.general.valuecolor = {r = c.r, g = c.g, b = c.b} + + self.db.chat.panelBackdropNameLeft = self.db.tempSettings.panelBackdropNameLeft + self.db.chat.panelBackdropNameRight = self.db.tempSettings.panelBackdropNameRight + + c = self.db.tempSettings.health + self.db.unitframe.colors.health = {r = c.r, g = c.g, b = c.b} + self.db.unitframe.colors.healthclass = self.db.tempSettings.healthclass + + c = self.db.tempSettings.castColor + self.db.unitframe.colors.castColor = {r = c.r, g = c.g, b = c.b} + self.db.unitframe.colors.transparentCastbar = self.db.tempSettings.transparentCastbar + + c = self.db.tempSettings.auraBarBuff + self.db.unitframe.colors.auraBarBuff = {r = c.r, g = c.g, b = c.b} + self.db.unitframe.colors.transparentAurabars = self.db.tempSettings.transparentAurabars + + self.db.tempSettings = nil + + self:UpdateAll() + end + + function E:CreateKittys() + if HelloKittyLeft then + HelloKittyLeft:Show() + HelloKittyRight:Show() + return + end + local helloKittyLeft = CreateFrame("Frame", "HelloKittyLeft", UIParent) + helloKittyLeft:SetSize(120, 128) + helloKittyLeft:SetMovable(true) + helloKittyLeft:EnableMouse(true) + helloKittyLeft:RegisterForDrag("LeftButton") + helloKittyLeft:Point("BOTTOMLEFT", LeftChatPanel, "BOTTOMRIGHT", 2, -4) + helloKittyLeft.tex = helloKittyLeft:CreateTexture(nil, "OVERLAY") + helloKittyLeft.tex:SetAllPoints() + helloKittyLeft.tex:SetTexture(E.Media.Textures.HelloKitty) + helloKittyLeft.tex:SetTexCoord(0, 0, 0, 1, 0, 0, 0, 1) + helloKittyLeft.curFrame = 1 + helloKittyLeft.countUp = true + helloKittyLeft:SetClampedToScreen(true) + helloKittyLeft:SetScript("OnDragStart", OnDragStart) + helloKittyLeft:SetScript("OnDragStop", OnDragStop) + helloKittyLeft:SetScript("OnUpdate", OnUpdate) + + local helloKittyRight = CreateFrame("Frame", "HelloKittyRight", UIParent) + helloKittyRight:SetSize(120, 128) + helloKittyRight:SetMovable(true) + helloKittyRight:EnableMouse(true) + helloKittyRight:RegisterForDrag("LeftButton") + helloKittyRight:Point("BOTTOMRIGHT", RightChatPanel, "BOTTOMLEFT", -2, -4) + helloKittyRight.tex = helloKittyRight:CreateTexture(nil, "OVERLAY") + helloKittyRight.tex:SetAllPoints() + helloKittyRight.tex:SetTexture(E.Media.Textures.HelloKitty) + helloKittyRight.tex:SetTexCoord(0, 0, 0, 1, 0, 0, 0, 1) + helloKittyRight.curFrame = 10 + helloKittyRight.countUp = false + helloKittyRight:SetClampedToScreen(true) + helloKittyRight:SetScript("OnDragStart", OnDragStart) + helloKittyRight:SetScript("OnDragStop", OnDragStop) + helloKittyRight:SetScript("OnUpdate", OnUpdate) + end + + --When it bugged out for a user the command "/hellokittyfix" attempted to restore the changed settings to default + function E:HelloKittyFixCheck(secondCheck) + local t = self.db.tempSettings + if not t and not secondCheck then t = self.db.general end + if t and t.backdropcolor then + return self:Round(t.backdropcolor.r, 2) == 0.87 and self:Round(t.backdropcolor.g, 2) == 0.3 and self:Round(t.backdropcolor.b, 2) == 0.74 + end + end + + function E:HelloKittyFix() + local c = P.general.backdropcolor + self.db.general.backdropcolor = {r = c.r, g = c.g, b = c.b} + + c = P.general.backdropfadecolor + self.db.general.backdropfadecolor = {r = c.r, g = c.g, b = c.b, a = (c.a or 0.8)} + + c = P.general.bordercolor + self.db.general.bordercolor = {r = c.r, g = c.g, b = c.b} + + c = P.general.valuecolor + self.db.general.valuecolor = {r = c.r, g = c.g, b = c.b} + + self.db.chat.panelBackdropNameLeft = "" + self.db.chat.panelBackdropNameRight = "" + + c = P.unitframe.colors.health + self.db.unitframe.colors.health = {r = c.r, g = c.g, b = c.b} + + c = P.unitframe.colors.castColor + self.db.unitframe.colors.castColor = {r = c.r, g = c.g, b = c.b} + self.db.unitframe.colors.transparentCastbar = false + + c = P.unitframe.colors.castColor + self.db.unitframe.colors.auraBarBuff = {r = c.r, g = c.g, b = c.b} + self.db.unitframe.colors.transparentAurabars = false + + if HelloKittyLeft then + HelloKittyLeft:Hide() + HelloKittyRight:Hide() + self.db.general.kittys = nil + return + end + + self.db.tempSettings = nil + self:UpdateAll() + end + + function E:HelloKittyToggle() + if HelloKittyLeft and HelloKittyLeft:IsShown() then + self:RestoreHelloKitty() + else + self:StaticPopup_Show("HELLO_KITTY") + end + end +end \ No newline at end of file diff --git a/ElvUI/Core/Commands.lua b/ElvUI/Core/Commands.lua new file mode 100644 index 0000000..375a41f --- /dev/null +++ b/ElvUI/Core/Commands.lua @@ -0,0 +1,280 @@ +local E, L, V, P, G = unpack(select(2, ...)) --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB +local DT = E:GetModule("DataTexts") +local AB = E:GetModule("ActionBars") + +--Lua functions +local tonumber, type = tonumber, type +local format, lower, match, split = string.format, string.lower, string.match, string.split +--WoW API / Variables +local InCombatLockdown = InCombatLockdown +local UIFrameFadeOut, UIFrameFadeIn = UIFrameFadeOut, UIFrameFadeIn +local EnableAddOn, DisableAllAddOns = EnableAddOn, DisableAllAddOns +local SetCVar = SetCVar +local ReloadUI = ReloadUI +local debugprofilestop = debugprofilestop +local UpdateAddOnCPUUsage, GetAddOnCPUUsage = UpdateAddOnCPUUsage, GetAddOnCPUUsage +local ResetCPUUsage = ResetCPUUsage +local GetAddOnInfo = GetAddOnInfo +local GetCVarBool = GetCVarBool +local ERR_NOT_IN_COMBAT = ERR_NOT_IN_COMBAT + +function E:Grid(msg) + msg = msg and tonumber(msg) + if type(msg) == "number" and (msg <= 256 and msg >= 4) then + E.db.gridSize = msg + E:Grid_Show() + elseif ElvUIGrid and ElvUIGrid:IsShown() then + E:Grid_Hide() + else + E:Grid_Show() + end +end + +function E:LuaError(msg) + msg = lower(msg) + if msg == "on" then + DisableAllAddOns() + EnableAddOn("ElvUI") + EnableAddOn("ElvUI_OptionsUI") + SetCVar("scriptErrors", 1) + ReloadUI() + elseif msg == "off" then + SetCVar("scriptErrors", 0) + E:Print("Lua errors off.") + else + E:Print("/luaerror on - /luaerror off") + end +end + +function E:BGStats() + DT.ForceHideBGStats = nil + DT:LoadDataTexts() + + E:Print(L["Battleground datatexts will now show again if you are inside a battleground."]) +end + +local function OnCallback(command) + MacroEditBox:GetScript("OnEvent")(MacroEditBox, "EXECUTE_CHAT_LINE", command) +end + +function E:DelayScriptCall(msg) + local secs, command = match(msg, "^(%S+)%s+(.*)$") + secs = tonumber(secs) + if (not secs) or (#command == 0) then + self:Print("usage: /in ") + self:Print("example: /in 1.5 /say hi") + else + E:Delay(secs, OnCallback, command) + end +end + +function FarmMode() + if InCombatLockdown() then E:Print(ERR_NOT_IN_COMBAT) return end + if not E.private.general.minimap.enable then return end + + if Minimap:IsShown() then + UIFrameFadeOut(Minimap, 0.3) + UIFrameFadeIn(FarmModeMap, 0.3) + Minimap.fadeInfo.finishedFunc = function() + Minimap:Hide() + FarmModeMap:SetAlpha(1) + + local zoomLevel = Minimap:GetZoom() + if zoomLevel < 5 then + Minimap:SetZoom(zoomLevel + 1) + Minimap:SetZoom(zoomLevel) + else + Minimap:SetZoom(zoomLevel - 1) + Minimap:SetZoom(zoomLevel) + end + end + FarmModeMap.enabled = true + else + UIFrameFadeOut(FarmModeMap, 0.3) + UIFrameFadeIn(Minimap, 0.3) + FarmModeMap.fadeInfo.finishedFunc = function() + FarmModeMap:Hide() + Minimap:SetAlpha(1) + + local zoomLevel = Minimap:GetZoom() + if zoomLevel < 5 then + Minimap:SetZoom(zoomLevel + 1) + Minimap:SetZoom(zoomLevel) + else + Minimap:SetZoom(zoomLevel - 1) + Minimap:SetZoom(zoomLevel) + end + end + FarmModeMap.enabled = false + end +end + +function E:FarmMode(msg) + if not E.private.general.minimap.enable then return end + + if msg and type(tonumber(msg)) == "number" and tonumber(msg) <= 500 and tonumber(msg) >= 20 and not InCombatLockdown() then + E.db.farmSize = tonumber(msg) + FarmModeMap:Size(tonumber(msg)) + end + + FarmMode() +end + +-- make this a locale later? +local MassKickMessage = "Guild Cleanup Results: Removed all guild members below rank %s, that have a minimal level of %s, and have not been online for at least: %s days." +function E:MassGuildKick(msg) + local minLevel, minDays, minRankIndex = split(",", msg) + minRankIndex = tonumber(minRankIndex) + minLevel = tonumber(minLevel) + minDays = tonumber(minDays) + + if not minLevel or not minDays then + E:Print("Usage: /cleanguild , , []") + return + end + + if minDays > 31 then + E:Print("Maximum days value must be below 32.") + return + end + + if not minRankIndex then minRankIndex = GuildControlGetNumRanks() - 1 end + + for i = 1, GetNumGuildMembers() do + local name, _, rankIndex, level, _, _, note, officerNote, connected, _, classFileName = GetGuildRosterInfo(i) + local minLevelx = minLevel + + if classFileName == "DEATHKNIGHT" then + minLevelx = minLevelx + 55 + end + + if not connected then + local years, months, days = GetGuildRosterLastOnline(i) + if days ~= nil and ((years > 0 or months > 0 or days >= minDays) and rankIndex >= minRankIndex) + and note ~= nil and officerNote ~= nil and (level <= minLevelx) then + GuildUninvite(name) + end + end + end + + SendChatMessage(format(MassKickMessage, GuildControlGetRankName(minRankIndex), minLevel, minDays), "GUILD") +end + +local num_frames = 0 +local function OnUpdate() + num_frames = num_frames + 1 +end +local f = CreateFrame("Frame") +f:Hide() +f:SetScript("OnUpdate", OnUpdate) + +local toggleMode, debugTimer, cpuImpactMessage = false, 0, "Consumed %sms per frame. Each frame took %sms to render." +function E:GetCPUImpact() + if not GetCVarBool("scriptProfile") then + E:Print("For `/cpuimpact` to work, you need to enable script profiling via: `/console scriptProfile 1` then reload. Disable after testing by setting it back to 0.") + return + end + + if not toggleMode then + ResetCPUUsage() + toggleMode, num_frames, debugTimer = true, 0, debugprofilestop() + self:Print("CPU Impact being calculated, type /cpuimpact to get results when you are ready.") + f:Show() + else + f:Hide() + local ms_passed = debugprofilestop() - debugTimer + UpdateAddOnCPUUsage() + + local per, passed = + ((num_frames == 0 and 0) or (GetAddOnCPUUsage("ElvUI") / num_frames)), + ((num_frames == 0 and 0) or (ms_passed / num_frames)) + self:Print(format(cpuImpactMessage, per and per > 0 and format("%.3f", per) or 0, passed and passed > 0 and format("%.3f", passed) or 0)) + toggleMode = false + end +end + +local BLIZZARD_ADDONS = { + "Blizzard_AchievementUI", + "Blizzard_ArenaUI", + "Blizzard_AuctionUI", + "Blizzard_BarbershopUI", + "Blizzard_BattlefieldMinimap", + "Blizzard_BindingUI", + "Blizzard_Calendar", + "Blizzard_CombatLog", + "Blizzard_CombatText", + "Blizzard_DebugTools", + "Blizzard_GlyphUI", + "Blizzard_GMChatUI", + "Blizzard_GMSurveyUI", + "Blizzard_GuildBankUI", + "Blizzard_InspectUI", + "Blizzard_ItemSocketingUI", + "Blizzard_MacroUI", + "Blizzard_RaidUI", + "Blizzard_TalentUI", + "Blizzard_TimeManager", + "Blizzard_TokenUI", + "Blizzard_TradeSkillUI", + "Blizzard_TrainerUI" +} + +function E:EnableBlizzardAddOns() + for _, addon in pairs(BLIZZARD_ADDONS) do + local reason = select(5, GetAddOnInfo(addon)) + if reason == "DISABLED" then + EnableAddOn(addon) + E:Print("The following addon was re-enabled:", addon) + end + end +end + +function E:ChangeRole(role) + local roles = { + ["melee"]="Melee", + ["caster"]="Caster", + ["ranged"]="Ranged", + ["tank"]="Tank", + } + E.Role = roles[lower(role)] or "Melee" + print("Role was changed to:", E.Role) +end + +function E:LoadCommands() + self:RegisterChatCommand("in", "DelayScriptCall") + self:RegisterChatCommand("ec", "ToggleOptionsUI") + self:RegisterChatCommand("elvui", "ToggleOptionsUI") + self:RegisterChatCommand("cpuimpact", "GetCPUImpact") + + self:RegisterChatCommand("cpuusage", "GetTopCPUFunc") + -- args: module, showall, delay, minCalls + -- Example1: /cpuusage all + -- Example2: /cpuusage Bags true + -- Example3: /cpuusage UnitFrames nil 50 25 + -- Note: showall, delay, and minCalls will default if not set + -- arg1 can be "all" this will scan all registered modules! + + self:RegisterChatCommand("bgstats", "BGStats") + self:RegisterChatCommand("hellokitty", "HelloKittyToggle") + self:RegisterChatCommand("hellokittyfix", "HelloKittyFix") + self:RegisterChatCommand("harlemshake", "HarlemShakeToggle") + self:RegisterChatCommand("luaerror", "LuaError") + self:RegisterChatCommand("egrid", "Grid") + self:RegisterChatCommand("moveui", "ToggleMoveMode") + self:RegisterChatCommand("resetui", "ResetUI") + self:RegisterChatCommand("enable", "EnableAddon") + self:RegisterChatCommand("disable", "DisableAddon") + self:RegisterChatCommand("farmmode", "FarmMode") + self:RegisterChatCommand("cleanguild", "MassGuildKick") + self:RegisterChatCommand("estatus", "ShowStatusReport") + + self:RegisterChatCommand("role", "ChangeRole") + -- This command is added for Ascension. Role checks will be unreliable, but + -- this will allow one to set Role manually. + -- /role expects one of "melee", "caster", "ranged", "tank" + -- and defaults to "melee" if no role is provided. + + if E.private.actionbar.enable then + self:RegisterChatCommand("kb", AB.ActivateBindMode) + end +end \ No newline at end of file diff --git a/ElvUI/Core/Config.lua b/ElvUI/Core/Config.lua new file mode 100644 index 0000000..a0ea893 --- /dev/null +++ b/ElvUI/Core/Config.lua @@ -0,0 +1,509 @@ +local E, L, V, P, G = unpack(select(2, ...)); -- Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB +local S = E:GetModule("Skins") + +--Lua functions +local _G = _G +local unpack = unpack +local type, ipairs, tonumber = type, ipairs, tonumber +local floor, select = floor, select +--WoW API / Variables +local CreateFrame = CreateFrame +local IsAddOnLoaded = IsAddOnLoaded +local InCombatLockdown = InCombatLockdown +local EditBox_ClearFocus = EditBox_ClearFocus +local RESET = RESET + +local selectedValue, grid = "ALL" + +E.ConfigModeLayouts = { + "ALL", + "GENERAL", + "SOLO", + "PARTY", + "ARENA", + "RAID", + "ACTIONBARS" +} + +E.ConfigModeLocalizedStrings = { + ALL = ALL, + GENERAL = GENERAL, + SOLO = SOLO, + PARTY = PARTY, + ARENA = ARENA, + RAID = RAID, + ACTIONBARS = ACTIONBARS_LABEL +} + +function E:Grid_Show() + if not grid then + E:Grid_Create() + elseif grid.boxSize ~= E.db.gridSize then + grid:Hide() + E:Grid_Create() + else + grid:Show() + end +end + +function E:Grid_Hide() + if grid then + grid:Hide() + end +end + +function E:ToggleMoveMode(override, configType) + if InCombatLockdown() then return end + if override ~= nil and override ~= "" then E.ConfigurationMode = override end + + if E.ConfigurationMode ~= true then + E:Grid_Show() + + if not ElvUIMoverPopupWindow then + E:CreateMoverPopup() + end + + ElvUIMoverPopupWindow:Show() + + if IsAddOnLoaded("ElvUI_OptionsUI") then + if E.Libs.AceConfigDialog then + E.Libs.AceConfigDialog:Close("ElvUI") + end + + GameTooltip:Hide() + end + + E.ConfigurationMode = true + else + E:Grid_Hide() + + if ElvUIMoverPopupWindow then + ElvUIMoverPopupWindow:Hide() + end + + E.ConfigurationMode = false + end + + if type(configType) ~= "string" then + configType = nil + end + + self:ToggleMovers(E.ConfigurationMode, configType or "ALL") +end + +function E:Grid_GetRegion() + if grid then + if grid.regionCount and grid.regionCount > 0 then + local line = select(grid.regionCount, grid:GetRegions()) + grid.regionCount = grid.regionCount - 1 + line:SetAlpha(1) + return line + else + return grid:CreateTexture() + end + end +end + +function E:Grid_Create() + if not grid then + grid = CreateFrame("Frame", "ElvUIGrid", E.UIParent) + grid:SetFrameStrata("BACKGROUND") + else + grid.regionCount = 0 + local numRegions = grid:GetNumRegions() + for i = 1, numRegions do + local region = select(i, grid:GetRegions()) + if region and region.IsObjectType and region:IsObjectType("Texture") then + grid.regionCount = grid.regionCount + 1 + region:SetAlpha(0) + end + end + end + + local size = E.mult + local width, height = E.UIParent:GetSize() + + local ratio = width / height + local hStepheight = height * ratio + local wStep = width / E.db.gridSize + local hStep = hStepheight / E.db.gridSize + + grid.boxSize = E.db.gridSize + grid:SetPoint("CENTER", E.UIParent) + grid:SetSize(width, height) + grid:Show() + + for i = 0, E.db.gridSize do + local tx = E:Grid_GetRegion() + if i == E.db.gridSize / 2 then + tx:SetTexture(1, 0, 0) + tx:SetDrawLayer("BORDER") + else + tx:SetTexture(0, 0, 0) + tx:SetDrawLayer("BACKGROUND") + end + tx:ClearAllPoints() + tx:Point("TOPLEFT", grid, "TOPLEFT", i*wStep - (size/2), 0) + tx:Point("BOTTOMRIGHT", grid, "BOTTOMLEFT", i*wStep + (size/2), 0) + end + + do + local tx = E:Grid_GetRegion() + tx:SetTexture(1, 0, 0) + tx:SetDrawLayer("BORDER") + tx:ClearAllPoints() + tx:Point("TOPLEFT", grid, "TOPLEFT", 0, -(height/2) + (size/2)) + tx:Point("BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2 + size/2)) + end + + for i = 1, floor((height/2)/hStep) do + local tx = E:Grid_GetRegion() + tx:SetTexture(0, 0, 0) + tx:SetDrawLayer("BACKGROUND") + tx:ClearAllPoints() + tx:Point("TOPLEFT", grid, "TOPLEFT", 0, -(height/2+i*hStep) + (size/2)) + tx:Point("BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2+i*hStep + size/2)) + + tx = E:Grid_GetRegion() + tx:SetTexture(0, 0, 0) + tx:SetDrawLayer("BACKGROUND") + tx:ClearAllPoints() + tx:Point("TOPLEFT", grid, "TOPLEFT", 0, -(height/2-i*hStep) + (size/2)) + tx:Point("BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2-i*hStep + size/2)) + end +end + +local function ConfigMode_OnClick(self) + selectedValue = self.value + E:ToggleMoveMode(false, self.value) + UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, self.value) +end + +local function ConfigMode_Initialize() + local info = _G.UIDropDownMenu_CreateInfo() + info.func = ConfigMode_OnClick + + for _, configMode in ipairs(E.ConfigModeLayouts) do + info.text = E.ConfigModeLocalizedStrings[configMode] + info.value = configMode + UIDropDownMenu_AddButton(info) + end + + UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, selectedValue) +end + +function E:NudgeMover(nudgeX, nudgeY) + local mover = ElvUIMoverNudgeWindow.child + local x, y, point = E:CalculateMoverPoints(mover, nudgeX, nudgeY) + + mover:ClearAllPoints() + mover:Point(mover.positionOverride or point, E.UIParent, mover.positionOverride and "BOTTOMLEFT" or point, x, y) + E:SaveMoverPosition(mover.name) + + --Update coordinates in Nudge Window + E:UpdateNudgeFrame(mover, x, y) +end + +function E:UpdateNudgeFrame(mover, x, y) + if not (x and y) then + x, y = E:CalculateMoverPoints(mover) + end + + x = E:Round(x, 0) + y = E:Round(y, 0) + + local ElvUIMoverNudgeWindow = ElvUIMoverNudgeWindow + ElvUIMoverNudgeWindow.xOffset:SetText(x) + ElvUIMoverNudgeWindow.yOffset:SetText(y) + ElvUIMoverNudgeWindow.xOffset.currentValue = x + ElvUIMoverNudgeWindow.yOffset.currentValue = y + ElvUIMoverNudgeWindow.title:SetText(mover.textString) +end + +function E:AssignFrameToNudge() + ElvUIMoverNudgeWindow.child = self + E:UpdateNudgeFrame(self) +end + +function E:CreateMoverPopup() + local f = CreateFrame("Frame", "ElvUIMoverPopupWindow", UIParent) + f:SetFrameStrata("DIALOG") + f:SetToplevel(true) + f:EnableMouse(true) + f:SetMovable(true) + f:SetFrameLevel(99) + f:SetClampedToScreen(true) + f:Width(360) + f:Height(195) + f:SetTemplate("Transparent") + f:Point("BOTTOM", UIParent, "CENTER", 0, 100) + f:SetScript("OnHide", function() + if ElvUIMoverPopupWindowDropDown then + UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, "ALL") + end + end) + f:SetBackdropBorderColor(unpack(E.media.rgbvaluecolor)) + f:CreateShadow(5) + f:Hide() + + local header = CreateFrame("Button", nil, f) + header:SetTemplate(nil, true) + header:Width(100) + header:Height(25) + header:Point("CENTER", f, "TOP") + header:SetFrameLevel(header:GetFrameLevel() + 2) + header:EnableMouse(true) + header:RegisterForClicks("AnyUp", "AnyDown") + header:SetScript("OnMouseDown", function() f:StartMoving() end) + header:SetScript("OnMouseUp", function() f:StopMovingOrSizing() end) + header:SetBackdropBorderColor(unpack(E.media.rgbvaluecolor)) + + local title = header:CreateFontString("OVERLAY") + title:FontTemplate() + title:Point("CENTER", header, "CENTER") + title:SetText("ElvUI") + + local desc = f:CreateFontString("ARTWORK") + desc:SetFontObject("GameFontHighlight") + desc:SetJustifyV("TOP") + desc:SetJustifyH("LEFT") + desc:Point("TOPLEFT", 18, -32) + desc:Point("BOTTOMRIGHT", -18, 48) + desc:SetText(L["DESC_MOVERCONFIG"]) + + local snapping = CreateFrame("CheckButton", f:GetName().."CheckButton", f, "OptionsCheckButtonTemplate") + _G[snapping:GetName().."Text"]:SetText(L["Sticky Frames"]) + + snapping:SetScript("OnShow", function(cb) + cb:SetChecked(E.db.general.stickyFrames) + end) + + snapping:SetScript("OnClick", function(cb) + E.db.general.stickyFrames = cb:GetChecked() + end) + + local lock = CreateFrame("Button", f:GetName().."CloseButton", f, "OptionsButtonTemplate") + _G[lock:GetName().."Text"]:SetText(L["Lock"]) + + lock:SetScript("OnClick", function() + E:ToggleMoveMode(true) + + if IsAddOnLoaded("ElvUI_OptionsUI") and E.Libs.AceConfigDialog then + E.Libs.AceConfigDialog:Open("ElvUI") + end + + selectedValue = "ALL" + UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, selectedValue) + end) + + local align = CreateFrame("EditBox", f:GetName().."EditBox", f, "InputBoxTemplate") + align:Width(24) + align:Height(17) + align:SetAutoFocus(false) + align:SetScript("OnEscapePressed", function(eb) + eb:SetText(E.db.gridSize) + EditBox_ClearFocus(eb) + end) + align:SetScript("OnEnterPressed", function(eb) + local text = eb:GetText() + if tonumber(text) then + if tonumber(text) <= 256 and tonumber(text) >= 4 then + E.db.gridSize = tonumber(text) + else + eb:SetText(E.db.gridSize) + end + else + eb:SetText(E.db.gridSize) + end + E:Grid_Show() + EditBox_ClearFocus(eb) + end) + align:SetScript("OnEditFocusLost", function(eb) + eb:SetText(E.db.gridSize) + end) + align:SetScript("OnEditFocusGained", align.HighlightText) + align:SetScript("OnShow", function(eb) + EditBox_ClearFocus(eb) + eb:SetText(E.db.gridSize) + end) + + align.text = align:CreateFontString(nil, "OVERLAY", "GameFontNormal") + align.text:Point("RIGHT", align, "LEFT", -4, 0) + align.text:SetText(L["Grid Size:"]) + + --position buttons + snapping:Point("BOTTOMLEFT", 14, 10) + lock:Point("BOTTOMRIGHT", -14, 14) + align:Point("TOPRIGHT", lock, "TOPLEFT", -4, -2) + + S:HandleCheckBox(snapping) + S:HandleButton(lock) + S:HandleEditBox(align) + + f:RegisterEvent("PLAYER_REGEN_DISABLED") + f:SetScript("OnEvent", function(mover) + if mover:IsShown() then + mover:Hide() + E:Grid_Hide() + E:ToggleMoveMode(true) + end + end) + + local configMode = CreateFrame("Frame", f:GetName().."DropDown", f, "UIDropDownMenuTemplate") + configMode:Point("BOTTOMRIGHT", lock, "TOPRIGHT", 8, -5) + S:HandleDropDownBox(configMode, 148) + configMode.text = configMode:CreateFontString(nil, "OVERLAY", "GameFontNormal") + configMode.text:Point("RIGHT", configMode.backdrop, "LEFT", -2, 0) + configMode.text:SetText(L["Config Mode:"]) + + UIDropDownMenu_Initialize(configMode, ConfigMode_Initialize) + + local nudgeFrame = CreateFrame("Frame", "ElvUIMoverNudgeWindow", E.UIParent) + nudgeFrame:SetFrameStrata("DIALOG") + nudgeFrame:Width(200) + nudgeFrame:Height(110) + nudgeFrame:SetTemplate("Transparent") + nudgeFrame:CreateShadow(5) + nudgeFrame:SetBackdropBorderColor(unpack(E.media.rgbvaluecolor)) + nudgeFrame:SetFrameLevel(100) + nudgeFrame:Hide() + nudgeFrame:EnableMouse(true) + nudgeFrame:SetClampedToScreen(true) + + ElvUIMoverPopupWindow:HookScript("OnHide", function() ElvUIMoverNudgeWindow:Hide() end) + + desc = nudgeFrame:CreateFontString("ARTWORK") + desc:SetFontObject("GameFontHighlight") + desc:SetJustifyV("TOP") + desc:SetJustifyH("LEFT") + desc:Point("TOPLEFT", 18, -15) + desc:Point("BOTTOMRIGHT", -18, 28) + desc:SetJustifyH("CENTER") + nudgeFrame.title = desc + + header = CreateFrame("Button", nil, nudgeFrame) + header:SetTemplate(nil, true) + header:Width(100) + header:Height(25) + header:Point("CENTER", nudgeFrame, "TOP") + header:SetFrameLevel(header:GetFrameLevel() + 2) + header:SetBackdropBorderColor(unpack(E.media.rgbvaluecolor)) + + title = header:CreateFontString("OVERLAY") + title:FontTemplate() + title:Point("CENTER", header, "CENTER") + title:SetText(L["Nudge"]) + + local xOffset = CreateFrame("EditBox", nudgeFrame:GetName().."XEditBox", nudgeFrame, "InputBoxTemplate") + xOffset:Width(50) + xOffset:Height(17) + xOffset:SetAutoFocus(false) + xOffset.currentValue = 0 + xOffset:SetScript("OnEscapePressed", function(eb) + eb:SetText(E:Round(xOffset.currentValue)) + EditBox_ClearFocus(eb) + end) + xOffset:SetScript("OnEnterPressed", function(eb) + local num = eb:GetText() + if tonumber(num) then + local diff = num - xOffset.currentValue + xOffset.currentValue = num + E:NudgeMover(diff) + end + eb:SetText(E:Round(xOffset.currentValue)) + EditBox_ClearFocus(eb) + end) + xOffset:SetScript("OnEditFocusLost", function(eb) + eb:SetText(E:Round(xOffset.currentValue)) + end) + xOffset:SetScript("OnEditFocusGained", xOffset.HighlightText) + xOffset:SetScript("OnShow", function(eb) + EditBox_ClearFocus(eb) + eb:SetText(E:Round(xOffset.currentValue)) + end) + + xOffset.text = xOffset:CreateFontString(nil, "OVERLAY", "GameFontNormal") + xOffset.text:Point("RIGHT", xOffset, "LEFT", -4, 0) + xOffset.text:SetText("X:") + xOffset:Point("BOTTOMRIGHT", nudgeFrame, "CENTER", -6, 8) + nudgeFrame.xOffset = xOffset + S:HandleEditBox(xOffset) + + local yOffset = CreateFrame("EditBox", nudgeFrame:GetName().."YEditBox", nudgeFrame, "InputBoxTemplate") + yOffset:Width(50) + yOffset:Height(17) + yOffset:SetAutoFocus(false) + yOffset.currentValue = 0 + yOffset:SetScript("OnEscapePressed", function(eb) + eb:SetText(E:Round(yOffset.currentValue)) + EditBox_ClearFocus(eb) + end) + yOffset:SetScript("OnEnterPressed", function(eb) + local num = eb:GetText() + if tonumber(num) then + local diff = num - yOffset.currentValue + yOffset.currentValue = num + E:NudgeMover(nil, diff) + end + eb:SetText(E:Round(yOffset.currentValue)) + EditBox_ClearFocus(eb) + end) + yOffset:SetScript("OnEditFocusLost", function(eb) + eb:SetText(E:Round(yOffset.currentValue)) + end) + yOffset:SetScript("OnEditFocusGained", yOffset.HighlightText) + yOffset:SetScript("OnShow", function(eb) + EditBox_ClearFocus(eb) + eb:SetText(E:Round(yOffset.currentValue)) + end) + + yOffset.text = yOffset:CreateFontString(nil, "OVERLAY", "GameFontNormal") + yOffset.text:Point("RIGHT", yOffset, "LEFT", -4, 0) + yOffset.text:SetText("Y:") + yOffset:Point("BOTTOMLEFT", nudgeFrame, "CENTER", 16, 8) + nudgeFrame.yOffset = yOffset + S:HandleEditBox(yOffset) + + local resetButton = CreateFrame("Button", nudgeFrame:GetName().."ResetButton", nudgeFrame, "UIPanelButtonTemplate") + resetButton:SetText(RESET) + resetButton:Point("TOP", nudgeFrame, "CENTER", 0, 2) + resetButton:Size(100, 25) + resetButton:SetScript("OnClick", function() + if ElvUIMoverNudgeWindow.child.textString then + E:ResetMovers(ElvUIMoverNudgeWindow.child.textString) + end + end) + S:HandleButton(resetButton) + + local upButton = CreateFrame("Button", nudgeFrame:GetName().."UpButton", nudgeFrame) + upButton:Point("BOTTOMRIGHT", nudgeFrame, "BOTTOM", -6, 4) + upButton:SetScript("OnClick", function() + E:NudgeMover(nil, 1) + end) + S:HandleNextPrevButton(upButton) + upButton:SetSize(22, 22) + + local downButton = CreateFrame("Button", nudgeFrame:GetName().."DownButton", nudgeFrame) + downButton:Point("BOTTOMLEFT", nudgeFrame, "BOTTOM", 6, 4) + downButton:SetScript("OnClick", function() + E:NudgeMover(nil, -1) + end) + S:HandleNextPrevButton(downButton) + downButton:SetSize(22, 22) + + local leftButton = CreateFrame("Button", nudgeFrame:GetName().."LeftButton", nudgeFrame) + leftButton:Point("RIGHT", upButton, "LEFT", -6, 0) + leftButton:SetScript("OnClick", function() + E:NudgeMover(-1) + end) + S:HandleNextPrevButton(leftButton) + leftButton:SetSize(22, 22) + + local rightButton = CreateFrame("Button", nudgeFrame:GetName().."RightButton", nudgeFrame) + rightButton:Point("LEFT", downButton, "RIGHT", 6, 0) + rightButton:SetScript("OnClick", function() + E:NudgeMover(1) + end) + S:HandleNextPrevButton(rightButton) + rightButton:SetSize(22, 22) +end \ No newline at end of file diff --git a/ElvUI/Core/Cooldowns.lua b/ElvUI/Core/Cooldowns.lua new file mode 100644 index 0000000..33bbede --- /dev/null +++ b/ElvUI/Core/Cooldowns.lua @@ -0,0 +1,320 @@ +local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB + +--Lua functions +local next, ipairs, pairs = next, ipairs, pairs +local floor, tinsert = math.floor, table.insert +--WoW API / Variables +local GetTime = GetTime +local CreateFrame = CreateFrame +local hooksecurefunc = hooksecurefunc + +local ICON_SIZE = 36 --the normal size for an icon (don't change this) +local FONT_SIZE = 20 --the base font size to use at a scale of 1 +local MIN_SCALE = 0.5 --the minimum scale we want to show cooldown counts at, anything below this will be hidden +local MIN_DURATION = 1.5 --the minimum duration to show cooldown text for + +function E:Cooldown_TextThreshold(cd, now) + if cd.parent and cd.parent.textThreshold and cd.endTime then + return (cd.endTime - now) >= cd.parent.textThreshold + end +end + +function E:Cooldown_BelowScale(cd) + if cd.parent then + if cd.parent.hideText then return true end + if cd.parent.skipScale then return end + end + + return cd.fontScale and (cd.fontScale < MIN_SCALE) +end + +function E:Cooldown_OnUpdate(elapsed) + if self.nextUpdate > 0 then + self.nextUpdate = self.nextUpdate - elapsed + return + end + + if not E:Cooldown_IsEnabled(self) then + E:Cooldown_StopTimer(self) + else + local now = GetTime() + if self.endCooldown and now >= self.endCooldown then + E:Cooldown_StopTimer(self) + else + if E:Cooldown_BelowScale(self) then + self.text:SetText("") + self.nextUpdate = 500 + elseif E:Cooldown_TextThreshold(self, now) then + self.text:SetText("") + self.nextUpdate = 1 + elseif self.endTime then + local value, id, nextUpdate, remainder = E:GetTimeInfo(self.endTime - now, self.threshold, self.hhmmThreshold, self.mmssThreshold) + self.nextUpdate = nextUpdate + + local style = E.TimeFormats[id] + if style then + local which = (self.textColors and 2 or 1) + (self.showSeconds and 0 or 2) + if self.textColors then + self.text:SetFormattedText(style[which], value, self.textColors[id], remainder) + else + self.text:SetFormattedText(style[which], value, remainder) + end + end + + local color = self.timeColors[id] + if color then + self.text:SetTextColor(color.r, color.g, color.b) + end + end + end + end +end + +function E:Cooldown_OnSizeChanged(cd, width, force) + local scale = width and (floor(width + 0.5) / ICON_SIZE) + + -- dont bother updating when the fontScale is the same, unless we are passing the force arg + if scale and (scale == cd.fontScale) and (force ~= true) then return end + cd.fontScale = scale + + -- this is needed because of skipScale variable, we wont allow a font size under the minscale + if cd.fontScale and (cd.fontScale < MIN_SCALE) then + scale = MIN_SCALE + end + + if cd.customFont then -- override font + cd.text:FontTemplate(cd.customFont, (scale * cd.customFontSize), cd.customFontOutline) + elseif scale then -- default, no override + cd.text:FontTemplate(nil, (scale * FONT_SIZE), "OUTLINE") + else -- this should never happen but just incase + cd.text:FontTemplate() + end + + if E:Cooldown_BelowScale(cd) then + cd:Hide() + elseif cd.enabled then + self:Cooldown_ForceUpdate(cd) + end +end + +function E:Cooldown_IsEnabled(cd) + if cd.forceEnabled then + return true + elseif cd.forceDisabled then + return false + elseif cd.reverseToggle ~= nil then + return cd.reverseToggle + else + return E.db.cooldown.enable + end +end + +function E:Cooldown_ForceUpdate(cd) + cd.nextUpdate = -1 + cd:Show() +end + +function E:Cooldown_StopTimer(cd) + cd.enabled = nil + cd:Hide() +end + +function E:Cooldown_Options(timer, db, parent) + local threshold, colors, icolors, hhmm, mmss, fonts + if parent and db.override then + threshold = db.threshold + icolors = db.useIndicatorColor and E.TimeIndicatorColors[parent.CooldownOverride] + colors = E.TimeColors[parent.CooldownOverride] + end + + if db.checkSeconds then + hhmm, mmss = db.hhmmThreshold, db.mmssThreshold + end + + timer.timeColors = colors or E.TimeColors + timer.threshold = threshold or E.db.cooldown.threshold or E.TimeThreshold + timer.textColors = icolors or (E.db.cooldown.useIndicatorColor and E.TimeIndicatorColors) + timer.hhmmThreshold = hhmm or (E.db.cooldown.checkSeconds and E.db.cooldown.hhmmThreshold) + timer.mmssThreshold = mmss or (E.db.cooldown.checkSeconds and E.db.cooldown.mmssThreshold) + + if db.reverse ~= nil then + timer.reverseToggle = (E.db.cooldown.enable and not db.reverse) or (db.reverse and not E.db.cooldown.enable) + else + timer.reverseToggle = nil + end + + if timer.CooldownOverride ~= "auras" then + if (db ~= E.db.cooldown) and db.fonts and db.fonts.enable then + fonts = db.fonts -- custom fonts override default fonts + elseif E.db.cooldown.fonts and E.db.cooldown.fonts.enable then + fonts = E.db.cooldown.fonts -- default global font override + end + + if fonts and fonts.enable then + timer.customFont = E.Libs.LSM:Fetch("font", fonts.font) + timer.customFontSize = fonts.fontSize + timer.customFontOutline = fonts.fontOutline + else + timer.customFont = nil + timer.customFontSize = nil + timer.customFontOutline = nil + end + end +end + +function E:CreateCooldownTimer(parent) + local timer = CreateFrame("Frame", parent:GetName() and "$parentTimer" or nil, parent) + timer:SetFrameLevel(parent:GetFrameLevel() + 1) + timer:Hide() + timer:SetAllPoints() + timer.parent = parent + parent.timer = timer + + local text = timer:CreateFontString(nil, "OVERLAY") + text:Point("CENTER", 1, 1) + text:SetJustifyH("CENTER") + timer.text = text + + -- can be used to modify elements created from this function + if parent.CooldownPreHook then + parent.CooldownPreHook(parent) + end + + -- cooldown override settings + local db = (parent.CooldownOverride and E.db[parent.CooldownOverride]) or E.db + if db and db.cooldown then + E:Cooldown_Options(timer, db.cooldown, parent) + end + + -- keep an eye on the size so we can rescale the font if needed + self:Cooldown_OnSizeChanged(timer, parent:GetWidth()) + parent:SetScript("OnSizeChanged", function(_, width) + self:Cooldown_OnSizeChanged(timer, width) + end) + + -- keep this after Cooldown_OnSizeChanged + timer:SetScript("OnUpdate", E.Cooldown_OnUpdate) + + return timer +end + +E.RegisteredCooldowns = {} +function E:OnSetCooldown(start, duration) + if (not self.forceDisabled) and (start and duration) and (duration > MIN_DURATION) then + local timer = self.timer or E:CreateCooldownTimer(self) + timer.start = start + timer.duration = duration + timer.endTime = start + duration + timer.endCooldown = timer.endTime - 0.05 + timer.nextUpdate = -1 + timer:Show() + elseif self.timer then + E:Cooldown_StopTimer(self.timer) + end +end + +function E:RegisterCooldown(cooldown) + if not cooldown.isHooked then + hooksecurefunc(cooldown, "SetCooldown", E.OnSetCooldown) + cooldown.isHooked = true + end + + if not cooldown.isRegisteredCooldown then + local module = (cooldown.CooldownOverride or "global") + if not E.RegisteredCooldowns[module] then E.RegisteredCooldowns[module] = {} end + + tinsert(E.RegisteredCooldowns[module], cooldown) + cooldown.isRegisteredCooldown = true + end +end + +function E:GetCooldownColors(db) + if not db then db = E.db.cooldown end -- just incase someone calls this without a first arg use the global + local c13 = E:RGBToHex(db.hhmmColorIndicator.r, db.hhmmColorIndicator.g, db.hhmmColorIndicator.b) -- color for timers that are soon to expire + local c12 = E:RGBToHex(db.mmssColorIndicator.r, db.mmssColorIndicator.g, db.mmssColorIndicator.b) -- color for timers that are soon to expire + local c11 = E:RGBToHex(db.expireIndicator.r, db.expireIndicator.g, db.expireIndicator.b) -- color for timers that are soon to expire + local c10 = E:RGBToHex(db.secondsIndicator.r, db.secondsIndicator.g, db.secondsIndicator.b) -- color for timers that have seconds remaining + local c9 = E:RGBToHex(db.minutesIndicator.r, db.minutesIndicator.g, db.minutesIndicator.b) -- color for timers that have minutes remaining + local c8 = E:RGBToHex(db.hoursIndicator.r, db.hoursIndicator.g, db.hoursIndicator.b) -- color for timers that have hours remaining + local c7 = E:RGBToHex(db.daysIndicator.r, db.daysIndicator.g, db.daysIndicator.b) -- color for timers that have days remaining + local c6 = db.hhmmColor -- HH:MM color + local c5 = db.mmssColor -- MM:SS color + local c4 = db.expiringColor -- color for timers that are soon to expire + local c3 = db.secondsColor -- color for timers that have seconds remaining + local c2 = db.minutesColor -- color for timers that have minutes remaining + local c1 = db.hoursColor -- color for timers that have hours remaining + local c0 = db.daysColor -- color for timers that have days remaining + return c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13 +end + +function E:UpdateCooldownOverride(module) + local cooldowns = (module and E.RegisteredCooldowns[module]) + if (not cooldowns) or not next(cooldowns) then return end + + for _, parent in ipairs(cooldowns) do + local db = (parent.CooldownOverride and E.db[parent.CooldownOverride]) or self.db + if db and db.cooldown then + local timer = parent.isHooked and parent.isRegisteredCooldown and parent.timer + local cd = timer or parent + + -- cooldown override settings + E:Cooldown_Options(cd, db.cooldown, parent) + + -- update font on cooldowns + if timer and cd then -- has a parent, these are timers from RegisterCooldown + self:Cooldown_OnSizeChanged(cd, parent:GetWidth(), true) + + elseif cd.text then + if cd.customFont then + cd.text:FontTemplate(cd.customFont, cd.customFontSize, cd.customFontOutline) + elseif parent.CooldownOverride == "auras" then + -- parent.auraType defined in `A:UpdateHeader` and `A:CreateIcon` + local font = E.Libs.LSM:Fetch("font", db.font) + if font and parent.auraType then + local fontSize = db[parent.auraType] and db[parent.auraType].durationFontSize + if fontSize then + cd.text:FontTemplate(font, fontSize, db.fontOutline) + end + end + end + + -- force update top aura cooldowns + if parent.CooldownOverride == "auras" then + parent.nextUpdate = -1 + end + end + end + end +end + +function E:UpdateCooldownSettings(module) + local db, timeColors, textColors = E.db.cooldown, E.TimeColors, E.TimeIndicatorColors + + -- update the module timecolors if the config called it but ignore "global" and "all": + -- global is the main call from config, all is the core file calls + local isModule = module and (module ~= "global" and module ~= "all") and self.db[module] and self.db[module].cooldown + if isModule then + if not E.TimeColors[module] then E.TimeColors[module] = {} end + if not E.TimeIndicatorColors[module] then E.TimeIndicatorColors[module] = {} end + db, timeColors, textColors = self.db[module].cooldown, E.TimeColors[module], E.TimeIndicatorColors[module] + end + + timeColors[0], timeColors[1], timeColors[2], timeColors[3], timeColors[4], timeColors[5], timeColors[6], textColors[0], textColors[1], textColors[2], textColors[3], textColors[4], textColors[5], textColors[6] = self:GetCooldownColors(db) + + if isModule then + E:UpdateCooldownOverride(module) + elseif module == "global" then -- this is only a call from the config change + for key in pairs(E.RegisteredCooldowns) do + E:UpdateCooldownOverride(key) + end + end + + -- okay update the other override settings if it was one of the core file calls + if module and (module == "all") then + E:UpdateCooldownSettings("bags") + E:UpdateCooldownSettings("nameplates") + E:UpdateCooldownSettings("actionbar") + E:UpdateCooldownSettings("unitframe") + E:UpdateCooldownSettings("auras") + end +end \ No newline at end of file diff --git a/ElvUI/Core/Core.lua b/ElvUI/Core/Core.lua new file mode 100644 index 0000000..8ebbf74 --- /dev/null +++ b/ElvUI/Core/Core.lua @@ -0,0 +1,1211 @@ +local ElvUI = select(2, ...) + +local gameLocale +do -- Locale doesn't exist yet, make it exist. + local convert = {["enGB"] = "enUS", ["esES"] = "esMX", ["itIT"] = "enUS"} + local lang = GetLocale() + + gameLocale = convert[lang] or lang or "enUS" + ElvUI[2] = ElvUI[1].Libs.ACL:GetLocale("ElvUI", gameLocale) +end + +local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB + +local ActionBars = E:GetModule("ActionBars") +local AFK = E:GetModule("AFK") +local Auras = E:GetModule("Auras") +local Bags = E:GetModule("Bags") +local Blizzard = E:GetModule("Blizzard") +local Chat = E:GetModule("Chat") +local DataBars = E:GetModule("DataBars") +local DataTexts = E:GetModule("DataTexts") +local Layout = E:GetModule("Layout") +local Minimap = E:GetModule("Minimap") +local NamePlates = E:GetModule("NamePlates") +local Threat = E:GetModule("Threat") +local Tooltip = E:GetModule("Tooltip") +local Totems = E:GetModule("Totems") +local ReminderBuffs = E:GetModule("ReminderBuffs") +local UnitFrames = E:GetModule("UnitFrames") + +local LSM = E.Libs.LSM + +--Lua functions +local _G = _G +local tonumber, pairs, ipairs, error, unpack, select, tostring = tonumber, pairs, ipairs, error, unpack, select, tostring +local assert, type, print = assert, type, print +local twipe, tinsert, tremove, next = table.wipe, tinsert, tremove, next +local format, find, match, strrep, strlen, sub, gsub, strjoin = string.format, string.find, string.match, strrep, strlen, string.sub, string.gsub, strjoin +--WoW API / Variables +local CreateFrame = CreateFrame +local GetAddOnInfo = GetAddOnInfo +local GetCVar = GetCVar +local GetNumPartyMembers = GetNumPartyMembers +local GetNumRaidMembers = GetNumRaidMembers +local InCombatLockdown = InCombatLockdown +local IsInGuild = IsInGuild +local IsInInstance = IsInInstance +local SendAddonMessage = SendAddonMessage +local UnitGUID = UnitGUID +local ERR_NOT_IN_COMBAT = ERR_NOT_IN_COMBAT + +--Constants +E.noop = function() end +E.title = format("|cff1784d1E|r|cffe5e3e3lvUI|r") +E.myfaction, E.myLocalizedFaction = UnitFactionGroup("player") +E.mylevel = UnitLevel("player") +E.myLocalizedClass, E.myclass = UnitClass("player") -- On Ascension, this is always (Hero, HERO) +E.myLocalizedRace, E.myrace = UnitRace("player") +E.myname = UnitName("player") +E.myrealm = GetRealmName() +E.version = GetAddOnMetadata("ElvUI", "Version") +E.wowpatch, E.wowbuild = GetBuildInfo() +E.wowbuild = tonumber(E.wowbuild) +E.resolution = GetCVar("gxResolution") +E.screenwidth, E.screenheight = tonumber(match(E.resolution, "(%d+)x+%d")), tonumber(match(E.resolution, "%d+x(%d+)")) +E.isMacClient = IsMacClient() +E.NewSign = "|TInterface\\OptionsFrame\\UI-OptionsFrame-NewFeatureIcon:14:14|t" +E.InfoColor = "|cfffe7b2c" + +--Tables +E.media = {} +E.frames = {} +E.unitFrameElements = {} +E.statusBars = {} +E.texts = {} +E.snapBars = {} +E.RegisteredModules = {} +E.RegisteredInitialModules = {} +E.ModuleCallbacks = {["CallPriority"] = {}} +E.InitialModuleCallbacks = {["CallPriority"] = {}} +E.valueColorUpdateFuncs = {} +E.TexCoords = {0, 1, 0, 1} +E.VehicleLocks = {} +E.CreditsList = {} + +E.InversePoints = { + TOP = "BOTTOM", + BOTTOM = "TOP", + TOPLEFT = "BOTTOMLEFT", + TOPRIGHT = "BOTTOMRIGHT", + LEFT = "RIGHT", + RIGHT = "LEFT", + BOTTOMLEFT = "TOPLEFT", + BOTTOMRIGHT = "TOPRIGHT", + CENTER = "CENTER" +} + +local colorizedName +function E:ColorizedName(name, arg2) + local length = strlen(name) + for i = 1, length do + local letter = sub(name, i, i) + if i == 1 then + colorizedName = format("|cff1784d1%s", letter) + elseif i == 2 then + colorizedName = format("%s|r|cffe5e3e3%s", colorizedName, letter) + elseif i == length and arg2 then + colorizedName = format("%s%s|r|cff1784d1:|r", colorizedName, letter) + else + colorizedName = colorizedName..letter + end + end + return colorizedName +end + +--This frame everything in ElvUI should be anchored to for Eyefinity support. +E.UIParent = CreateFrame("Frame", "ElvUIParent", UIParent) +E.UIParent:SetFrameLevel(UIParent:GetFrameLevel()) +E.UIParent:SetSize(UIParent:GetSize()) +E.UIParent:SetPoint("CENTER", UIParent, "CENTER") +E.snapBars[#E.snapBars + 1] = E.UIParent + +E.HiddenFrame = CreateFrame("Frame") +E.HiddenFrame:Hide() + +do -- used in optionsUI + E.DEFAULT_FILTER = {} + for filter, tbl in pairs(G.unitframe.aurafilters) do + E.DEFAULT_FILTER[filter] = tbl.type + end +end + +function E:Print(...) + (_G[self.db.general.messageRedirect] or DEFAULT_CHAT_FRAME):AddMessage(strjoin(" ", self:ColorizedName("ElvUI", true), ...)) -- I put DEFAULT_CHAT_FRAME as a fail safe. +end + +local delayedTimer +local delayedFuncs = {} +function E:ShapeshiftDelayedUpdate(func, ...) + delayedFuncs[func] = {...} + + if delayedTimer then return end + + delayedTimer = E:ScheduleTimer(function() + for f in pairs(delayedFuncs) do + f(unpack(delayedFuncs[f])) + end + + twipe(delayedFuncs) + delayedTimer = nil + end, 0.05) +end + +function E:GrabColorPickerValues(r, g, b) + -- we must block the execution path to `ColorCallback` in `AceGUIWidget-ColorPicker-ElvUI` + -- in order to prevent an infinite loop from `OnValueChanged` when passing into `E.UpdateMedia` which eventually leads here again. + ColorPickerFrame.noColorCallback = true + + -- grab old values + local oldR, oldG, oldB = ColorPickerFrame:GetColorRGB() + + -- set and define the new values + ColorPickerFrame:SetColorRGB(r, g, b) + r, g, b = ColorPickerFrame:GetColorRGB() + + -- swap back to the old values + if oldR then ColorPickerFrame:SetColorRGB(oldR, oldG, oldB) end + + -- free it up.. + ColorPickerFrame.noColorCallback = nil + + return r, g, b +end + +function E:SetColorTable(t, data) + if not data.r or not data.g or not data.b then + error("SetColorTable: Could not unpack color values.") + end + + if t and (type(t) == "table") then + t[1], t[2], t[3], t[4] = E:UpdateColorTable(data) + else + t = E:GetColorTable(data) + end + + return t +end + +function E:UpdateColorTable(data) + if not data.r or not data.g or not data.b then + error("UpdateColorTable: Could not unpack color values.") + end + + if (data.r > 1 or data.r < 0) then data.r = 1 end + if (data.g > 1 or data.g < 0) then data.g = 1 end + if (data.b > 1 or data.b < 0) then data.b = 1 end + if data.a and (data.a > 1 or data.a < 0) then data.a = 1 end + + if data.a then + return data.r, data.g, data.b, data.a + else + return data.r, data.g, data.b + end +end + +function E:GetColorTable(data) + if not data.r or not data.g or not data.b then + error("GetColorTable: Could not unpack color values.") + end + + if (data.r > 1 or data.r < 0) then data.r = 1 end + if (data.g > 1 or data.g < 0) then data.g = 1 end + if (data.b > 1 or data.b < 0) then data.b = 1 end + if data.a and (data.a > 1 or data.a < 0) then data.a = 1 end + + if data.a then + return {data.r, data.g, data.b, data.a} + else + return {data.r, data.g, data.b} + end +end + +function E:UpdateMedia() + if not self.db.general or not self.private.general then return end --Prevent rare nil value errors + + -- Fonts + self.media.normFont = LSM:Fetch("font", self.db.general.font) + self.media.combatFont = LSM:Fetch("font", self.private.general.dmgfont) + + -- Textures + self.media.blankTex = LSM:Fetch("background", "ElvUI Blank") + self.media.normTex = LSM:Fetch("statusbar", self.private.general.normTex) + self.media.glossTex = LSM:Fetch("statusbar", self.private.general.glossTex) + + -- Border Color + local border = E.db.general.bordercolor + self.media.bordercolor = {border.r, border.g, border.b} + + -- UnitFrame Border Color + border = E.db.unitframe.colors.borderColor + self.media.unitframeBorderColor = {border.r, border.g, border.b} + + -- Backdrop Color + self.media.backdropcolor = E:SetColorTable(self.media.backdropcolor, self.db.general.backdropcolor) + + -- Backdrop Fade Color + self.media.backdropfadecolor = E:SetColorTable(self.media.backdropfadecolor, self.db.general.backdropfadecolor) + + -- Value Color + local value = self.db.general.valuecolor + + self.media.hexvaluecolor = self:RGBToHex(value.r, value.g, value.b) + self.media.rgbvaluecolor = {value.r, value.g, value.b} + + -- Hero Color + local herocolor = E.db.general.herocolor + self.media.herocolor = herocolor + self.oUF.herocolor = {herocolor.r, herocolor.g, herocolor. b} + + if LeftChatPanel and LeftChatPanel.tex and RightChatPanel and RightChatPanel.tex then + LeftChatPanel.tex:SetTexture(E.db.chat.panelBackdropNameLeft) + local a = E.db.general.backdropfadecolor.a or 0.5 + LeftChatPanel.tex:SetAlpha(a) + + RightChatPanel.tex:SetTexture(E.db.chat.panelBackdropNameRight) + RightChatPanel.tex:SetAlpha(a) + end + + self:ValueFuncCall() + self:UpdateBlizzardFonts() +end + +do --Update font/texture paths when they are registered by the addon providing them + --This helps fix most of the issues with fonts or textures reverting to default because the addon providing them is loading after ElvUI. + --We use a wrapper to avoid errors in :UpdateMedia because "self" is passed to the function with a value other than ElvUI. + local function LSMCallback() E:UpdateMedia() end + LSM.RegisterCallback(E, "LibSharedMedia_Registered", LSMCallback) +end + +function E:ValueFuncCall() + for func in pairs(self.valueColorUpdateFuncs) do + func(self.media.hexvaluecolor, unpack(self.media.rgbvaluecolor)) + end +end + +function E:UpdateFrameTemplates() + for frame in pairs(self.frames) do + if frame and frame.template and not frame.ignoreUpdates then + if not frame.ignoreFrameTemplates then + frame:SetTemplate(frame.template, frame.glossTex, nil, frame.forcePixelMode) + end + else + self.frames[frame] = nil + end + end + + for frame in pairs(self.unitFrameElements) do + if frame and frame.template and not frame.ignoreUpdates then + if not frame.ignoreFrameTemplates then + frame:SetTemplate(frame.template, frame.glossTex, nil, frame.forcePixelMode, frame.isUnitFrameElement) + end + else + self.unitFrameElements[frame] = nil + end + end +end + +function E:UpdateBorderColors() + for frame in pairs(self.frames) do + if frame and not frame.ignoreUpdates then + if not frame.ignoreBorderColors then + if frame.template == "Default" or frame.template == "Transparent" or frame.template == nil then + frame:SetBackdropBorderColor(unpack(self.media.bordercolor)) + end + end + else + self.frames[frame] = nil + end + end + + for frame in pairs(self.unitFrameElements) do + if frame and not frame.ignoreUpdates then + if not frame.ignoreBorderColors then + if frame.template == "Default" or frame.template == "Transparent" or frame.template == nil then + frame:SetBackdropBorderColor(unpack(self.media.unitframeBorderColor)) + end + end + else + self.unitFrameElements[frame] = nil + end + end +end + +function E:UpdateBackdropColors() + for frame in pairs(self.frames) do + if frame and not frame.ignoreUpdates then + if not frame.ignoreBackdropColors then + if frame.template == "Default" or frame.template == nil then + frame:SetBackdropColor(unpack(self.media.backdropcolor)) + elseif frame.template == "Transparent" then + frame:SetBackdropColor(unpack(self.media.backdropfadecolor)) + end + end + else + self.frames[frame] = nil + end + end + + for frame in pairs(self.unitFrameElements) do + if frame and not frame.ignoreUpdates then + if not frame.ignoreBackdropColors then + if frame.template == "Default" or frame.template == nil then + frame:SetBackdropColor(unpack(self.media.backdropcolor)) + elseif frame.template == "Transparent" then + frame:SetBackdropColor(unpack(self.media.backdropfadecolor)) + end + end + else + self.unitFrameElements[frame] = nil + end + end +end + +function E:UpdateFontTemplates() + for text in pairs(self.texts) do + if text then + text:FontTemplate(text.font, text.fontSize, text.fontStyle) + else + self.texts[text] = nil + end + end +end + +function E:RegisterStatusBar(statusBar) + tinsert(self.statusBars, statusBar) +end + +function E:UpdateStatusBars() + for _, statusBar in pairs(self.statusBars) do + if statusBar and statusBar:IsObjectType("StatusBar") then + statusBar:SetStatusBarTexture(self.media.normTex) + elseif statusBar and statusBar:IsObjectType("Texture") then + statusBar:SetTexture(self.media.normTex) + end + end +end + +function E:IncompatibleAddOn(addon, module) + E.PopupDialogs.INCOMPATIBLE_ADDON.button1 = addon + E.PopupDialogs.INCOMPATIBLE_ADDON.button2 = "ElvUI "..module + E.PopupDialogs.INCOMPATIBLE_ADDON.addon = addon + E.PopupDialogs.INCOMPATIBLE_ADDON.module = module + E:StaticPopup_Show("INCOMPATIBLE_ADDON", addon, module) +end + +function E:IsAddOnEnabled(addon) + local _, _, _, enabled, _, reason = GetAddOnInfo(addon) + if reason ~= "MISSING" and enabled then + return true + end +end + +function E:CheckIncompatible() + if E.global.ignoreIncompatible then return end + + if E.private.chat.enable then + if self:IsAddOnEnabled("Prat-3.0") then + self:IncompatibleAddOn("Prat-3.0", "Chat") + elseif self:IsAddOnEnabled("Chatter") then + self:IncompatibleAddOn("Chatter", "Chat") + end + end + + if E.private.nameplates.enable then + if self:IsAddOnEnabled("Aloft") then + self:IncompatibleAddOn("Aloft", "NamePlates") + elseif self:IsAddOnEnabled("Healers-Have-To-Die") then + self:IncompatibleAddOn("Healers-Have-To-Die", "NamePlates") + elseif self:IsAddOnEnabled("TidyPlates") then + self:IncompatibleAddOn("TidyPlates", "NamePlates") + end + end + + if E.private.tooltip.enable and self:IsAddOnEnabled("TipTac") then + self:IncompatibleAddOn("TipTac", "Tooltip") + end + + if E.private.worldmap.enable and self:IsAddOnEnabled("Mapster") then + self:IncompatibleAddOn("Mapster", "WorldMap") + end +end + +function E:CopyTable(currentTable, defaultTable) + if type(currentTable) ~= "table" then currentTable = {} end + + if type(defaultTable) == "table" then + for option, value in pairs(defaultTable) do + if type(value) == "table" then + value = self:CopyTable(currentTable[option], value) + end + + currentTable[option] = value + end + end + + return currentTable +end + +function E:RemoveEmptySubTables(tbl) + if type(tbl) ~= "table" then + E:Print("Bad argument #1 to 'RemoveEmptySubTables' (table expected)") + return + end + + for k, v in pairs(tbl) do + if type(v) == "table" then + if next(v) == nil then + tbl[k] = nil + else + self:RemoveEmptySubTables(v) + end + end + end +end + +--Compare 2 tables and remove duplicate key/value pairs +--param cleanTable : table you want cleaned +--param checkTable : table you want to check against. +--return : a copy of cleanTable with duplicate key/value pairs removed +function E:RemoveTableDuplicates(cleanTable, checkTable) + if type(cleanTable) ~= "table" then + E:Print("Bad argument #1 to 'RemoveTableDuplicates' (table expected)") + return + end + if type(checkTable) ~= "table" then + E:Print("Bad argument #2 to 'RemoveTableDuplicates' (table expected)") + return + end + + local rtdCleaned = {} + for option, value in pairs(cleanTable) do + if type(value) == "table" and checkTable[option] and type(checkTable[option]) == "table" then + rtdCleaned[option] = self:RemoveTableDuplicates(value, checkTable[option]) + else + -- Add unique data to our clean table + if cleanTable[option] ~= checkTable[option] then + rtdCleaned[option] = value + end + end + end + + --Clean out empty sub-tables + self:RemoveEmptySubTables(rtdCleaned) + + return rtdCleaned +end + +--Compare 2 tables and remove blacklisted key/value pairs +--param cleanTable : table you want cleaned +--param blacklistTable : table you want to check against. +--return : a copy of cleanTable with blacklisted key/value pairs removed +function E:FilterTableFromBlacklist(cleanTable, blacklistTable) + if type(cleanTable) ~= "table" then + E:Print("Bad argument #1 to 'FilterTableFromBlacklist' (table expected)") + return + end + if type(blacklistTable) ~= "table" then + E:Print("Bad argument #2 to 'FilterTableFromBlacklist' (table expected)") + return + end + + local tfbCleaned = {} + for option, value in pairs(cleanTable) do + if type(value) == "table" and blacklistTable[option] and type(blacklistTable[option]) == "table" then + tfbCleaned[option] = self:FilterTableFromBlacklist(value, blacklistTable[option]) + else + -- Filter out blacklisted keys + if blacklistTable[option] ~= true then + tfbCleaned[option] = value + end + end + end + + --Clean out empty sub-tables + self:RemoveEmptySubTables(tfbCleaned) + + return tfbCleaned +end + +do --The code in this function is from WeakAuras, credit goes to Mirrored and the WeakAuras Team + --Code slightly modified by Simpy + local function recurse(table, level, ret) + for i, v in pairs(table) do + ret = ret..strrep(" ", level).."[" + if type(i) == "string" then ret = ret..'"'..i..'"' else ret = ret..i end + ret = ret.."] = " + + if type(v) == "number" then + ret = ret..v..",\n" + elseif type(v) == "string" then + ret = ret.."\""..gsub(gsub(gsub(gsub(v, "\\", "\\\\"), "\n", "\\n"), "\"", "\\\""), "\124", "\124\124").."\",\n" + elseif type(v) == "boolean" then + if v then ret = ret.."true,\n" else ret = ret.."false,\n" end + elseif type(v) == "table" then + ret = ret.."{\n" + ret = recurse(v, level + 1, ret) + ret = ret..strrep(" ", level).."},\n" + else + ret = ret.."\""..tostring(v).."\",\n" + end + end + + return ret + end + + function E:TableToLuaString(inTable) + if type(inTable) ~= "table" then + E:Print("Invalid argument #1 to E:TableToLuaString (table expected)") + return + end + + local ret = "{\n" + if inTable then ret = recurse(inTable, 1, ret) end + ret = ret.."}" + + return ret + end +end + +do --The code in this function is from WeakAuras, credit goes to Mirrored and the WeakAuras Team + --Code slightly modified by Simpy + local lineStructureTable, profileFormat = {}, { + profile = "E.db", + private = "E.private", + global = "E.global", + filters = "E.global", + styleFilters = "E.global" + } + + local function buildLineStructure(str) -- str is profileText + for _, v in ipairs(lineStructureTable) do + if type(v) == "string" then + str = str..'["'..v..'"]' + else + str = str..'['..v..']' + end + end + + return str + end + + local sameLine + local function recurse(tbl, ret, profileText) + local lineStructure = buildLineStructure(profileText) + for k, v in pairs(tbl) do + if not sameLine then + ret = ret..lineStructure + end + + ret = ret.."[" + + if type(k) == "string" then + ret = ret..'"'..k..'"' + else + ret = ret..k + end + + if type(v) == "table" then + tinsert(lineStructureTable, k) + sameLine = true + ret = ret.."]" + ret = recurse(v, ret, profileText) + else + sameLine = false + ret = ret.."] = " + + if type(v) == "number" then + ret = ret..v.."\n" + elseif type(v) == "string" then + ret = ret.."\""..gsub(gsub(gsub(gsub(v, "\\", "\\\\"), "\n", "\\n"), "\"", "\\\""), "\124", "\124\124").."\"\n" + elseif type(v) == "boolean" then + if v then + ret = ret.."true\n" + else + ret = ret.."false\n" + end + else + ret = ret.."\""..tostring(v).."\"\n" + end + end + end + + tremove(lineStructureTable) + + return ret + end + + function E:ProfileTableToPluginFormat(inTable, profileType) + local profileText = profileFormat[profileType] + if not profileText then return end + + twipe(lineStructureTable) + local ret = "" + if inTable and profileType then + sameLine = false + ret = recurse(inTable, ret, profileText) + end + + return ret + end +end + +do --Split string by multi-character delimiter (the strsplit / string.split function provided by WoW doesn't allow multi-character delimiter) + local splitTable = {} + function E:SplitString(str, delim) + assert(type (delim) == "string" and strlen(delim) > 0, "bad delimiter") + + local start = 1 + twipe(splitTable) -- results table + + -- find each instance of a string followed by the delimiter + while true do + local pos = find(str, delim, start, true) -- plain find + if not pos then break end + + tinsert(splitTable, sub(str, start, pos - 1)) + start = pos + strlen(delim) + end -- while + + -- insert final one (after last delimiter) + tinsert(splitTable, sub(str, start)) + + return unpack(splitTable) + end +end + +do + local SendMessageWaiting + local SendRecieveGroupSize = 0 + + function E:SendMessage() + if GetNumRaidMembers() > 1 then + local _, instanceType = IsInInstance() + if instanceType == "pvp" then + SendAddonMessage("ELVUI_VERSIONCHK", E.version, "BATTLEGROUND") + else + SendAddonMessage("ELVUI_VERSIONCHK", E.version, "RAID") + end + elseif GetNumPartyMembers() > 0 then + SendAddonMessage("ELVUI_VERSIONCHK", E.version, "PARTY") + elseif IsInGuild() then + SendAddonMessage("ELVUI_VERSIONCHK", E.version, "GUILD") + end + + SendMessageWaiting = nil + end + + local function SendRecieve(_, event, prefix, message, _, sender) + if event == "CHAT_MSG_ADDON" then + if prefix ~= "ELVUI_VERSIONCHK" then return end + if not sender or sender == E.myname then return end + + local ver = tonumber(E.version) + message = tonumber(message) + + if ver ~= G.general.version then + if not E.shownUpdatedWhileRunningPopup and not InCombatLockdown() then + E:StaticPopup_Show("ELVUI_UPDATED_WHILE_RUNNING") + + E.shownUpdatedWhileRunningPopup = true + end + elseif message and (message > ver) then + if not E.recievedOutOfDateMessage then + E:Print(L["ElvUI is out of date. You can download the newest version from https://github.com/BanditTech/ElvUI-Ascension"]) + + if message and ((message - ver) >= 0.01) and not InCombatLockdown() then + E:StaticPopup_Show("ELVUI_UPDATE_AVAILABLE") + end + + E.recievedOutOfDateMessage = true + end + end + elseif event == "PARTY_MEMBERS_CHANGED" or event == "RAID_ROSTER_UPDATE" then + local numRaid = GetNumRaidMembers() + local num = numRaid > 0 and numRaid or (GetNumPartyMembers() + 1) + if num ~= SendRecieveGroupSize then + if num > 1 and num > SendRecieveGroupSize then + if not SendMessageWaiting then + SendMessageWaiting = E:Delay(10, E.SendMessage) + end + end + SendRecieveGroupSize = num + end + elseif event == "PLAYER_ENTERING_WORLD" then + if not SendMessageWaiting then + SendMessageWaiting = E:Delay(10, E.SendMessage) + end + end + end + + local f = CreateFrame("Frame") + f:RegisterEvent("CHAT_MSG_ADDON") + f:RegisterEvent("RAID_ROSTER_UPDATE") + f:RegisterEvent("PARTY_MEMBERS_CHANGED") + f:RegisterEvent("PLAYER_ENTERING_WORLD") + f:SetScript("OnEvent", SendRecieve) +end + +function E:UpdateAll(ignoreInstall) + E.private = E.charSettings.profile + E.db = E.data.profile + E.global = E.data.global + E.db.theme = nil + E.db.install_complete = nil + + E:DBConversions() + + ActionBars.db = E.db.actionbar + Auras.db = E.db.auras + Bags.db = E.db.bags + Chat.db = E.db.chat + DataBars.db = E.db.databars + DataTexts.db = E.db.datatexts + NamePlates.db = E.db.nameplates + Threat.db = E.db.general.threat + Tooltip.db = E.db.tooltip + Totems.db = E.db.general.totems + ReminderBuffs.db = E.db.general.reminder + UnitFrames.db = E.db.unitframe + + --The mover is positioned before it is resized, which causes issues for unitframes + --Allow movers to be "pushed" outside the screen, when they are resized they should be back in the screen area. + --We set movers to be clamped again at the bottom of this function. + E:SetMoversClampedToScreen(false) + E:SetMoversPositions() + + E:UpdateMedia() + E:UpdateBorderColors() + E:UpdateBackdropColors() + E:UpdateFrameTemplates() + E:UpdateStatusBars() + E:UpdateCooldownSettings("all") + + Layout:ToggleChatPanels() + Layout:BottomPanelVisibility() + Layout:TopPanelVisibility() + Layout:SetDataPanelStyle() + + if E.private.actionbar.enable then + ActionBars:ToggleDesaturation() + ActionBars:UpdateButtonSettings() + ActionBars:UpdateMicroPositionDimensions() + end + + AFK:Toggle() + + if E.private.bags.enable then + Bags:Layout() + Bags:Layout(true) + Bags:SizeAndPositionBagBar() + Bags:UpdateCountDisplay() + Bags:UpdateItemLevelDisplay() + end + + if E.private.chat.enable then + Chat:PositionChat(true) + Chat:SetupChat() + Chat:UpdateAnchors() + end + + DataBars:EnableDisable_ExperienceBar() + DataBars:EnableDisable_ReputationBar() + DataBars:UpdateDataBarDimensions() + + DataTexts:LoadDataTexts() + + if E.private.general.minimap.enable then + Minimap:UpdateSettings() + ReminderBuffs:UpdateSettings() + end + + if E.private.nameplates.enable then + NamePlates:ConfigureAll() + NamePlates:StyleFilterInitialize() + end + + Threat:ToggleEnable() + Threat:UpdatePosition() + + Totems:ToggleEnable() + Totems:PositionAndSize() + + if E.private.unitframe.enable then + UnitFrames:Update_AllFrames() + end + + if ElvUIPlayerBuffs then + Auras:UpdateHeader(ElvUIPlayerBuffs) + end + + if ElvUIPlayerDebuffs then + Auras:UpdateHeader(ElvUIPlayerDebuffs) + end + + if E.RefreshGUI then + E:RefreshGUI() + end + + if not ignoreInstall and not E.private.install_complete then + E:Install() + end + + Blizzard:SetWatchFrameHeight() + E:SetMoversClampedToScreen(true) -- Go back to using clamp after resizing has taken place. +end + +do + E.ObjectEventTable, E.ObjectEventFrame = {}, CreateFrame("Frame") + local eventFrame, eventTable = E.ObjectEventFrame, E.ObjectEventTable + + eventFrame:SetScript("OnEvent", function(_, event, ...) + local objs = eventTable[event] + if objs then + for object, funcs in pairs(objs) do + for _, func in ipairs(funcs) do + func(object, event, ...) + end + end + end + end) + + function E:HasFunctionForObject(event, object, func) + if not (event and object and func) then + E:Print("Error. Usage: HasFunctionForObject(event, object, func)") + return + end + + local objs = eventTable[event] + local funcs = objs and objs[object] + return funcs and tContains(funcs, func) + end + + function E:IsEventRegisteredForObject(event, object) + if not (event and object) then + E:Print("Error. Usage: IsEventRegisteredForObject(event, object)") + return + end + + local objs = eventTable[event] + local funcs = objs and objs[object] + return funcs ~= nil, funcs + end + + --- Registers specified event and adds specified func to be called for the specified object. + -- Unless all parameters are supplied it will not register. + -- If the specified object has already been registered for the specified event + -- then it will just add the specified func to a table of functions that should be called. + -- When a registered event is triggered, then the registered function is called with + -- the object as first parameter, then event, and then all the parameters for the event itself. + -- @param event The event you want to register. + -- @param object The object you want to register the event for. + -- @param func The function you want executed for this object. + function E:RegisterEventForObject(event, object, func) + if not (event and object and func) then + E:Print("Error. Usage: RegisterEventForObject(event, object, func)") + return + end + + local objs = eventTable[event] + if not objs then + objs = {} + eventTable[event] = objs + eventFrame:RegisterEvent(event) + end + + local funcs = objs[object] + if not funcs then + objs[object] = {func} + elseif not tContains(funcs, func) then + tinsert(funcs, func) + end + end + + --- Unregisters specified function for the specified object on the specified event. + -- Unless all parameters are supplied it will not unregister. + -- @param event The event you want to unregister an object from. + -- @param object The object you want to unregister a func from. + -- @param func The function you want unregistered for the object. + function E:UnregisterEventForObject(event, object, func) + if not (event and object and func) then + E:Print("Error. Usage: UnregisterEventForObject(event, object, func)") + return + end + + local objs = eventTable[event] + local funcs = objs and objs[object] + if funcs then + for index, fnc in ipairs(funcs) do + if func == fnc then + tremove(funcs, index) + break + end + end + + if #funcs == 0 then + objs[object] = nil + end + + if not next(funcs) then + eventFrame:UnregisterEvent(event) + eventTable[event] = nil + end + end + end +end + +function E:ResetAllUI() + self:ResetMovers() + + if E.db.layoutSet then + E:SetupLayout(E.db.layoutSet, true) + end +end + +function E:ResetUI(...) + if InCombatLockdown() then E:Print(ERR_NOT_IN_COMBAT) return end + + if ... == "" or ... == " " or ... == nil then + E:StaticPopup_Show("RESETUI_CHECK") + return + end + + self:ResetMovers(...) +end + +function E:CallLoadedModule(obj, silent, object, index) + local name, func + if type(obj) == "table" then name, func = unpack(obj) else name = obj end + local module = name and self:GetModule(name, silent) + + if not module then return end + if func and type(func) == "string" then + E:RegisterCallback(name, module[func], module) + elseif func and type(func) == "function" then + E:RegisterCallback(name, func, module) + elseif module.Initialize then + E:RegisterCallback(name, module.Initialize, module) + end + + E.callbacks:Fire(name) + + if object and index then object[index] = nil end +end + +function E:RegisterInitialModule(name, func) + self.RegisteredInitialModules[#self.RegisteredInitialModules + 1] = (func and {name, func}) or name +end + +function E:RegisterModule(name, func) + if self.initialized then + E:CallLoadedModule((func and {name, func}) or name) + else + self.RegisteredModules[#self.RegisteredModules + 1] = (func and {name, func}) or name + end +end + +function E:InitializeInitialModules() + for index, object in ipairs(E.RegisteredInitialModules) do + E:CallLoadedModule(object, true, E.RegisteredInitialModules, index) + end +end + +function E:InitializeModules() + for index, object in ipairs(E.RegisteredModules) do + E:CallLoadedModule(object, true, E.RegisteredModules, index) + end +end + +--DATABASE CONVERSIONS +function E:DBConversions() + --Fix issue where UIScale was incorrectly stored as string + E.global.general.UIScale = tonumber(E.global.general.UIScale) + + --Not sure how this one happens, but prevent it in any case + if E.global.general.UIScale <= 0 then + E.global.general.UIScale = G.general.UIScale + end + + if gameLocale and E.global.general.locale == "auto" then + E.global.general.locale = gameLocale + end + + --Combat & Resting Icon options update + if E.db.unitframe.units.player.combatIcon ~= nil then + E.db.unitframe.units.player.CombatIcon.enable = E.db.unitframe.units.player.combatIcon + E.db.unitframe.units.player.combatIcon = nil + end + if E.db.unitframe.units.player.restIcon ~= nil then + E.db.unitframe.units.player.RestIcon.enable = E.db.unitframe.units.player.restIcon + E.db.unitframe.units.player.restIcon = nil + end + + -- [Fader] Combat Fade options for Player + if E.db.unitframe.units.player.combatfade ~= nil then + local enabled = E.db.unitframe.units.player.combatfade + E.db.unitframe.units.player.fader.enable = enabled + + if enabled then -- use the old min alpha too + E.db.unitframe.units.player.fader.minAlpha = 0 + end + + E.db.unitframe.units.player.combatfade = nil + end + + -- [Fader] Range check options for Units + do + local outsideAlpha + if E.db.unitframe.OORAlpha ~= nil then + outsideAlpha = E.db.unitframe.OORAlpha + E.db.unitframe.OORAlpha = nil + end + + local rangeCheckUnits = {"target", "targettarget", "targettargettarget", "focus", "focustarget", "pet", "pettarget", "boss", "arena", "party", "raid", "raid40", "raidpet", "tank", "assist"} + for _, unit in pairs(rangeCheckUnits) do + if E.db.unitframe.units[unit].rangeCheck ~= nil then + local enabled = E.db.unitframe.units[unit].rangeCheck + E.db.unitframe.units[unit].fader.enable = enabled + E.db.unitframe.units[unit].fader.range = enabled + + if outsideAlpha then + E.db.unitframe.units[unit].fader.minAlpha = outsideAlpha + end + + E.db.unitframe.units[unit].rangeCheck = nil + end + end + end + + --Convert old "Buffs and Debuffs" font size option to individual options + if E.db.auras.fontSize then + local fontSize = E.db.auras.fontSize + E.db.auras.buffs.countFontSize = fontSize + E.db.auras.buffs.durationFontSize = fontSize + E.db.auras.debuffs.countFontSize = fontSize + E.db.auras.debuffs.durationFontSize = fontSize + E.db.auras.fontSize = nil + end + + --Convert old private cooldown setting to profile setting + if E.private.cooldown and (E.private.cooldown.enable ~= nil) then + E.db.cooldown.enable = E.private.cooldown.enable + E.private.cooldown.enable = nil + E.private.cooldown = nil + end + + if not E.db.chat.panelColorConverted then + local color = E.db.general.backdropfadecolor + E.db.chat.panelColor = {r = color.r, g = color.g, b = color.b, a = color.a} + E.db.chat.panelColorConverted = true + end + + --Convert cropIcon to tristate + local cropIcon = E.db.general.cropIcon + if type(cropIcon) == "boolean" then + E.db.general.cropIcon = (cropIcon and 2) or 0 + end + + --Vendor Greys option is now in bags table + if E.db.general.vendorGrays then + E.db.bags.vendorGrays.enable = E.db.general.vendorGrays + E.db.general.vendorGrays = nil + E.db.general.vendorGraysDetails = nil + end + + --Heal Prediction is now a table instead of a bool + local healPredictionUnits = {"player", "target", "focus", "pet", "arena", "party", "raid", "raid40", "raidpet"} + for _, unit in pairs(healPredictionUnits) do + if type(E.db.unitframe.units[unit].healPrediction) ~= "table" then + local enabled = E.db.unitframe.units[unit].healPrediction + E.db.unitframe.units[unit].healPrediction = {} + E.db.unitframe.units[unit].healPrediction.enable = enabled + end + end + + --Health Backdrop Multiplier + if E.db.unitframe.colors.healthmultiplier ~= nil then + if E.db.unitframe.colors.healthmultiplier > 0.75 then + E.db.unitframe.colors.healthMultiplier = 0.75 + else + E.db.unitframe.colors.healthMultiplier = E.db.unitframe.colors.healthmultiplier + end + + E.db.unitframe.colors.healthmultiplier = nil + end + + if sub(E.db.chat.timeStampFormat, -1) == " " then + E.db.chat.timeStampFormat = sub(E.db.chat.timeStampFormat, 1, -2) + end + + if E.private.skins.blizzard.greeting ~= nil then + E.private.skins.blizzard.greeting = nil + end +end + +function E:RefreshModulesDB() + -- this function is specifically used to reference the new database + -- onto the unitframe module, its useful dont delete! D: + twipe(UnitFrames.db) --old ref, dont need so clear it + UnitFrames.db = self.db.unitframe --new ref +end + +function E:Initialize() + twipe(self.db) + twipe(self.global) + twipe(self.private) + + self.myguid = UnitGUID("player") + self.data = E.Libs.AceDB:New("ElvDB", self.DF) + self.data.RegisterCallback(self, "OnProfileChanged", "UpdateAll") + self.data.RegisterCallback(self, "OnProfileCopied", "UpdateAll") + self.data._ResetProfile = self.data.ResetProfile + self.data.ResetProfile = self.OnProfileReset + self.charSettings = E.Libs.AceDB:New("ElvPrivateDB", self.privateVars) + E.Libs.DualSpec:EnhanceDatabase(self.data, "ElvUI") + self.private = self.charSettings.profile + self.db = self.data.profile + self.global = self.data.global + + self:CheckIncompatible() + self:DBConversions() + self:UIScale() + self:BuildPrefixValues() + self:LoadAPI() + self:LoadCommands() + self:InitializeModules() + self:RefreshModulesDB() + self:LoadMovers() + self:UpdateMedia() + self:UpdateCooldownSettings("all") + self:Tutorials() + self.initialized = true + + Minimap:UpdateSettings() + + if E.db.general.smoothingAmount and (E.db.general.smoothingAmount ~= 0.33) then + E:SetSmoothingAmount(E.db.general.smoothingAmount) + end + + if not self.private.install_complete then + self:Install() + end + + if self:HelloKittyFixCheck() then + self:HelloKittyFix() + end + + if self.db.general.kittys then + self:CreateKittys() + self:Delay(5, self.Print, self, L["Type /hellokitty to revert to old settings."]) + end + + if self.db.general.loginmessage then + local msg = format(L["LOGIN_MSG"], self.media.hexvaluecolor, self.media.hexvaluecolor, self.version) + if Chat.Initialized then msg = select(2, Chat:FindURL("CHAT_MSG_DUMMY", msg)) end + print(msg) + end + + if GetCVar("scriptProfile") ~= "1" then + collectgarbage("collect") + end +end \ No newline at end of file diff --git a/ElvUI/Core/Distributor.lua b/ElvUI/Core/Distributor.lua new file mode 100644 index 0000000..da185dd --- /dev/null +++ b/ElvUI/Core/Distributor.lua @@ -0,0 +1,602 @@ +local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB +local D = E:GetModule("Distributor") +local LibCompress = E.Libs.Compress +local LibBase64 = E.Libs.Base64 + +--Lua functions +local loadstring = loadstring +local pcall = pcall +local setfenv = setfenv +local tonumber = tonumber +local type = type +local format, gsub, len, split, sub = string.format, string.gsub, string.len, string.split, string.sub +--WoW API / Variables +local CreateFrame = CreateFrame +local GetNumRaidMembers, UnitInRaid = GetNumRaidMembers, UnitInRaid +local GetNumPartyMembers, UnitInParty = GetNumPartyMembers, UnitInParty +local ACCEPT, CANCEL, YES, NO = ACCEPT, CANCEL, YES, NO + +---------------------------------- +-- CONSTANTS +---------------------------------- + +local REQUEST_PREFIX = "ELVUI_REQUEST" +local REPLY_PREFIX = "ELVUI_REPLY" +local TRANSFER_PREFIX = "ELVUI_TRANSFER" +local TRANSFER_COMPLETE_PREFIX = "ELVUI_COMPLETE" + +local ACECOMMPREFIXES = { + [TRANSFER_PREFIX.."\001"] = true, + [TRANSFER_PREFIX.."\002"] = true, + [TRANSFER_PREFIX.."\003"] = true, +} + +-- The active downloads +local Downloads = {} +local Uploads = {} + +function D:Initialize() + self.Initialized = true + self:RegisterComm(REQUEST_PREFIX) + self:RegisterEvent("CHAT_MSG_ADDON") + + self.statusBar = CreateFrame("StatusBar", "ElvUI_Download", E.UIParent) + E:RegisterStatusBar(self.statusBar) + self.statusBar:CreateBackdrop("Default") + self.statusBar:SetStatusBarTexture(E.media.normTex) + self.statusBar:SetStatusBarColor(0.95, 0.15, 0.15) + self.statusBar:Size(250, 18) + self.statusBar.text = self.statusBar:CreateFontString(nil, "OVERLAY") + self.statusBar.text:FontTemplate() + self.statusBar.text:Point("CENTER") + self.statusBar:Hide() +end + +-- Used to start uploads +function D:Distribute(target, otherServer, isGlobal) + local profileKey, data + if not isGlobal then + if ElvDB.profileKeys then + profileKey = ElvDB.profileKeys[E.myname.." - "..E.myrealm] + end + + data = ElvDB.profiles[profileKey] + else + profileKey = "global" + data = ElvDB.global + end + + if not data or not profileKey then return end + + data = E:RemoveTableDuplicates(data, isGlobal and G or P) + + local serialData = self:Serialize(data) + local length = len(serialData) + local message = format("%s:%d:%s", profileKey, length, target) + + Uploads[profileKey] = { + serialData = serialData, + target = target, + } + + if otherServer then + local numParty, numRaid = GetNumPartyMembers(), GetNumRaidMembers() + if numRaid > 0 and UnitInRaid("target") then + self:SendCommMessage(REQUEST_PREFIX, message, "RAID") + elseif numParty > 0 and UnitInParty("target") then + self:SendCommMessage(REQUEST_PREFIX, message, "PARTY") + else + E:Print(L["Must be in group with the player if he isn't on the same server as you."]) + return + end + else + self:SendCommMessage(REQUEST_PREFIX, message, "WHISPER", target) + end + self:RegisterComm(REPLY_PREFIX) + E:StaticPopup_Show("DISTRIBUTOR_WAITING") +end + +function D:CHAT_MSG_ADDON(_, prefix, message, _, sender) + if not ACECOMMPREFIXES[prefix] or not Downloads[sender] then return end + + local cur = len(message) + local max = Downloads[sender].length + Downloads[sender].current = Downloads[sender].current + cur + + if Downloads[sender].current > max then + Downloads[sender].current = max + end + + self.statusBar:SetValue(Downloads[sender].current) +end + +function D:UpdateSendProgress(sentBytes, totalBytes) + self.statusBar:SetValue(sentBytes) + + if sentBytes == totalBytes then + E:StaticPopupSpecial_Hide(self.statusBar) + end +end + +function D:OnCommReceived(prefix, msg, dist, sender) + if prefix == REQUEST_PREFIX then + local profile, length, sendTo = split(":", msg) + + if dist ~= "WHISPER" and sendTo ~= E.myname then + return + end + + if self.statusBar:IsShown() then + self:SendCommMessage(REPLY_PREFIX, profile..":NO", dist, sender) + return + end + + local textString = format(L["%s is attempting to share the profile %s with you. Would you like to accept the request?"], sender, profile) + if profile == "global" then + textString = format(L["%s is attempting to share his filters with you. Would you like to accept the request?"], sender) + end + + E.PopupDialogs.DISTRIBUTOR_RESPONSE = { + text = textString, + OnAccept = function() + self.statusBar:SetMinMaxValues(0, length) + self.statusBar:SetValue(0) + self.statusBar.text:SetFormattedText(L["Data From: %s"], sender) + E:StaticPopupSpecial_Show(self.statusBar) + self:SendCommMessage(REPLY_PREFIX, profile..":YES", dist, sender) + end, + OnCancel = function() + self:SendCommMessage(REPLY_PREFIX, profile..":NO", dist, sender) + end, + button1 = ACCEPT, + button2 = CANCEL, + timeout = 32, + whileDead = 1, + hideOnEscape = 1 + } + E:StaticPopup_Show("DISTRIBUTOR_RESPONSE") + + Downloads[sender] = { + current = 0, + length = tonumber(length), + profile = profile + } + + self:RegisterComm(TRANSFER_PREFIX) + elseif prefix == REPLY_PREFIX then + self:UnregisterComm(REPLY_PREFIX) + E:StaticPopup_Hide("DISTRIBUTOR_WAITING") + + local profileKey, response = split(":", msg) + if response == "YES" then + self.statusBar:SetMinMaxValues(0, len(Uploads[profileKey].serialData)) + self.statusBar:SetValue(0) + self.statusBar.text:SetFormattedText(L["Data To: %s"], sender) + E:StaticPopupSpecial_Show(self.statusBar) + + self:RegisterComm(TRANSFER_COMPLETE_PREFIX) + self:SendCommMessage(TRANSFER_PREFIX, Uploads[profileKey].serialData, dist, Uploads[profileKey].target, "BULK", self.UpdateSendProgress, self) + Uploads[profileKey] = nil + else + E:StaticPopup_Show("DISTRIBUTOR_REQUEST_DENIED") + Uploads[profileKey] = nil + end + elseif prefix == TRANSFER_PREFIX then + self:UnregisterComm(TRANSFER_PREFIX) + E:StaticPopupSpecial_Hide(self.statusBar) + + local profileKey = Downloads[sender].profile + local success, data = self:Deserialize(msg) + + if success then + local textString = format(L["Profile download complete from %s, would you like to load the profile %s now?"], sender, profileKey) + + if profileKey == "global" then + textString = format(L["Filter download complete from %s, would you like to apply changes now?"], sender) + else + if not ElvDB.profiles[profileKey] then + ElvDB.profiles[profileKey] = data + else + textString = format(L["Profile download complete from %s, but the profile %s already exists. Change the name or else it will overwrite the existing profile."], sender, profileKey) + E.PopupDialogs.DISTRIBUTOR_CONFIRM = { + text = textString, + button1 = ACCEPT, + hasEditBox = 1, + editBoxWidth = 350, + maxLetters = 127, + OnAccept = function(popup) + ElvDB.profiles[popup.editBox:GetText()] = data + E.Libs.AceAddon:GetAddon("ElvUI").data:SetProfile(popup.editBox:GetText()) + E:UpdateAll(true) + Downloads[sender] = nil + E:StaticPopup_Show("CONFIG_RL") + end, + OnShow = function(popup) popup.editBox:SetText(profileKey) popup.editBox:SetFocus() end, + timeout = 0, + exclusive = 1, + whileDead = 1, + hideOnEscape = 1, + preferredIndex = 3 + } + + E:StaticPopup_Show("DISTRIBUTOR_CONFIRM") + self:SendCommMessage(TRANSFER_COMPLETE_PREFIX, "COMPLETE", dist, sender) + return + end + end + + E.PopupDialogs.DISTRIBUTOR_CONFIRM = { + text = textString, + OnAccept = function() + if profileKey == "global" then + E:CopyTable(ElvDB.global, data) + E:UpdateAll(true) + else + E.Libs.AceAddon:GetAddon("ElvUI").data:SetProfile(profileKey) + end + Downloads[sender] = nil + end, + OnCancel = function() + Downloads[sender] = nil + end, + button1 = YES, + button2 = NO, + whileDead = 1, + hideOnEscape = 1 + } + + E:StaticPopup_Show("DISTRIBUTOR_CONFIRM") + self:SendCommMessage(TRANSFER_COMPLETE_PREFIX, "COMPLETE", dist, sender) + else + E:StaticPopup_Show("DISTRIBUTOR_FAILED") + self:SendCommMessage(TRANSFER_COMPLETE_PREFIX, "FAILED", dist, sender) + end + elseif prefix == TRANSFER_COMPLETE_PREFIX then + self:UnregisterComm(TRANSFER_COMPLETE_PREFIX) + if msg == "COMPLETE" then + E:StaticPopup_Show("DISTRIBUTOR_SUCCESS") + else + E:StaticPopup_Show("DISTRIBUTOR_FAILED") + end + end +end + +--Keys that should not be exported +local blacklistedKeys = { + profile = { + general = { + numberPrefixStyle = true, + } + }, + private = {}, + global = { + general = { + UIScale = true, + locale = true, + eyefinity = true, + ignoreScalePopup = true + }, + chat = { + classColorMentionExcludedNames = true + }, + unitframe = { + spellRangeCheck = true + } + } +} + +local function GetProfileData(profileType) + if not profileType or type(profileType) ~= "string" then + E:Print("Bad argument #1 to 'GetProfileData' (string expected)") + return + end + + local profileKey + local profileData = {} + + if profileType == "profile" then + if ElvDB.profileKeys then + profileKey = ElvDB.profileKeys[E.myname.." - "..E.myrealm] + end + + --Copy current profile data + profileData = E:CopyTable(profileData, ElvDB.profiles[profileKey]) + --This table will also hold all default values, not just the changed settings. + --This makes the table huge, and will cause the WoW client to lock up for several seconds. + --We compare against the default table and remove all duplicates from our table. The table is now much smaller. + profileData = E:RemoveTableDuplicates(profileData, P) + profileData = E:FilterTableFromBlacklist(profileData, blacklistedKeys.profile) + elseif profileType == "private" then + local privateProfileKey = E.myname.." - "..E.myrealm + profileKey = "private" + + profileData = E:CopyTable(profileData, ElvPrivateDB.profiles[privateProfileKey]) + profileData = E:RemoveTableDuplicates(profileData, V) + profileData = E:FilterTableFromBlacklist(profileData, blacklistedKeys.private) + elseif profileType == "global" then + profileKey = "global" + + profileData = E:CopyTable(profileData, ElvDB.global) + profileData = E:RemoveTableDuplicates(profileData, G) + profileData = E:FilterTableFromBlacklist(profileData, blacklistedKeys.global) + elseif profileType == "filters" then + profileKey = "filters" + + profileData.unitframe = {} + profileData.unitframe.aurafilters = {} + profileData.unitframe.aurafilters = E:CopyTable(profileData.unitframe.aurafilters, ElvDB.global.unitframe.aurafilters) + profileData.unitframe.buffwatch = {} + profileData.unitframe.buffwatch = E:CopyTable(profileData.unitframe.buffwatch, ElvDB.global.unitframe.buffwatch) + profileData = E:RemoveTableDuplicates(profileData, G) + elseif profileType == "styleFilters" then + profileKey = "styleFilters" + + profileData.nameplates = {} + profileData.nameplates.filters = {} + profileData.nameplates.filters = E:CopyTable(profileData.nameplates.filters, ElvDB.global.nameplates.filters) + profileData = E:RemoveTableDuplicates(profileData, G) + end + + return profileKey, profileData +end + +local function GetProfileExport(profileType, exportFormat) + local profileExport, exportString + local profileKey, profileData = GetProfileData(profileType) + + if not profileKey or not profileData or (profileData and type(profileData) ~= "table") then + E:Print("Error getting data from 'GetProfileData'") + return + end + + if exportFormat == "text" then + local serialData = D:Serialize(profileData) + exportString = D:CreateProfileExport(serialData, profileType, profileKey) + local compressedData = LibCompress:Compress(exportString) + local encodedData = LibBase64:Encode(compressedData) + profileExport = encodedData + elseif exportFormat == "luaTable" then + exportString = E:TableToLuaString(profileData) + profileExport = D:CreateProfileExport(exportString, profileType, profileKey) + elseif exportFormat == "luaPlugin" then + profileExport = E:ProfileTableToPluginFormat(profileData, profileType) + end + + return profileKey, profileExport +end + +function D:CreateProfileExport(dataString, profileType, profileKey) + local returnString + + if profileType == "profile" then + returnString = format("%s::%s::%s", dataString, profileType, profileKey) + else + returnString = format("%s::%s", dataString, profileType) + end + + return returnString +end + +function D:GetImportStringType(dataString) + local stringType = "" + + if LibBase64:IsBase64(dataString) then + stringType = "Base64" + elseif sub(dataString, 1, 1) == "{" then --Basic check to weed out obviously wrong strings + stringType = "Table" + end + + return stringType +end + +function D:Decode(dataString) + local profileInfo, profileType, profileKey, profileData + local stringType = self:GetImportStringType(dataString) + + if stringType == "Base64" then + local decodedData = LibBase64:Decode(dataString) + local decompressedData, decompressedMessage = LibCompress:Decompress(decodedData) + + if not decompressedData then + E:Print("Error decompressing data:", decompressedMessage) + return + end + + local serializedData, success + serializedData, profileInfo = E:SplitString(decompressedData, "^^::") -- "^^" indicates the end of the AceSerializer string + + if not profileInfo then + E:Print("Error importing profile. String is invalid or corrupted!") + return + end + + serializedData = format("%s%s", serializedData, "^^") --Add back the AceSerializer terminator + profileType, profileKey = E:SplitString(profileInfo, "::") + success, profileData = D:Deserialize(serializedData) + + if not success then + E:Print("Error deserializing:", profileData) + return + end + elseif stringType == "Table" then + local profileDataAsString + profileDataAsString, profileInfo = E:SplitString(dataString, "}::") -- "}::" indicates the end of the table + + if not profileInfo then + E:Print("Error extracting profile info. Invalid import string!") + return + end + + if not profileDataAsString then + E:Print("Error extracting profile data. Invalid import string!") + return + end + + profileDataAsString = format("%s%s", profileDataAsString, "}") --Add back the missing "}" + profileDataAsString = gsub(profileDataAsString, "\124\124", "\124") --Remove escape pipe characters + profileType, profileKey = E:SplitString(profileInfo, "::") + + local func, err = loadstring(format("%s %s", "return", profileDataAsString)) + + if func then + setfenv(func, {}) -- execute code in an empty environment + local success, res = pcall(func) + + if success then + profileData = res + else + err = res + end + end + + if err then + E:Print("Error converting lua string to table:", err) + return + end + end + + return profileType, profileKey, profileData +end + +local function SetImportedProfile(profileType, profileKey, profileData, force) + D.profileType = nil + D.profileKey = nil + D.profileData = nil + + if profileType == "profile" then + profileData = E:FilterTableFromBlacklist(profileData, blacklistedKeys.profile) --Remove unwanted options from import + if not ElvDB.profiles[profileKey] or force then + if force and E.data.keys.profile == profileKey then + --Overwriting an active profile doesn't update when calling SetProfile + --So make it look like we use a different profile + local tempKey = profileKey.."_Temp" + E.data.keys.profile = tempKey + end + ElvDB.profiles[profileKey] = profileData + --Calling SetProfile will now update all settings correctly + E.data:SetProfile(profileKey) + else + D.profileType = profileType + D.profileKey = profileKey + D.profileData = profileData + E:StaticPopup_Show("IMPORT_PROFILE_EXISTS") + + return + end + elseif profileType == "private" then + profileData = E:FilterTableFromBlacklist(profileData, blacklistedKeys.private) --Remove unwanted options from import + local pfKey = ElvPrivateDB.profileKeys[E.myname.." - "..E.myrealm] + ElvPrivateDB.profiles[pfKey] = profileData + E:StaticPopup_Show("IMPORT_RL") + elseif profileType == "global" then + profileData = E:FilterTableFromBlacklist(profileData, blacklistedKeys.global) --Remove unwanted options from import + E:CopyTable(ElvDB.global, profileData) + E:StaticPopup_Show("IMPORT_RL") + elseif profileType == "filters" then + E:CopyTable(ElvDB.global.unitframe, profileData.unitframe) + elseif profileType == "styleFilters" then + E:CopyTable(ElvDB.global.nameplates, profileData.nameplates) + end + + --Update all ElvUI modules + E:UpdateAll(true) +end + +function D:ExportProfile(profileType, exportFormat) + if not profileType or not exportFormat then + E:Print("Bad argument to 'ExportProfile' (string expected)") + return + end + + local profileKey, profileExport = GetProfileExport(profileType, exportFormat) + + return profileKey, profileExport +end + +function D:ImportProfile(dataString) + local profileType, profileKey, profileData = self:Decode(dataString) + + if not profileData or type(profileData) ~= "table" then + E:Print("Error: something went wrong when converting string to table!") + return + end + + if profileType and ((profileType == "profile" and profileKey) or profileType ~= "profile") then + SetImportedProfile(profileType, profileKey, profileData) + end + + return true +end + +E.PopupDialogs.DISTRIBUTOR_SUCCESS = { + text = L["Your profile was successfully recieved by the player."], + whileDead = 1, + hideOnEscape = 1, + button1 = OKAY +} + +E.PopupDialogs.DISTRIBUTOR_WAITING = { + text = L["Profile request sent. Waiting for response from player."], + whileDead = 1, + hideOnEscape = 1, + timeout = 35 +} + +E.PopupDialogs.DISTRIBUTOR_REQUEST_DENIED = { + text = L["Request was denied by user."], + whileDead = 1, + hideOnEscape = 1, + button1 = OKAY +} + +E.PopupDialogs.DISTRIBUTOR_FAILED = { + text = L["Lord! It's a miracle! The download up and vanished like a fart in the wind! Try Again!"], + whileDead = 1, + hideOnEscape = 1, + button1 = OKAY +} + +E.PopupDialogs.DISTRIBUTOR_RESPONSE = {} +E.PopupDialogs.DISTRIBUTOR_CONFIRM = {} + +E.PopupDialogs.IMPORT_PROFILE_EXISTS = { + text = L["The profile you tried to import already exists. Choose a new name or accept to overwrite the existing profile."], + button1 = ACCEPT, + button2 = CANCEL, + hasEditBox = 1, + editBoxWidth = 350, + maxLetters = 127, + OnAccept = function(self) + local profileType = D.profileType + local profileKey = self.editBox:GetText() + local profileData = D.profileData + SetImportedProfile(profileType, profileKey, profileData, true) + end, + EditBoxOnTextChanged = function(self) + if self:GetText() == "" then + self:GetParent().button1:Disable() + else + self:GetParent().button1:Enable() + end + end, + OnShow = function(self) self.editBox:SetText(D.profileKey) self.editBox:SetFocus() end, + whileDead = 1, + hideOnEscape = true, + preferredIndex = 3 +} + +E.PopupDialogs.IMPORT_RL = { + text = L["You have imported settings which may require a UI reload to take effect. Reload now?"], + button1 = ACCEPT, + button2 = CANCEL, + OnAccept = ReloadUI, + whileDead = 1, + hideOnEscape = false, + preferredIndex = 3 +} + +local function InitializeCallback() + D:Initialize() +end + +E:RegisterModule(D:GetName(), InitializeCallback) \ No newline at end of file diff --git a/ElvUI/Core/Dropdown.lua b/ElvUI/Core/Dropdown.lua new file mode 100644 index 0000000..ded9a9d --- /dev/null +++ b/ElvUI/Core/Dropdown.lua @@ -0,0 +1,88 @@ +local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB + +--Lua functions +local tinsert = tinsert +--WoW API / Variables +local CreateFrame = CreateFrame +local ToggleFrame = ToggleFrame +local GetCursorPosition = GetCursorPosition + +local PADDING = 10 +local BUTTON_HEIGHT = 16 +local BUTTON_WIDTH = 135 + +local function OnClick(btn) + btn.func() + + btn:GetParent():Hide() +end + +local function OnEnter(btn) + btn.hoverTex:Show() +end + +local function OnLeave(btn) + btn.hoverTex:Hide() +end + +function E:DropDown(list, frame, xOffset, yOffset) + if not frame.buttons then + frame.buttons = {} + frame:SetFrameStrata("DIALOG") + frame:SetClampedToScreen(true) + tinsert(UISpecialFrames, frame:GetName()) + frame:Hide() + end + + xOffset = xOffset or 0 + yOffset = yOffset or 0 + + for i = 1, #frame.buttons do + frame.buttons[i]:Hide() + end + + for i = 1, #list do + if not frame.buttons[i] then + frame.buttons[i] = CreateFrame("Button", nil, frame) + + frame.buttons[i].hoverTex = frame.buttons[i]:CreateTexture(nil, "OVERLAY") + frame.buttons[i].hoverTex:SetAllPoints() + frame.buttons[i].hoverTex:SetTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]]) + frame.buttons[i].hoverTex:SetBlendMode("ADD") + frame.buttons[i].hoverTex:Hide() + + frame.buttons[i].text = frame.buttons[i]:CreateFontString(nil, "BORDER") + frame.buttons[i].text:SetAllPoints() + frame.buttons[i].text:FontTemplate() + frame.buttons[i].text:SetJustifyH("LEFT") + + frame.buttons[i]:SetScript("OnEnter", OnEnter) + frame.buttons[i]:SetScript("OnLeave", OnLeave) + end + + frame.buttons[i]:Show() + frame.buttons[i]:Height(BUTTON_HEIGHT) + frame.buttons[i]:Width(BUTTON_WIDTH) + frame.buttons[i].text:SetText(list[i].text) + frame.buttons[i].func = list[i].func + frame.buttons[i]:SetScript("OnClick", OnClick) + + if i == 1 then + frame.buttons[i]:Point("TOPLEFT", frame, "TOPLEFT", PADDING, -PADDING) + else + frame.buttons[i]:Point("TOPLEFT", frame.buttons[i-1], "BOTTOMLEFT") + end + end + + frame:Height((#list * BUTTON_HEIGHT) + PADDING * 2) + frame:Width(BUTTON_WIDTH + PADDING * 2) + + local UIScale = UIParent:GetScale() + local x, y = GetCursorPosition() + x = x/UIScale + y = y/UIScale + frame:ClearAllPoints() + frame:Point("TOPLEFT", UIParent, "BOTTOMLEFT", x + xOffset, y + yOffset) + + ToggleFrame(frame) +end \ No newline at end of file diff --git a/ElvUI/Core/Fonts.lua b/ElvUI/Core/Fonts.lua new file mode 100644 index 0000000..942460f --- /dev/null +++ b/ElvUI/Core/Fonts.lua @@ -0,0 +1,99 @@ +local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB +local LSM = E.Libs.LSM + +--Lua functions +--WoW API / Variables +local SetCVar = SetCVar + +local function SetFont(obj, font, size, style, sr, sg, sb, sa, sox, soy, r, g, b) + if not obj then return end + + obj:SetFont(font, size, style) + if sr and sg and sb then obj:SetShadowColor(sr, sg, sb, sa) end + if sox and soy then obj:SetShadowOffset(sox, soy) end + if r and g and b then obj:SetTextColor(r, g, b) + elseif r then obj:SetAlpha(r) end +end + +function E:UpdateBlizzardFonts() + local NORMAL = self.media.normFont + local NUMBER = self.media.normFont + local COMBAT = LSM:Fetch("font", self.private.general.dmgfont) + local NAMEFONT = LSM:Fetch("font", self.private.general.namefont) + local MONOCHROME = "" + + UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = 12 + CHAT_FONT_HEIGHTS = {6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20} + + if self.db.general.font == "Homespun" then + MONOCHROME = "MONOCHROME" + end + + if self.eyefinity then + InterfaceOptionsCombatTextPanelTargetDamage:Hide() + InterfaceOptionsCombatTextPanelPeriodicDamage:Hide() + InterfaceOptionsCombatTextPanelPetDamage:Hide() + InterfaceOptionsCombatTextPanelHealing:Hide() + SetCVar("CombatLogPeriodicSpells", 0) + SetCVar("PetMeleeDamage", 0) + SetCVar("CombatDamage", 0) + SetCVar("CombatHealing", 0) + + -- set an invisible font for xp, honor kill, etc + COMBAT = E.Media.Fonts.Invisible + end + + UNIT_NAME_FONT = NAMEFONT + NAMEPLATE_FONT = NAMEFONT + DAMAGE_TEXT_FONT = COMBAT + STANDARD_TEXT_FONT = NORMAL + + if self.private.general.replaceBlizzFonts then + SetFont(GameTooltipHeader, NORMAL, self.db.general.fontSize) + SetFont(NumberFont_OutlineThick_Mono_Small, NUMBER, self.db.general.fontSize, "OUTLINE") + SetFont(NumberFont_Outline_Huge, NUMBER, 28, MONOCHROME.."THICKOUTLINE", 28) + SetFont(NumberFont_Outline_Large, NUMBER, 15, MONOCHROME.."OUTLINE") + SetFont(NumberFont_Outline_Med, NUMBER, self.db.general.fontSize, "OUTLINE") + SetFont(NumberFont_Shadow_Med, NORMAL, self.db.general.fontSize) + SetFont(NumberFont_Shadow_Small, NORMAL, self.db.general.fontSize) + SetFont(ChatFontSmall, NORMAL, self.db.general.fontSize) + SetFont(QuestFontHighlight, NORMAL, self.db.general.fontSize) + SetFont(QuestFont, NORMAL, self.db.general.fontSize) + SetFont(QuestFont_Large, NORMAL, 14) + SetFont(QuestTitleFont, NORMAL, self.db.general.fontSize + 8) + SetFont(QuestTitleFontBlackShadow, NORMAL, self.db.general.fontSize + 8) + SetFont(SystemFont_Large, NORMAL, 15) + SetFont(GameFontNormalMed3, NORMAL, 15) + SetFont(SystemFont_Shadow_Huge1, NORMAL, 20, MONOCHROME.."OUTLINE") + SetFont(SystemFont_Med1, NORMAL, self.db.general.fontSize) + SetFont(SystemFont_Med3, NORMAL, self.db.general.fontSize) + SetFont(SystemFont_OutlineThick_Huge2, NORMAL, 20, MONOCHROME.."THICKOUTLINE") + SetFont(SystemFont_Outline_Small, NUMBER, self.db.general.fontSize, "OUTLINE") + SetFont(SystemFont_Shadow_Large, NORMAL, 15) + SetFont(SystemFont_Shadow_Med1, NORMAL, self.db.general.fontSize) + SetFont(SystemFont_Shadow_Med3, NORMAL, self.db.general.fontSize) + SetFont(SystemFont_Shadow_Outline_Huge2, NORMAL, 20, MONOCHROME.."OUTLINE") + SetFont(SystemFont_Shadow_Small, NORMAL, self.db.general.fontSize) + SetFont(SystemFont_Small, NORMAL, self.db.general.fontSize) + SetFont(SystemFont_Tiny, NORMAL, self.db.general.fontSize) + SetFont(Tooltip_Med, NORMAL, self.db.general.fontSize) + SetFont(Tooltip_Small, NORMAL, self.db.general.fontSize) + SetFont(FriendsFont_Normal, NORMAL, self.db.general.fontSize) + SetFont(FriendsFont_Small, NORMAL, self.db.general.fontSize) + SetFont(FriendsFont_Large, NORMAL, self.db.general.fontSize) + SetFont(FriendsFont_UserText, NORMAL, self.db.general.fontSize) + SetFont(SpellFont_Small, NORMAL, self.db.general.fontSize*0.9) + SetFont(ZoneTextString, NORMAL, 32, MONOCHROME.."OUTLINE") + SetFont(SubZoneTextString, NORMAL, 25, MONOCHROME.."OUTLINE") + SetFont(PVPInfoTextString, NORMAL, 22, MONOCHROME.."OUTLINE") + SetFont(PVPArenaTextString, NORMAL, 22, MONOCHROME.."OUTLINE") + SetFont(CombatTextFont, COMBAT, 100, MONOCHROME.."OUTLINE") + SetFont(SystemFont_OutlineThick_WTF, NORMAL, 32, MONOCHROME.."OUTLINE") + SetFont(SubZoneTextFont, NORMAL, 24, MONOCHROME.."OUTLINE") + SetFont(MailFont_Large, NORMAL, 14) + SetFont(InvoiceFont_Med, NORMAL, 12) + SetFont(InvoiceFont_Small, NORMAL, self.db.general.fontSize) + SetFont(AchievementFont_Small, NORMAL, self.db.general.fontSize) + SetFont(ReputationDetailFont, NORMAL, self.db.general.fontSize) + end +end \ No newline at end of file diff --git a/ElvUI/Core/Install.lua b/ElvUI/Core/Install.lua new file mode 100644 index 0000000..c4442c6 --- /dev/null +++ b/ElvUI/Core/Install.lua @@ -0,0 +1,936 @@ +local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB +local UF = E:GetModule("UnitFrames") +local S = E:GetModule("Skins") + +--Lua functions +local _G = _G +local format = format +--WoW API / Variables +local CreateFrame = CreateFrame +local SetCVar = SetCVar +local PlaySoundFile = PlaySoundFile +local ReloadUI = ReloadUI +local UIFrameFadeOut = UIFrameFadeOut +local ChatFrame_AddMessageGroup = ChatFrame_AddMessageGroup +local ChatFrame_RemoveAllMessageGroups = ChatFrame_RemoveAllMessageGroups +local ChatFrame_AddChannel = ChatFrame_AddChannel +local ChatFrame_RemoveChannel = ChatFrame_RemoveChannel +local ChangeChatColor = ChangeChatColor +local ToggleChatColorNamesByClassGroup = ToggleChatColorNamesByClassGroup +local FCF_ResetChatWindows = FCF_ResetChatWindows +local FCF_SetLocked = FCF_SetLocked +local FCF_DockFrame, FCF_UnDockFrame = FCF_DockFrame, FCF_UnDockFrame +local FCF_OpenNewWindow = FCF_OpenNewWindow +local FCF_SavePositionAndDimensions = FCF_SavePositionAndDimensions +local FCF_SetWindowName = FCF_SetWindowName +local FCF_StopDragging = FCF_StopDragging +local FCF_SetChatWindowFontSize = FCF_SetChatWindowFontSize +local CLASS, CONTINUE, PREVIOUS = CLASS, CONTINUE, PREVIOUS +local NUM_CHAT_WINDOWS = NUM_CHAT_WINDOWS +local LOOT, GENERAL, TRADE, GUILD, WHISPER = LOOT, GENERAL, TRADE, GUILD, WHISPER +local GUILD_EVENT_LOG = GUILD_EVENT_LOG + +local CURRENT_PAGE = 0 +local MAX_PAGE = 8 + +local function SetupChat(noDisplayMsg) + FCF_ResetChatWindows() -- Monitor this + FCF_SetLocked(ChatFrame1, 1) + FCF_DockFrame(ChatFrame2) + FCF_SetLocked(ChatFrame2, 1) + + FCF_OpenNewWindow(LOOT) + FCF_UnDockFrame(ChatFrame3) + FCF_SetLocked(ChatFrame3, 1) + ChatFrame3:Show() + + FCF_OpenNewWindow(GUILD) + FCF_OpenNewWindow(WHISPER) + FCF_DockFrame(ChatFrame4) + FCF_SetLocked(ChatFrame4, 1) + FCF_DockFrame(ChatFrame5) + FCF_SetLocked(ChatFrame5, 1) + + FCF_SelectDockFrame(ChatFrame1) + + for i = 1, NUM_CHAT_WINDOWS do + local frame = _G[format("ChatFrame%s", i)] + + -- move general bottom left + if i == 1 then + frame:ClearAllPoints() + frame:Point("BOTTOMLEFT", LeftChatToggleButton, "TOPLEFT", 1, 3) + elseif i == 3 then + frame:ClearAllPoints() + frame:Point("BOTTOMLEFT", RightChatDataPanel, "TOPLEFT", 1, 3) + end + + FCF_SavePositionAndDimensions(frame) + FCF_StopDragging(frame) + + -- set default Elvui font size + FCF_SetChatWindowFontSize(nil, frame, 12) + + -- rename windows general because moved to chat #3 + if i == 1 then + FCF_SetWindowName(frame, GENERAL) + elseif i == 2 then + FCF_SetWindowName(frame, GUILD_EVENT_LOG) + elseif i == 3 then + FCF_SetWindowName(frame, LOOT.." / "..TRADE) + elseif i == 4 then + FCF_SetWindowName(frame, GUILD) + elseif i == 5 then + FCF_SetWindowName(frame, WHISPER) + end + end + + local chatGroup = {"SYSTEM", "CHANNEL", "SAY", "EMOTE", "YELL", "WHISPER", "PARTY", "PARTY_LEADER", "RAID", "RAID_LEADER", "RAID_WARNING", "BATTLEGROUND", "BATTLEGROUND_LEADER", "GUILD", "OFFICER", "MONSTER_SAY", "MONSTER_YELL", "MONSTER_EMOTE", "MONSTER_WHISPER", "MONSTER_BOSS_EMOTE", "MONSTER_BOSS_WHISPER", "ERRORS", "AFK", "DND", "IGNORED", "BG_HORDE", "BG_ALLIANCE", "BG_NEUTRAL", "ACHIEVEMENT", "GUILD_ACHIEVEMENT", "BN_WHISPER", "BN_CONVERSATION", "BN_INLINE_TOAST_ALERT"} + ChatFrame_RemoveAllMessageGroups(ChatFrame1) + for _, v in ipairs(chatGroup) do + ChatFrame_AddMessageGroup(ChatFrame1, v) + end + + chatGroup = {"COMBAT_XP_GAIN", "COMBAT_HONOR_GAIN", "COMBAT_FACTION_CHANGE", "SKILL", "LOOT", "MONEY"} + ChatFrame_RemoveAllMessageGroups(ChatFrame3) + for _, v in ipairs(chatGroup) do + ChatFrame_AddMessageGroup(ChatFrame3, v) + end + + local chatGroup = {"GUILD", "OFFICER", "GUILD_ACHIEVEMENT"} + ChatFrame_RemoveAllMessageGroups(ChatFrame4) + for _, v in ipairs(chatGroup) do + ChatFrame_AddMessageGroup(ChatFrame4, v) + end + + local chatGroup = {"WHISPER", "BN_WHISPER"} + ChatFrame_RemoveAllMessageGroups(ChatFrame5) + for _, v in ipairs(chatGroup) do + ChatFrame_AddMessageGroup(ChatFrame5, v) + end + + ChatFrame_AddChannel(ChatFrame1, GENERAL) + ChatFrame_RemoveChannel(ChatFrame1, TRADE) + ChatFrame_RemoveChannel(ChatFrame1, "Ascension") + ChatFrame_RemoveChannel(ChatFrame1, "World") + ChatFrame_AddChannel(ChatFrame3, TRADE) + ChatFrame_AddChannel(ChatFrame3, "Ascension") + ChatFrame_AddChannel(ChatFrame3, "World") + + chatGroup = {"SAY", "EMOTE", "YELL", "WHISPER", "PARTY", "PARTY_LEADER", "RAID", "RAID_LEADER", "RAID_WARNING", "BATTLEGROUND", "BATTLEGROUND_LEADER", "GUILD", "OFFICER", "ACHIEVEMENT", "GUILD_ACHIEVEMENT"} + for i = 1, MAX_WOW_CHAT_CHANNELS do + tinsert(chatGroup, "CHANNEL"..i) + end + for _, v in ipairs(chatGroup) do + ToggleChatColorNamesByClassGroup(true, v) + end + + -- Create a list of replacement colors + local replacementColors = { + ["General"] = {195/255, 230/255, 232/255}, + ["Trade"] = {232/255, 158/255, 121/255}, + ["LocalDefense"] = {232/255, 228/255, 121/255}, + ["GuildRecruitment"] = {64/255, 255/255, 64/255}, + ["LookingForGroup"] = {0/255, 206/255, 255/255}, + ["Ascension"] = {255/255, 248/255, 163/255}, + ["World"] = {255/255, 248/255, 163/255}, + } + + -- Itterate through the channel list, and set the colors for each specific channel + -- We need to do this because the channels change around so much + -- low level characters start off with channel 1 being Ascension + local chanList = { GetChannelList() } + for i=1, #chanList, 2 do + if replacementColors[chanList[i+1]] ~= nil then + ChangeChatColor("CHANNEL"..chanList[i], unpack(replacementColors[chanList[i+1]])) + end + if chanList[i+1] == "GuildRecruitment" then + ChatFrame_AddChannel(ChatFrame1, "GuildRecruitment") + end + end + + if E.Chat then + E.Chat:PositionChat(true) + if E.db.RightChatPanelFaded then + RightChatToggleButton:Click() + end + + if E.db.LeftChatPanelFaded then + LeftChatToggleButton:Click() + end + end + + if InstallStepComplete and not noDisplayMsg then + InstallStepComplete.message = L["Chat Set"] + InstallStepComplete:Show() + end +end + +local function SetupCVars(noDisplayMsg) + SetCVar("mapQuestDifficulty", 1) + SetCVar("ShowClassColorInNameplate", 1) + SetCVar("screenshotQuality", 10) + SetCVar("chatMouseScroll", 1) + SetCVar("chatStyle", "classic") + SetCVar("WholeChatWindowClickable", 0) + SetCVar("ConversationMode", "inline") + SetCVar("showTutorials", 0) + SetCVar("showNewbieTips", 0) + SetCVar("showLootSpam", 1) + SetCVar("UberTooltips", 1) + SetCVar("threatWarning", 3) + SetCVar("alwaysShowActionBars", 1) + SetCVar("lockActionBars", 1) + SetCVar("SpamFilter", 0) + + if InstallStepComplete and not noDisplayMsg then + InstallStepComplete.message = L["CVars Set"] + InstallStepComplete:Show() + end +end + +function E:GetColor(r, g, b, a) + return {r = r, g = g, b = b, a = a} +end + +function E:SetupTheme(theme, noDisplayMsg) + E.private.theme = theme + + local classColor + + --Set colors + if theme == "classic" then + E.db.general.bordercolor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(0.31, 0.31, 0.31)) + E.db.general.backdropcolor = E:GetColor(0.1, 0.1, 0.1) + E.db.general.backdropfadecolor = E:GetColor(13/255, 13/255, 13/255, 0.69) + E.db.unitframe.colors.borderColor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(0.31, 0.31, 0.31)) + E.db.unitframe.colors.healthclass = false + E.db.unitframe.colors.health = E:GetColor(0.31, 0.31, 0.31) + E.db.unitframe.colors.auraBarBuff = E:GetColor(0.31, 0.31, 0.31) + E.db.unitframe.colors.castColor = E:GetColor(0.31, 0.31, 0.31) + E.db.unitframe.colors.castClassColor = false + elseif theme == "class" then + classColor = E.media.herocolor + + E.db.general.bordercolor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(0.31, 0.31, 0.31)) + E.db.general.backdropcolor = E:GetColor(0.1, 0.1, 0.1) + E.db.general.backdropfadecolor = E:GetColor(0.06, 0.06, 0.06, 0.8) + E.db.unitframe.colors.borderColor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(0.31, 0.31, 0.31)) + E.db.unitframe.colors.auraBarBuff = E:GetColor(classColor.r, classColor.g, classColor.b) + E.db.unitframe.colors.healthclass = true + E.db.unitframe.colors.castClassColor = true + else + E.db.general.bordercolor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(0.1, 0.1, 0.1)) + E.db.general.backdropcolor = E:GetColor(0.1, 0.1, 0.1) + E.db.general.backdropfadecolor = E:GetColor(0.054, 0.054, 0.054, 0.8) + E.db.unitframe.colors.borderColor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(0.1, 0.1, 0.1)) + E.db.unitframe.colors.auraBarBuff = E:GetColor(0.1, 0.1, 0.1) + E.db.unitframe.colors.healthclass = false + E.db.unitframe.colors.health = E:GetColor(0.1, 0.1, 0.1) + E.db.unitframe.colors.castColor = E:GetColor(0.1, 0.1, 0.1) + E.db.unitframe.colors.castClassColor = false + end + + --Value Color + if theme == "class" then + E.db.general.valuecolor = E:GetColor(classColor.r, classColor.g, classColor.b) + else + E.db.general.valuecolor = E:GetColor(254/255, 123/255, 44/255) + end + + E:UpdateAll(true) + + if InstallStepComplete and not noDisplayMsg then + InstallStepComplete.message = L["Theme Set"] + InstallStepComplete:Show() + end +end + +function E:SetupLayout(layout, noDataReset, noDisplayMsg) + if not noDataReset then + E.db.layoutSet = layout + + --Unitframes + E:CopyTable(E.db.unitframe.units, P.unitframe.units) + + --Shared base layout, tweaks to individual layouts will be below + E:ResetMovers("") + if not E.db.movers then E.db.movers = {} end + + --ActionBars + E.db.actionbar.backdropSpacingConverted = true + E.db.actionbar.bar1.buttons = 8 + E.db.actionbar.bar1.buttonsize = 50 + E.db.actionbar.bar1.buttonspacing = 1 + E.db.actionbar.bar2.buttons = 9 + E.db.actionbar.bar2.buttonsize = 38 + E.db.actionbar.bar2.buttonspacing = 1 + E.db.actionbar.bar2.enabled = true + E.db.actionbar.bar2.visibility = "[vehicleui] hide; show" + E.db.actionbar.bar3.buttons = 8 + E.db.actionbar.bar3.buttonsize = 50 + E.db.actionbar.bar3.buttonspacing = 1 + E.db.actionbar.bar3.buttonsPerRow = 10 + E.db.actionbar.bar3.visibility = "[vehicleui] hide; show" + E.db.actionbar.bar4.enabled = false + E.db.actionbar.bar4.visibility = "[vehicleui] hide; show" + E.db.actionbar.bar5.enabled = false + E.db.actionbar.bar5.visibility = "[vehicleui] hide; show" + E.db.actionbar.bar6.visibility = "[vehicleui] hide; show" + --Auras + E.db.auras.buffs.countFontSize = 10 + E.db.auras.buffs.size = 40 + E.db.auras.debuffs.countFontSize = 10 + E.db.auras.debuffs.size = 40 + --Bags + E.db.bags.bagSize = 42 + E.db.bags.bagWidth = 472 + E.db.bags.bankSize = 42 + E.db.bags.bankWidth = 472 + --Chat + E.db.chat.fontSize = 10 + E.db.chat.panelColorConverted = true + E.db.chat.separateSizes = false + E.db.chat.panelHeight = 236 + E.db.chat.panelWidth = 472 + E.db.chat.tapFontSize = 10 + --DataBars + E.db.databars.experience.height = 10 + E.db.databars.experience.orientation = "HORIZONTAL" + E.db.databars.experience.textSize = 12 + E.db.databars.experience.width = 350 + E.db.databars.reputation.enable = true + E.db.databars.reputation.height = 10 + E.db.databars.reputation.orientation = "HORIZONTAL" + E.db.databars.reputation.width = 222 + --General + E.db.general.minimap.size = 220 + E.db.general.watchFrameHeight = 400 + E.db.general.totems.growthDirection = "HORIZONTAL" + E.db.general.totems.size = 50 + E.db.general.totems.spacing = 8 + E.db.general.reminder.enable = false + --Movers + E.db.movers.AlertFrameMover = "TOP,ElvUIParent,TOP,-1,-18" + E.db.movers.BNETMover = "TOPRIGHT,ElvUIParent,TOPRIGHT,-4,-274" + E.db.movers.ElvAB_1 = "BOTTOM,ElvUIParent,BOTTOM,0,190" + E.db.movers.ElvAB_2 = "BOTTOM,ElvUIParent,BOTTOM,0,4" + E.db.movers.ElvAB_3 = "BOTTOM,ElvUIParent,BOTTOM,0,138" + E.db.movers.ElvAB_5 = "BOTTOM,ElvUIParent,BOTTOM,-92,57" + E.db.movers.ElvBar_Totem = "BOTTOM,ElvUIParent,BOTTOM,0,55" + E.db.movers.ElvUF_FocusMover = "BOTTOM,ElvUIParent,BOTTOM,342,59" + E.db.movers.ElvUF_PartyMover = "BOTTOMLEFT,ElvUIParent,BOTTOMLEFT,4,248" + E.db.movers.ElvUF_PetMover = "BOTTOM,ElvUIParent,BOTTOM,-341,99" + E.db.movers.ElvUF_PlayerCastbarMover = "BOTTOM,ElvUIParent,BOTTOM,0,96" + E.db.movers.ElvUF_PlayerMover = "BOTTOM,ElvUIParent,BOTTOM,-341,138" + E.db.movers.ElvUF_Raid40Mover = "TOPLEFT,ElvUIParent,BOTTOMLEFT,4,482" + E.db.movers.ElvUF_RaidMover = "BOTTOMLEFT,ElvUIParent,BOTTOMLEFT,4,248" + E.db.movers.ElvUF_RaidpetMover = "TOPLEFT,ElvUIParent,BOTTOMLEFT,4,737" + E.db.movers.ElvUF_TargetCastbarMover = "BOTTOM,ElvUIParent,BOTTOM,0,242" + E.db.movers.ElvUF_TargetMover = "BOTTOM,ElvUIParent,BOTTOM,342,138" + E.db.movers.ElvUF_TargetTargetMover = "BOTTOM,ElvUIParent,BOTTOM,342,99" + E.db.movers.ExperienceBarMover = "BOTTOM,ElvUIParent,BOTTOM,0,43" + E.db.movers.LootFrameMover = "TOPLEFT,ElvUIParent,TOPLEFT,418,-186" + E.db.movers.MirrorTimer1Mover = "TOP,ElvUIParent,TOP,-1,-96" + E.db.movers.WatchFrameMover = "TOPRIGHT,ElvUIParent,TOPRIGHT,-163,-325" + E.db.movers.ReputationBarMover = "TOPRIGHT,ElvUIParent,TOPRIGHT,-2,-245" + E.db.movers.ShiftAB = "TOPLEFT,ElvUIParent,BOTTOMLEFT,4,769" + E.db.movers.TempEnchantMover = "TOPRIGHT,ElvUIParent,TOPRIGHT,-4,-257" + E.db.movers.TotemBarMover = "BOTTOMLEFT,ElvUIParent,BOTTOMLEFT,485,4" + E.db.movers.VehicleSeatMover = "TOPLEFT,ElvUIParent,TOPLEFT,4,-4" + --Tooltip + E.db.tooltip.fontSize = 10 + E.db.tooltip.healthBar.fontOutline = "MONOCHROMEOUTLINE" + E.db.tooltip.healthBar.height = 12 + --UnitFrames + E.db.unitframe.smoothbars = true + E.db.unitframe.thinBorders = true + --Player + E.db.unitframe.units.player.aurabar.height = 26 + E.db.unitframe.units.player.buffs.perrow = 7 + E.db.unitframe.units.player.castbar.height = 40 + E.db.unitframe.units.player.castbar.insideInfoPanel = false + E.db.unitframe.units.player.castbar.width = 407 + E.db.unitframe.units.player.classbar.height = 14 + E.db.unitframe.units.player.debuffs.perrow = 7 + E.db.unitframe.units.player.disableMouseoverGlow = true + E.db.unitframe.units.player.health.attachTextTo = "InfoPanel" + E.db.unitframe.units.player.height = 82 + E.db.unitframe.units.player.infoPanel.enable = true + E.db.unitframe.units.player.power.attachTextTo = "InfoPanel" + E.db.unitframe.units.player.power.height = 22 + --Target + E.db.unitframe.units.target.aurabar.height = 26 + E.db.unitframe.units.target.buffs.anchorPoint = "TOPLEFT" + E.db.unitframe.units.target.buffs.perrow = 7 + E.db.unitframe.units.target.castbar.height = 40 + E.db.unitframe.units.target.castbar.insideInfoPanel = false + E.db.unitframe.units.target.castbar.width = 407 + E.db.unitframe.units.target.debuffs.anchorPoint = "TOPLEFT" + E.db.unitframe.units.target.debuffs.attachTo = "FRAME" + E.db.unitframe.units.target.debuffs.enable = false + E.db.unitframe.units.target.debuffs.maxDuration = 0 + E.db.unitframe.units.target.debuffs.perrow = 7 + E.db.unitframe.units.target.disableMouseoverGlow = true + E.db.unitframe.units.target.health.attachTextTo = "InfoPanel" + E.db.unitframe.units.target.height = 82 + E.db.unitframe.units.target.infoPanel.enable = true + E.db.unitframe.units.target.name.attachTextTo = "InfoPanel" + E.db.unitframe.units.target.name.text_format = "[namecolor][name]" + E.db.unitframe.units.target.orientation = "LEFT" + E.db.unitframe.units.target.power.attachTextTo = "InfoPanel" + E.db.unitframe.units.target.power.height = 22 + --TargetTarget + E.db.unitframe.units.targettarget.debuffs.anchorPoint = "TOPRIGHT" + E.db.unitframe.units.targettarget.debuffs.enable = false + E.db.unitframe.units.targettarget.disableMouseoverGlow = true + E.db.unitframe.units.targettarget.power.enable = false + E.db.unitframe.units.targettarget.raidicon.attachTo = "LEFT" + E.db.unitframe.units.targettarget.raidicon.enable = false + E.db.unitframe.units.targettarget.raidicon.xOffset = 2 + E.db.unitframe.units.targettarget.raidicon.yOffset = 0 + E.db.unitframe.units.targettarget.threatStyle = "GLOW" + E.db.unitframe.units.targettarget.width = 270 + --Focus + E.db.unitframe.units.focus.castbar.width = 270 + E.db.unitframe.units.focus.width = 270 + --Pet + E.db.unitframe.units.pet.castbar.iconSize = 32 + E.db.unitframe.units.pet.castbar.width = 270 + E.db.unitframe.units.pet.debuffs.anchorPoint = "TOPRIGHT" + E.db.unitframe.units.pet.debuffs.enable = true + E.db.unitframe.units.pet.disableTargetGlow = false + E.db.unitframe.units.pet.infoPanel.height = 14 + E.db.unitframe.units.pet.portrait.camDistanceScale = 2 + E.db.unitframe.units.pet.width = 270 + --Boss + E.db.unitframe.units.boss.buffs.maxDuration = 300 + E.db.unitframe.units.boss.buffs.sizeOverride = 27 + E.db.unitframe.units.boss.buffs.yOffset = 16 + E.db.unitframe.units.boss.castbar.width = 246 + E.db.unitframe.units.boss.debuffs.maxDuration = 300 + E.db.unitframe.units.boss.debuffs.numrows = 1 + E.db.unitframe.units.boss.debuffs.sizeOverride = 27 + E.db.unitframe.units.boss.debuffs.yOffset = -16 + E.db.unitframe.units.boss.height = 60 + E.db.unitframe.units.boss.infoPanel.height = 17 + E.db.unitframe.units.boss.portrait.camDistanceScale = 2 + E.db.unitframe.units.boss.portrait.width = 45 + E.db.unitframe.units.boss.width = 246 + --Party + E.db.unitframe.units.party.height = 74 + E.db.unitframe.units.party.power.height = 13 + E.db.unitframe.units.party.rdebuffs.font = "PT Sans Narrow" + E.db.unitframe.units.party.width = 231 + --Raid + E.db.unitframe.units.raid.growthDirection = "RIGHT_UP" + E.db.unitframe.units.raid.health.frequentUpdates = true + E.db.unitframe.units.raid.infoPanel.enable = true + E.db.unitframe.units.raid.name.attachTextTo = "InfoPanel" + E.db.unitframe.units.raid.name.position = "BOTTOMLEFT" + E.db.unitframe.units.raid.name.xOffset = 2 + E.db.unitframe.units.raid.numGroups = 8 + E.db.unitframe.units.raid.rdebuffs.font = "PT Sans Narrow" + E.db.unitframe.units.raid.rdebuffs.size = 30 + E.db.unitframe.units.raid.rdebuffs.xOffset = 30 + E.db.unitframe.units.raid.rdebuffs.yOffset = 25 + E.db.unitframe.units.raid.resurrectIcon.attachTo = "BOTTOMRIGHT" + E.db.unitframe.units.raid.visibility = "[@raid6,noexists] hide;show" + E.db.unitframe.units.raid.width = 92 + --Raid40 + E.db.unitframe.units.raid40.enable = false + E.db.unitframe.units.raid40.rdebuffs.font = "PT Sans Narrow" + + --[[ + -- Layout Tweaks will be handled below. + -- These are changes that deviate from the shared base layout + --]] + + if layout == "dpsCaster" then + E.db.movers.ElvUF_PlayerCastbarMover = "BOTTOM,ElvUIParent,BOTTOM,0,243" + E.db.movers.ElvUF_TargetCastbarMover = "BOTTOM,ElvUIParent,BOTTOM,0,97" + elseif layout == "healer" then + E.db.movers.ElvUF_PlayerCastbarMover = "BOTTOM,ElvUIParent,BOTTOM,0,243" + E.db.movers.ElvUF_TargetCastbarMover = "BOTTOM,ElvUIParent,BOTTOM,0,97" + E.db.movers.ElvUF_RaidMover = "BOTTOMLEFT,ElvUIParent,BOTTOMLEFT,202,373" + E.db.movers.LootFrameMover = "TOPLEFT,ElvUIParent,TOPLEFT,250,-104" + E.db.movers.ShiftAB = "TOPLEFT,ElvUIParent,BOTTOMLEFT,4,273" + E.db.unitframe.units.party.enable = false + E.db.unitframe.units.party.health.frequentUpdates = true + E.db.unitframe.units.raid.visibility = "[nogroup] hide;show" + E.db.unitframe.units.raid40.health.frequentUpdates = true + end + end + + E:UpdateAll(true) + + if InstallStepComplete and not noDisplayMsg then + InstallStepComplete.message = L["Layout Set"] + InstallStepComplete:Show() + end +end + +local function SetupAuras(style, noDisplayMsg) + local frame = UF.player + E:CopyTable(E.db.unitframe.units.player.buffs, P.unitframe.units.player.buffs) + E:CopyTable(E.db.unitframe.units.player.debuffs, P.unitframe.units.player.debuffs) + E:CopyTable(E.db.unitframe.units.player.aurabar, P.unitframe.units.player.aurabar) + if frame then + UF:Configure_Auras(frame, "Buffs") + UF:Configure_Auras(frame, "Debuffs") + UF:Configure_AuraBars(frame) + end + + frame = UF.target + E:CopyTable(E.db.unitframe.units.target.buffs, P.unitframe.units.target.buffs) + E:CopyTable(E.db.unitframe.units.target.debuffs, P.unitframe.units.target.debuffs) + E:CopyTable(E.db.unitframe.units.target.aurabar, P.unitframe.units.target.aurabar) + if frame then + UF:Configure_Auras(frame, "Buffs") + UF:Configure_Auras(frame, "Debuffs") + UF:Configure_AuraBars(frame) + end + + frame = UF.focus + E:CopyTable(E.db.unitframe.units.focus.buffs, P.unitframe.units.focus.buffs) + E:CopyTable(E.db.unitframe.units.focus.debuffs, P.unitframe.units.focus.debuffs) + E:CopyTable(E.db.unitframe.units.focus.aurabar, P.unitframe.units.focus.aurabar) + if frame then + UF:Configure_Auras(frame, "Buffs") + UF:Configure_Auras(frame, "Debuffs") + UF:Configure_AuraBars(frame) + end + + if not style then + --PLAYER + E.db.unitframe.units.player.buffs.enable = true + E.db.unitframe.units.player.buffs.attachTo = "FRAME" + E.db.unitframe.units.player.debuffs.attachTo = "BUFFS" + E.db.unitframe.units.player.aurabar.enable = false + if E.private.unitframe.enable then + UF:CreateAndUpdateUF("player") + end + + --TARGET + E.db.unitframe.units.target.debuffs.enable = true + E.db.unitframe.units.target.aurabar.enable = false + if E.private.unitframe.enable then + UF:CreateAndUpdateUF("target") + end + end + + if InstallStepComplete and not noDisplayMsg then + InstallStepComplete.message = L["Auras Set"] + InstallStepComplete:Show() + end +end + +local function InstallComplete() + E.private.install_complete = E.version + + ReloadUI() +end + +local function ResetAll() + InstallNextButton:Disable() + InstallPrevButton:Disable() + InstallOption1Button:Hide() + InstallOption1Button:SetScript("OnClick", nil) + InstallOption1Button:SetText("") + InstallOption2Button:Hide() + InstallOption2Button:SetScript("OnClick", nil) + InstallOption2Button:SetText("") + InstallOption3Button:Hide() + InstallOption3Button:SetScript("OnClick", nil) + InstallOption3Button:SetText("") + InstallOption4Button:Hide() + InstallOption4Button:SetScript("OnClick", nil) + InstallOption4Button:SetText("") + InstallSlider:Hide() + InstallSlider.Min:SetText("") + InstallSlider.Max:SetText("") + InstallSlider.Cur:SetText("") + ElvUIInstallFrame.SubTitle:SetText("") + ElvUIInstallFrame.Desc1:SetText("") + ElvUIInstallFrame.Desc2:SetText("") + ElvUIInstallFrame.Desc3:SetText("") + ElvUIInstallFrame:Size(550, 400) +end + +local function SetPage(PageNum) + CURRENT_PAGE = PageNum + ResetAll() + + InstallStatus.anim.progress:SetChange(PageNum) + InstallStatus.anim.progress:Play() + InstallStatus.text:SetText(CURRENT_PAGE.." / "..MAX_PAGE) + + local r, g, b = E:ColorGradient(CURRENT_PAGE / MAX_PAGE, 1, 0, 0, 1, 1, 0, 0, 1, 0) + ElvUIInstallFrame.Status:SetStatusBarColor(r, g, b) + + if PageNum == MAX_PAGE then + InstallNextButton:Disable() + else + InstallNextButton:Enable() + end + + if PageNum == 1 then + InstallPrevButton:Disable() + else + InstallPrevButton:Enable() + end + + local f = ElvUIInstallFrame + if PageNum == 1 then + f.SubTitle:SetFormattedText(L["Welcome to ElvUI version %s!"], E.version) + f.Desc1:SetText(L["This install process will help you learn some of the features in ElvUI has to offer and also prepare your user interface for usage."]) + f.Desc2:SetText(L["The in-game configuration menu can be accessed by typing the /ec command or by clicking the 'C' button on the minimap. Press the button below if you wish to skip the installation process."]) + f.Desc3:SetText(L["Please press the continue button to go onto the next step."]) + InstallOption1Button:Show() + InstallOption1Button:SetScript("OnClick", InstallComplete) + InstallOption1Button:SetText(L["Skip Process"]) + elseif PageNum == 2 then + f.SubTitle:SetText(L["CVars"]) + f.Desc1:SetText(L["This part of the installation process sets up your World of Warcraft default options it is recommended you should do this step for everything to behave properly."]) + f.Desc2:SetText(L["Please click the button below to setup your CVars."]) + f.Desc3:SetText(L["Importance: |cff07D400High|r"]) + InstallOption1Button:Show() + InstallOption1Button:SetScript("OnClick", function() SetupCVars() end) + InstallOption1Button:SetText(L["Setup CVars"]) + elseif PageNum == 3 then + f.SubTitle:SetText(L["Chat"]) + f.Desc1:SetText(L["This part of the installation process sets up your chat windows names, positions and colors."]) + f.Desc2:SetText(L["The chat windows function the same as Blizzard standard chat windows, you can right click the tabs and drag them around, rename, etc. Please click the button below to setup your chat windows."]) + f.Desc3:SetText(L["Importance: |cffD3CF00Medium|r"]) + InstallOption1Button:Show() + InstallOption1Button:SetScript("OnClick", function() SetupChat() end) + InstallOption1Button:SetText(L["Setup Chat"]) + elseif PageNum == 4 then + f.SubTitle:SetText(L["Theme Setup"]) + f.Desc1:SetText(L["Choose a theme layout you wish to use for your initial setup."]) + f.Desc2:SetText(L["You can always change fonts and colors of any element of ElvUI from the in-game configuration."]) + f.Desc3:SetText(L["Importance: |cffFF0000Low|r"]) + InstallOption1Button:Show() + InstallOption1Button:SetScript("OnClick", function() E:SetupTheme("classic") end) + InstallOption1Button:SetText(L["Classic"]) + InstallOption2Button:Show() + InstallOption2Button:SetScript("OnClick", function() E:SetupTheme("default") end) + InstallOption2Button:SetText(L["Dark"]) + InstallOption3Button:Show() + InstallOption3Button:SetScript("OnClick", function() E:SetupTheme("class") end) + InstallOption3Button:SetText(CLASS) + elseif PageNum == 5 then + f.SubTitle:SetText(L["UI Scale"]) + f.Desc1:SetFormattedText(L["Adjust the UI Scale to fit your screen, press the autoscale button to set the UI Scale automatically."]) + InstallSlider:Show() + InstallSlider:SetValueStep(0.01) + InstallSlider:SetMinMaxValues(0.4, 1.15) + + local value = E.global.general.UIScale + InstallSlider:SetValue(value) + InstallSlider.Cur:SetText(value) + InstallSlider:SetScript("OnValueChanged", function(self) + E.global.general.UIScale = self:GetValue() + InstallSlider.Cur:SetText(E.global.general.UIScale) + end) + + InstallSlider.Min:SetText(0.4) + InstallSlider.Max:SetText(1.15) + InstallOption1Button:Show() + InstallOption1Button:SetScript("OnClick", function() + local scale = E:PixelBestSize() + + -- this is to just keep the slider in place, the values need updated again afterwards + InstallSlider:SetValue(scale) + + -- update the values with deeper accuracy + E.global.general.UIScale = scale + InstallSlider.Cur:SetText(E.global.general.UIScale) + end) + + InstallOption1Button:SetText(L["Auto Scale"]) + InstallOption2Button:Show() + InstallOption2Button:SetScript("OnClick", function() + E:PixelScaleChanged(nil, true) + end) + + InstallOption2Button:SetText(L["Preview"]) + f.Desc3:SetText(L["Importance: |cff07D400High|r"]) + elseif PageNum == 6 then + f.SubTitle:SetText(L["Layout"]) + f.Desc1:SetText(L["You can now choose what layout you wish to use based on your combat role."]) + f.Desc2:SetText(L["This will change the layout of your unitframes and actionbars."]) + f.Desc3:SetText(L["Importance: |cffD3CF00Medium|r"]) + InstallOption1Button:Show() + InstallOption1Button:SetScript("OnClick", function() E.db.layoutSet = nil E:SetupLayout("tank") end) + InstallOption1Button:SetText(L["Tank / Physical DPS"]) + InstallOption2Button:Show() + InstallOption2Button:SetScript("OnClick", function() E.db.layoutSet = nil E:SetupLayout("healer") end) + InstallOption2Button:SetText(L["Healer"]) + InstallOption3Button:Show() + InstallOption3Button:SetScript("OnClick", function() E.db.layoutSet = nil E:SetupLayout("dpsCaster") end) + InstallOption3Button:SetText(L["Caster DPS"]) + elseif PageNum == 7 then + f.SubTitle:SetText(L["Auras"]) + f.Desc1:SetText(L["Select the type of aura system you want to use with ElvUI's unitframes. Set to Aura Bar & Icons to use both aura bars and icons, set to icons only to only see icons."]) + f.Desc2:SetText(L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."]) + f.Desc3:SetText(L["Importance: |cffD3CF00Medium|r"]) + InstallOption1Button:Show() + InstallOption1Button:SetScript("OnClick", function() SetupAuras(true) end) + InstallOption1Button:SetText(L["Aura Bars & Icons"]) + InstallOption2Button:Show() + InstallOption2Button:SetScript("OnClick", function() SetupAuras() end) + InstallOption2Button:SetText(L["Icons Only"]) + elseif PageNum == 8 then + f.SubTitle:SetText(L["Installation Complete"]) + f.Desc1:SetText(L["You are now finished with the installation process. If you are in need of technical support please visit us at https://github.com/ElvUI-WotLK."]) + f.Desc2:SetText(L["Please click the button below so you can setup variables and ReloadUI."]) + InstallOption1Button:Show() + InstallOption1Button:SetScript("OnClick", function() E:StaticPopup_Show("ELVUI_EDITBOX", nil, nil, "https://discord.gg/UXSc7nt") end) + InstallOption1Button:SetText(L["Discord"]) + InstallOption2Button:Show() + InstallOption2Button:SetScript("OnClick", InstallComplete) + InstallOption2Button:SetText(L["Finished"]) + ElvUIInstallFrame:Size(550, 350) + end +end + +local function NextPage() + if CURRENT_PAGE ~= MAX_PAGE then + CURRENT_PAGE = CURRENT_PAGE + 1 + SetPage(CURRENT_PAGE) + end +end + +local function PreviousPage() + if CURRENT_PAGE ~= 1 then + CURRENT_PAGE = CURRENT_PAGE - 1 + SetPage(CURRENT_PAGE) + end +end + +--Install UI +function E:Install() + if not InstallStepComplete then + local imsg = CreateFrame("Frame", "InstallStepComplete", E.UIParent) + imsg:Size(418, 72) + imsg:Point("TOP", 0, -190) + imsg:Hide() + imsg:SetScript("OnShow", function(f) + if f.message then + PlaySoundFile([[Sound\Interface\LevelUp.wav]]) + f.text:SetText(f.message) + UIFrameFadeOut(f, 3.5, 1, 0) + E:Delay(4, f.Hide, f) + f.message = nil + else + f:Hide() + end + end) + + imsg.firstShow = false + + imsg.bg = imsg:CreateTexture(nil, "BACKGROUND") + imsg.bg:SetTexture([[Interface\AddOns\ElvUI\media\textures\LevelUpTex]]) + imsg.bg:Point("BOTTOM") + imsg.bg:Size(326, 103) + imsg.bg:SetTexCoord(0.00195313, 0.63867188, 0.03710938, 0.23828125) + imsg.bg:SetVertexColor(1, 1, 1, 0.6) + + imsg.lineTop = imsg:CreateTexture(nil, "BACKGROUND") + imsg.lineTop:SetDrawLayer("BACKGROUND") + imsg.lineTop:SetTexture([[Interface\AddOns\ElvUI\media\textures\LevelUpTex]]) + imsg.lineTop:Point("TOP") + imsg.lineTop:Size(418, 7) + imsg.lineTop:SetTexCoord(0.00195313, 0.81835938, 0.01953125, 0.03320313) + + imsg.lineBottom = imsg:CreateTexture(nil, "BACKGROUND") + imsg.lineBottom:SetDrawLayer("BACKGROUND") + imsg.lineBottom:SetTexture([[Interface\AddOns\ElvUI\media\textures\LevelUpTex]]) + imsg.lineBottom:Point("BOTTOM") + imsg.lineBottom:Size(418, 7) + imsg.lineBottom:SetTexCoord(0.00195313, 0.81835938, 0.01953125, 0.03320313) + + imsg.text = imsg:CreateFontString(nil, "OVERLAY") + imsg.text:FontTemplate(E.media.normFont, 32, "OUTLINE") + imsg.text:Point("BOTTOM", 0, 16) + imsg.text:SetTextColor(1, 0.82, 0) + imsg.text:SetJustifyH("CENTER") + end + + --Create Frame + if not ElvUIInstallFrame then + local f = CreateFrame("Button", "ElvUIInstallFrame", E.UIParent) + f.SetPage = SetPage + f:Size(550, 400) + f:SetTemplate("Transparent") + f:Point("CENTER") + f:SetFrameStrata("TOOLTIP") + + f:SetMovable(true) + f:EnableMouse(true) + f:RegisterForDrag("LeftButton") + f:SetScript("OnDragStart", function(frame) frame:StartMoving() frame:SetUserPlaced(false) end) + f:SetScript("OnDragStop", function(frame) frame:StopMovingOrSizing() end) + + f.Title = f:CreateFontString(nil, "OVERLAY") + f.Title:FontTemplate(nil, 17, nil) + f.Title:Point("TOP", 0, -5) + f.Title:SetText(L["ElvUI Installation"]) + + f.Next = CreateFrame("Button", "InstallNextButton", f, "UIPanelButtonTemplate") + f.Next:Size(110, 25) + f.Next:Point("BOTTOMRIGHT", -5, 5) + f.Next:SetText(CONTINUE) + f.Next:Disable() + f.Next:SetScript("OnClick", NextPage) + S:HandleButton(f.Next, true) + + f.Prev = CreateFrame("Button", "InstallPrevButton", f, "UIPanelButtonTemplate") + f.Prev:Size(110, 25) + f.Prev:Point("BOTTOMLEFT", 5, 5) + f.Prev:SetText(PREVIOUS) + f.Prev:Disable() + f.Prev:SetScript("OnClick", PreviousPage) + S:HandleButton(f.Prev, true) + + f.Status = CreateFrame("StatusBar", "InstallStatus", f) + f.Status:SetFrameLevel(f.Status:GetFrameLevel() + 2) + f.Status:CreateBackdrop() + f.Status:SetStatusBarTexture(E.media.normTex) + E:RegisterStatusBar(f.Status) + f.Status:SetMinMaxValues(0, MAX_PAGE) + f.Status:Point("TOPLEFT", f.Prev, "TOPRIGHT", 6, -2) + f.Status:Point("BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2) + + -- Setup StatusBar Animation + f.Status.anim = CreateAnimationGroup(f.Status) + f.Status.anim.progress = f.Status.anim:CreateAnimation("Progress") + f.Status.anim.progress:SetEasing("Out") + f.Status.anim.progress:SetDuration(0.3) + + f.Status.text = f.Status:CreateFontString(nil, "OVERLAY") + f.Status.text:FontTemplate() + f.Status.text:Point("CENTER") + f.Status.text:SetText(CURRENT_PAGE.." / "..MAX_PAGE) + + f.Slider = CreateFrame("Slider", "InstallSlider", f) + f.Slider:SetOrientation("HORIZONTAL") + f.Slider:Height(15) + f.Slider:Width(400) + f.Slider:SetHitRectInsets(0, 0, -10, 0) + f.Slider:SetPoint("CENTER", 0, 45) + S:HandleSliderFrame(f.Slider) + f.Slider:Hide() + + f.Slider.Min = f.Slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") + f.Slider.Min:SetPoint("RIGHT", f.Slider, "LEFT", -3, 0) + f.Slider.Max = f.Slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") + f.Slider.Max:SetPoint("LEFT", f.Slider, "RIGHT", 3, 0) + f.Slider.Cur = f.Slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") + f.Slider.Cur:SetPoint("BOTTOM", f.Slider, "TOP", 0, 10) + f.Slider.Cur:FontTemplate(nil, 30, nil) + + f.Option1 = CreateFrame("Button", "InstallOption1Button", f, "UIPanelButtonTemplate") + f.Option1:Size(160, 30) + f.Option1:Point("BOTTOM", 0, 45) + f.Option1:SetText("") + f.Option1:Hide() + S:HandleButton(f.Option1, true) + + f.Option2 = CreateFrame("Button", "InstallOption2Button", f, "UIPanelButtonTemplate") + f.Option2:Size(110, 30) + f.Option2:Point("BOTTOMLEFT", f, "BOTTOM", 4, 45) + f.Option2:SetText("") + f.Option2:Hide() + f.Option2:SetScript("OnShow", function() + f.Option1:Width(110) + f.Option1:ClearAllPoints() + f.Option1:Point("BOTTOMRIGHT", f, "BOTTOM", -4, 45) + end) + f.Option2:SetScript("OnHide", function() + f.Option1:Width(160) + f.Option1:ClearAllPoints() + f.Option1:Point("BOTTOM", 0, 45) + end) + S:HandleButton(f.Option2, true) + + f.Option3 = CreateFrame("Button", "InstallOption3Button", f, "UIPanelButtonTemplate") + f.Option3:Size(100, 30) + f.Option3:Point("LEFT", f.Option2, "RIGHT", 4, 0) + f.Option3:SetText("") + f.Option3:Hide() + f.Option3:SetScript("OnShow", function() + f.Option1:Width(100) + f.Option1:ClearAllPoints() + f.Option1:Point("RIGHT", f.Option2, "LEFT", -4, 0) + f.Option2:Width(100) + f.Option2:ClearAllPoints() + f.Option2:Point("BOTTOM", f, "BOTTOM", 0, 45) + end) + f.Option3:SetScript("OnHide", function() + f.Option1:Width(160) + f.Option1:ClearAllPoints() + f.Option1:Point("BOTTOM", 0, 45) + f.Option2:Width(110) + f.Option2:ClearAllPoints() + f.Option2:Point("BOTTOMLEFT", f, "BOTTOM", 4, 45) + end) + S:HandleButton(f.Option3, true) + + f.Option4 = CreateFrame("Button", "InstallOption4Button", f, "UIPanelButtonTemplate") + f.Option4:Size(100, 30) + f.Option4:Point("LEFT", f.Option3, "RIGHT", 4, 0) + f.Option4:SetText("") + f.Option4:Hide() + f.Option4:SetScript("OnShow", function() + f.Option1:Width(100) + f.Option1:ClearAllPoints() + f.Option1:Point("RIGHT", f.Option2, "LEFT", -4, 0) + f.Option2:Width(100) + f.Option2:ClearAllPoints() + f.Option2:Point("BOTTOMRIGHT", f, "BOTTOM", -4, 45) + end) + f.Option4:SetScript("OnHide", function() + f.Option1:Width(160) + f.Option1:ClearAllPoints() + f.Option1:Point("BOTTOM", 0, 45) + f.Option2:Width(110) + f.Option2:ClearAllPoints() + f.Option2:Point("BOTTOMLEFT", f, "BOTTOM", 4, 45) + end) + S:HandleButton(f.Option4, true) + + f.SubTitle = f:CreateFontString(nil, "OVERLAY") + f.SubTitle:FontTemplate(nil, 15, nil) + f.SubTitle:Point("TOP", 0, -40) + + f.Desc1 = f:CreateFontString(nil, "OVERLAY") + f.Desc1:FontTemplate() + f.Desc1:Point("TOPLEFT", 20, -75) + f.Desc1:Width(f:GetWidth() - 40) + + f.Desc2 = f:CreateFontString(nil, "OVERLAY") + f.Desc2:FontTemplate() + f.Desc2:Point("TOPLEFT", 20, -125) + f.Desc2:Width(f:GetWidth() - 40) + + f.Desc3 = f:CreateFontString(nil, "OVERLAY") + f.Desc3:FontTemplate() + f.Desc3:Point("TOPLEFT", 20, -175) + f.Desc3:Width(f:GetWidth() - 40) + + local closeButton = CreateFrame("Button", "InstallCloseButton", f, "UIPanelCloseButton") + closeButton:Point("TOPRIGHT", f, "TOPRIGHT") + closeButton:SetScript("OnClick", function() f:Hide() end) + S:HandleCloseButton(closeButton) + + f.tutorialImage = f:CreateTexture("InstallTutorialImage", "OVERLAY") + f.tutorialImage:Size(256, 128) + f.tutorialImage:SetTexture(E.Media.Textures.Logo) + f.tutorialImage:Point("BOTTOM", 0, 70) + end + + ElvUIInstallFrame:Show() + NextPage() +end \ No newline at end of file diff --git a/ElvUI/Core/Load_Core.xml b/ElvUI/Core/Load_Core.xml new file mode 100644 index 0000000..a679d66 --- /dev/null +++ b/ElvUI/Core/Load_Core.xml @@ -0,0 +1,24 @@ + +