diff --git a/Tukui/Tukui.toc b/Tukui/Tukui.toc deleted file mode 100644 index 5938120..0000000 --- a/Tukui/Tukui.toc +++ /dev/null @@ -1,15 +0,0 @@ -## Interface: 40300 -## Author: Tukz -## Project Collaborators: Elv22, Nightcracker -## Credits to: Caith, Caellian, Shestak, Haste, Tekkub, Alza, Roth, P3lim, Tulla, Hungtar, hankthetank, Ishtara, Haleth and others... -## Special Thanks to: Admins, Moderator and VIP's from tukui.org -## Version: 14.17 -## Title: |cffC495DDTukui|r -## Notes: UI of awesomeness! -## SavedVariables: TukuiData -## SavedVariablesPerCharacter: TukuiDataPerChar -## OptionalDeps: Tukui_ConfigUI, Tukui_EditedDefaultConfig, !ClassColors, Clique, BigWigs, DBM-Core, Omen, Recount, Skada, TinyDPS -## X-oUF: oUFTukui -## Website: www.tukui.org - -Tukui.xml \ No newline at end of file diff --git a/Tukui/Tukui.xml b/Tukui/Tukui.xml deleted file mode 100644 index 50aa2ba..0000000 --- a/Tukui/Tukui.xml +++ /dev/null @@ -1,196 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Script file="developer\reloadui.lua"/> - <Script file="developer\commands.lua"/> - <Script file="core\init.lua"/> - <Script file="locales\english.lua"/> - <Script file="locales\french.lua"/> - <Script file="locales\russian.lua"/> - <Script file="locales\german.lua"/> - <Script file="locales\taiwan.lua"/> - <Script file="locales\spanish.lua"/> - <Script file="locales\korean.lua"/> - <Script file="locales\chinese.lua"/> - <Script file="config\config.lua"/> - <Script file="config\profiles.lua"/> - <Script file="core\customconfig.lua"/> - <Script file="core\config.lua"/> - <Script file="medias\medias.lua"/> - <Include file="modules\unitframes\core\oUF\oUF.xml"/> - <Script file="modules\unitframes\plugins\oUF_AuraWatch\oUF_AuraWatch.lua"/> - <Script file="modules\unitframes\plugins\oUF_CombatFeedback\oUF_CombatFeedback.lua"/> - <Script file="modules\unitframes\plugins\oUF_DebuffHighlight\oUF_DebuffHighlight.lua"/> - <Script file="modules\unitframes\plugins\oUF_Experience\oUF_Experience.lua"/> - <Script file="modules\unitframes\plugins\oUF_MovableFrames\movable.lua"/> - <Script file="modules\unitframes\plugins\oUF_Reputation\oUF_Reputation.lua"/> - <Script file="modules\unitframes\plugins\oUF_Smooth\oUF_Smooth.lua"/> - <Script file="modules\unitframes\plugins\oUF_TotemBar\oUF_TotemBar.lua"/> - <Script file="modules\unitframes\plugins\oUF_Trinkets\oUF_Trinkets.lua"/> - <Script file="modules\unitframes\plugins\oUF_RaidDebuffs\oUF_RaidDebuffs.lua"/> - <Script file="modules\unitframes\plugins\oUF_WeakenedSoul\oUF_WeakenedSoul.lua"/> - <Script file="modules\unitframes\templates\colors.lua"/> - <Script file="core\video.lua"/> - <Script file="core\deprecated.lua"/> - <Script file="core\api.lua"/> - <Script file="core\functions.lua"/> - <Script file="core\fonts.lua"/> - <Script file="core\protection.lua"/> - <Script file="core\popups.lua"/> - <Script file="core\install.lua"/> - <Script file="modules\blizzard\watchframe.lua"/> - <Script file="modules\blizzard\durability.lua"/> - <Script file="modules\blizzard\vehicle.lua"/> - <Script file="modules\blizzard\capturebar.lua"/> - <Script file="modules\blizzard\gm.lua"/> - <Script file="modules\blizzard\ghostframe.lua"/> - <Script file="modules\blizzard\timertracker.lua"/> - <Script file="modules\misc\commands.lua"/> - <Script file="modules\misc\micromenu.lua"/> - <Script file="modules\blizzard\quests.lua"/> - <Script file="modules\misc\invite.lua"/> - <Script file="modules\misc\damage.lua"/> - <Script file="modules\loot\autodez.lua"/> - <Script file="modules\blizzard\symbol.lua"/> - <Script file="modules\loot\merchant.lua"/> - <Script file="modules\blizzard\error.lua"/> - <!-- <Script file="modules\chat\copyurl.lua"/> --> - <Script file="modules\tooltip\itemidcount.lua"/> - <Script file="modules\blizzard\kill.lua"/> - <Script file="modules\chat\spam.lua"/> - <Script file="modules\chat\profanity.lua"/> - <Script file="modules\blizzard\font.lua"/> - <Include file="modules\buffs\template.xml"/> - <Script file="modules\buffs\buffs.lua"/> - <Script file="modules\buffs\header.lua"/> - <Script file="modules\maps\minimap.lua"/> - <Script file="modules\panels\panels.lua"/> - <Script file="modules\datatext\armor.lua"/> - <Script file="modules\datatext\avoidance.lua"/> - <Script file="modules\datatext\bags.lua"/> - <Script file="modules\datatext\battleground.lua"/> - <Script file="modules\datatext\crit.lua"/> - <Script file="modules\datatext\dps.lua"/> - <Script file="modules\datatext\durability.lua"/> - <Script file="modules\datatext\fps.lua"/> - <Script file="modules\datatext\friend.lua"/> - <Script file="modules\datatext\gold.lua"/> - <Script file="modules\datatext\guild.lua"/> - <Script file="modules\datatext\haste.lua"/> - <Script file="modules\datatext\hps.lua"/> - <Script file="modules\datatext\system.lua"/> - <Script file="modules\datatext\power.lua"/> - <Script file="modules\datatext\time.lua"/> - <Script file="modules\datatext\currency.lua"/> - <Script file="modules\datatext\hit.lua"/> - <Script file="modules\datatext\micromenu.lua"/> - <Script file="modules\datatext\mastery.lua"/> - <Script file="modules\datatext\regen.lua"/> - <Script file="modules\datatext\talent.lua"/> - <Script file="modules\datatext\calltoarms.lua"/> - <Script file="modules\actionbars\Bind.lua"/> - <Script file="modules\actionbars\Hide.lua"/> - <Script file="modules\actionbars\Bar1.lua"/> - <Script file="modules\actionbars\Bar2.lua"/> - <Script file="modules\actionbars\Bar3.lua"/> - <Script file="modules\actionbars\Bar4.lua"/> - <Script file="modules\actionbars\Bar5.lua"/> - <Script file="modules\actionbars\Bar6.lua"/> - <Script file="modules\actionbars\Bar7.lua"/> - <Script file="modules\actionbars\BarPet.lua"/> - <Script file="modules\actionbars\BarShift.lua"/> - <Script file="modules\actionbars\BarTotem.lua"/> - <Script file="modules\actionbars\buttons.lua"/> - <Script file="modules\actionbars\Style.lua"/> - <Script file="modules\actionbars\Range.lua"/> - <Script file="modules\actionbars\Others.lua"/> - <Script file="modules\actionbars\Cooldowns.lua"/> - <Script file="modules\actionbars\Extra.lua"/> - <Script file="modules\chat\chatframes.lua"/> - <Script file="modules\chat\telltarget.lua"/> - <Script file="modules\chat\copychat.lua"/> - <Script file="modules\chat\mousescroll.lua"/> - <Script file="modules\chat\sounds.lua"/> - <Script file="modules\tooltip\tooltip.lua"/> - <Script file="modules\nameplates\nameplates.lua"/> - <Script file="modules\bags\bags.lua"/> - <Script file="modules\loot\lootframe.lua"/> - <Script file="modules\loot\rollframe.lua"/> - <Script file="modules\maps\zonemap.lua"/> - <Script file="modules\blizzard\mirror.lua"/> - <Include file="modules\unitframes\templates\tankassist.xml"/> - <Script file="modules\unitframes\tags\tags.lua"/> - <Script file="modules\unitframes\layouts\tukui.lua"/> - <Script file="modules\misc\altpowerbar.lua"/> - <Script file="modules\misc\threatbar.lua"/> - <Script file="modules\misc\combo.lua"/> - <Script file="modules\blizzard\achievements.lua"/> - <Script file="modules\misc\dropdownlist.lua"/> - <Script file="core\move.lua"/> - <Script file="modules\misc\raidutilities.lua"/> - <Script file="modules\skins\blizzard\achievement.lua"/> - <Script file="modules\skins\blizzard\achievementpopup.lua"/> - <Script file="modules\skins\blizzard\archeology.lua"/> - <Script file="modules\skins\blizzard\auction.lua"/> - <Script file="modules\skins\blizzard\bags.lua"/> - <Script file="modules\skins\blizzard\barbershop.lua"/> - <Script file="modules\skins\blizzard\bgscore.lua"/> - <Script file="modules\skins\blizzard\binding.lua"/> - <Script file="modules\skins\blizzard\bubbles.lua"/> - <Script file="modules\skins\blizzard\calendar.lua"/> - <Script file="modules\skins\blizzard\character.lua"/> - <Script file="modules\skins\blizzard\chat.lua"/> - <Script file="modules\skins\blizzard\colorpicker.lua"/> - <Script file="modules\skins\blizzard\debugtools.lua"/> - <Script file="modules\skins\blizzard\dressup.lua"/> - <Script file="modules\skins\blizzard\friends.lua"/> - <Script file="modules\skins\blizzard\glyph.lua"/> - <Script file="modules\skins\blizzard\gossip.lua"/> - <Script file="modules\skins\blizzard\greeting.lua"/> - <Script file="modules\skins\blizzard\guild.lua"/> - <Script file="modules\skins\blizzard\guildbank.lua"/> - <Script file="modules\skins\blizzard\guildcontrol.lua"/> - <Script file="modules\skins\blizzard\guildregister.lua"/> - <Script file="modules\skins\blizzard\help.lua"/> - <Script file="modules\skins\blizzard\inspect.lua"/> - <Script file="modules\skins\blizzard\itemtransmogrify.lua"/> - <Script file="modules\skins\blizzard\itemtext.lua"/> - <Script file="modules\skins\blizzard\journal.lua"/> - <Script file="modules\skins\blizzard\lfd.lua"/> - <Script file="modules\skins\blizzard\lfg.lua"/> - <Script file="modules\skins\blizzard\lfr.lua"/> - <Script file="modules\skins\blizzard\macosx.lua"/> - <Script file="modules\skins\blizzard\macro.lua"/> - <Script file="modules\skins\blizzard\mail.lua"/> - <Script file="modules\skins\blizzard\merchant.lua"/> - <Script file="modules\skins\blizzard\opacity.lua"/> - <Script file="modules\skins\blizzard\others.lua"/> - <Script file="modules\skins\blizzard\petition.lua"/> - <Script file="modules\skins\blizzard\pvp.lua"/> - <Script file="modules\skins\blizzard\quest.lua"/> - <Script file="modules\skins\blizzard\questlog.lua"/> - <Script file="modules\skins\blizzard\raid.lua"/> - <Script file="modules\skins\blizzard\raidinfo.lua"/> - <Script file="modules\skins\blizzard\raidparent.lua"/> - <Script file="modules\skins\blizzard\reforging.lua"/> - <Script file="modules\skins\blizzard\socket.lua"/> - <Script file="modules\skins\blizzard\spellbook.lua"/> - <Script file="modules\skins\blizzard\tabard.lua"/> - <Script file="modules\skins\blizzard\talent.lua"/> - <Script file="modules\skins\blizzard\taxi.lua"/> - <Script file="modules\skins\blizzard\timemanager.lua"/> - <Script file="modules\skins\blizzard\trade.lua"/> - <Script file="modules\skins\blizzard\tradeskill.lua"/> - <Script file="modules\skins\blizzard\trainer.lua"/> - <Script file="modules\skins\blizzard\tutorial.lua"/> - <Script file="modules\skins\blizzard\voidstorage.lua"/> - <Script file="modules\skins\blizzard\worldmap.lua"/> - - <Script file="modules\skins\addons\bigwigs.lua"/> - <Script file="modules\skins\addons\omen.lua"/> - <Script file="modules\skins\addons\recount.lua"/> - <Script file="modules\skins\addons\skada.lua"/> - <Script file="modules\skins\addons\tinydps.lua"/> - <Script file="modules\skins\addons\dbm.lua"/> - <Script file="modules\skins\addons\dxe.lua"/> - - <Script file="developer\test.lua"/> -</Ui> \ No newline at end of file diff --git a/Tukui/config/config.lua b/Tukui/config/config.lua deleted file mode 100644 index fd92eaf..0000000 --- a/Tukui/config/config.lua +++ /dev/null @@ -1,171 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - ------------------------------------------ --- This is the default configuration file ------------------------------------------ - -C["general"] = { - ["autoscale"] = true, -- mainly enabled for users that don't want to mess with the config file - ["uiscale"] = 0.71, -- set your value (between 0.64 and 1) of your uiscale if autoscale is off - ["overridelowtohigh"] = false, -- EXPERIMENTAL ONLY! override lower version to higher version on a lower reso. - ["backdropcolor"] = { .1,.1,.1 }, -- default backdrop color of panels - ["bordercolor"] = { .6,.6,.6 }, -- default border color of panels - ["blizzardreskin"] = true -- reskin all Blizzard frames -} - -C["unitframes"] = { - -- general options - ["enable"] = true, -- do i really need to explain this? - ["enemyhcolor"] = false, -- enemy target (players) color by hostility, very useful for healer. - ["unitcastbar"] = true, -- enable tukui castbar - ["cblatency"] = false, -- enable castbar latency - ["cbicons"] = true, -- enable icons on castbar - ["classiccombo"] = false, -- display classic combo points (from Tukui 13 or less) - ["movecombobar"] = true, -- display the new combo bar (t14+) from target to player (ROGUE ONLY) - ["auratimer"] = true, -- enable timers on buffs/debuffs - ["auratextscale"] = 11, -- the font size of buffs/debuffs timers on unitframes - ["targetauras"] = true, -- enable auras on target unit frame - ["lowThreshold"] = 20, -- global low threshold, for low mana warning. - ["targetpowerpvponly"] = true, -- enable power text on pvp target only - ["totdebuffs"] = false, -- enable tot debuffs (high reso only) - ["showtotalhpmp"] = false, -- change the display of info text on player and target with XXXX/Total. - ["showsmooth"] = true, -- enable smooth bar - ["charportrait"] = false, -- do i really need to explain this? - ["maintank"] = false, -- enable maintank - ["mainassist"] = false, -- enable mainassist - ["unicolor"] = false, -- enable unicolor theme - ["combatfeedback"] = true, -- enable combattext on player and target. - ["playeraggro"] = true, -- color player border to red if you have aggro on current target. - ["healcomm"] = false, -- enable healprediction support. - ["onlyselfdebuffs"] = false, -- display only our own debuffs applied on target - ["showfocustarget"] = true, -- show focus target - ["bordercolor"] = { .4,.4,.4 }, -- unit frames panel border color - - -- raid layout (if one of them is enabled) - ["showrange"] = true, -- show range opacity on raidframes - ["raidalphaoor"] = 0.3, -- alpha of unitframes when unit is out of range - ["gridonly"] = false, -- enable grid only mode for all healer mode raid layout. - ["showsymbols"] = true, -- show symbol. - ["aggro"] = true, -- show aggro on all raids layouts - ["raidunitdebuffwatch"] = true, -- track important spell to watch in pve for grid mode. - ["gridhealthvertical"] = true, -- enable vertical grow on health bar for grid mode. - ["showplayerinparty"] = false, -- show my player frame in party - ["gridscale"] = 1, -- set the healing grid scaling - ["gridvertical"] = false, -- grid group displayed vertically - - -- boss frames - ["showboss"] = true, -- enable boss unit frames for PVELOL encounters. - - -- priest only plugin - ["weakenedsoulbar"] = true, -- show weakened soul bar - - -- class bar - ["classbar"] = true, -- enable tukui classbar over player unit -} - -C["arena"] = { - ["unitframes"] = true, -- enable tukz arena unitframes (requirement : tukui unitframes enabled) -} - -C["auras"] = { - ["player"] = true, -- enable tukui buffs/debuffs - ["consolidate"] = true, -- enable downpdown menu with consolidate buff - ["flash"] = false, -- flash warning for buff with time < 30 sec -} - -C["actionbar"] = { - ["enable"] = true, -- enable tukui action bars - ["hotkey"] = true, -- enable hotkey display because it was a lot requested - ["hideshapeshift"] = false, -- hide shapeshift or totembar because it was a lot requested. - ["showgrid"] = true, -- show grid on empty button - ["buttonsize"] = 27, -- normal buttons size - ["petbuttonsize"] = 29, -- pet & stance buttons size - ["buttonspacing"] = 4, -- buttons spacing - ["ownshdbar"] = false, -- use a complete new stance bar for shadow dance (rogue only) -} - -C["bags"] = { - ["enable"] = true, -- enable an all in one bag mod that fit tukui perfectly -} - -C["loot"] = { - ["lootframe"] = true, -- reskin the loot frame to fit tukui - ["rolllootframe"] = true, -- reskin the roll frame to fit tukui - ["autogreed"] = true, -- auto-dez or auto-greed item at max level, auto-greed Frozen orb -} - -C["cooldown"] = { - ["enable"] = true, -- do i really need to explain this? - ["treshold"] = 8, -- show decimal under X seconds and text turn red -} - -C["datatext"] = { - ["fps_ms"] = 4, -- show fps and ms on panels - ["system"] = 5, -- show total memory and others systems infos on panels - ["bags"] = 0, -- show space used in bags on panels - ["gold"] = 6, -- show your current gold on panels - ["wowtime"] = 8, -- show time on panels - ["guild"] = 1, -- show number on guildmate connected on panels - ["dur"] = 2, -- show your equipment durability on panels. - ["friends"] = 3, -- show number of friends connected. - ["dps_text"] = 0, -- show a dps meter on panels - ["hps_text"] = 0, -- show a heal meter on panels - ["power"] = 7, -- show your attackpower/spellpower/healpower/rangedattackpower whatever stat is higher gets displayed - ["haste"] = 0, -- show your haste rating on panels. - ["crit"] = 0, -- show your crit rating on panels. - ["avd"] = 0, -- show your current avoidance against the level of the mob your targeting - ["armor"] = 0, -- show your armor value against the level mob you are currently targeting - ["currency"] = 0, -- show your tracked currency on panels - ["hit"] = 0, -- show hit rating - ["mastery"] = 0, -- show mastery rating - ["micromenu"] = 0, -- add a micro menu thought datatext - ["regen"] = 0, -- show mana regeneration - ["talent"] = 0, -- show talent - ["calltoarms"] = 0, -- show dungeon and call to arms - - ["battleground"] = true, -- enable 3 stats in battleground only that replace stat1,stat2,stat3. - ["time24"] = true, -- set time to 24h format. - ["localtime"] = false, -- set time to local time instead of server time. - ["fontsize"] = 12, -- font size for panels. -} - -C["chat"] = { - ["enable"] = true, -- blah - ["whispersound"] = true, -- play a sound when receiving whisper - ["background"] = false, -} - -C["nameplate"] = { - ["enable"] = true, -- enable nice skinned nameplates that fit into tukui - ["showhealth"] = false, -- show health text on nameplate - ["enhancethreat"] = false, -- threat features based on if your a tank or not - ["combat"] = false, -- only show enemy nameplates in-combat. - ["goodcolor"] = {75/255, 175/255, 76/255}, -- good threat color (tank shows this with threat, everyone else without) - ["badcolor"] = {0.78, 0.25, 0.25}, -- bad threat color (opposite of above) - ["transitioncolor"] = {218/255, 197/255, 92/255}, -- threat color when gaining threat -} - -C["tooltip"] = { - ["enable"] = true, -- true to enable this mod, false to disable - ["hidecombat"] = false, -- hide bottom-right tooltip when in combat - ["hidebuttons"] = false, -- always hide action bar buttons tooltip. - ["hideuf"] = false, -- hide tooltip on unitframes - ["cursor"] = false, -- tooltip via cursor only -} - -C["merchant"] = { - ["sellgrays"] = true, -- automaticly sell grays? - ["autorepair"] = true, -- automaticly repair? - ["sellmisc"] = true, -- sell defined items automatically -} - -C["error"] = { - ["enable"] = true, -- true to enable this mod, false to disable - filter = { -- what messages to not hide - [INVENTORY_FULL] = true, -- inventory is full will not be hidden by default - }, -} - -C["invite"] = { - ["autoaccept"] = true, -- auto-accept invite from guildmate and friends. -} diff --git a/Tukui/config/profiles.lua b/Tukui/config/profiles.lua deleted file mode 100644 index 09f6285..0000000 --- a/Tukui/config/profiles.lua +++ /dev/null @@ -1,27 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - ---------------------------------------------------------------------------- --- Per Class Config (overwrite general) --- Class need to be UPPERCASE --- This is an example, note that "WIZARD" doesn't exist on WoW. :P --- It's just to give an example without interfering the default config. --- A full configuration list can be found in /Tukui/config/config.lua ---------------------------------------------------------------------------- - -if T.myclass == "WIZARD" then - C.actionbar.hotkey = false - C.actionbar.hideshapeshift = true - C.unitframes.enemyhcolor = true -end - ---------------------------------------------------------------------------- --- Per Character Name Config (overwrite /Tukui/config/config.lua and class) --- Name need to be case sensitive ---------------------------------------------------------------------------- - -if T.myname == "Tukz" and T.myrealm == "Ysondre" then - C.actionbar.hideshapeshift = true - C.actionbar.hotkey = false - C.unitframes.enemyhcolor = true - C.general.uiscale = 0.64 -end diff --git a/Tukui/core/api.lua b/Tukui/core/api.lua deleted file mode 100644 index dcbdcb4..0000000 --- a/Tukui/core/api.lua +++ /dev/null @@ -1,292 +0,0 @@ --- Tukui API, see DOCS/API.txt for more informations - -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -local noop = T.dummy -local floor = math.floor -local class = T.myclass -local texture = C.media.blank -local backdropr, backdropg, backdropb = unpack(C["media"].backdropcolor) -local borderr, borderg, borderb = unpack(C["media"].bordercolor) -local backdropa = 1 -local bordera = 1 -local template -local inset = 0 -local noinset = C.media.noinset - --- pixel perfect script of custom ui Scale. -local mult = 768/string.match(GetCVar("gxResolution"), "%d+x(%d+)")/C["general"].uiscale -local Scale = function(x) - return mult*math.floor(x/mult+.5) -end - -T.Scale = function(x) return Scale(x) end -T.mult = mult - -if noinset then inset = mult end - --- function to update color when it doesn't match template we try to apply -local function UpdateColor(t) - if t == template then return end - - if t == "ClassColor" or t == "Class Color" or t == "Class" then - local c = T.UnitColor.class[class] - borderr, borderg, borderb = c[1], c[2], c[3] - backdropr, backdropg, backdropb = unpack(C["media"].backdropcolor) - backdropa = 1 - else - local balpha = 1 - if t == "Transparent" then balpha = 0.8 end - borderr, borderg, borderb = unpack(C["media"].bordercolor) - backdropr, backdropg, backdropb = unpack(C["media"].backdropcolor) - backdropa = balpha - end - - template = t -end - ---------------------------------------------------- --- TUKUI API START HERE ---------------------------------------------------- - -local function Size(frame, width, height) - frame:SetSize(Scale(width), Scale(height or width)) -end - -local function Width(frame, width) - frame:SetWidth(Scale(width)) -end - -local function Height(frame, height) - frame:SetHeight(Scale(height)) -end - -local function Point(obj, arg1, arg2, arg3, arg4, arg5) - -- anyone has a more elegant way for this? - if type(arg1)=="number" then arg1 = Scale(arg1) end - if type(arg2)=="number" then arg2 = Scale(arg2) end - if type(arg3)=="number" then arg3 = Scale(arg3) end - if type(arg4)=="number" then arg4 = Scale(arg4) end - if type(arg5)=="number" then arg5 = Scale(arg5) end - - obj:SetPoint(arg1, arg2, arg3, arg4, arg5) -end - -local function SetTemplate(f, t, tex) - if tex then - texture = C.media.normTex - else - texture = C.media.blank - end - - UpdateColor(t) - - f:SetBackdrop({ - bgFile = texture, - edgeFile = C.media.blank, - tile = false, tileSize = 0, edgeSize = mult, - insets = { left = -mult + inset, right = -mult + inset, top = -mult + inset, bottom = -mult + inset} - }) - - f:SetBackdropColor(backdropr, backdropg, backdropb, backdropa) - f:SetBackdropBorderColor(borderr, borderg, borderb) -end - -local function CreatePanel(f, t, w, h, a1, p, a2, x, y) - UpdateColor(t) - - local sh = Scale(h) - local sw = Scale(w) - f:SetFrameLevel(1) - f:SetHeight(sh) - f:SetWidth(sw) - f:SetFrameStrata("BACKGROUND") - f:SetPoint(a1, p, a2, Scale(x), Scale(y)) - f:SetBackdrop({ - bgFile = C["media"].blank, - edgeFile = C["media"].blank, - tile = false, tileSize = 0, edgeSize = mult, - insets = { left = -mult + inset + inset, right = -mult + inset + inset, top = -mult + inset + inset, bottom = -mult + inset + inset} - }) - - f:SetBackdropColor(backdropr, backdropg, backdropb, backdropa) - f:SetBackdropBorderColor(borderr, borderg, borderb) -end - -local function CreateBackdrop(f, t, tex) - if not t then t = "Default" end - - local b = CreateFrame("Frame", nil, f) - b:Point("TOPLEFT", -2 + inset, 2 - inset) - b:Point("BOTTOMRIGHT", 2 - inset, -2 + inset) - b:SetTemplate(t, tex) - - if f:GetFrameLevel() - 1 >= 0 then - b:SetFrameLevel(f:GetFrameLevel() - 1) - else - b:SetFrameLevel(0) - end - - f.backdrop = b -end - -local function CreateShadow(f, t) - if f.shadow then return end -- we seriously don't want to create shadow 2 times in a row on the same frame. - - local shadow = CreateFrame("Frame", nil, f) - shadow:SetFrameLevel(1) - shadow:SetFrameStrata(f:GetFrameStrata()) - shadow:Point("TOPLEFT", -3, 3) - shadow:Point("BOTTOMLEFT", -3, -3) - shadow:Point("TOPRIGHT", 3, 3) - shadow:Point("BOTTOMRIGHT", 3, -3) - shadow:SetBackdrop( { - edgeFile = C["media"].glowTex, edgeSize = T.Scale(3), - insets = {left = T.Scale(5), right = T.Scale(5), top = T.Scale(5), bottom = T.Scale(5)}, - }) - shadow:SetBackdropColor(0, 0, 0, 0) - shadow:SetBackdropBorderColor(0, 0, 0, 0.8) - f.shadow = shadow -end - -local function Kill(object) - if object.UnregisterAllEvents then - object:UnregisterAllEvents() - end - object.Show = noop - object:Hide() -end - --- styleButton function authors are Chiril & Karudon. -local function StyleButton(b, c) - local name = b:GetName() - - local button = _G[name] - local icon = _G[name.."Icon"] - local count = _G[name.."Count"] - local border = _G[name.."Border"] - local hotkey = _G[name.."HotKey"] - local cooldown = _G[name.."Cooldown"] - local nametext = _G[name.."Name"] - local flash = _G[name.."Flash"] - local normaltexture = _G[name.."NormalTexture"] - local icontexture = _G[name.."IconTexture"] - - local hover = b:CreateTexture("frame", nil, self) -- hover - hover:SetTexture(1,1,1,0.3) - hover:SetHeight(button:GetHeight()) - hover:SetWidth(button:GetWidth()) - hover:Point("TOPLEFT",button,2,-2) - hover:Point("BOTTOMRIGHT",button,-2,2) - button:SetHighlightTexture(hover) - - local pushed = b:CreateTexture("frame", nil, self) -- pushed - pushed:SetTexture(0.9,0.8,0.1,0.3) - pushed:SetHeight(button:GetHeight()) - pushed:SetWidth(button:GetWidth()) - pushed:Point("TOPLEFT",button,2,-2) - pushed:Point("BOTTOMRIGHT",button,-2,2) - button:SetPushedTexture(pushed) - - if c then - local checked = b:CreateTexture("frame", nil, self) -- checked - checked:SetTexture(0,1,0,0.3) - checked:SetHeight(button:GetHeight()) - checked:SetWidth(button:GetWidth()) - checked:Point("TOPLEFT",button,2,-2) - checked:Point("BOTTOMRIGHT",button,-2,2) - button:SetCheckedTexture(checked) - end -end - -local function FontString(parent, name, fontName, fontHeight, fontStyle) - local fs = parent:CreateFontString(nil, "OVERLAY") - fs:SetFont(fontName, fontHeight, fontStyle) - fs:SetJustifyH("LEFT") - fs:SetShadowColor(0, 0, 0) - fs:SetShadowOffset(mult, -mult) - - if not name then - parent.text = fs - else - parent[name] = fs - end - - return fs -end - -local function HighlightTarget(self, event, unit) - if self.unit == "target" then return end - if UnitIsUnit('target', self.unit) then - self.HighlightTarget:Show() - else - self.HighlightTarget:Hide() - end -end - -local function HighlightUnit(f, r, g, b) - if f.HighlightTarget then return end - local glowBorder = {edgeFile = C["media"].blank, edgeSize = 1} - f.HighlightTarget = CreateFrame("Frame", nil, f) - f.HighlightTarget:Point("TOPLEFT", f, "TOPLEFT", -2, 2) - f.HighlightTarget:Point("BOTTOMRIGHT", f, "BOTTOMRIGHT", 2, -2) - f.HighlightTarget:SetBackdrop(glowBorder) - f.HighlightTarget:SetFrameLevel(f:GetFrameLevel() + 1) - f.HighlightTarget:SetBackdropBorderColor(r,g,b,1) - f.HighlightTarget:Hide() - f:RegisterEvent("PLAYER_TARGET_CHANGED", HighlightTarget) -end - -local function StripTextures(object, kill) - for i=1, object:GetNumRegions() do - local region = select(i, object:GetRegions()) - if region:GetObjectType() == "Texture" then - if kill then - region:Kill() - else - region:SetTexture(nil) - end - end - end -end - ---------------------------------------------------- --- TUKUI API STOP HERE ---------------------------------------------------- - ---------------------------------------------------- --- MERGE TUKUI API WITH WOW API ---------------------------------------------------- - -local function addapi(object) - local mt = getmetatable(object).__index - if not object.Size then mt.Size = Size end - if not object.Point then mt.Point = Point end - if not object.SetTemplate then mt.SetTemplate = SetTemplate end - if not object.CreateBackdrop then mt.CreateBackdrop = CreateBackdrop end - if not object.StripTextures then mt.StripTextures = StripTextures end - if not object.CreatePanel then mt.CreatePanel = CreatePanel end - if not object.CreateShadow then mt.CreateShadow = CreateShadow end - if not object.Kill then mt.Kill = Kill end - if not object.StyleButton then mt.StyleButton = StyleButton end - if not object.Width then mt.Width = Width end - if not object.Height then mt.Height = Height end - if not object.FontString then mt.FontString = FontString end - if not object.HighlightUnit then mt.HighlightUnit = HighlightUnit end -end - -local handled = {["Frame"] = true} -local object = CreateFrame("Frame") -addapi(object) -addapi(object:CreateTexture()) -addapi(object:CreateFontString()) - -object = EnumerateFrames() -while object do - if not handled[object:GetObjectType()] then - addapi(object) - handled[object:GetObjectType()] = true - end - - object = EnumerateFrames(object) -end \ No newline at end of file diff --git a/Tukui/core/config.lua b/Tukui/core/config.lua deleted file mode 100644 index c3bab23..0000000 --- a/Tukui/core/config.lua +++ /dev/null @@ -1,43 +0,0 @@ ----------------------------------------------------------------------------- --- This Module loads new user settings if TukUI_ConfigUI is loaded ----------------------------------------------------------------------------- -local T, C, L = unpack(select(2, ...)) -- Import Functions/Constants, Config, Locales - -local myPlayerRealm = GetCVar("realmName") -local myPlayerName = UnitName("player") - -if not IsAddOnLoaded("Tukui_ConfigUI") then return end - -if not TukuiConfigAll then TukuiConfigAll = {} end -if (TukuiConfigAll[myPlayerRealm] == nil) then TukuiConfigAll[myPlayerRealm] = {} end -if (TukuiConfigAll[myPlayerRealm][myPlayerName] == nil) then TukuiConfigAll[myPlayerRealm][myPlayerName] = false end - -if TukuiConfigAll[myPlayerRealm][myPlayerName] == true and not TukuiConfigPrivate then return end -if TukuiConfigAll[myPlayerRealm][myPlayerName] == false and not TukuiConfigPublic then return end - -local setting -if TukuiConfigAll[myPlayerRealm][myPlayerName] == true then - setting = TukuiConfigPrivate -else - setting = TukuiConfigPublic -end - -for group,options in pairs(setting) do - if C[group] then - local count = 0 - for option,value in pairs(options) do - if C[group][option] ~= nil then - if C[group][option] == value then - setting[group][option] = nil - else - count = count+1 - C[group][option] = value - end - end - end - -- keeps TukuiConfig clean and small - if count == 0 then setting[group] = nil end - else - setting[group] = nil - end -end \ No newline at end of file diff --git a/Tukui/core/customconfig.lua b/Tukui/core/customconfig.lua deleted file mode 100644 index 33fd541..0000000 --- a/Tukui/core/customconfig.lua +++ /dev/null @@ -1,39 +0,0 @@ ----------------------------------------------------------------------------- --- This Module loads custom settings for edited package ----------------------------------------------------------------------------- - ---[[ - To add your own custom config into your edited version, - You need to create the addon Tukui_EditedDefaultConfig and add - your custom configuration into it. - - A guide (example) can be downloaded at: - http://www.tukui.org/downloads/Tukui_EditedDefaultConfig.zip - - Don't forget to add in the .toc, in your edited Tukui version: Tukui_CustomConfig - If no new option group, Add it to: ## OptionalDeps - If new option group, Add it to: ## RequiredDeps - - That's it! That's all! ---]] - -local T, C, L = unpack(select(2, ...)) - -if not TukuiEditedDefaultConfig then return end - -local settings = TukuiEditedDefaultConfig - --- add our new options and update default -for group, options in pairs(settings) do - -- create a new group of option if not found on Tukui - if not C[group] then - C[group] = {} - end - - -- set all the options - for option, value in pairs(options) do - if group ~= "media" then - C[group][option] = value - end - end -end \ No newline at end of file diff --git a/Tukui/core/deprecated.lua b/Tukui/core/deprecated.lua deleted file mode 100644 index c54af60..0000000 --- a/Tukui/core/deprecated.lua +++ /dev/null @@ -1,10 +0,0 @@ ---[[ - In computer software or authoring programs standards and documentation, - the term deprecation is applied to software features that are superseded - and should be avoided. Although deprecated features remain in the current - version, their use may raise warning messages recommending alternative practices, - and deprecation may indicate that the feature will be removed in the future. - Features are deprecatedrather than being removedin order to provide - backward compatibility and give programmers who have used the feature time to - bring their code into compliance with the new standard. ---]] \ No newline at end of file diff --git a/Tukui/core/fonts.lua b/Tukui/core/fonts.lua deleted file mode 100644 index 7a01e7e..0000000 --- a/Tukui/core/fonts.lua +++ /dev/null @@ -1,31 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -------------------------------------------------------------------------- --- adjust defualt fonts according to which client we are currently using. -------------------------------------------------------------------------- - -if T.client == "ruRU" then - C["media"].uffont = C["media"].ru_uffont - C["media"].font = C["media"].ru_font - C["media"].dmgfont = C["media"].ru_dmgfont -elseif T.client == "zhTW" then - C["media"].uffont = C["media"].tw_uffont - C["media"].font = C["media"].tw_font - C["media"].dmgfont = C["media"].tw_dmgfont -elseif T.client == "koKR" then - C["media"].uffont = C["media"].kr_uffont - C["media"].font = C["media"].kr_font - C["media"].dmgfont = C["media"].kr_dmgfont -elseif T.client == "frFR" then - C["media"].uffont = C["media"].fr_uffont - C["media"].font = C["media"].fr_font - C["media"].dmgfont = C["media"].fr_dmgfont -elseif T.client == "deDE" then - C["media"].uffont = C["media"].de_uffont - C["media"].font = C["media"].de_font - C["media"].dmgfont = C["media"].de_dmgfont -elseif T.client == "zhCN" then - C["media"].uffont = C["media"].cn_uffont - C["media"].font = C["media"].cn_font - C["media"].dmgfont = C["media"].cn_dmgfont -end \ No newline at end of file diff --git a/Tukui/core/functions.lua b/Tukui/core/functions.lua deleted file mode 100644 index 16b0168..0000000 --- a/Tukui/core/functions.lua +++ /dev/null @@ -1,1467 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - --- Define action bar default buttons size -T.buttonsize = T.Scale(C.actionbar.buttonsize) -T.buttonspacing = T.Scale(C.actionbar.buttonspacing) -T.petbuttonsize = T.Scale(C.actionbar.petbuttonsize) -T.petbuttonspacing = T.Scale(C.actionbar.buttonspacing) - --- return if we are currently playing on PTR. -T.IsPTRVersion = function() - if T.toc > 40200 then - return true - else - return false - end -end - --- just for creating text -T.SetFontString = function(parent, fontName, fontHeight, fontStyle) - local fs = parent:CreateFontString(nil, "OVERLAY") - fs:SetFont(fontName, fontHeight, fontStyle) - fs:SetJustifyH("LEFT") - fs:SetShadowColor(0, 0, 0) - fs:SetShadowOffset(1.25, -1.25) - return fs -end - --- datatext panel position -T.PP = function(p, obj) - local left = TukuiInfoLeft - local right = TukuiInfoRight - local mapleft = TukuiMinimapStatsLeft - local mapright = TukuiMinimapStatsRight - - if p == 1 then - obj:SetParent(left) - obj:SetHeight(left:GetHeight()) - obj:SetPoint("LEFT", left, 30, 0) - obj:SetPoint('TOP', left) - obj:SetPoint('BOTTOM', left) - elseif p == 2 then - obj:SetParent(left) - obj:SetHeight(left:GetHeight()) - obj:SetPoint('TOP', left) - obj:SetPoint('BOTTOM', left) - elseif p == 3 then - obj:SetParent(left) - obj:SetHeight(left:GetHeight()) - obj:SetPoint("RIGHT", left, -30, 0) - obj:SetPoint('TOP', left) - obj:SetPoint('BOTTOM', left) - elseif p == 4 then - obj:SetParent(right) - obj:SetHeight(right:GetHeight()) - obj:SetPoint("LEFT", right, 30, 0) - obj:SetPoint('TOP', right) - obj:SetPoint('BOTTOM', right) - elseif p == 5 then - obj:SetParent(right) - obj:SetHeight(right:GetHeight()) - obj:SetPoint('TOP', right) - obj:SetPoint('BOTTOM', right) - elseif p == 6 then - obj:SetParent(right) - obj:SetHeight(right:GetHeight()) - obj:SetPoint("RIGHT", right, -30, 0) - obj:SetPoint('TOP', right) - obj:SetPoint('BOTTOM', right) - end - - if TukuiMinimap then - if p == 7 then - obj:SetParent(mapleft) - obj:SetHeight(mapleft:GetHeight()) - obj:SetPoint('TOP', mapleft) - obj:SetPoint('BOTTOM', mapleft) - elseif p == 8 then - obj:SetParent(mapright) - obj:SetHeight(mapright:GetHeight()) - obj:SetPoint('TOP', mapright) - obj:SetPoint('BOTTOM', mapright) - end - end -end - --- set the position of the datatext tooltip -T.DataTextTooltipAnchor = function(self) - local panel = self:GetParent() - local anchor = "ANCHOR_TOP" - local xoff = 0 - local yoff = T.Scale(5) - - if panel == TukuiInfoLeft then - anchor = "ANCHOR_TOPLEFT" - elseif panel == TukuiInfoRight then - anchor = "ANCHOR_TOPRIGHT" - elseif panel == TukuiMinimapStatsLeft or panel == TukuiMinimapStatsRight then - local position = TukuiMinimap:GetPoint() - if position:match("LEFT") then - anchor = "ANCHOR_BOTTOMRIGHT" - yoff = T.Scale(-6) - xoff = 0 - TukuiMinimapStatsRight:GetWidth() - elseif position:match("RIGHT") then - anchor = "ANCHOR_BOTTOMLEFT" - yoff = T.Scale(-6) - xoff = TukuiMinimapStatsRight:GetWidth() - else - anchor = "ANCHOR_BOTTOM" - yoff = T.Scale(-6) - end - end - - return anchor, panel, xoff, yoff -end - --- used to update shift action bar buttons -T.TukuiShiftBarUpdate = function() - local numForms = GetNumShapeshiftForms() - local texture, name, isActive, isCastable - local button, icon, cooldown - local start, duration, enable - for i = 1, NUM_SHAPESHIFT_SLOTS do - button = _G["ShapeshiftButton"..i] - icon = _G["ShapeshiftButton"..i.."Icon"] - if i <= numForms then - texture, name, isActive, isCastable = GetShapeshiftFormInfo(i) - icon:SetTexture(texture) - - cooldown = _G["ShapeshiftButton"..i.."Cooldown"] - if texture then - cooldown:SetAlpha(1) - else - cooldown:SetAlpha(0) - end - - start, duration, enable = GetShapeshiftFormCooldown(i) - CooldownFrame_SetTimer(cooldown, start, duration, enable) - - if isActive then - ShapeshiftBarFrame.lastSelected = button:GetID() - button:SetChecked(1) - else - button:SetChecked(0) - end - - if isCastable then - icon:SetVertexColor(1.0, 1.0, 1.0) - else - icon:SetVertexColor(0.4, 0.4, 0.4) - end - end - end -end - --- used to update pet bar buttons -T.TukuiPetBarUpdate = function(self, event) - local petActionButton, petActionIcon, petAutoCastableTexture, petAutoCastShine - for i=1, NUM_PET_ACTION_SLOTS, 1 do - local buttonName = "PetActionButton" .. i - petActionButton = _G[buttonName] - petActionIcon = _G[buttonName.."Icon"] - petAutoCastableTexture = _G[buttonName.."AutoCastable"] - petAutoCastShine = _G[buttonName.."Shine"] - local name, subtext, texture, isToken, isActive, autoCastAllowed, autoCastEnabled = GetPetActionInfo(i) - - if not isToken then - petActionIcon:SetTexture(texture) - petActionButton.tooltipName = name - else - petActionIcon:SetTexture(_G[texture]) - petActionButton.tooltipName = _G[name] - end - - petActionButton.isToken = isToken - petActionButton.tooltipSubtext = subtext - - if isActive and name ~= "PET_ACTION_FOLLOW" then - petActionButton:SetChecked(1) - if IsPetAttackAction(i) then - PetActionButton_StartFlash(petActionButton) - end - else - petActionButton:SetChecked(0) - if IsPetAttackAction(i) then - PetActionButton_StopFlash(petActionButton) - end - end - - if autoCastAllowed then - petAutoCastableTexture:Show() - else - petAutoCastableTexture:Hide() - end - - if autoCastEnabled then - AutoCastShine_AutoCastStart(petAutoCastShine) - else - AutoCastShine_AutoCastStop(petAutoCastShine) - end - - -- grid display - if name then - if not C["actionbar"].showgrid then - petActionButton:SetAlpha(1) - end - else - if not C["actionbar"].showgrid then - petActionButton:SetAlpha(0) - end - end - - if texture then - if GetPetActionSlotUsable(i) then - SetDesaturation(petActionIcon, nil) - else - SetDesaturation(petActionIcon, 1) - end - petActionIcon:Show() - else - petActionIcon:Hide() - end - - -- between level 1 and 10 on cata, we don't have any control on Pet. (I lol'ed so hard) - -- Setting desaturation on button to true until you learn the control on class trainer. - -- you can at least control "follow" button. - if not PetHasActionBar() and texture and name ~= "PET_ACTION_FOLLOW" then - PetActionButton_StopFlash(petActionButton) - SetDesaturation(petActionIcon, 1) - petActionButton:SetChecked(0) - end - end -end - --- remove decimal from a number -T.Round = function(number, decimals) - if not decimals then decimals = 0 end - return (("%%.%df"):format(decimals)):format(number) -end - --- want hex color instead of RGB? -T.RGBToHex = function(r, g, b) - r = r <= 1 and r >= 0 and r or 0 - g = g <= 1 and g >= 0 and g or 0 - b = b <= 1 and b >= 0 and b or 0 - return string.format("|cff%02x%02x%02x", r*255, g*255, b*255) -end - ---Return short value of a number -T.ShortValue = function(v) - if v >= 1e6 then - return ("%.1fm"):format(v / 1e6):gsub("%.?0+([km])$", "%1") - elseif v >= 1e3 or v <= -1e3 then - return ("%.1fk"):format(v / 1e3):gsub("%.?0+([km])$", "%1") - else - return v - end -end - --- used to return role -T.CheckRole = function() - local role - local tree = GetPrimaryTalentTree() - if ((T.myclass == "PALADIN" and tree == 2) or (T.myclass == "WARRIOR" and tree == 3) or (T.myclass == "DEATHKNIGHT" and tree == 1)) or (T.myclass == "DRUID" and tree == 2 and GetBonusBarOffset() == 3) then - role = "Tank" - else - local playerint = select(2, UnitStat("player", 4)) - local playeragi = select(2, UnitStat("player", 2)) - local base, posBuff, negBuff = UnitAttackPower("player"); - local playerap = base + posBuff + negBuff; - - if (((playerap > playerint) or (playeragi > playerint)) and not (T.myclass == "SHAMAN" and tree ~= 1 and tree ~= 3) and not (UnitBuff("player", GetSpellInfo(24858)) or UnitBuff("player", GetSpellInfo(65139)))) or T.myclass == "ROGUE" or T.myclass == "HUNTER" or (T.myclass == "SHAMAN" and tree == 2) then - role = "Melee" - else - role = "Caster" - end - end - - return role -end - ---Add time before calling a function ---Usage T.Delay(seconds, functionToCall, ...) -local waitTable = {} -local waitFrame -T.Delay = function(delay, func, ...) - if(type(delay)~="number" or type(func)~="function") then - return false - end - if(waitFrame == nil) then - waitFrame = CreateFrame("Frame","WaitFrame", UIParent) - waitFrame:SetScript("onUpdate",function (self,elapse) - local count = #waitTable - local i = 1 - while(i<=count) do - local waitRecord = tremove(waitTable,i) - local d = tremove(waitRecord,1) - local f = tremove(waitRecord,1) - local p = tremove(waitRecord,1) - if(d>elapse) then - tinsert(waitTable,i,{d-elapse,f,p}) - i = i + 1 - else - count = count - 1 - f(unpack(p)) - end - end - end) - end - tinsert(waitTable,{delay,func,{...}}) - return true -end - ------------------------------------------------------------------------- --- Skinning ------------------------------------------------------------------------- - -T.SkinFuncs = {} -T.SkinFuncs["Tukui"] = {} - -function T.SetModifiedBackdrop(self) - local color = RAID_CLASS_COLORS[T.myclass] - self:SetBackdropColor(color.r*.15, color.g*.15, color.b*.15) - self:SetBackdropBorderColor(color.r, color.g, color.b) -end - -function T.SetOriginalBackdrop(self) - local color = RAID_CLASS_COLORS[T.myclass] - if C["general"].classcolortheme == true then - self:SetBackdropBorderColor(color.r, color.g, color.b) - else - self:SetTemplate("Default") - end -end - -function T.SkinButton(f, strip) - if f:GetName() then - local l = _G[f:GetName().."Left"] - local m = _G[f:GetName().."Middle"] - local r = _G[f:GetName().."Right"] - - - if l then l:SetAlpha(0) end - if m then m:SetAlpha(0) end - if r then r:SetAlpha(0) end - end - - if f.SetNormalTexture then f:SetNormalTexture("") end - - if f.SetHighlightTexture then f:SetHighlightTexture("") end - - if f.SetPushedTexture then f:SetPushedTexture("") end - - if f.SetDisabledTexture then f:SetDisabledTexture("") end - - if strip then f:StripTextures() end - - f:SetTemplate("Default") - f:HookScript("OnEnter", T.SetModifiedBackdrop) - f:HookScript("OnLeave", T.SetOriginalBackdrop) -end - -function T.SkinScrollBar(frame) - if _G[frame:GetName().."BG"] then _G[frame:GetName().."BG"]:SetTexture(nil) end - if _G[frame:GetName().."Track"] then _G[frame:GetName().."Track"]:SetTexture(nil) end - - if _G[frame:GetName().."Top"] then - _G[frame:GetName().."Top"]:SetTexture(nil) - end - - if _G[frame:GetName().."Bottom"] then - _G[frame:GetName().."Bottom"]:SetTexture(nil) - end - - if _G[frame:GetName().."Middle"] then - _G[frame:GetName().."Middle"]:SetTexture(nil) - end - - if _G[frame:GetName().."ScrollUpButton"] and _G[frame:GetName().."ScrollDownButton"] then - _G[frame:GetName().."ScrollUpButton"]:StripTextures() - _G[frame:GetName().."ScrollUpButton"]:SetTemplate("Default", true) - if not _G[frame:GetName().."ScrollUpButton"].texture then - _G[frame:GetName().."ScrollUpButton"].texture = _G[frame:GetName().."ScrollUpButton"]:CreateTexture(nil, 'OVERLAY') - _G[frame:GetName().."ScrollUpButton"].texture:Point("TOPLEFT", 2, -2) - _G[frame:GetName().."ScrollUpButton"].texture:Point("BOTTOMRIGHT", -2, 2) - _G[frame:GetName().."ScrollUpButton"].texture:SetTexture([[Interface\AddOns\Tukui\medias\textures\arrowup.tga]]) - _G[frame:GetName().."ScrollUpButton"].texture:SetVertexColor(unpack(C["media"].bordercolor)) - end - - _G[frame:GetName().."ScrollDownButton"]:StripTextures() - _G[frame:GetName().."ScrollDownButton"]:SetTemplate("Default", true) - - if not _G[frame:GetName().."ScrollDownButton"].texture then - _G[frame:GetName().."ScrollDownButton"].texture = _G[frame:GetName().."ScrollDownButton"]:CreateTexture(nil, 'OVERLAY') - _G[frame:GetName().."ScrollDownButton"].texture:Point("TOPLEFT", 2, -2) - _G[frame:GetName().."ScrollDownButton"].texture:Point("BOTTOMRIGHT", -2, 2) - _G[frame:GetName().."ScrollDownButton"].texture:SetTexture([[Interface\AddOns\Tukui\medias\textures\arrowdown.tga]]) - _G[frame:GetName().."ScrollDownButton"].texture:SetVertexColor(unpack(C["media"].bordercolor)) - end - - if not frame.trackbg then - frame.trackbg = CreateFrame("Frame", nil, frame) - frame.trackbg:Point("TOPLEFT", _G[frame:GetName().."ScrollUpButton"], "BOTTOMLEFT", 0, -1) - frame.trackbg:Point("BOTTOMRIGHT", _G[frame:GetName().."ScrollDownButton"], "TOPRIGHT", 0, 1) - frame.trackbg:SetTemplate("Transparent") - end - - if frame:GetThumbTexture() then - if not thumbTrim then thumbTrim = 3 end - frame:GetThumbTexture():SetTexture(nil) - if not frame.thumbbg then - frame.thumbbg = CreateFrame("Frame", nil, frame) - frame.thumbbg:Point("TOPLEFT", frame:GetThumbTexture(), "TOPLEFT", 2, -thumbTrim) - frame.thumbbg:Point("BOTTOMRIGHT", frame:GetThumbTexture(), "BOTTOMRIGHT", -2, thumbTrim) - frame.thumbbg:SetTemplate("Default", true) - if frame.trackbg then - frame.thumbbg:SetFrameLevel(frame.trackbg:GetFrameLevel()) - end - end - end - end -end - ---Tab Regions -local tabs = { - "LeftDisabled", - "MiddleDisabled", - "RightDisabled", - "Left", - "Middle", - "Right", -} - -function T.SkinTab(tab) - if not tab then return end - for _, object in pairs(tabs) do - local tex = _G[tab:GetName()..object] - if tex then - tex:SetTexture(nil) - end - end - - if tab.GetHighlightTexture and tab:GetHighlightTexture() then - tab:GetHighlightTexture():SetTexture(nil) - else - tab:StripTextures() - end - - tab.backdrop = CreateFrame("Frame", nil, tab) - tab.backdrop:SetTemplate("Default") - tab.backdrop:SetFrameLevel(tab:GetFrameLevel() - 1) - tab.backdrop:Point("TOPLEFT", 10, -3) - tab.backdrop:Point("BOTTOMRIGHT", -10, 3) -end - -function T.SkinNextPrevButton(btn, horizonal) - btn:SetTemplate("Default") - btn:Size(btn:GetWidth() - 7, btn:GetHeight() - 7) - - if horizonal then - btn:GetNormalTexture():SetTexCoord(0.3, 0.29, 0.3, 0.72, 0.65, 0.29, 0.65, 0.72) - btn:GetPushedTexture():SetTexCoord(0.3, 0.35, 0.3, 0.8, 0.65, 0.35, 0.65, 0.8) - btn:GetDisabledTexture():SetTexCoord(0.3, 0.29, 0.3, 0.75, 0.65, 0.29, 0.65, 0.75) - else - btn:GetNormalTexture():SetTexCoord(0.3, 0.29, 0.3, 0.81, 0.65, 0.29, 0.65, 0.81) - if btn:GetPushedTexture() then - btn:GetPushedTexture():SetTexCoord(0.3, 0.35, 0.3, 0.81, 0.65, 0.35, 0.65, 0.81) - end - if btn:GetDisabledTexture() then - btn:GetDisabledTexture():SetTexCoord(0.3, 0.29, 0.3, 0.75, 0.65, 0.29, 0.65, 0.75) - end - end - - btn:GetNormalTexture():ClearAllPoints() - btn:GetNormalTexture():Point("TOPLEFT", 2, -2) - btn:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - if btn:GetDisabledTexture() then - btn:GetDisabledTexture():SetAllPoints(btn:GetNormalTexture()) - end - if btn:GetPushedTexture() then - btn:GetPushedTexture():SetAllPoints(btn:GetNormalTexture()) - end - btn:GetHighlightTexture():SetTexture(1, 1, 1, 0.3) - btn:GetHighlightTexture():SetAllPoints(btn:GetNormalTexture()) -end - -function T.SkinRotateButton(btn) - btn:SetTemplate("Default") - btn:Size(btn:GetWidth() - 14, btn:GetHeight() - 14) - - btn:GetNormalTexture():SetTexCoord(0.3, 0.29, 0.3, 0.65, 0.69, 0.29, 0.69, 0.65) - btn:GetPushedTexture():SetTexCoord(0.3, 0.29, 0.3, 0.65, 0.69, 0.29, 0.69, 0.65) - - btn:GetHighlightTexture():SetTexture(1, 1, 1, 0.3) - - btn:GetNormalTexture():ClearAllPoints() - btn:GetNormalTexture():Point("TOPLEFT", 2, -2) - btn:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - btn:GetPushedTexture():SetAllPoints(btn:GetNormalTexture()) - btn:GetHighlightTexture():SetAllPoints(btn:GetNormalTexture()) -end - -function T.SkinEditBox(frame) - if _G[frame:GetName().."Left"] then _G[frame:GetName().."Left"]:Kill() end - if _G[frame:GetName().."Middle"] then _G[frame:GetName().."Middle"]:Kill() end - if _G[frame:GetName().."Right"] then _G[frame:GetName().."Right"]:Kill() end - if _G[frame:GetName().."Mid"] then _G[frame:GetName().."Mid"]:Kill() end - frame:CreateBackdrop("Default") - - if frame:GetName() and frame:GetName():find("Silver") or frame:GetName():find("Copper") then - frame.backdrop:Point("BOTTOMRIGHT", -12, -2) - end -end - -function T.SkinDropDownBox(frame, width) - local button = _G[frame:GetName().."Button"] - if not width then width = 155 end - - frame:StripTextures() - frame:Width(width) - - _G[frame:GetName().."Text"]:ClearAllPoints() - _G[frame:GetName().."Text"]:Point("RIGHT", button, "LEFT", -2, 0) - - - button:ClearAllPoints() - button:Point("RIGHT", frame, "RIGHT", -10, 3) - button.SetPoint = T.dummy - - T.SkinNextPrevButton(button, true) - - frame:CreateBackdrop("Default") - frame.backdrop:Point("TOPLEFT", 20, -2) - frame.backdrop:Point("BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) -end - -function T.SkinCheckBox(frame) - frame:StripTextures() - frame:CreateBackdrop("Default") - frame.backdrop:Point("TOPLEFT", 4, -4) - frame.backdrop:Point("BOTTOMRIGHT", -4, 4) - - if frame.SetCheckedTexture then - frame:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check") - end - - if frame.SetDisabledTexture then - frame:SetDisabledTexture("Interface\\Buttons\\UI-CheckBox-Check-Disabled") - end - - frame.SetNormalTexture = T.dummy - frame.SetPushedTexture = T.dummy - frame.SetHighlightTexture = T.dummy -end - -function T.SkinCloseButton(f, point) - if point then - f:Point("TOPRIGHT", point, "TOPRIGHT", 2, 2) - end - - f:SetNormalTexture("") - f:SetPushedTexture("") - f:SetHighlightTexture("") - f.t = f:CreateFontString(nil, "OVERLAY") - f.t:SetFont(C.media.pixelfont, 12, "MONOCHROME") - f.t:SetPoint("CENTER", 0, 1) - f.t:SetText("X") -end - -local LoadBlizzardSkin = CreateFrame("Frame") -LoadBlizzardSkin:RegisterEvent("ADDON_LOADED") -LoadBlizzardSkin:SetScript("OnEvent", function(self, event, addon) - if IsAddOnLoaded("Skinner") or IsAddOnLoaded("Aurora") or not C.general.blizzardreskin then - self:UnregisterEvent("ADDON_LOADED") - return - end - - for _addon, skinfunc in pairs(T.SkinFuncs) do - if type(skinfunc) == "function" then - if _addon == addon then - if skinfunc then - skinfunc() - end - end - elseif type(skinfunc) == "table" then - if _addon == addon then - for _, skinfunc in pairs(T.SkinFuncs[_addon]) do - if skinfunc then - skinfunc() - end - end - end - end - end -end) - ------------------------------------------------------------------------- --- unitframes Functions ------------------------------------------------------------------------- - --- tell oUF Framework that we use our own oUF version (ns.oUF, also know as X-oUF in /Tukui/Tukui.toc) -local ADDON_NAME, ns = ... -local oUF = ns.oUF -assert(oUF, "Tukui was unable to locate oUF install.") - --- a function to update all unit frames -T.updateAllElements = function(frame) - for _, v in ipairs(frame.__elements) do - v(frame, "UpdateElement", frame.unit) - end -end - --- Create an animation (like seen on text unitframe when low mana) -local SetUpAnimGroup = function(self) - self.anim = self:CreateAnimationGroup("Flash") - self.anim.fadein = self.anim:CreateAnimation("ALPHA", "FadeIn") - self.anim.fadein:SetChange(1) - self.anim.fadein:SetOrder(2) - - self.anim.fadeout = self.anim:CreateAnimation("ALPHA", "FadeOut") - self.anim.fadeout:SetChange(-1) - self.anim.fadeout:SetOrder(1) -end - --- Start the flash anim -local Flash = function(self, duration) - if not self.anim then - SetUpAnimGroup(self) - end - - self.anim.fadein:SetDuration(duration) - self.anim.fadeout:SetDuration(duration) - self.anim:Play() -end - --- Stop the flash anim -local StopFlash = function(self) - if self.anim then - self.anim:Finish() - end -end - --- Spawn the right-click dropdown on unitframe -T.SpawnMenu = function(self) - local unit = self.unit:gsub("(.)", string.upper, 1) - if unit == "Targettarget" or unit == "focustarget" or unit == "pettarget" then return end - - if _G[unit.."FrameDropDown"] then - ToggleDropDownMenu(1, nil, _G[unit.."FrameDropDown"], "cursor") - elseif (self.unit:match("party")) then - ToggleDropDownMenu(1, nil, _G["PartyMemberFrame"..self.id.."DropDown"], "cursor") - else - FriendsDropDown.unit = self.unit - FriendsDropDown.id = self.id - FriendsDropDown.initialize = RaidFrameDropDown_Initialize - ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor") - end -end - --- called in some function to return a short value. (example: 120 000 return 120k) -local ShortValue = function(v) - if v <= 999 then return v end - if v >= 1000000 then - local value = string.format("%.1fm", v/1000000) - return value - elseif v >= 1000 then - local value = string.format("%.1fk", v/1000) - return value - end -end - --- function to update health text -T.PostUpdateHealth = function(health, unit, min, max) - if not UnitIsConnected(unit) or UnitIsDead(unit) or UnitIsGhost(unit) then - if not UnitIsConnected(unit) then - health.value:SetText("|cffD7BEA5"..L.unitframes_ouf_offline.."|r") - elseif UnitIsDead(unit) then - health.value:SetText("|cffD7BEA5"..L.unitframes_ouf_dead.."|r") - elseif UnitIsGhost(unit) then - health.value:SetText("|cffD7BEA5"..L.unitframes_ouf_ghost.."|r") - end - else - local r, g, b - - -- overwrite healthbar color for enemy player (a tukui option if enabled), target vehicle/pet too far away returning unitreaction nil and friend unit not a player. (mostly for overwrite tapped for friendly) - -- I don't know if we really need to call C["unitframes"].unicolor but anyway, it's safe this way. - if (C["unitframes"].unicolor ~= true and C["unitframes"].enemyhcolor and unit == "target" and UnitIsEnemy(unit, "player") and UnitIsPlayer(unit)) or (C["unitframes"].unicolor ~= true and unit == "target" and not UnitIsPlayer(unit) and UnitIsFriend(unit, "player")) then - local c = T.UnitColor.reaction[UnitReaction(unit, "player")] - if c then - r, g, b = c[1], c[2], c[3] - health:SetStatusBarColor(r, g, b) - else - -- if "c" return nil it's because it's a vehicle or pet unit too far away, we force friendly color - -- this should fix color not updating for vehicle/pet too far away from yourself. - r, g, b = 75/255, 175/255, 76/255 - health:SetStatusBarColor(r, g, b) - end - end - - if min ~= max then - local r, g, b - r, g, b = oUF.ColorGradient(min/max, 0.69, 0.31, 0.31, 0.65, 0.63, 0.35, 0.33, 0.59, 0.33) - if unit == "player" and health:GetAttribute("normalUnit") ~= "pet" then - if C["unitframes"].showtotalhpmp == true then - health.value:SetFormattedText("|cff559655%s|r |cffD7BEA5|||r |cff559655%s|r", ShortValue(min), ShortValue(max)) - else - health.value:SetFormattedText("|cffAF5050%d|r |cffD7BEA5-|r |cff%02x%02x%02x%d%%|r", min, r * 255, g * 255, b * 255, floor(min / max * 100)) - end - elseif unit == "target" or (unit and unit:find("boss%d")) then - if C["unitframes"].showtotalhpmp == true then - health.value:SetFormattedText("|cff559655%s|r |cffD7BEA5|||r |cff559655%s|r", ShortValue(min), ShortValue(max)) - else - health.value:SetFormattedText("|cffAF5050%s|r |cffD7BEA5-|r |cff%02x%02x%02x%d%%|r", ShortValue(min), r * 255, g * 255, b * 255, floor(min / max * 100)) - end - elseif (unit and unit:find("arena%d")) or unit == "focus" or unit == "focustarget" then - health.value:SetText("|cff559655"..ShortValue(min).."|r") - else - health.value:SetText("|cff559655-"..ShortValue(max-min).."|r") - end - else - if unit == "player" and health:GetAttribute("normalUnit") ~= "pet" then - health.value:SetText("|cff559655"..max.."|r") - elseif unit == "target" or unit == "focus" or unit == "focustarget" or (unit and unit:find("arena%d")) then - health.value:SetText("|cff559655"..ShortValue(max).."|r") - else - health.value:SetText(" ") - end - end - end -end - --- function to update health text for party/raid -T.PostUpdateHealthRaid = function(health, unit, min, max) - if not UnitIsConnected(unit) or UnitIsDead(unit) or UnitIsGhost(unit) then - if not UnitIsConnected(unit) then - health.value:SetText("|cffD7BEA5"..L.unitframes_ouf_offline.."|r") - elseif UnitIsDead(unit) then - health.value:SetText("|cffD7BEA5"..L.unitframes_ouf_dead.."|r") - elseif UnitIsGhost(unit) then - health.value:SetText("|cffD7BEA5"..L.unitframes_ouf_ghost.."|r") - end - else - -- doing this here to force friendly unit (vehicle or pet) very far away from you to update color correcly - -- because if vehicle or pet is too far away, unitreaction return nil and color of health bar is white. - if not UnitIsPlayer(unit) and UnitIsFriend(unit, "player") and C["unitframes"].unicolor ~= true then - local c = T.UnitColor.reaction[5] - local r, g, b = c[1], c[2], c[3] - health:SetStatusBarColor(r, g, b) - health.bg:SetTexture(.1, .1, .1) - end - - if min ~= max then - health.value:SetText("|cff559655-"..ShortValue(max-min).."|r") - else - health.value:SetText(" ") - end - end -end - --- function to make sure pet unit health is always colored. -T.PostUpdatePetColor = function(health, unit, min, max) - -- doing this here to force friendly unit (vehicle or pet) very far away from you to update color correcly - -- because if vehicle or pet is too far away, unitreaction return nil and color of health bar is white. - if not UnitIsPlayer(unit) and UnitIsFriend(unit, "player") and C["unitframes"].unicolor ~= true then - local c = T.UnitColor.reaction[5] - local r, g, b = c[1], c[2], c[3] - - if health then health:SetStatusBarColor(r, g, b) end - if health.bg then health.bg:SetTexture(.1, .1, .1) end - end -end - --- a function to move name of current target unit if enemy or friendly -T.PostNamePosition = function(self) - self.Name:ClearAllPoints() - if (self.Power.value:GetText() and UnitIsEnemy("player", "target") and C["unitframes"].targetpowerpvponly == true) or (self.Power.value:GetText() and C["unitframes"].targetpowerpvponly == false) then - self.Name:SetPoint("CENTER", self.panel, "CENTER", 0, 0) - else - self.Power.value:SetAlpha(0) - self.Name:SetPoint("LEFT", self.panel, "LEFT", 4, 0) - end -end - --- color the power bar according to class / vehicle / etc. -T.PreUpdatePower = function(power, unit) - local pType = select(2, UnitPowerType(unit)) - - local color = T.UnitColor.power[pType] - if color then - power:SetStatusBarColor(color[1], color[2], color[3]) - end -end - --- function to update power text on unit frames -T.PostUpdatePower = function(power, unit, min, max) - local self = power:GetParent() - local pType, pToken = UnitPowerType(unit) - local color = T.UnitColor.power[pToken] - - if color then - power.value:SetTextColor(color[1], color[2], color[3]) - end - - if not UnitIsPlayer(unit) and not UnitPlayerControlled(unit) or not UnitIsConnected(unit) then - power.value:SetText() - elseif UnitIsDead(unit) or UnitIsGhost(unit) then - power.value:SetText() - else - if min ~= max then - if pType == 0 then - if unit == "target" then - if C["unitframes"].showtotalhpmp == true then - power.value:SetFormattedText("%s |cffD7BEA5|||r %s", ShortValue(max - (max - min)), ShortValue(max)) - else - power.value:SetFormattedText("%d%% |cffD7BEA5-|r %s", floor(min / max * 100), ShortValue(max - (max - min))) - end - elseif unit == "player" and self:GetAttribute("normalUnit") == "pet" or unit == "pet" then - if C["unitframes"].showtotalhpmp == true then - power.value:SetFormattedText("%s |cffD7BEA5|||r %s", ShortValue(max - (max - min)), ShortValue(max)) - else - power.value:SetFormattedText("%d%%", floor(min / max * 100)) - end - elseif (unit and unit:find("arena%d")) or unit == "focus" or unit == "focustarget" then - power.value:SetText(ShortValue(min)) - else - if C["unitframes"].showtotalhpmp == true then - power.value:SetFormattedText("%s |cffD7BEA5|||r %s", ShortValue(max - (max - min)), ShortValue(max)) - else - power.value:SetFormattedText("%d%% |cffD7BEA5-|r %d", floor(min / max * 100), max - (max - min)) - end - end - else - power.value:SetText(max - (max - min)) - end - else - if unit == "pet" or unit == "target" or unit == "focus" or unit == "focustarget" or (unit and unit:find("arena%d")) then - power.value:SetText(ShortValue(min)) - else - power.value:SetText(min) - end - end - end - if self.Name then - if unit == "target" then T.PostNamePosition(self, power) end - end -end - --- display casting time -T.CustomCastTimeText = function(self, duration) - self.Time:SetText(("%.1f / %.1f"):format(self.channeling and duration or self.max - duration, self.max)) -end - --- display delay in casting time -T.CustomCastDelayText = function(self, duration) - self.Time:SetText(("%.1f |cffaf5050%s %.1f|r"):format(self.channeling and duration or self.max - duration, self.channeling and "- " or "+", self.delay)) -end - --- display seconds to min/hour/day -T.FormatTime = function(s) - local day, hour, minute = 86400, 3600, 60 - if s >= day then - return format("%dd", ceil(s / day)) - elseif s >= hour then - return format("%dh", ceil(s / hour)) - elseif s >= minute then - return format("%dm", ceil(s / minute)) - elseif s >= minute / 12 then - return floor(s) - end - return format("%.1f", s) -end - --- create a timer on a buff or debuff -local CreateAuraTimer = function(self, elapsed) - if self.timeLeft then - self.elapsed = (self.elapsed or 0) + elapsed - if self.elapsed >= 0.1 then - if not self.first then - self.timeLeft = self.timeLeft - self.elapsed - else - self.timeLeft = self.timeLeft - GetTime() - self.first = false - end - if self.timeLeft > 0 then - local time = T.FormatTime(self.timeLeft) - self.remaining:SetText(time) - if self.timeLeft <= 5 then - self.remaining:SetTextColor(0.99, 0.31, 0.31) - else - self.remaining:SetTextColor(1, 1, 1) - end - else - self.remaining:Hide() - self:SetScript("OnUpdate", nil) - end - self.elapsed = 0 - end - end -end - --- create a skin for all unitframes buffs/debuffs -T.PostCreateAura = function(element, button) - button:SetTemplate("Default") - - button.remaining = T.SetFontString(button, C["media"].font, C["unitframes"].auratextscale, "THINOUTLINE") - button.remaining:Point("CENTER", 1, 0) - - button.cd.noOCC = true -- hide OmniCC CDs, because we create our own cd with CreateAuraTimer() - button.cd.noCooldownCount = true -- hide CDC CDs, because we create our own cd with CreateAuraTimer() - - button.cd:SetReverse() - button.icon:Point("TOPLEFT", 2, -2) - button.icon:Point("BOTTOMRIGHT", -2, 2) - button.icon:SetTexCoord(0.08, 0.92, 0.08, 0.92) - button.icon:SetDrawLayer('ARTWORK') - - button.count:Point("BOTTOMRIGHT", 3, 3) - button.count:SetJustifyH("RIGHT") - button.count:SetFont(C["media"].font, 9, "THICKOUTLINE") - button.count:SetTextColor(0.84, 0.75, 0.65) - - button.overlayFrame = CreateFrame("frame", nil, button, nil) - button.cd:SetFrameLevel(button:GetFrameLevel() + 1) - button.cd:ClearAllPoints() - button.cd:Point("TOPLEFT", button, "TOPLEFT", 2, -2) - button.cd:Point("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2) - button.overlayFrame:SetFrameLevel(button.cd:GetFrameLevel() + 1) - button.overlay:SetParent(button.overlayFrame) - button.count:SetParent(button.overlayFrame) - button.remaining:SetParent(button.overlayFrame) - - button.Glow = CreateFrame("Frame", nil, button) - button.Glow:Point("TOPLEFT", button, "TOPLEFT", -3, 3) - button.Glow:Point("BOTTOMRIGHT", button, "BOTTOMRIGHT", 3, -3) - button.Glow:SetFrameStrata("BACKGROUND") - button.Glow:SetBackdrop{edgeFile = C["media"].glowTex, edgeSize = 3, insets = {left = 0, right = 0, top = 0, bottom = 0}} - button.Glow:SetBackdropColor(0, 0, 0, 0) - button.Glow:SetBackdropBorderColor(0, 0, 0) -end - --- update cd, border color, etc on buffs / debuffs -T.PostUpdateAura = function(icons, unit, icon, index, offset, filter, isDebuff, duration, timeLeft) - local _, _, _, _, dtype, duration, expirationTime, unitCaster, _ = UnitAura(unit, index, icon.filter) - - if(icon.debuff) then - if(not UnitIsFriend("player", unit) and icon.owner ~= "player" and icon.owner ~= "vehicle") then - icon:SetBackdropBorderColor(unpack(C["media"].bordercolor)) - icon.icon:SetDesaturated(true) - else - local color = DebuffTypeColor[dtype] or DebuffTypeColor.none - icon:SetBackdropBorderColor(color.r * 0.6, color.g * 0.6, color.b * 0.6) - icon.icon:SetDesaturated(false) - end - else - if (isStealable or ((T.myclass == "MAGE" or T.myclass == "PRIEST" or T.myclass == "SHAMAN") and dtype == "Magic")) and not UnitIsFriend("player", unit) then - icon:SetBackdropBorderColor(1, 0.85, 0, 1) - else - icon:SetBackdropBorderColor(unpack(C.media.bordercolor)) - end - end - - if duration and duration > 0 then - if C["unitframes"].auratimer == true then - icon.remaining:Show() - else - icon.remaining:Hide() - end - else - icon.remaining:Hide() - end - - icon.duration = duration - icon.timeLeft = expirationTime - icon.first = true - icon:SetScript("OnUpdate", CreateAuraTimer) -end - --- hide the portrait if out of range, not connected, etc -T.HidePortrait = function(self, unit) - if self.unit == "target" then - if not UnitExists(self.unit) or not UnitIsConnected(self.unit) or not UnitIsVisible(self.unit) then - self.Portrait:SetAlpha(0) - else - self.Portrait:SetAlpha(1) - end - end -end - --- This is mostly just a fix for worgen male portrait because of a bug found in default Blizzard UI. -T.PortraitUpdate = function(self, unit) - --Fucking Furries - if self:GetModel() and self:GetModel().find and self:GetModel():find("worgenmale") then - self:SetCamera(1) - end -end - --- used to check if a spell is interruptable -local CheckInterrupt = function(self, unit) - if unit == "vehicle" then unit = "player" end - - if self.interrupt and UnitCanAttack("player", unit) then - self:SetStatusBarColor(1, 0, 0, 0.5) - else - self:SetStatusBarColor(0.31, 0.45, 0.63, 0.5) - end -end - --- check if we can interrupt on cast -T.CheckCast = function(self, unit, name, rank, castid) - CheckInterrupt(self, unit) -end - --- check if we can interrupt on channel cast -T.CheckChannel = function(self, unit, name, rank) - CheckInterrupt(self, unit) -end - --- update the warlock shard -T.UpdateShards = function(self, event, unit, powerType) - if(self.unit ~= unit or (powerType and powerType ~= 'SOUL_SHARDS')) then return end - local num = UnitPower(unit, SPELL_POWER_SOUL_SHARDS) - for i = 1, SHARD_BAR_NUM_SHARDS do - if(i <= num) then - self.SoulShards[i]:SetAlpha(1) - else - self.SoulShards[i]:SetAlpha(.2) - end - end -end - --- phasing detection on party/raid -T.Phasing = function(self, event) - local inPhase = UnitInPhase(self.unit) - local picon = self.PhaseIcon - - if not UnitIsPlayer(self.unit) then picon:Hide() return end - - -- TO BE COMPLETED -end - --- update holy charge display on paladin -T.UpdateHoly = function(self, event, unit, powerType) - if(self.unit ~= unit or (powerType and powerType ~= 'HOLY_POWER')) then return end - local num = UnitPower(unit, SPELL_POWER_HOLY_POWER) - for i = 1, MAX_HOLY_POWER do - if(i <= num) then - self.HolyPower[i]:SetAlpha(1) - else - self.HolyPower[i]:SetAlpha(.2) - end - end -end - --- druid eclipse bar direction :P -T.EclipseDirection = function(self) - if ( GetEclipseDirection() == "sun" ) then - self.Text:SetText("|cffE5994C"..L.unitframes_ouf_starfirespell.."|r") - elseif ( GetEclipseDirection() == "moon" ) then - self.Text:SetText("|cff4478BC"..L.unitframes_ouf_wrathspell.."|r") - else - self.Text:SetText("") - end -end - --- show the druid bar mana or eclipse if form is moonkin/cat/bear. -T.DruidBarDisplay = function(self, login) - local eb = self.EclipseBar - local dm = self.DruidMana - local txt = self.EclipseBar.Text - local shadow = self.shadow - local bg = self.DruidManaBackground - local flash = self.FlashInfo - - if login then - dm:SetScript("OnUpdate", nil) - end - - if eb:IsShown() or dm:IsShown() then - if eb:IsShown() then - txt:Show() - flash:Hide() - end - shadow:Point("TOPLEFT", -4, 12) - bg:SetAlpha(1) - else - txt:Hide() - flash:Show() - shadow:Point("TOPLEFT", -4, 4) - bg:SetAlpha(0) - end -end - --- master looter icon -T.MLAnchorUpdate = function (self) - if self.Leader:IsShown() then - self.MasterLooter:SetPoint("TOPLEFT", 14, 8) - else - self.MasterLooter:SetPoint("TOPLEFT", 2, 8) - end -end - --- update repuration bar color -T.UpdateReputationColor = function(self, event, unit, bar) - local name, id = GetWatchedFactionInfo() - bar:SetStatusBarColor(FACTION_BAR_COLORS[id].r, FACTION_BAR_COLORS[id].g, FACTION_BAR_COLORS[id].b) -end - --- when called, it update the name of unit -T.UpdateName = function(self,event) - if self.Name then self.Name:UpdateTag(self.unit) end -end - --- display warning when low mana -local UpdateManaLevelDelay = 0 -T.UpdateManaLevel = function(self, elapsed) - UpdateManaLevelDelay = UpdateManaLevelDelay + elapsed - if self.parent.unit ~= "player" or UpdateManaLevelDelay < 0.2 or UnitIsDeadOrGhost("player") or UnitPowerType("player") ~= 0 then return end - UpdateManaLevelDelay = 0 - - local percMana = UnitMana("player") / UnitManaMax("player") * 100 - - if percMana <= C.unitframes.lowThreshold then - self.ManaLevel:SetText("|cffaf5050"..L.unitframes_ouf_lowmana.."|r") - Flash(self, 0.3) - else - self.ManaLevel:SetText() - StopFlash(self) - end -end - --- show or hide druid mana text if cat/bear form or not. -T.UpdateDruidManaText = function(self) - if self.unit ~= "player" then return end - - local num, str = UnitPowerType("player") - if num ~= 0 then - local min = UnitPower("player", 0) - local max = UnitPowerMax("player", 0) - - local percMana = min / max * 100 - if percMana <= C["unitframes"].lowThreshold then - self.FlashInfo.ManaLevel:SetText("|cffaf5050"..L.unitframes_ouf_lowmana.."|r") - Flash(self.FlashInfo, 0.3) - else - self.FlashInfo.ManaLevel:SetText() - StopFlash(self.FlashInfo) - end - - if min ~= max then - if self.Power.value:GetText() then - self.DruidManaText:SetPoint("LEFT", self.Power.value, "RIGHT", 1, 0) - self.DruidManaText:SetFormattedText("|cffD7BEA5-|r |cff4693FF%d%%|r|r", floor(min / max * 100)) - else - self.DruidManaText:SetPoint("LEFT", self.panel, "LEFT", 4, 1) - self.DruidManaText:SetFormattedText("%d%%", floor(min / max * 100)) - end - else - self.DruidManaText:SetText() - end - - self.DruidManaText:SetAlpha(1) - else - self.DruidManaText:SetAlpha(0) - end -end - --- red color the border of text panel or name on unitframes if unit have aggro -T.UpdateThreat = function(self, event, unit) - if (self.unit ~= unit) or (unit == "target" or unit == "pet" or unit == "focus" or unit == "focustarget" or unit == "targettarget") then return end - local threat = UnitThreatSituation(self.unit) - if (threat == 3) then - if self.panel then - self.panel:SetBackdropBorderColor(.69,.31,.31,1) - else - self.Name:SetTextColor(1,0.1,0.1) - end - else - if self.panel then - local r, g, b = unpack(C["media"].bordercolor) - self.panel:SetBackdropBorderColor(r * 0.7, g * 0.7, b * 0.7) - else - self.Name:SetTextColor(1,1,1) - end - end -end - --------------------------------------------------------------------------------------------- --- Grid theme indicator section --------------------------------------------------------------------------------------------- - --- position of indicators -T.countOffsets = { - TOPLEFT = {6*C["unitframes"].gridscale, 1}, - TOPRIGHT = {-6*C["unitframes"].gridscale, 1}, - BOTTOMLEFT = {6*C["unitframes"].gridscale, 1}, - BOTTOMRIGHT = {-6*C["unitframes"].gridscale, 1}, - LEFT = {6*C["unitframes"].gridscale, 1}, - RIGHT = {-6*C["unitframes"].gridscale, 1}, - TOP = {0, 0}, - BOTTOM = {0, 0}, -} - --- skin the icon -T.CreateAuraWatchIcon = function(self, icon) - icon:SetTemplate("Default") - icon.icon:Point("TOPLEFT", 1, -1) - icon.icon:Point("BOTTOMRIGHT", -1, 1) - icon.icon:SetTexCoord(.08, .92, .08, .92) - icon.icon:SetDrawLayer("ARTWORK") - if (icon.cd) then - icon.cd:SetReverse() - end - icon.overlay:SetTexture() -end - --- create the icon -T.createAuraWatch = function(self, unit) - local auras = CreateFrame("Frame", nil, self) - auras:SetPoint("TOPLEFT", self.Health, 2, -2) - auras:SetPoint("BOTTOMRIGHT", self.Health, -2, 2) - auras.presentAlpha = 1 - auras.missingAlpha = 0 - auras.icons = {} - auras.PostCreateIcon = T.CreateAuraWatchIcon - - if (not C["unitframes"].auratimer) then - auras.hideCooldown = true - end - - local buffs = {} - - if (T.buffids["ALL"]) then - for key, value in pairs(T.buffids["ALL"]) do - tinsert(buffs, value) - end - end - - if (T.buffids[T.myclass]) then - for key, value in pairs(T.buffids[T.myclass]) do - tinsert(buffs, value) - end - end - - -- "Cornerbuffs" - if (buffs) then - for key, spell in pairs(buffs) do - local icon = CreateFrame("Frame", nil, auras) - icon.spellID = spell[1] - icon.anyUnit = spell[4] - icon:Width(6*C["unitframes"].gridscale) - icon:Height(6*C["unitframes"].gridscale) - icon:SetPoint(spell[2], 0, 0) - - local tex = icon:CreateTexture(nil, "OVERLAY") - tex:SetAllPoints(icon) - tex:SetTexture(C.media.blank) - if (spell[3]) then - tex:SetVertexColor(unpack(spell[3])) - else - tex:SetVertexColor(0.8, 0.8, 0.8) - end - - local count = icon:CreateFontString(nil, "OVERLAY") - count:SetFont(C["media"].uffont, 8*C["unitframes"].gridscale, "THINOUTLINE") - count:SetPoint("CENTER", unpack(T.countOffsets[spell[2]])) - icon.count = count - - auras.icons[spell[1]] = icon - end - end - - self.AuraWatch = auras -end - --------------------------------------------------------------------------------------------- --- This is the "Grid" theme debuff display section, like what GridStatusDebuffs does --------------------------------------------------------------------------------------------- - -if C["unitframes"].raidunitdebuffwatch == true then - -- Class buffs { spell ID, position [, {r,g,b,a}][, anyUnit] } - -- It use oUF_AuraWatch lib, for grid indicator - do - T.buffids = { - PRIEST = { - {6788, "TOPLEFT", {1, 0, 0}, true}, -- Weakened Soul - {33076, "TOPRIGHT", {0.2, 0.7, 0.2}}, -- Prayer of Mending - {139, "BOTTOMLEFT", {0.4, 0.7, 0.2}}, -- Renew - {17, "BOTTOMRIGHT", {0.81, 0.85, 0.1}, true}, -- Power Word: Shield - }, - DRUID = { - {774, "TOPLEFT", {0.8, 0.4, 0.8}}, -- Rejuvenation - {8936, "TOPRIGHT", {0.2, 0.8, 0.2}}, -- Regrowth - {33763, "BOTTOMLEFT", {0.4, 0.8, 0.2}}, -- Lifebloom - {48438, "BOTTOMRIGHT", {0.8, 0.4, 0}}, -- Wild Growth - }, - PALADIN = { - {53563, "TOPLEFT", {0.7, 0.3, 0.7}}, -- Beacon of Light - }, - SHAMAN = { - {61295, "TOPLEFT", {0.7, 0.3, 0.7}}, -- Riptide - {51945, "TOPRIGHT", {0.2, 0.7, 0.2}}, -- Earthliving - {16177, "BOTTOMLEFT", {0.4, 0.7, 0.2}}, -- Ancestral Fortitude - {974, "BOTTOMRIGHT", {0.7, 0.4, 0}, true}, -- Earth Shield - }, - ALL = { - {14253, "RIGHT", {0, 1, 0}}, -- Abolish Poison - {23333, "LEFT", {1, 0, 0}}, -- Warsong flag xD - }, - } - end - - -- Dispellable & Important Raid Debuffs we want to show on Grid! - -- It use oUF_RaidDebuffs lib for tracking dispellable / important - do - local _, ns = ... - local ORD = ns.oUF_RaidDebuffs or oUF_RaidDebuffs - - if not ORD then return end - - ORD.ShowDispelableDebuff = true - ORD.FilterDispellableDebuff = true - ORD.MatchBySpellName = true - - local function SpellName(id) - local name = select(1, GetSpellInfo(id)) - return name - end - - T.debuffids = { - -- Other debuff - SpellName(67479), -- Impale - - --CATA DEBUFFS - --Baradin Hold - SpellName(95173), -- Consuming Darkness - - --Blackwing Descent - --Magmaw - SpellName(91911), -- Constricting Chains - SpellName(94679), -- Parasitic Infection - SpellName(94617), -- Mangle - - --Omintron Defense System - SpellName(79835), --Poison Soaked Shell - SpellName(91433), --Lightning Conductor - SpellName(91521), --Incineration Security Measure - - --Maloriak - SpellName(77699), -- Flash Freeze - SpellName(77760), -- Biting Chill - - --Atramedes - SpellName(92423), -- Searing Flame - SpellName(92485), -- Roaring Flame - SpellName(92407), -- Sonic Breath - - --Chimaeron - SpellName(82881), -- Break - SpellName(89084), -- Low Health - - --Nefarian - - --Sinestra - SpellName(92956), --Wrack - - --The Bastion of Twilight - --Valiona & Theralion - SpellName(92878), -- Blackout - SpellName(86840), -- Devouring Flames - SpellName(95639), -- Engulfing Magic - - --Halfus Wyrmbreaker - SpellName(39171), -- Malevolent Strikes - - --Twilight Ascendant Council - SpellName(92511), -- Hydro Lance - SpellName(82762), -- Waterlogged - SpellName(92505), -- Frozen - SpellName(92518), -- Flame Torrent - SpellName(83099), -- Lightning Rod - SpellName(92075), -- Gravity Core - SpellName(92488), -- Gravity Crush - - --Cho'gall - SpellName(86028), -- Cho's Blast - SpellName(86029), -- Gall's Blast - - --Throne of the Four Winds - --Conclave of Wind - --Nezir <Lord of the North Wind> - SpellName(93131), --Ice Patch - --Anshal <Lord of the West Wind> - SpellName(86206), --Soothing Breeze - SpellName(93122), --Toxic Spores - --Rohash <Lord of the East Wind> - SpellName(93058), --Slicing Gale - --Al'Akir - SpellName(93260), -- Ice Storm - SpellName(93295), -- Lightning Rod - - -- Firelands, thanks Kaelhan :) - -- Beth'tilac - SpellName(99506), -- Widows Kiss - SpellName(97202), -- Fiery Web Spin - SpellName(49026), -- Fixate - SpellName(97079), -- Seeping Venom - -- Lord Rhyolith - -- none, hehe, fake boss - -- Alysrazor - SpellName(101296), -- Fieroblast - SpellName(100723), -- Gushing Wound - SpellName(99389), -- Imprinted - SpellName(101729), -- Blazing Claw - -- Shannox - SpellName(99837), -- Crystal Prison - SpellName(99937), -- Jagged Tear - -- Baleroc - SpellName(99256), -- Torment - SpellName(99252), -- Blaze of Glory - SpellName(99516), -- Countdown - -- Majordomo Staghelm - SpellName(98450), -- Searing Seeds - -- Ragnaros - SpellName(99399), -- Burning Wound - SpellName(100293), -- Lava Wave - SpellName(98313), -- Magma Blast - SpellName(100675), -- Dreadflame - - -- Dragon Soul - -- Morchok - SpellName(103541), -- Safe - SpellName(103536), -- Warning - SpellName(103534), -- Danger - SpellName(108570), -- Black Blood of the Earth - - -- Warlord Zon'ozz - SpellName(103434), -- Disrupting Shadows - - -- Yor'sahj the Unsleeping - SpellName(105171), -- Deep Corruption - - -- Hagara the Stormbinder - SpellName(105465), -- Lighting Storm - SpellName(104451), -- Ice Tomb - SpellName(109325), -- Frostflake - SpellName(105289), -- Shattered Ice - SpellName(105285), -- Target - - -- Ultraxion - SpellName(110079), -- Fading Light - SpellName(109075), -- Fading Light - - -- Warmaster Blackhorn - - -- Spine of Deathwing - SpellName(105479), -- Searing Plasma - SpellName(105490), -- Fiery Grip - - -- Madness of Deathwing - } - - T.ReverseTimer = { - [92956] = true, -- Sinestra (Wrack) - }, - - ORD:RegisterDebuffs(T.debuffids) - end -end \ No newline at end of file diff --git a/Tukui/core/init.lua b/Tukui/core/init.lua deleted file mode 100644 index 32caee4..0000000 --- a/Tukui/core/init.lua +++ /dev/null @@ -1,43 +0,0 @@ ----------------------------------------------------------------- --- Initiation of Tukui engine ----------------------------------------------------------------- - --- including system -local addon, engine = ... -engine[1] = {} -- T, functions, constants, variables -engine[2] = {} -- C, config -engine[3] = {} -- L, localization - -Tukui = engine -- Allow other addons to use Engine - ---[[ - This should be at the top of every file inside of the Tukui AddOn: - local T, C, L = unpack(select(2, ...)) - - This is how another addon imports the Tukui engine: - local T, C, L = unpack(Tukui) ---]] - --------------------------------------------------- --- We need this as soon we begin loading Tukui --------------------------------------------------- - -local T, C, L = unpack(select(2, ...)) - -T.dummy = function() return end -T.myname = select(1, UnitName("player")) -T.myclass = select(2, UnitClass("player")) -T.myrace = select(2, UnitRace("player")) -T.myfaction = UnitFactionGroup("player") -T.client = GetLocale() -T.resolution = GetCVar("gxResolution") -T.screenheight = tonumber(string.match(T.resolution, "%d+x(%d+)")) -T.screenwidth = tonumber(string.match(T.resolution, "(%d+)x+%d")) -T.version = GetAddOnMetadata("Tukui", "Version") -T.versionnumber = tonumber(T.version) -T.incombat = UnitAffectingCombat("player") -T.patch, T.buildtext, T.releasedate, T.toc = GetBuildInfo() -T.build = tonumber(T.buildtext) -T.level = UnitLevel("player") -T.myrealm = GetRealmName() -T.InfoLeftRightWidth = 370 \ No newline at end of file diff --git a/Tukui/core/install.lua b/Tukui/core/install.lua deleted file mode 100644 index dbfc628..0000000 --- a/Tukui/core/install.lua +++ /dev/null @@ -1,487 +0,0 @@ ------------------------------------------------------------------------- --- Install Script ------------------------------------------------------------------------- - -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -T.ChatSetup = function() - -- setting chat frames if using Tukui chats. - FCF_ResetChatWindows() - FCF_SetLocked(ChatFrame1, 1) - FCF_DockFrame(ChatFrame2) - FCF_SetLocked(ChatFrame2, 1) - FCF_OpenNewWindow(L.chat_general) - FCF_SetLocked(ChatFrame3, 1) - FCF_DockFrame(ChatFrame3) - - FCF_OpenNewWindow(LOOT) - FCF_UnDockFrame(ChatFrame4) - FCF_SetLocked(ChatFrame4, 1) - ChatFrame4:Show() - - for i = 1, NUM_CHAT_WINDOWS do - local frame = _G[format("ChatFrame%s", i)] - local id = frame:GetID() - - -- set default tukui font size - FCF_SetChatWindowFontSize(nil, frame, 12) - - -- set the size of chat frames - frame:Size(T.InfoLeftRightWidth + 1, 111) - - -- tell wow that we are using new size - SetChatWindowSavedDimensions(id, T.Scale(T.InfoLeftRightWidth + 1), T.Scale(111)) - - -- save new default position and dimension - FCF_SavePositionAndDimensions(frame) - - -- rename windows general and combat log - if i == 1 then FCF_SetWindowName(frame, "G, S & W") end - if i == 2 then FCF_SetWindowName(frame, "Log") end - - T.SetDefaultChatPosition(frame) - end - - ChatFrame_RemoveAllMessageGroups(ChatFrame1) - ChatFrame_RemoveChannel(ChatFrame1, L.chat_trade) -- erf, it seem we need to localize this now - ChatFrame_RemoveChannel(ChatFrame1, L.chat_general) -- erf, it seem we need to localize this now - ChatFrame_RemoveChannel(ChatFrame1, L.chat_defense) -- erf, it seem we need to localize this now - ChatFrame_RemoveChannel(ChatFrame1, L.chat_recrutment) -- erf, it seem we need to localize this now - ChatFrame_RemoveChannel(ChatFrame1, L.chat_lfg) -- erf, it seem we need to localize this now - ChatFrame_AddMessageGroup(ChatFrame1, "SAY") - ChatFrame_AddMessageGroup(ChatFrame1, "EMOTE") - ChatFrame_AddMessageGroup(ChatFrame1, "YELL") - ChatFrame_AddMessageGroup(ChatFrame1, "GUILD") - ChatFrame_AddMessageGroup(ChatFrame1, "OFFICER") - ChatFrame_AddMessageGroup(ChatFrame1, "GUILD_ACHIEVEMENT") - ChatFrame_AddMessageGroup(ChatFrame1, "WHISPER") - ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_SAY") - ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_EMOTE") - ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_YELL") - ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_WHISPER") - ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_BOSS_EMOTE") - ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_BOSS_WHISPER") - ChatFrame_AddMessageGroup(ChatFrame1, "PARTY") - ChatFrame_AddMessageGroup(ChatFrame1, "PARTY_LEADER") - ChatFrame_AddMessageGroup(ChatFrame1, "RAID") - ChatFrame_AddMessageGroup(ChatFrame1, "RAID_LEADER") - ChatFrame_AddMessageGroup(ChatFrame1, "RAID_WARNING") - ChatFrame_AddMessageGroup(ChatFrame1, "BATTLEGROUND") - ChatFrame_AddMessageGroup(ChatFrame1, "BATTLEGROUND_LEADER") - ChatFrame_AddMessageGroup(ChatFrame1, "BG_HORDE") - ChatFrame_AddMessageGroup(ChatFrame1, "BG_ALLIANCE") - ChatFrame_AddMessageGroup(ChatFrame1, "BG_NEUTRAL") - ChatFrame_AddMessageGroup(ChatFrame1, "SYSTEM") - ChatFrame_AddMessageGroup(ChatFrame1, "ERRORS") - ChatFrame_AddMessageGroup(ChatFrame1, "AFK") - ChatFrame_AddMessageGroup(ChatFrame1, "DND") - ChatFrame_AddMessageGroup(ChatFrame1, "IGNORED") - ChatFrame_AddMessageGroup(ChatFrame1, "ACHIEVEMENT") - ChatFrame_AddMessageGroup(ChatFrame1, "BN_WHISPER") - ChatFrame_AddMessageGroup(ChatFrame1, "BN_CONVERSATION") - - -- Setup the spam chat frame - ChatFrame_RemoveAllMessageGroups(ChatFrame3) - ChatFrame_AddChannel(ChatFrame3, L.chat_trade) -- erf, it seem we need to localize this now - ChatFrame_AddChannel(ChatFrame3, L.chat_general) -- erf, it seem we need to localize this now - ChatFrame_AddChannel(ChatFrame3, L.chat_defense) -- erf, it seem we need to localize this now - ChatFrame_AddChannel(ChatFrame3, L.chat_recrutment) -- erf, it seem we need to localize this now - ChatFrame_AddChannel(ChatFrame3, L.chat_lfg) -- erf, it seem we need to localize this now - - -- Setup the right chat - ChatFrame_RemoveAllMessageGroups(ChatFrame4) - ChatFrame_AddMessageGroup(ChatFrame4, "COMBAT_XP_GAIN") - ChatFrame_AddMessageGroup(ChatFrame4, "COMBAT_HONOR_GAIN") - ChatFrame_AddMessageGroup(ChatFrame4, "COMBAT_FACTION_CHANGE") - ChatFrame_AddMessageGroup(ChatFrame4, "LOOT") - ChatFrame_AddMessageGroup(ChatFrame4, "MONEY") - - -- enable classcolor automatically on login and on each character without doing /configure each time. - ToggleChatColorNamesByClassGroup(true, "SAY") - ToggleChatColorNamesByClassGroup(true, "EMOTE") - ToggleChatColorNamesByClassGroup(true, "YELL") - ToggleChatColorNamesByClassGroup(true, "GUILD") - ToggleChatColorNamesByClassGroup(true, "OFFICER") - ToggleChatColorNamesByClassGroup(true, "GUILD_ACHIEVEMENT") - ToggleChatColorNamesByClassGroup(true, "ACHIEVEMENT") - ToggleChatColorNamesByClassGroup(true, "WHISPER") - ToggleChatColorNamesByClassGroup(true, "PARTY") - ToggleChatColorNamesByClassGroup(true, "PARTY_LEADER") - ToggleChatColorNamesByClassGroup(true, "RAID") - ToggleChatColorNamesByClassGroup(true, "RAID_LEADER") - ToggleChatColorNamesByClassGroup(true, "RAID_WARNING") - ToggleChatColorNamesByClassGroup(true, "BATTLEGROUND") - ToggleChatColorNamesByClassGroup(true, "BATTLEGROUND_LEADER") - ToggleChatColorNamesByClassGroup(true, "CHANNEL1") - ToggleChatColorNamesByClassGroup(true, "CHANNEL2") - ToggleChatColorNamesByClassGroup(true, "CHANNEL3") - ToggleChatColorNamesByClassGroup(true, "CHANNEL4") - ToggleChatColorNamesByClassGroup(true, "CHANNEL5") -end - -local function cvarsetup() - SetCVar("buffDurations", 1) - SetCVar("mapQuestDifficulty", 1) - SetCVar("scriptErrors", 1) - SetCVar("ShowClassColorInNameplate", 1) - SetCVar("screenshotQuality", 8) - SetCVar("chatMouseScroll", 1) - SetCVar("chatStyle", "im") - SetCVar("WholeChatWindowClickable", 0) - SetCVar("ConversationMode", "inline") - SetCVar("showTutorials", 0) - SetCVar("showNewbieTips", 0) - SetCVar("autoQuestWatch", 1) - SetCVar("autoQuestProgress", 1) - SetCVar("UberTooltips", 1) - SetCVar("removeChatDelay", 1) - SetCVar("showVKeyCastbar", 1) - SetCVar("bloatthreat", 0) - SetCVar("bloattest", 0) - SetCVar("showArenaEnemyFrames", 0) -end - -local function positionsetup() - -- reset saved variables on char - TukuiDataPerChar = {} - - -- reset movable stuff into original position - for i = 1, getn(T.AllowFrameMoving) do - if T.AllowFrameMoving[i] then T.AllowFrameMoving[i]:SetUserPlaced(false) end - end -end - -local v = CreateFrame("Button", "TukuiVersionFrame", UIParent) -v:SetSize(300, 36) -v:SetPoint("CENTER") -v:SetTemplate("Default") -v:CreateShadow("Default") -v:FontString("Text", C.media.font, 12) -v.Text:SetPoint("CENTER") -v.Text:SetText("Tukui ".. T.version .." by |cffff0000tukz@tukui.org|r, website at |cffff0000www.tukui.org|r") -v:SetScript("OnClick", function() - v:Hide() -end) -v:Hide() - -local f = CreateFrame("Frame", "TukuiInstallFrame", UIParent) -f:SetSize(400, 400) -f:SetPoint("CENTER") -f:SetTemplate("Default") -f:CreateShadow("Default") -f:Hide() - -local sb = CreateFrame("StatusBar", nil, f) -sb:SetStatusBarTexture(C.media.normTex) -sb:SetPoint("BOTTOM", f, "BOTTOM", 0, 60) -sb:SetHeight(20) -sb:SetWidth(f:GetWidth()-44) -sb:SetFrameStrata("HIGH") -sb:SetFrameLevel(6) -sb:Hide() - -local sbd = CreateFrame("Frame", nil, sb) -sbd:SetTemplate("Default") -sbd:SetPoint("TOPLEFT", sb, -2, 2) -sbd:SetPoint("BOTTOMRIGHT", sb, 2, -2) -sbd:SetFrameStrata("HIGH") -sbd:SetFrameLevel(5) - -local header = f:CreateFontString(nil, "OVERLAY") -header:SetFont(C.media.font, 16, "THINOUTLINE") -header:SetPoint("TOP", f, "TOP", 0, -20) - -local text1 = f:CreateFontString(nil, "OVERLAY") -text1:SetJustifyH("LEFT") -text1:SetFont(C.media.font, 12) -text1:SetWidth(f:GetWidth()-40) -text1:SetPoint("TOPLEFT", f, "TOPLEFT", 20, -60) - -local text2 = f:CreateFontString(nil, "OVERLAY") -text2:SetJustifyH("LEFT") -text2:SetFont(C.media.font, 12) -text2:SetWidth(f:GetWidth()-40) -text2:SetPoint("TOPLEFT", text1, "BOTTOMLEFT", 0, -20) - -local text3 = f:CreateFontString(nil, "OVERLAY") -text3:SetJustifyH("LEFT") -text3:SetFont(C.media.font, 12) -text3:SetWidth(f:GetWidth()-40) -text3:SetPoint("TOPLEFT", text2, "BOTTOMLEFT", 0, -20) - -local text4 = f:CreateFontString(nil, "OVERLAY") -text4:SetJustifyH("LEFT") -text4:SetFont(C.media.font, 12) -text4:SetWidth(f:GetWidth()-40) -text4:SetPoint("TOPLEFT", text3, "BOTTOMLEFT", 0, -20) - -local credits = f:CreateFontString(nil, "OVERLAY") -credits:SetFont(C.media.font, 12, "THINOUTLINE") -credits:SetText("") -credits:SetPoint("BOTTOM", f, "BOTTOM", 0, 4) - -local sbt = sb:CreateFontString(nil, "OVERLAY") -sbt:SetFont(C.media.font, 13, "THINOUTLINE") -sbt:SetPoint("CENTER", sb) - -local option1 = CreateFrame("Button", "TukuiInstallOption1", f) -option1:SetPoint("BOTTOMLEFT", f, "BOTTOMLEFT", 20, 20) -option1:SetSize(128, 25) -option1:SetTemplate("Default") -option1:FontString("Text", C.media.font, 12) -option1.Text:SetPoint("CENTER") - -local option2 = CreateFrame("Button", "TukuiInstallOption2", f) -option2:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", -20, 20) -option2:SetSize(128, 25) -option2:SetTemplate("Default") -option2:FontString("Text", C.media.font, 12) -option2.Text:SetPoint("CENTER") - -local close = CreateFrame("Button", "TukuiInstallCloseButton", f, "UIPanelCloseButton") -close:SetPoint("TOPRIGHT", f, "TOPRIGHT") -T.SkinCloseButton(close) -close:SetScript("OnClick", function() - f:Hide() -end) - -local step4 = function() - TukuiDataPerChar.install = true - sb:SetValue(4) - PlaySoundFile("Sound\\interface\\LevelUp.wav") - header:SetText(L.install_header_11) - text1:SetText(L.install_step_4_line_1) - text2:SetText(L.install_step_4_line_2) - text3:SetText(L.install_step_4_line_3) - text4:SetText(L.install_step_4_line_4) - sbt:SetText("4/4") - option1:Hide() - option2.Text:SetText(L.install_button_finish) - option2:SetScript("OnClick", function() - ReloadUI() - end) -end - -local step3 = function() - if not option2:IsShown() then option2:Show() end - sb:SetValue(3) - header:SetText(L.install_header_10) - text1:SetText(L.install_step_3_line_1) - text2:SetText(L.install_step_3_line_2) - text3:SetText(L.install_step_3_line_3) - text4:SetText(L.install_step_3_line_4) - sbt:SetText("3/4") - option1:SetScript("OnClick", step4) - option2:SetScript("OnClick", function() - positionsetup() - step4() - end) -end - -local step2 = function() - sb:SetValue(2) - header:SetText(L.install_header_9) - sbt:SetText("2/4") - if IsAddOnLoaded("Prat") or IsAddOnLoaded("Chatter") then - text1:SetText(L.install_step_2_line_0) - text2:SetText("") - text3:SetText("") - text4:SetText("") - option2:Hide() - else - text1:SetText(L.install_step_2_line_1) - text2:SetText(L.install_step_2_line_2) - text3:SetText(L.install_step_2_line_3) - text4:SetText(L.install_step_2_line_4) - option2:SetScript("OnClick", function() - T.ChatSetup() - step3() - end) - end - option1:SetScript("OnClick", step3) -end - -local step1 = function() - close:Hide() - sb:SetMinMaxValues(0, 4) - sb:Show() - sb:SetValue(1) - sb:SetStatusBarColor(0.26, 1, 0.22) - header:SetText(L.install_header_8) - text1:SetText(L.install_step_1_line_1) - text2:SetText(L.install_step_1_line_2) - text3:SetText(L.install_step_1_line_3) - text4:SetText(L.install_step_1_line_4) - sbt:SetText("1/4") - - option1:Show() - - option1.Text:SetText(L.install_button_skip) - option2.Text:SetText(L.install_button_continue) - - option1:SetScript("OnClick", step2) - option2:SetScript("OnClick", function() - cvarsetup() - local ms = GetCVar("gxMultisample") - if ms ~= "1" then - SetCVar("gxMultisample", 1) - RestartGx() - end - step2() - end) - - -- this is really essential, whatever if skipped or not - SetActionBarToggles(1, 1, 1, 1, 0) - SetCVar("alwaysShowActionBars", 0) -end - -local tut6 = function() - sb:SetValue(6) - header:SetText(L.install_header_7) - text1:SetText(L.tutorial_step_6_line_1) - text2:SetText(L.tutorial_step_6_line_2) - text3:SetText(L.tutorial_step_6_line_3) - text4:SetText(L.tutorial_step_6_line_4) - - sbt:SetText("6/6") - - option1:Show() - - option1.Text:SetText(L.install_button_close) - option2.Text:SetText(L.install_button_install) - - option1:SetScript("OnClick", function() - f:Hide() - end) - option2:SetScript("OnClick", step1) -end - -local tut5 = function() - sb:SetValue(5) - header:SetText(L.install_header_6) - text1:SetText(L.tutorial_step_5_line_1) - text2:SetText(L.tutorial_step_5_line_2) - text3:SetText(L.tutorial_step_5_line_3) - text4:SetText(L.tutorial_step_5_line_4) - - sbt:SetText("5/6") - - option2:SetScript("OnClick", tut6) -end - -local tut4 = function() - sb:SetValue(4) - header:SetText(L.install_header_5) - text1:SetText(L.tutorial_step_4_line_1) - text2:SetText(L.tutorial_step_4_line_2) - text3:SetText(L.tutorial_step_4_line_3) - text4:SetText(L.tutorial_step_4_line_4) - - sbt:SetText("4/6") - - option2:SetScript("OnClick", tut5) -end - -local tut3 = function() - sb:SetValue(3) - header:SetText(L.install_header_4) - text1:SetText(L.tutorial_step_3_line_1) - text2:SetText(L.tutorial_step_3_line_2) - text3:SetText(L.tutorial_step_3_line_3) - text4:SetText(L.tutorial_step_3_line_4) - - sbt:SetText("3/6") - - option2:SetScript("OnClick", tut4) -end - -local tut2 = function() - sb:SetValue(2) - header:SetText(L.install_header_3) - text1:SetText(L.tutorial_step_2_line_1) - text2:SetText(L.tutorial_step_2_line_2) - text3:SetText(L.tutorial_step_2_line_3) - text4:SetText(L.tutorial_step_2_line_4) - - sbt:SetText("2/6") - - option2:SetScript("OnClick", tut3) -end - -local tut1 = function() - sb:SetMinMaxValues(0, 6) - sb:Show() - close:Show() - sb:SetValue(1) - sb:SetStatusBarColor(0, 0.76, 1) - header:SetText(L.install_header_2) - text1:SetText(L.tutorial_step_1_line_1) - text2:SetText(L.tutorial_step_1_line_2) - text3:SetText(L.tutorial_step_1_line_3) - text4:SetText(L.tutorial_step_1_line_4) - sbt:SetText("1/6") - option1:Hide() - option2.Text:SetText(L.install_button_next) - option2:SetScript("OnClick", tut2) -end - --- this install Tukui with default settings. -local function install() - f:Show() - sb:Hide() - option1:Show() - option2:Show() - close:Show() - header:SetText(L.install_header_1) - text1:SetText(L.install_init_line_1) - text2:SetText(L.install_init_line_2) - text3:SetText(L.install_init_line_3) - text4:SetText(L.install_init_line_4) - - option1.Text:SetText(L.install_button_tutorial) - option2.Text:SetText(L.install_button_install) - - option1:SetScript("OnClick", tut1) - option2:SetScript("OnClick", step1) -end - ------------------------------------------------------------------------- --- On login function, look for some infos! ------------------------------------------------------------------------- - -local TukuiOnLogon = CreateFrame("Frame") -TukuiOnLogon:RegisterEvent("PLAYER_ENTERING_WORLD") -TukuiOnLogon:SetScript("OnEvent", function(self, event) - self:UnregisterEvent("PLAYER_ENTERING_WORLD") - - -- create empty saved vars if they doesn't exist. - if (TukuiData == nil) then TukuiData = {} end - if (TukuiDataPerChar == nil) then TukuiDataPerChar = {} end - - if T.screenwidth < 1200 then - SetCVar("useUiScale", 0) - StaticPopup_Show("TUKUIDISABLE_UI") - else - -- install default if we never ran Tukui on this character. - if not TukuiDataPerChar.install then - install() - end - end - - if (IsAddOnLoaded("Tukui_Raid") and IsAddOnLoaded("Tukui_Raid_Healing")) then - StaticPopup_Show("TUKUIDISABLE_RAID") - end -end) - -SLASH_TUTORIAL1 = "/uihelp" -SLASH_TUTORIAL2 = "/tutorial" -SlashCmdList.TUTORIAL = function() f:Show() tut1() end - -SLASH_VERSION1 = "/version" -SlashCmdList.VERSION = function() if v:IsShown() then v:Hide() else v:Show() end end - -SLASH_CONFIGURE1 = "/install" -SlashCmdList.CONFIGURE = install - -SLASH_RESETUI1 = "/resetui" -SlashCmdList.RESETUI = function() f:Show() step1() end \ No newline at end of file diff --git a/Tukui/core/move.lua b/Tukui/core/move.lua deleted file mode 100644 index f91b9a9..0000000 --- a/Tukui/core/move.lua +++ /dev/null @@ -1,169 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - --- all the frame we want to move --- all our frames that we want being movable. -T.AllowFrameMoving = { - TukuiMinimap, - TukuiTooltipAnchor, - TukuiAurasPlayerBuffs, - TukuiShiftBar, - TukuiRollAnchor, - TukuiAchievementHolder, - TukuiWatchFrameAnchor, - TukuiGMFrameAnchor, - TukuiVehicleAnchor, - TukuiExtraActionBarFrameHolder, -} - --- used to exec various code if we enable or disable moving -local function exec(self, enable) - if self == TukuiGMFrameAnchor then - if enable then - self:Show() - else - self:Hide() - end - end - - if self == TukuiMinimap then - if enable then - Minimap:Hide() - self:SetBackdropBorderColor(1,0,0,1) - else - Minimap:Show() - self:SetBackdropBorderColor(unpack(C.media.bordercolor)) - end - end - - if self == TukuiAurasPlayerBuffs then - if not self:GetBackdrop() then self:SetTemplate("Default") end - - local buffs = TukuiAurasPlayerBuffs - local debuffs = TukuiAurasPlayerDebuffs - - if enable then - buffs:SetBackdropColor(unpack(C.media.backdropcolor)) - buffs:SetBackdropBorderColor(1,0,0,1) - else - local position = self:GetPoint() - if position:match("TOPLEFT") or position:match("BOTTOMLEFT") or position:match("BOTTOMRIGHT") or position:match("TOPRIGHT") then - buffs:SetAttribute("point", position) - debuffs:SetAttribute("point", position) - end - if position:match("LEFT") then - buffs:SetAttribute("xOffset", 35) - debuffs:SetAttribute("xOffset", 35) - else - buffs:SetAttribute("xOffset", -35) - debuffs:SetAttribute("xOffset", -35) - end - if position:match("BOTTOM") then - buffs:SetAttribute("wrapYOffset", 67.5) - debuffs:SetAttribute("wrapYOffset", 67.5) - else - buffs:SetAttribute("wrapYOffset", -67.5) - debuffs:SetAttribute("wrapYOffset", -67.5) - end - buffs:SetBackdropColor(0,0,0,0) - buffs:SetBackdropBorderColor(0,0,0,0) - end - end - - if self == TukuiTooltipAnchor or self == TukuiRollAnchor or self == TukuiAchievementHolder or self == TukuiVehicleAnchor then - if enable then - self:SetAlpha(1) - else - self:SetAlpha(0) - if self == TukuiTooltipAnchor then - local position = TukuiTooltipAnchor:GetPoint() - local healthBar = GameTooltipStatusBar - if position:match("TOP") then - healthBar:ClearAllPoints() - healthBar:Point("TOPLEFT", healthBar:GetParent(), "BOTTOMLEFT", 2, -5) - healthBar:Point("TOPRIGHT", healthBar:GetParent(), "BOTTOMRIGHT", -2, -5) - if healthBar.text then healthBar.text:Point("CENTER", healthBar, 0, -6) end - else - healthBar:ClearAllPoints() - healthBar:Point("BOTTOMLEFT", healthBar:GetParent(), "TOPLEFT", 2, 5) - healthBar:Point("BOTTOMRIGHT", healthBar:GetParent(), "TOPRIGHT", -2, 5) - if healthBar.text then healthBar.text:Point("CENTER", healthBar, 0, 6) end - end - end - end - end - - if self == TukuiWatchFrameAnchor or self == TukuiExtraActionBarFrameHolder then - if enable then - self:SetBackdropBorderColor(1,0,0,1) - self:SetBackdropColor(unpack(C.media.backdropcolor)) - else - self:SetBackdropBorderColor(0,0,0,0) - self:SetBackdropColor(0,0,0,0) - end - end - - if self == TukuiShiftBar then - if enable then - TukuiShapeShiftHolder:SetAlpha(1) - else - TukuiShapeShiftHolder:SetAlpha(0) - end - end -end - -local enable = true -local origa1, origf, origa2, origx, origy - -T.MoveUIElements = function() - -- don't allow moving while in combat - if InCombatLockdown() then print(ERR_NOT_IN_COMBAT) return end - - for i = 1, getn(T.AllowFrameMoving) do - if T.AllowFrameMoving[i] then - if enable then - T.AllowFrameMoving[i]:EnableMouse(true) - T.AllowFrameMoving[i]:RegisterForDrag("LeftButton", "RightButton") - T.AllowFrameMoving[i]:SetScript("OnDragStart", function(self) - origa1, origf, origa2, origx, origy = T.AllowFrameMoving[i]:GetPoint() - self.moving = true - self:SetUserPlaced(true) - self:StartMoving() - end) - T.AllowFrameMoving[i]:SetScript("OnDragStop", function(self) - self.moving = false - self:StopMovingOrSizing() - end) - exec(T.AllowFrameMoving[i], enable) - if T.AllowFrameMoving[i].text then - T.AllowFrameMoving[i].text:Show() - end - else - T.AllowFrameMoving[i]:EnableMouse(false) - if T.AllowFrameMoving[i].moving == true then - T.AllowFrameMoving[i]:StopMovingOrSizing() - T.AllowFrameMoving[i]:ClearAllPoints() - T.AllowFrameMoving[i]:SetPoint(origa1, origf, origa2, origx, origy) - end - exec(T.AllowFrameMoving[i], enable) - if T.AllowFrameMoving[i].text then T.AllowFrameMoving[i].text:Hide() end - T.AllowFrameMoving[i].moving = false - end - end - end - - if T.MoveUnitFrames then T.MoveUnitFrames() end - - if enable then enable = false else enable = true end -end -SLASH_MOVING1 = "/mtukui" -SLASH_MOVING2 = "/moveui" -SlashCmdList["MOVING"] = T.MoveUIElements - -local protection = CreateFrame("Frame") -protection:RegisterEvent("PLAYER_REGEN_DISABLED") -protection:SetScript("OnEvent", function(self, event) - if enable then return end - print(ERR_NOT_IN_COMBAT) - enable = false - moving() -end) \ No newline at end of file diff --git a/Tukui/core/popups.lua b/Tukui/core/popups.lua deleted file mode 100644 index e317bc6..0000000 --- a/Tukui/core/popups.lua +++ /dev/null @@ -1,65 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - ------------------------------------------------------------------------- --- General Popups ------------------------------------------------------------------------- - -StaticPopupDialogs["TUKUIDISABLE_UI"] = { - text = L.popup_disableui, - button1 = ACCEPT, - button2 = CANCEL, - OnAccept = function() DisableAddOn("Tukui") ReloadUI() end, - timeout = 0, - whileDead = 1, - preferredIndex = 3, -} - -StaticPopupDialogs["TUKUIDISABLE_RAID"] = { - text = L.popup_2raidactive, - button1 = "DPS - TANK", - button2 = "HEAL", - OnAccept = function() DisableAddOn("Tukui_Raid_Healing") EnableAddOn("Tukui_Raid") ReloadUI() end, - OnCancel = function() EnableAddOn("Tukui_Raid_Healing") DisableAddOn("Tukui_Raid") ReloadUI() end, - timeout = 0, - whileDead = 1, - preferredIndex = 3, -} - -StaticPopupDialogs["TUKUIDISBAND_RAID"] = { - text = L.disband, - button1 = ACCEPT, - button2 = CANCEL, - OnAccept = function() - if InCombatLockdown() then return end -- Prevent user error in combat - - SendChatMessage(ERR_GROUP_DISBANDED, "RAID" or "PARTY") - if UnitInRaid("player") then - for i = 1, GetNumRaidMembers() do - local name, _, _, _, _, _, _, online = GetRaidRosterInfo(i) - if online and name ~= T.myname then - UninviteUnit(name) - end - end - else - for i = MAX_PARTY_MEMBERS, 1, -1 do - if GetPartyMember(i) then - UninviteUnit(UnitName("party"..i)) - end - end - end - LeaveParty() - end, - timeout = 0, - whileDead = 1, - preferredIndex = 3, -} - -StaticPopupDialogs["TUKUI_FIX_AB"] = { - text = L.popup_fix_ab, - button1 = ACCEPT, - button2 = CANCEL, - OnAccept = ReloadUI, - timeout = 0, - whileDead = 1, - preferredIndex = 3, -} \ No newline at end of file diff --git a/Tukui/core/protection.lua b/Tukui/core/protection.lua deleted file mode 100644 index 3f01545..0000000 --- a/Tukui/core/protection.lua +++ /dev/null @@ -1,38 +0,0 @@ ------------------------------------------------------------------------- --- We don't want 2 addons enabled doing the same thing. --- Disable a feature on Tukui if X addon is found. ------------------------------------------------------------------------- - -local T, C, L = unpack(select(2, ...)) - -if (IsAddOnLoaded("Stuf") or IsAddOnLoaded("PitBull4") or IsAddOnLoaded("ShadowedUnitFrames") or IsAddOnLoaded("ag_UnitFrames")) then - C["unitframes"].enable = false -end - -if (IsAddOnLoaded("TidyPlates") or IsAddOnLoaded("Aloft")) then - C["nameplate"].enable = false -end - -if (IsAddOnLoaded("Dominos") or IsAddOnLoaded("Bartender4") or IsAddOnLoaded("Macaroon")) then - C["actionbar"].enable = false -end - -if (IsAddOnLoaded("Prat") or IsAddOnLoaded("Chatter")) then - C["chat"].enable = false -end - -if (IsAddOnLoaded("Quartz") or IsAddOnLoaded("AzCastBar") or IsAddOnLoaded("eCastingBar")) then - C["unitframes"].unitcastbar = false -end - -if (IsAddOnLoaded("TipTac")) then - C["tooltip"].enable = false -end - -if (IsAddOnLoaded("Gladius")) then - C["arena"].unitframes = false -end - -if (IsAddOnLoaded("SatrinaBuffFrame") or IsAddOnLoaded("ElkBuffBars")) then - C["auras"].player = false -end \ No newline at end of file diff --git a/Tukui/core/video.lua b/Tukui/core/video.lua deleted file mode 100644 index 581fcc6..0000000 --- a/Tukui/core/video.lua +++ /dev/null @@ -1,132 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - --------------------------------------------------------- --- detect if high, low or eyefinity version --------------------------------------------------------- - -if T.screenwidth < 1600 then - if C.general.overridelowtohigh == true then - C["general"].autoscale = false - T.lowversion = false - else - T.lowversion = true - end -elseif (T.screenwidth >= 3840) or (UIParent:GetWidth() + 1 > T.screenwidth) then - local width = T.screenwidth - local height = T.screenheight - - -- because some user enable bezel compensation, we need to find the real width of a single monitor. - -- I don't know how it really work, but i'm assuming they add pixel to width to compensate the bezel. :P - - -- HQ resolution - if width >= 9840 then width = 3280 end -- WQSXGA - if width >= 7680 and width < 9840 then width = 2560 end -- WQXGA - if width >= 5760 and width < 7680 then width = 1920 end -- WUXGA & HDTV - if width >= 5040 and width < 5760 then width = 1680 end -- WSXGA+ - - -- adding height condition here to be sure it work with bezel compensation because WSXGA+ and UXGA/HD+ got approx same width - if width >= 4800 and width < 5760 and height == 900 then width = 1600 end -- UXGA & HD+ - - -- low resolution screen - if width >= 4320 and width < 4800 then width = 1440 end -- WSXGA - if width >= 4080 and width < 4320 then width = 1360 end -- WXGA - if width >= 3840 and width < 4080 then width = 1224 end -- SXGA & SXGA (UVGA) & WXGA & HDTV - - -- yep, now set Tukui to lower reso if screen #1 width < 1600 - if width < 1600 and not C.general.overridelowtohigh then - T.lowversion = true - end - - -- register a constant, we will need it later for launch.lua - T.eyefinity = width -end - --- raid scale according to which version we use -if T.lowversion then - T.raidscale = 0.8 -else - T.raidscale = 1 -end - --------------------------------------------------------- --- Auto Scale UI (Overwrite Settings and Blizzard) --------------------------------------------------------- - --- autoscale -if C["general"].autoscale == true then - C["general"].uiscale = min(2, max(.64, 768/string.match(T.resolution, "%d+x(%d+)"))) -end - --------------------------------------------------------- --- Graphics Settings --------------------------------------------------------- - --- the ui doesn't reload if ratio stay the same, we need to force reload if it happen. -local function NeedReloadUI() - local resolution = Graphics_ResolutionDropDown - local x, y = resolution:getValues() - local oldratio = T.screenwidth / T.screenheight - local newratio = x / y - local oldreso = T.resolution - local newreso = x.."x"..y - - if (oldratio == newratio) and (oldreso ~= newreso) then - ReloadUI() - end -end - -local Graphic = CreateFrame("Frame") -Graphic:RegisterEvent("PLAYER_ENTERING_WORLD") -Graphic:SetScript("OnEvent", function(self, event) - -- always enable uiscale for Tukui (needed) - local useUiScale = GetCVar("useUiScale") - if useUiScale ~= "1" then - SetCVar("useUiScale", 1) - end - - -- Multisample need to be at 1 for pixel perfectness - local gxMultisample = GetCVar("gxMultisample") - if C["general"].multisampleprotect == true and gxMultisample ~= "1" then - SetMultisampleFormat(1) - end - - -- uiscale security - if C["general"].uiscale > 1 then C["general"].uiscale = 1 end - if C["general"].uiscale < 0.64 then C["general"].uiscale = 0.64 end - - -- set our new uiscale now if it doesn't match Blizzard saved uiScale. - if format("%.2f", GetCVar("uiScale")) ~= format("%.2f", C["general"].uiscale) then - -- if we set an uiscale, it broke quest when opening full size map in combat - T.FullMapQuestTaintFix = true - - -- set new ui scale - SetCVar("uiScale", C["general"].uiscale) - end - - -- we adjust UIParent to screen #1 if Eyefinity is found - if T.eyefinity then - local width = T.eyefinity - local height = T.screenheight - - -- if autoscale is off, find a new width value of UIParent for screen #1. - if not C.general.autoscale or height > 1200 then - local h = UIParent:GetHeight() - local ratio = T.screenheight / h - local w = T.eyefinity / ratio - - width = w - height = h - end - - UIParent:SetSize(width, height) - UIParent:ClearAllPoints() - UIParent:SetPoint("CENTER") - end - - -- require a reload when graphics option changes, even if Standard Blizzard UI doesn't really need it. - VideoOptionsFrameOkay:HookScript("OnClick", NeedReloadUI) - VideoOptionsFrameApply:HookScript("OnClick", NeedReloadUI) - - -- unload - self:UnregisterEvent("PLAYER_ENTERING_WORLD") -end) \ No newline at end of file diff --git a/Tukui/developer/commands.lua b/Tukui/developer/commands.lua deleted file mode 100644 index 33c195e..0000000 --- a/Tukui/developer/commands.lua +++ /dev/null @@ -1,81 +0,0 @@ --- a command to show frame you currently have mouseovered -SLASH_FRAME1 = "/frame" -SlashCmdList["FRAME"] = function(arg) - if arg ~= "" then - arg = _G[arg] - else - arg = GetMouseFocus() - end - if arg ~= nil and arg:GetName() ~= nil then - local point, relativeTo, relativePoint, xOfs, yOfs = arg:GetPoint() - ChatFrame1:AddMessage("|cffCC0000~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") - ChatFrame1:AddMessage("Name: |cffFFD100"..arg:GetName()) - if arg:GetParent() then - ChatFrame1:AddMessage("Parent: |cffFFD100"..arg:GetParent():GetName()) - end - - ChatFrame1:AddMessage("Width: |cffFFD100"..format("%.2f",arg:GetWidth())) - ChatFrame1:AddMessage("Height: |cffFFD100"..format("%.2f",arg:GetHeight())) - ChatFrame1:AddMessage("Strata: |cffFFD100"..arg:GetFrameStrata()) - ChatFrame1:AddMessage("Level: |cffFFD100"..arg:GetFrameLevel()) - - if xOfs then - ChatFrame1:AddMessage("X: |cffFFD100"..format("%.2f",xOfs)) - end - if yOfs then - ChatFrame1:AddMessage("Y: |cffFFD100"..format("%.2f",yOfs)) - end - if relativeTo then - ChatFrame1:AddMessage("Point: |cffFFD100"..point.."|r anchored to "..relativeTo:GetName().."'s |cffFFD100"..relativePoint) - end - ChatFrame1:AddMessage("|cffCC0000~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") - elseif arg == nil then - ChatFrame1:AddMessage("Invalid frame name") - else - ChatFrame1:AddMessage("Could not find frame info") - end -end - --- enable lua error by command -function SlashCmdList.LUAERROR(msg, editbox) - if (msg == 'on') then - SetCVar("scriptErrors", 1) - -- because sometime we need to /rl to show an error on login. - ReloadUI() - elseif (msg == 'off') then - SetCVar("scriptErrors", 0) - else - print("/luaerror on - /luaerror off") - end -end -SLASH_LUAERROR1 = '/luaerror' - -local testui = TestUI or function() end -TestUI = function(msg) - if msg == "a" or msg == "arena" then - TukuiArena1:Show(); TukuiArena1.Hide = function() end; TukuiArena1.unit = "player" - TukuiArena2:Show(); TukuiArena2.Hide = function() end; TukuiArena2.unit = "player" - TukuiArena3:Show(); TukuiArena3.Hide = function() end; TukuiArena3.unit = "player" - elseif msg == "boss" or msg == "b" then - TukuiBoss1:Show(); TukuiBoss1.Hide = function() end; TukuiBoss1.unit = "player" - TukuiBoss2:Show(); TukuiBoss2.Hide = function() end; TukuiBoss2.unit = "player" - TukuiBoss3:Show(); TukuiBoss3.Hide = function() end; TukuiBoss3.unit = "player" - elseif msg == "pet" then - TukuiPet:Show(); TukuiPet.Hide = function() end; TukuiPet.unit = "player" - elseif msg == "buffs" then - UnitAura = function() - -- name, rank, texture, count, dtype, duration, timeLeft, caster - return 139, 'Rank 1', 'Interface\\Icons\\Spell_Holy_Penance', 1, 'Magic', 0, 0, "player" - end - - if(oUF) then - for i, v in pairs(oUF.units) do - if(v.UNIT_AURA) then - v:UNIT_AURA("UNIT_AURA", v.unit) - end - end - end - end -end -SlashCmdList.TestUI = TestUI -SLASH_TestUI1 = "/testui" \ No newline at end of file diff --git a/Tukui/developer/reloadui.lua b/Tukui/developer/reloadui.lua deleted file mode 100644 index 2ebcd5d..0000000 --- a/Tukui/developer/reloadui.lua +++ /dev/null @@ -1,10 +0,0 @@ ------------------------------------------------------------------------- --- ReloadUI command ------------------------------------------------------------------------- - -SLASH_RELOADUI1 = "/rl" -SlashCmdList.RELOADUI = ReloadUI - - - - diff --git a/Tukui/developer/test.lua b/Tukui/developer/test.lua deleted file mode 100644 index e69de29..0000000 diff --git a/Tukui/docs/API.txt b/Tukui/docs/API.txt deleted file mode 100644 index 01a9556..0000000 --- a/Tukui/docs/API.txt +++ /dev/null @@ -1,58 +0,0 @@ -Tukui API - -This is how another addon imports the Tukui engine: -(it must be at the top of every lua file if your addon or edited version is built around Tukui) - local T, C, L = unpack(Tukui) - -Now the functions: - - frame:SetTemplate("Template", texture) - Set a backdrop that cover the exact size of the frame according - to which template is choosen. If "texture" is set to true, it will - use media.normTex instead of the default blank texture. If "" is empty, - it will use "Default" template by default. - - frame:CreatePanel("Template", width, height, point, anchor, relativepoint, xposition, yposition) - SetTemplate's brother, sets a backdrop with more options like custom - size, position, point, etc. If "" is empty, it will use "Default" - template by default. - - frame:Size(width, height) - Sets the width and height of object to an absolute (pixel perfect) value - in pixels. If height is ommitted then height = width is assumed. - - frame:Point(...) - Exactly the same as its little brother SetPoint, but every offset - is scaled to absolute (pixel perfect) pixel amounts. - - frame:Width(...) - Exactly the same as its little brother SetWidth, but every offset - is scaled to absolute (pixel perfect) pixel amounts. - - frame:Height(...) - Exactly the same as its little brother SetHeight, but every offset - is scaled to absolute (pixel perfect) pixel amounts. - - frame:CreateShadow("Template") - Create shadow effect on the edge of the frame according to which template - we choose. If "" is empty, it will use "Default" template by default. - - frame:Kill() - Unregister all events from this frame and kill its process for ever. - - frame:StyleButton(hasChecked) - Set a hover / pushed / and... Checked texture (if set on true) - - frame:FontString(name, fontName, fontHeight, fontStyle) - Create a FontString with the frame as a parent. If you leave name as nil the font name will become - "<framename>.text". If a name is provided however it will be called "<framename>.<yourname>". - - frame:HighlightUnit(r, g, b) - Highlight your current target with specified (r, g, b) color. - -Templates: - - "Default" - -- use default color according to what we have set via /media/medias.lua - - "Transparent" - -- Same as "Default" but with Transparent background - - "ClassColor" \ No newline at end of file diff --git a/Tukui/docs/TOC.txt b/Tukui/docs/TOC.txt deleted file mode 100644 index 64f651e..0000000 --- a/Tukui/docs/TOC.txt +++ /dev/null @@ -1,11 +0,0 @@ -Example of .toc file for an extra addon for Tukui. -Just copy/past below lines in a .toc file and edit it. - -## Interface: 40000 -## Title: |cffC495DDTukui Example|r -## Notes: This is the tooltip text show in character screen, addon list, when mouse is over this mod. -## Author: Your nickname -## Version: 1.00 -## RequiredDeps: Tukui - -example.lua \ No newline at end of file diff --git a/Tukui/licenses/Tukui b/Tukui/licenses/Tukui deleted file mode 100644 index d378c90..0000000 --- a/Tukui/licenses/Tukui +++ /dev/null @@ -1,49 +0,0 @@ -Tukui License - Copyright 2009-2011 http://www.tukui.org - - The contents of this addon, excluding third-party resources, are - copyrighted to their authors with all rights reserved. - - Authors of this addon hereby grant you the following rights: - - 1. You may make modifications to this addon for private use only except - if you publish your edited version via tukui.org, wowinterface.com, - curse.com, github.com or if you ask authors permission before uploading it - somewhere else. If you upload it on curse.com or wowinterface.com, it must - be uploaded thought an "addon pack" category only. Do not enable any kind - of donation from other site unless you rewrote or edited more than 60% - of our codes. - - 2. Do not modify the name of this addon, including the addon folders. - - 3. Some users have no restrictions at all. Yep for you that means you - just DO WHAT THE FUCK YOU WANT TO. - - - Nightcracker - - Shestak - - Elv22 - - Eclipse - - Hydra - - Syne - - Foof - - Safturento - - Darth Android - - Smelly - - Haleth - - Even if your name is included in the list, I strongly suggest that you keep - the original name of addon, because we are working with other authors - to fix compatibility issues between them if they are found. Renaming it - will break these fixes. - - 4. This copyright notice shall be included in all copies or substantial - portions of the Software. - - Earlier versions were released under terms that did not require permission, - but due to the actions of certain unscrupulous distributors, I have chosen - to license all versions over v9 under stricter terms. - - All rights not explicitly addressed in this license are reserved by - the copyright holders. - - You can write us at contact@tukui.org for reporting abuse. diff --git a/Tukui/licenses/oUF b/Tukui/licenses/oUF deleted file mode 100644 index e1e124d..0000000 --- a/Tukui/licenses/oUF +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2006-2011 Trond A Ekseth <troeks@gmail.com> - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/Tukui/locales/chinese.lua b/Tukui/locales/chinese.lua deleted file mode 100644 index f37128d..0000000 --- a/Tukui/locales/chinese.lua +++ /dev/null @@ -1,319 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -if T.client == "zhCN" then - -- localization for zhCN by 风吹那啥凉(Popptise @Tukui forums) - L.chat_BATTLEGROUND_GET = "战场" - L.chat_BATTLEGROUND_LEADER_GET = "战场领袖" - L.chat_BN_WHISPER_GET = "密语" - L.chat_GUILD_GET = "公" - L.chat_OFFICER_GET = "官" - L.chat_PARTY_GET = "队" - L.chat_PARTY_GUIDE_GET = "地下城向导" - L.chat_PARTY_LEADER_GET = "队长" - L.chat_RAID_GET = "团" - L.chat_RAID_LEADER_GET = "团长" - L.chat_RAID_WARNING_GET = "团队警告" - L.chat_WHISPER_GET = "密语" - L.chat_FLAG_AFK = "[AFK]" - L.chat_FLAG_DND = "[DND]" - L.chat_FLAG_GM = "[GM]" - L.chat_ERR_FRIEND_ONLINE_SS = "|cff05e9FF上线了|r" - L.chat_ERR_FRIEND_OFFLINE_S = "|cffff0000下线了|r" - - -- 请不要缩写下列频道名称 这是用来帮助设置归类频道的 - L.chat_general = "综合" - L.chat_trade = "交易" - L.chat_defense = "本地防务" - L.chat_recrutment = "公会招募" - L.chat_lfg = "寻求组队" - - L.disband = "正在解散团队" - - L.datatext_download = "下载: " - L.datatext_bandwidth = "带宽:" - L.datatext_guild = "公会" - L.datatext_noguild = "没有公会" - L.datatext_bags = "背包 " - L.datatext_friends = "好友" - L.datatext_online = "在线:" - L.datatext_armor = "耐久度" - L.datatext_earned = "赚取:" - L.datatext_spent = "花费:" - L.datatext_deficit = "赤字:" - L.datatext_profit = "利润:" - L.datatext_timeto = "时间至:" - L.datatext_friendlist = "好友列表:" - L.datatext_playersp = "法伤" - L.datatext_playerap = "攻强" - L.datatext_playerhaste = "急速" - L.datatext_dps = "dps" - L.datatext_hps = "hps" - L.datatext_playerarp = "护甲穿透" - L.datatext_session = "本次概况:" - L.datatext_character = "角色:" - L.datatext_server = "服务器:" - L.datatext_totalgold = "总共:" - L.datatext_savedraid = "已保存进度的团队副本" - L.datatext_currency = "兑换通货:" - L.datatext_fps = " 帧数 & " - L.datatext_ms = " 延时" - L.datatext_playercrit = " 爆击" - L.datatext_playerheal = " 治疗" - L.datatext_avoidancebreakdown = "伤害减免" - L.datatext_lvl = "等级" - L.datatext_boss = "首领" - L.datatext_miss = "未命中" - L.datatext_dodge = "躲闪" - L.datatext_block = "格挡" - L.datatext_parry = "招架" - L.datatext_playeravd = "免伤: " - L.datatext_servertime = "服务器时间: " - L.datatext_localtime = "本地时间: " - L.datatext_mitigation = "等级缓和: " - L.datatext_healing = "治疗: " - L.datatext_damage = "伤害: " - L.datatext_honor = "荣誉: " - L.datatext_killingblows = "击杀: " - L.datatext_ttstatsfor = "状态 " - L.datatext_ttkillingblows = "击杀:" - L.datatext_tthonorkills = "荣誉击杀" - L.datatext_ttdeaths = "死亡:" - L.datatext_tthonorgain = "获得荣誉:" - L.datatext_ttdmgdone = "伤害输出:" - L.datatext_tthealdone = "治疗输出:" - L.datatext_basesassaulted = "突袭基地:" - L.datatext_basesdefended = "防守基地:" - L.datatext_towersassaulted = "突袭哨塔:" - L.datatext_towersdefended = "防守哨塔:" - L.datatext_flagscaptured = "夺取旗帜:" - L.datatext_flagsreturned = "交换旗帜:" - L.datatext_graveyardsassaulted = "突袭墓地:" - L.datatext_graveyardsdefended = "防守墓地:" - L.datatext_demolishersdestroyed = "摧毁投石车:" - L.datatext_gatesdestroyed = "摧毁大门:" - L.datatext_totalmemusage = "总内存占用:" - L.datatext_control = "控制方:" - - L.Slots = { - [1] = {1, "头部", 1000}, - [2] = {3, "肩部", 1000}, - [3] = {5, "胸部", 1000}, - [4] = {6, "腰部", 1000}, - [5] = {9, "手腕", 1000}, - [6] = {10, "手", 1000}, - [7] = {7, "腿部", 1000}, - [8] = {8, "脚", 1000}, - [9] = {16, "主手", 1000}, - [10] = {17, "副手", 1000}, - [11] = {18, "远程", 1000} - } - - L.popup_disableui = "Tukui不支持当前分辨率,想要禁用Tukui吗?(如果你想尝试其他分辨率就点击取消)" - L.popup_install = "当前角色第一次使用Tukui,你必须重载插件以完成配置。" - L.popup_reset = "注意!当前操作将还原Tukui至默认设置,你是否决定继续?" - L.popup_2raidactive = "当前两种团队样式被激活,请选择其中之一。" - L.popup_install_yes = "当然!(建议!)" - L.popup_install_no = "不,这个UI太难用了!" - L.popup_reset_yes = "当然勒~还是预设的好~" - L.popup_reset_no = "不了,否则我会在论坛发帖抱怨的!" - L.popup_fix_ab = "你的动作条存在一些问题。你想重载插件修复它么?" - - L.merchant_repairnomoney = "您没有足够的金币以完成修理!" - L.merchant_repaircost = "您修理装备花费了:" - L.merchant_trashsell = "您包里的垃圾被卖出去了,您赚取了:" - - L.goldabbrev = "|cffffd700g|r" - L.silverabbrev = "|cffc7c7cfs|r" - L.copperabbrev = "|cffeda55fc|r" - - L.error_noerror = "没有错误。" - - L.unitframes_ouf_offline = "离线" - L.unitframes_ouf_dead = "死亡" - L.unitframes_ouf_ghost = "灵魂" - L.unitframes_ouf_lowmana = "低法力值" - L.unitframes_ouf_threattext = "当前目标仇恨:" - L.unitframes_ouf_offlinedps = "离线" - L.unitframes_ouf_deaddps = "|cffff0000[死亡]|r" - L.unitframes_ouf_ghostheal = "灵魂" - L.unitframes_ouf_deadheal = "死亡" - L.unitframes_ouf_gohawk = "切换为雄鹰守护" - L.unitframes_ouf_goviper = "切换为蝰蛇守护" - L.unitframes_disconnected = "断线" - L.unitframes_ouf_wrathspell = "愤怒" - L.unitframes_ouf_starfirespell = "星火术" - - L.tooltip_count = "数量" - - L.bags_noslots = "不能再购买更多的栏位了!" - L.bags_costs = "花费: %.2f G" - L.bags_buyslots = "输入 /bags purchase yes 以购买新的栏位!" - L.bags_openbank = "您必须先打开您的银行!" - L.bags_sort = "当背包或者银行打开的时候,整理和排序其中的物品!" - L.bags_stack = "当背包或者银行打开的时候,对其中不完整的物品进行堆叠!" - L.bags_buybankslot = "购买银行栏位(必须保持银行打开)" - L.bags_search = "查找" - L.bags_sortmenu = "整理" - L.bags_sortspecial = "整理特殊物品" - L.bags_stackmenu = "堆叠" - L.bags_stackspecial = "堆叠特殊物品" - L.bags_showbags = "显示背包" - L.bags_sortingbags = "整理完成。" - L.bags_nothingsort= "不需要整理。" - L.bags_bids = "使用背包: " - L.bags_stackend = "重新堆叠完成。" - L.bags_rightclick_search = "右击开始查找。" - - L.loot_fish = "Fishy loot" -- not sure for this now - L.loot_empty = "Empty slot" -- not sure for this now - - L.chat_invalidtarget = "无效的目标" - - L.mount_wintergrasp = "冬拥湖" - - L.core_autoinv_enable = "自动邀请开启:invite" - L.core_autoinv_enable_c = "自动邀请已开启" - L.core_autoinv_disable = "自动邀请已关闭" - L.core_wf_unlock = "任务追踪已解锁" - L.core_wf_lock = "任务追踪已锁定" - L.core_welcome1 = "欢迎使用 |cffC495DDTukui|r, 版本 " - L.core_welcome2 = "输入 |cff00FFFF/uihelp|r 以获取更多信息或者访问 www.tukui.org" - - L.core_uihelp1 = "|cff00ff00General 通用指令|r" - L.core_uihelp2 = "|cffFF0000/moveui|r - 解锁和移动屏幕中的框架。" - L.core_uihelp3 = "|cffFF0000/rl|r - 重载你的插件。" - L.core_uihelp4 = "|cffFF0000/gm|r - 向G M发送帮助请求或者打开游戏内帮助。" - L.core_uihelp5 = "|cffFF0000/frame|r - 侦测当前鼠标所在框体的名称。(对lua编辑者来说非常有用) " - L.core_uihelp6 = "|cffFF0000/heal|r - 启用团队治疗框体样式。" - L.core_uihelp7 = "|cffFF0000/dps|r - 启用Dps/Tank 团队样式。" - L.core_uihelp8 = "|cffFF0000/bags|r - 整理背包,购买银行栏位或者购买物品。" - L.core_uihelp9 = "|cffFF0000/resetui|r - 重置所有框体配置文件至原始的Tukui。" - L.core_uihelp10 = "|cffFF0000/rd|r - 解散团队。" - L.core_uihelp11 = "|cffFF0000/ainv|r - 通过M语关键词启用自动邀请。你可以通过在聊天框输入“/ainv 你的关键词”来设置你自己的关键词。" - L.core_uihelp100 = "(向下滚动以获取更多的指令。)" - - L.symbol_CLEAR = "取消标记" - L.symbol_SKULL = "骷髅" - L.symbol_CROSS = "十字" - L.symbol_SQUARE = "方形" - L.symbol_MOON = "月亮" - L.symbol_TRIANGLE = "三角形" - L.symbol_DIAMOND = "钻石" - L.symbol_CIRCLE = "大饼" - L.symbol_STAR = "星星" - - L.bind_combat = "您不能在战斗中绑定快捷键。" - L.bind_saved = "所有绑定的快捷键已经被保存。" - L.bind_discard = "所有新设定的快捷键已经呗取消。" - L.bind_instruct = "移动鼠标至动作条按钮上来绑定,按ESC键或者右击取消绑定。" - L.bind_save = "保存绑定" - L.bind_discardbind = "取消绑定" - - L.hunter_unhappy = "你的宠物感到不高兴了!" - L.hunter_content = "你的宠物感到很满足!" - L.hunter_happy = "你的宠物很开心" - - L.move_tooltip = "移动鼠标提示" - L.move_minimap = "移动小地图" - L.move_watchframe = "移动任务追踪" - L.move_gmframe = "移动G M对话框" - L.move_buffs = "移动玩家增益效果" - L.move_debuffs = "移动玩家减益效果" - L.move_shapeshift = "移动姿态或图腾条" - L.move_achievements = "移动成就框体" - L.move_roll = "移动拾取R点框体" - L.move_vehicle = "移动载具界面" - - ------------------------------------------------- - -- INSTALLATION - ------------------------------------------------- - - -- headers - L.install_header_1 = "欢迎" - L.install_header_2 = "1. 要点" - L.install_header_3 = "2. 单位框架" - L.install_header_4 = "3. 特性" - L.install_header_5 = "4. 您应该知道的东西" - L.install_header_6 = "5. 命令" - L.install_header_7 = "6. 完成" - L.install_header_8 = "1. 必要的设定" - L.install_header_9 = "2. 社交" - L.install_header_10= "3. 框架" - L.install_header_11= "4. 成功!" - - -- install - L.install_init_line_1 = "感谢您选择Tukui。" - L.install_init_line_2 = "几个小步骤将引导你安装Tukui. 在每一步中, 你可以选择应用或者跳过当前的设定。" - L.install_init_line_3 = "你也可以选择查看我们提供给您的关于Tukui一些特性的小提示。" - L.install_init_line_4 = "按下教程按键开始查看教程,或者点击安装跳过这一步。" - - -- tutorial 1 - L.tutorial_step_1_line_1 = "这个快速的小教程将给您展示一些Tukui的特性。" - L.tutorial_step_1_line_2 = "首先,将告知你一些使用Tukui前该知道的要点。" - L.tutorial_step_1_line_3 = "安装程序是按照每个角色来设定的。当然一些设定将在整个帐号下适用,您必须要为每一个使用Tukui的角色运行一遍安装程序。程序将在您每个角色第一次运行Tukui时自动显示。 当然, 高阶用户可以在 /Tukui/config/config.lua 中发现这些选项, 新手在游戏中输入/tukui 也可以找到。" - L.tutorial_step_1_line_4 = "高阶用户是指相比于普通的用户他们有能力使用一些新的特新(比如编辑LUA脚本)。新手是指没有编程能力的用户。那么我们建议他们使用游戏内设置面板来设定Tukui至他们想要的样式。" - - -- tutorial 2 - L.tutorial_step_2_line_1 = "Tukui包含了一个由Haste编写的oUF的内建版本. 由它来构建整个屏幕上的各种单位框体,玩家的BUFF/DEBUFF和职业特定的BUFF/DEBUFF." - L.tutorial_step_2_line_2 = "你可以在Wowinterface上搜索oUF来获取更多关于这个工具的信息。" - L.tutorial_step_2_line_3 = "如果你是一个治疗者或者团队领袖,那么你可能需要启用治疗框体。 它显示了更多的raid信息(/heal)。DPS和坦克需要一个相对简单的团队框架(/dps)。如果你不想使用它们中的任何一个,你可以在人物选择界面中的插件列表里禁用它们。" - L.tutorial_step_2_line_4 = "你只需要输入/moveui,,既可以简单的移动单位框架。" - - -- tutorial 3 - L.tutorial_step_3_line_1 = "Tukui是一个重新设计过的暴雪用户界面。不多不少,大概所有的原始特性你都可以在Tukui中体验到。 有些仅有的原始界面不能实现的功能在屏幕中是看不到的, 比如说当你访问商人的时候自动售卖灰色的物品,又或者自动整理背包内的物品。" - L.tutorial_step_3_line_2 = "因为并不是所有人都喜欢诸如:伤害统计, 首领模块, 仇恨统计, 等等这些模块, 但我们认为这是非常好的事. Tukui是为不同职业,不同口味,不同爱好,不同天赋等等最大化的玩家群体所编写的。 这就是为什么Tukui是当前最火的UI。 它满足了每一个人的游戏体验并且完全可供编辑。 它也被设计于为那些想要打造自己特性的UI的初学者们提供了一个很好的开端而无需专注于插件本身的构造。 从2009年开始,许多用户使用Tukui作为基本架构来制作他们自己的插件。 你可以到我们的网站上看看那些Tukui改版!" - L.tutorial_step_3_line_3 = "用户们可以到我们官方网站的Tukui配套插件区或者访问 www.wowinterface.com 来获取安装更多有额外特性的插件。" - L.tutorial_step_3_line_4 = "" - - -- tutorial 4 - L.tutorial_step_4_line_1 = "想要设置动作条的数目, 移动鼠标至左/右动作条的底部背景框架。可以使用相同的方法设定右边的动作条,点击顶部或底部。 想要从聊天框内复制文字, 鼠标点击在聊天框右上角出现的小按钮即可。" - L.tutorial_step_4_line_2 = "小地图的边框可以改变颜色。绿色的时候说明你有未读邮件,红色表明你有新的行事历邀请 ,橙色表明你两者都有。" - L.tutorial_step_4_line_3 = "你可以点击80%的信息栏来打开更多的BLZ面板。 好友和公会信息也具有右键特性。" - L.tutorial_step_4_line_4 = "这里有一些下拉菜单可以使用。 右键[X] (关闭) 背包按钮 将会显示下拉菜单比如:显示背包,整理背包,显示钥匙扣等等。 鼠标中间点击小地图将会显示宏命令按钮。" - - -- tutorial 5 - L.tutorial_step_5_line_1 = "最后,Tukui有一些实用的命令,下面是列表" - L.tutorial_step_5_line_2 = "/moveui 允许你移动屏幕上的大多数框体至任何地方。 /enable 和 /disable 被用于快速开启或关闭大多数插件。 /rl 重载插件。 /heal 启用治疗团队框架。/dps 启用坦克/输出团队框架。" - L.tutorial_step_5_line_3 = "/tt 让你M语你的目标 /rc 立即进行团队就绪检查 /rd 解散团队或小队 /bags 通过命令行来显示一些可用信息 /ainv 通过M语你来启用自动邀请 (/ainv off) 关闭自动邀请。" - L.tutorial_step_5_line_4 = "/gm 打开帮助面板 /install, /resetui or /tutorial 载入安装程序 /frame 在聊天框里输入当前鼠标下框体的一些额外的信息。" - - -- tutorial 6 - L.tutorial_step_6_line_1 = "教程结束了。你可以在任何时候输入/tutorial来重新参看教程。" - L.tutorial_step_6_line_2 = "我建议你仔细的看一下config/config.lua 或者输入 /Tukui 来设置你所需要的属性。" - L.tutorial_step_6_line_3 = "你可以继续安装,如果安装已经完成你可以重置插件。" - L.tutorial_step_6_line_4 = "" - - -- install step 1 - L.install_step_1_line_1 = "这些步骤将会为Tukui设置正确的环境变量。" - L.install_step_1_line_2 = "第一步将会应用一些比较重要的设置。" - L.install_step_1_line_3 = "这一步 |cffff0000推荐|r 所有的用户应用, 除非你只想应用一些特殊的设定。" - L.install_step_1_line_4 = "点击继续来应用这些设定,或者如果你想要跳过这些步骤点击跳过。" - - -- install step 2 - L.install_step_2_line_0 = "发现另外的聊天插件。我们将略过这一步。请按跳过继续安装。" - L.install_step_2_line_1 = "第二步应用了正确的聊天设定。" - L.install_step_2_line_2 = "如果你是一个新用户,那么非常建议你应用这一步。 如果您已经在使用,那么可以跳过这一步。" - L.install_step_2_line_3 = "由于应用这些设定,聊天字体过大是正常的。 当安装完成之后它会恢复正常。" - L.install_step_2_line_4 = "点击继续来继续安装,或者点击跳过,如果你想跳过这一步骤。" - - -- install step 3 - L.install_step_3_line_1 = "第三步且是最后一步将会设定原始框体的位置。" - L.install_step_3_line_2 = "非常 |cffff0000推荐|r 新手应用这一步。" - L.install_step_3_line_3 = "" - L.install_step_3_line_4 = "点击继续来继续安装,或者点击跳过,如果你想跳过这一步骤。" - - -- install step 4 - L.install_step_4_line_1 = "安装完成~" - L.install_step_4_line_2 = "请点击”完成“按钮重载插件。" - L.install_step_4_line_3 = "" - L.install_step_4_line_4 = "享受Tukui吧! 访问我们: www.tukui.org!" - - -- buttons - L.install_button_tutorial = "教程" - L.install_button_install = "安装" - L.install_button_next = "下一步" - L.install_button_skip = "跳过" - L.install_button_continue = "继续" - L.install_button_finish = "完成" - L.install_button_close = "关闭" -end \ No newline at end of file diff --git a/Tukui/locales/english.lua b/Tukui/locales/english.lua deleted file mode 100644 index ad855d6..0000000 --- a/Tukui/locales/english.lua +++ /dev/null @@ -1,318 +0,0 @@ --- localization for enUS and enGB -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -L.chat_BATTLEGROUND_GET = "BG" -L.chat_BATTLEGROUND_LEADER_GET = "BG" -L.chat_BN_WHISPER_GET = "From" -L.chat_GUILD_GET = "G" -L.chat_OFFICER_GET = "O" -L.chat_PARTY_GET = "P" -L.chat_PARTY_GUIDE_GET = "P" -L.chat_PARTY_LEADER_GET = "P" -L.chat_RAID_GET = "R" -L.chat_RAID_LEADER_GET = "R" -L.chat_RAID_WARNING_GET = "W" -L.chat_WHISPER_GET = "From" -L.chat_FLAG_AFK = "[AFK]" -L.chat_FLAG_DND = "[DND]" -L.chat_FLAG_GM = "[GM]" -L.chat_ERR_FRIEND_ONLINE_SS = "is now |cff298F00online|r" -L.chat_ERR_FRIEND_OFFLINE_S = "is now |cffff0000offline|r" - -L.chat_general = "General" -L.chat_trade = "Trade" -L.chat_defense = "LocalDefense" -L.chat_recrutment = "GuildRecruitment" -L.chat_lfg = "LookingForGroup" - -L.disband = "Disbanding group ?" - -L.datatext_notalents ="No Talents" -L.datatext_download = "Download: " -L.datatext_bandwidth = "Bandwidth: " -L.datatext_guild = "Guild" -L.datatext_noguild = "No Guild" -L.datatext_bags = "Bags: " -L.datatext_friends = "Friends" -L.datatext_online = "Online: " -L.datatext_armor = "Armor" -L.datatext_earned = "Earned:" -L.datatext_spent = "Spent:" -L.datatext_deficit = "Deficit:" -L.datatext_profit = "Profit:" -L.datatext_timeto = "Time to" -L.datatext_friendlist = "Friends list:" -L.datatext_playersp = "sp" -L.datatext_playerap = "ap" -L.datatext_playerhaste = "haste" -L.datatext_dps = "dps" -L.datatext_hps = "hps" -L.datatext_playerarp = "arp" -L.datatext_session = "Session: " -L.datatext_character = "Character: " -L.datatext_server = "Server: " -L.datatext_totalgold = "Total: " -L.datatext_savedraid = "Saved Raid(s)" -L.datatext_currency = "Currency:" -L.datatext_fps = " fps & " -L.datatext_ms = " ms" -L.datatext_playercrit = " crit" -L.datatext_playerheal = " heal" -L.datatext_avoidancebreakdown = "Avoidance Breakdown" -L.datatext_lvl = "lvl" -L.datatext_boss = "Boss" -L.datatext_miss = "Miss" -L.datatext_dodge = "Dodge" -L.datatext_block = "Block" -L.datatext_parry = "Parry" -L.datatext_playeravd = "avd: " -L.datatext_servertime = "Server Time: " -L.datatext_localtime = "Local Time: " -L.datatext_mitigation = "Mitigation By Level: " -L.datatext_healing = "Healing: " -L.datatext_damage = "Damage: " -L.datatext_honor = "Honor: " -L.datatext_killingblows = "Killing Blows: " -L.datatext_ttstatsfor = "Stats for " -L.datatext_ttkillingblows = "Killing Blows:" -L.datatext_tthonorkills = "Honorable Kills:" -L.datatext_ttdeaths = "Deaths:" -L.datatext_tthonorgain = "Honor Gained:" -L.datatext_ttdmgdone = "Damage Done:" -L.datatext_tthealdone = "Healing Done:" -L.datatext_basesassaulted = "Bases Assaulted:" -L.datatext_basesdefended = "Bases Defended:" -L.datatext_towersassaulted = "Towers Assaulted:" -L.datatext_towersdefended = "Towers Defended:" -L.datatext_flagscaptured = "Flags Captured:" -L.datatext_flagsreturned = "Flags Returned:" -L.datatext_graveyardsassaulted = "Graveyards Assaulted:" -L.datatext_graveyardsdefended = "Graveyards Defended:" -L.datatext_demolishersdestroyed = "Demolishers Destroyed:" -L.datatext_gatesdestroyed = "Gates Destroyed:" -L.datatext_totalmemusage = "Total Memory Usage:" -L.datatext_control = "Controlled by:" - -L.Slots = { - [1] = {1, "Head", 1000}, - [2] = {3, "Shoulder", 1000}, - [3] = {5, "Chest", 1000}, - [4] = {6, "Waist", 1000}, - [5] = {9, "Wrist", 1000}, - [6] = {10, "Hands", 1000}, - [7] = {7, "Legs", 1000}, - [8] = {8, "Feet", 1000}, - [9] = {16, "Main Hand", 1000}, - [10] = {17, "Off Hand", 1000}, - [11] = {18, "Ranged", 1000} -} - -L.popup_disableui = "Tukui doesn't work for this resolution, do you want to disable Tukui? (Cancel if you want to try another resolution)" -L.popup_install = "First time running Tukui V13 with this Character. You must reload your UI to set Action Bars, Variables and Chat Frames." -L.popup_reset = "Warning! This will reset everything to Tukui default. Do you want to proceed?" -L.popup_2raidactive = "2 raid layouts are active, please select a layout." -L.popup_install_yes = "Yeah! (recommended!)" -L.popup_install_no = "No, it sux so hard" -L.popup_reset_yes = "Yeah baby!" -L.popup_reset_no = "No, or else I'll QQ in the forums!" -L.popup_fix_ab = "There is something wrong with your action bar. Do you want to reloadui to fix it?" - -L.merchant_repairnomoney = "You don't have enough money to repair!" -L.merchant_repaircost = "Your items have been repaired for" -L.merchant_trashsell = "Your vendor trash has been sold and you earned" - -L.goldabbrev = "|cffffd700g|r" -L.silverabbrev = "|cffc7c7cfs|r" -L.copperabbrev = "|cffeda55fc|r" - -L.error_noerror = "No error yet." - -L.unitframes_ouf_offline = "Offline" -L.unitframes_ouf_dead = "Dead" -L.unitframes_ouf_ghost = "Ghost" -L.unitframes_ouf_lowmana = "LOW MANA" -L.unitframes_ouf_threattext = "Threat on current target:" -L.unitframes_ouf_offlinedps = "Offline" -L.unitframes_ouf_deaddps = "|cffff0000[DEAD]|r" -L.unitframes_ouf_ghostheal = "GHOST" -L.unitframes_ouf_deadheal = "DEAD" -L.unitframes_ouf_gohawk = "GO HAWK" -L.unitframes_ouf_goviper = "GO VIPER" -L.unitframes_disconnected = "D/C" -L.unitframes_ouf_wrathspell = "Wrath" -L.unitframes_ouf_starfirespell = "Starfire" - -L.tooltip_count = "Count" - -L.bags_noslots = "can't buy anymore slots!" -L.bags_costs = "Cost: %.2f gold" -L.bags_buyslots = "Buy new slot with /bags purchase yes" -L.bags_openbank = "You need to open your bank first." -L.bags_sort = "sort your bags or your bank, if open." -L.bags_stack = "fill up partial stacks in your bags or bank, if open." -L.bags_buybankslot = "buy bank slot. (need to have bank open)" -L.bags_search = "Search" -L.bags_sortmenu = "Sort" -L.bags_sortspecial = "Sort Special" -L.bags_stackmenu = "Stack" -L.bags_stackspecial = "Stack Special" -L.bags_showbags = "Show Bags" -L.bags_sortingbags = "Sorting finished." -L.bags_nothingsort= "Nothing to sort." -L.bags_bids = "Using bags: " -L.bags_stackend = "Restacking finished." -L.bags_rightclick_search = "Right-click to search." - -L.loot_fish = "Fishy loot" -L.loot_empty = "Empty slot" - -L.chat_invalidtarget = "Invalid Target" - -L.mount_wintergrasp = "Wintergrasp" - -L.core_autoinv_enable = "Autoinvite ON: invite" -L.core_autoinv_enable_c = "Autoinvite ON: " -L.core_autoinv_disable = "Autoinvite OFF" -L.core_wf_unlock = "WatchFrame unlock" -L.core_wf_lock = "WatchFrame lock" -L.core_welcome1 = "Welcome to |cffC495DDTukui|r, version " -L.core_welcome2 = "Type |cff00FFFF/uihelp|r for more info or visit www.tukui.org" - -L.core_uihelp1 = "|cff00ff00General Slash Commands|r" -L.core_uihelp2 = "|cffFF0000/moveui|r - Unlock and move elements around the screen." -L.core_uihelp3 = "|cffFF0000/rl|r - Reloads your User Interface." -L.core_uihelp4 = "|cffFF0000/gm|r - Send GM tickets or shows WoW in-game help." -L.core_uihelp5 = "|cffFF0000/frame|r - Detect the frame name your mouse is currently on. (very useful for lua editors)" -L.core_uihelp6 = "|cffFF0000/heal|r - Enable healing raid layout." -L.core_uihelp7 = "|cffFF0000/dps|r - Enable Dps/Tank raid layout." -L.core_uihelp8 = "|cffFF0000/bags|r - For sorting, buying bank slot, or stacking items in your bags." -L.core_uihelp9 = "|cffFF0000/resetui|r - Reset Tukui to default." -L.core_uihelp10 = "|cffFF0000/rd|r - Disband raid." -L.core_uihelp11 = "|cffFF0000/ainv|r - Enable autoinvite via keyword on whisper. You can set your own keyword by typing `/ainv myword`" -L.core_uihelp100 = "(Scroll up for more commands ...)" - -L.symbol_CLEAR = "Clear" -L.symbol_SKULL = "Skull" -L.symbol_CROSS = "Cross" -L.symbol_SQUARE = "Square" -L.symbol_MOON = "Moon" -L.symbol_TRIANGLE = "Triangle" -L.symbol_DIAMOND = "Diamond" -L.symbol_CIRCLE = "Circle" -L.symbol_STAR = "Star" - -L.bind_combat = "You can't bind keys in combat." -L.bind_saved = "All keybindings have been saved." -L.bind_discard = "All newly set keybindings have been discarded." -L.bind_instruct = "Hover your mouse over any actionbutton to bind it. Press the escape key or right click to clear the current actionbuttons keybinding." -L.bind_save = "Save bindings" -L.bind_discardbind = "Discard bindings" - -L.hunter_unhappy = "Your pet is unhappy!" -L.hunter_content = "Your pet is content!" -L.hunter_happy = "Your pet is happy!" - -L.move_tooltip = "Move Tooltip" -L.move_minimap = "Move Minimap" -L.move_watchframe = "Move Quests" -L.move_gmframe = "Move Ticket" -L.move_buffs = "Move Player Buffs" -L.move_debuffs = "Move Player Debuffs" -L.move_shapeshift = "Move Shapeshift/Totem" -L.move_achievements = "Move Achievements" -L.move_roll = "Move Loot Roll Frame" -L.move_vehicle = "Move Vehicle Seat" -L.move_extrabutton = "Extra Button" - -------------------------------------------------- --- INSTALLATION -------------------------------------------------- - --- headers -L.install_header_1 = "Welcome" -L.install_header_2 = "1. Essentials" -L.install_header_3 = "2. Unitframes" -L.install_header_4 = "3. Features" -L.install_header_5 = "4. Things you should know!" -L.install_header_6 = "5. Commands" -L.install_header_7 = "6. Finished" -L.install_header_8 = "1. Essential Settings" -L.install_header_9 = "2. Social" -L.install_header_10= "3. Frames" -L.install_header_11= "4. Success!" - --- install -L.install_init_line_1 = "Thank you for choosing Tukui!" -L.install_init_line_2 = "You will be guided through the installation process in a few simple steps. At each step, you can decide whether or not you want to apply or skip the presented settings." -L.install_init_line_3 = "You are also given the possibility to be shown a brief tutorial on some of the features of Tukui." -L.install_init_line_4 = "Press the 'Tutorial' button to be guided through this small introduction, or press 'Install' to skip this step." - --- tutorial 1 -L.tutorial_step_1_line_1 = "This quick tutorial will show you some of the features in Tukui." -L.tutorial_step_1_line_2 = "First, the essentials that you should know before you can play with this UI." -L.tutorial_step_1_line_3 = "This installer is partially character-specific. While some of the settings that will be applied later on are account-wide, you need to run install script for each new character running Tukui. Script is auto show on every new character logging into Tukui for the first time. Also, the options can be found in /Tukui/config/config.lua for `Power` users or by typing /tukui in game for `Friendly` users." -L.tutorial_step_1_line_4 = "A power user is a user of a personal computer who has the ability to use advanced features (ex: Lua editing) which are beyond the abilities of normal users. A friendly user is a normal user and is not necessarily capable of programming. It's recommended for them to use our in game configuration tool (/tukui) for settings what they want displayed on Tukui." - --- tutorial 2 -L.tutorial_step_2_line_1 = "Tukui includes an embedded version of oUF (oUFTukui) created by Haste. This handles all of the unitframes on the screen, the buffs and debuffs, and the class-specific elements." -L.tutorial_step_2_line_2 = "You can visit wowinterface.com and search for oUF for more information about this tool." -L.tutorial_step_2_line_3 = "If you play as a healer or a raid leader, you may want to enable healer unit frames. They display more information about your raid. (/heal) A dps or tank should use our simple raid display. (/dps) If you don't want to show any of them or use something else, you can disable it in addon manager from character login list." -L.tutorial_step_2_line_4 = "To easily change the unitframe position, just type /moveui." - --- tutorial 3 -L.tutorial_step_3_line_1 = "Tukui is a redesigned Blizzard UI. Nothing less, nothing more. Approx all features you can see on Default UI is available thought Tukui. The only features not available thought default UI are some automated features not really visible on screen, like example auto selling gray when visiting a vendor or, another example, auto sort items in bags." -L.tutorial_step_3_line_2 = "Because not everyone is enjoying things like DPS meters, Boss mods, Threat meter, etc, we judge that it's the best thing to do. Tukui is made around this idea to fit at maximum all class, roles, specs, type of gameplay, taste of users, etc. That's why Tukui is one of the most popular UI at the moment. It fit everyone gameplay and is extremly editable. It's also designed to be a very good start for everyone that want to make their own custom UI without depending on addons. Tons of users since 2009 are now using Tukui as a base for their own UI. Take a look into our Edited Packages from our website!" -L.tutorial_step_3_line_3 = "Users may want to visit our extra mods section into our website or by visiting www.wowinterface.com to install additionnal features or mods." -L.tutorial_step_3_line_4 = "" - --- tutorial 4 -L.tutorial_step_4_line_1 = "To set how many bars you want, mouseover on left or right of bottom action bar background. Do the same on the right, via top and bottom. To copy text from the chat frame, click the button show on mouseover on the right corner of chat frames." -L.tutorial_step_4_line_2 = "The minimap border changes colour. It is green when you have new mail, red when you have a new calendar invite, and orange when you have both." -L.tutorial_step_4_line_3 = "You can left-click thought 80% of datatext to show various panels from Blizzard. Friend and Guild Datatext have right-click features aswell." -L.tutorial_step_4_line_4 = "There is some dropdown menu available. Right-clicking on [X] (Close) bag button will show a dropdown menu to show bags, sort items, show keyring, etc. Middle-clicking thought Minimap will show the micro menu." - --- tutorial 5 -L.tutorial_step_5_line_1 = "Lastly, Tukui includes useful slash commands. Below is a list." -L.tutorial_step_5_line_2 = "/moveui allow you to move lots of frames anywhere on the screen. /enable and /disable are used to quickly enable and disable addons. /rl reloads the UI. /heal enable the healer raid unit frames and /dps enable the dps/tank raid unit frames." -L.tutorial_step_5_line_3 = "/tt lets you whisper your target. /rc initiates a ready check. /rd disbands a party or raid. /bags display some features available thought command line. /ainv enable auto invite by whisper on you. (/ainv off) to turn it off" -L.tutorial_step_5_line_4 = "/gm toggles the Help frame. /install, /resetui or /tutorial loads this installer. /frame print the name and parent of the frame below the cursor respectively with additionnal information." - --- tutorial 6 -L.tutorial_step_6_line_1 = "The tutorial is complete. You can choose to reconsult it at any time by typing /tutorial." -L.tutorial_step_6_line_2 = "I suggest you have a look through config/config.lua or by typing /Tukui to customize the UI to your needs." -L.tutorial_step_6_line_3 = "You can now continue install the UI if it's not done yet or if you want to reset to default!" -L.tutorial_step_6_line_4 = "" - --- install step 1 -L.install_step_1_line_1 = "These steps will apply the correct CVar settings for Tukui." -L.install_step_1_line_2 = "The first step applies the essential settings." -L.install_step_1_line_3 = "This is |cffff0000recommended|r for any user, unless you want to apply only a specific part of the settings." -L.install_step_1_line_4 = "Click 'Continue' to apply the settings, or click 'Skip' if you wish to skip this step." - --- install step 2 -L.install_step_2_line_0 = "Another chat addon is found. We will ignore this step. Please press skip to continue installation." -L.install_step_2_line_1 = "The second step applies the correct chat setup." -L.install_step_2_line_2 = "If you are a new user, this step is recommended. If you are an existing user, you may want to skip this step." -L.install_step_2_line_3 = "It is normal that your chat font will appear too big upon applying these settings. It will revert back to normal when finishing the installation." -L.install_step_2_line_4 = "Click 'Continue' to apply the settings, or click 'Skip' if you wish to skip this step." - --- install step 3 -L.install_step_3_line_1 = "The third and final step applies default frames position." -L.install_step_3_line_2 = "This step is |cffff0000recommended|r for any new user." -L.install_step_3_line_3 = "" -L.install_step_3_line_4 = "Click 'Continue' to apply the settings, or click 'Skip' if you wish to skip this step." - --- install step 4 -L.install_step_4_line_1 = "Installation is complete." -L.install_step_4_line_2 = "Please click the 'Finish' button to reload the UI." -L.install_step_4_line_3 = "" -L.install_step_4_line_4 = "Enjoy Tukui! Visit us at www.tukui.org!" - --- buttons -L.install_button_tutorial = "Tutorial" -L.install_button_install = "Install" -L.install_button_next = "Next" -L.install_button_skip = "Skip" -L.install_button_continue = "Continue" -L.install_button_finish = "Finish" -L.install_button_close = "Close" diff --git a/Tukui/locales/french.lua b/Tukui/locales/french.lua deleted file mode 100644 index 499ebc9..0000000 --- a/Tukui/locales/french.lua +++ /dev/null @@ -1,304 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -if T.client == "frFR" then - L.chat_BATTLEGROUND_GET = "BG" - L.chat_BATTLEGROUND_LEADER_GET = "BG" - L.chat_BN_WHISPER_GET = "De" - L.chat_GUILD_GET = "G" - L.chat_OFFICER_GET = "O" - L.chat_PARTY_GET = "G" - L.chat_PARTY_GUIDE_GET = "G" - L.chat_PARTY_LEADER_GET = "G" - L.chat_RAID_GET = "R" - L.chat_RAID_LEADER_GET = "R" - L.chat_RAID_WARNING_GET = "W" - L.chat_WHISPER_GET = "De" - L.chat_FLAG_AFK = "[ABS]" - L.chat_FLAG_DND = "[NPD]" - L.chat_FLAG_GM = "[MJ]" - L.chat_ERR_FRIEND_ONLINE_SS = "s'est |cff298F00connecté|r" - L.chat_ERR_FRIEND_OFFLINE_S = "s'est |cffff0000déconnecté|r" - - L.chat_general = "Général" - L.chat_trade = "Commerce" - L.chat_defense = "DéfenseLocale" - L.chat_recrutment = "RecrutementDeGuilde" - L.chat_lfg = "RechercheDeGroupe" - - L.disband = "Dissoudre le groupe ?" - - L.datatext_notalents ="Aucun talents" - L.datatext_download = "Téléchargement : " - L.datatext_bandwidth = "Bande passante : " - L.datatext_guild = "Guilde" - L.datatext_noguild = "Pas de Guilde" - L.datatext_bags = "Sacs : " - L.datatext_friends = "Amis" - L.datatext_online = "En ligne : " - L.datatext_armor = "Armure" - L.datatext_earned = "Gagné : " - L.datatext_spent = "Dépensé : " - L.datatext_deficit = "Déficit : " - L.datatext_profit = "Profit : " - L.datatext_timeto = "Temps restant" - L.datatext_friendlist = "Liste d'amis : " - L.datatext_playersp = "sp" - L.datatext_playerap = "ap" - L.datatext_playerhaste = "hâte" - L.datatext_dps = "dps" - L.datatext_hps = "hps" - L.datatext_playerarp = "arp" - L.datatext_session = "Session : " - L.datatext_character = "Personnage : " - L.datatext_server = "Serveur : " - L.datatext_totalgold = "Total : " - L.datatext_savedraid = "Raid(s) enregistré(s)" - L.datatext_currency = "Monnaie : " - L.datatext_fps = " fps & " - L.datatext_ms = " ms" - L.datatext_playercrit = " crit" - L.datatext_playerheal = " heal" - L.datatext_avoidancebreakdown = "Évitement" - L.datatext_lvl = "lvl" - L.datatext_boss = "boss" - L.datatext_miss = "Coup raté" - L.datatext_dodge = "Esquive" - L.datatext_block = "Bloquer" - L.datatext_parry = "Parade" - L.datatext_playeravd = "avd : " - L.datatext_servertime = "Heure Serveur : " - L.datatext_localtime = "Heure Locale : " - L.datatext_mitigation = "Mitigation par Level : " - L.datatext_healing = "Soins : " - L.datatext_damage = "Dégâts : " - L.datatext_honor = "Honneur : " - L.datatext_killingblows = "Coups fatals : " - L.datatext_ttstatsfor = "Statistiques pour " - L.datatext_ttkillingblows = "Coups fatals : " - L.datatext_tthonorkills = "Victoires honorables : " - L.datatext_ttdeaths = "Morts : " - L.datatext_tthonorgain = "Points d'honneur gagnés : " - L.datatext_ttdmgdone = "Dégâts effectués : " - L.datatext_tthealdone = "Soins prodigués : " - L.datatext_basesassaulted = "Bases Attaquées : " - L.datatext_basesdefended = "Bases Défendues : " - L.datatext_towersassaulted = "Tours Attaquées : " - L.datatext_towersdefended = "Tours Défendues : " - L.datatext_flagscaptured = "Drapeaux Capturés : " - L.datatext_flagsreturned = "Drapeaux Récupérés : " - L.datatext_graveyardsassaulted = "Cimetières Attaqués : " - L.datatext_graveyardsdefended = "Cimetières Défendus : " - L.datatext_demolishersdestroyed = "Démolisseurs Détruits : " - L.datatext_gatesdestroyed = "Portes Détruites : " - L.datatext_totalmemusage = "Utilisation Totale de la Mémoire : " - L.datatext_control = "Controlé par : " - - L.Slots = { - [1] = {1, "Tête", 1000}, - [2] = {3, "Épaule", 1000}, - [3] = {5, "Plastron", 1000}, - [4] = {6, "Ceinture", 1000}, - [5] = {9, "Poignets", 1000}, - [6] = {10, "Mains", 1000}, - [7] = {7, "Jambes", 1000}, - [8] = {8, "Bottes", 1000}, - [9] = {16, "Main droite", 1000}, - [10] = {17, "Main gauche", 1000}, - [11] = {18, "À Distance", 1000} - } - - L.popup_disableui = "Tukui ne fonctionne pas avec cette résolution, voulez-vous désactiver Tukui? (Annuler si vous souhaitez essayer une autre résolution)" - L.popup_install = "Première fois sur Tukui V13 avec ce personnage. Vous devez recharger l'interface utilisateur afin de configurer les barres d'action, les variables et les cadres de Chat." - L.popup_2raidactive = "2 modèles de raid sont activés, merci d'en choisir un." - L.popup_reset = "Attention ! Vous allez charger les paramètres par défaut de Tukui. Voulez-vous poursuivre ?" - L.popup_install_yes = "Ouais! (recommandé!)" - L.popup_install_no = "Non, ça craint trop!" - L.popup_reset_yes = "Ouais bébé!" - L.popup_reset_no = "Non, ou j'irai pleurer sur les forums!" - L.popup_fix_ab = "Quelque chose ne va pas avec vos barres d'action. Voulez-vous recharger l'interface pour les réparer?" - - L.merchant_repairnomoney = "Vous n'avez pas assez d'argent pour réparer !" - L.merchant_repaircost = "Tous les objets ont été réparés pour" - L.merchant_trashsell = "Les objets gris ont été vendus et vous avez gagné" - - - L.goldabbrev = "|cffffd700o|r" - L.silverabbrev = "|cffc7c7cfa|r" - L.copperabbrev = "|cffeda55fc|r" - - L.error_noerror = "pas d'erreur pour le moment." - - L.unitframes_ouf_offline = "Hors ligne" - L.unitframes_ouf_dead = "Mort" - L.unitframes_ouf_ghost = "Fantome" - L.unitframes_ouf_lowmana = "MANA FAIBLE" - L.unitframes_ouf_threattext = "Menace sur la cible actuelle: " - L.unitframes_ouf_offlinedps = "Hors ligne" - L.unitframes_ouf_deaddps = "|cffff0000[MORT]|r" - L.unitframes_ouf_ghostheal = "FANTOME" - L.unitframes_ouf_deadheal = "MORT" - L.unitframes_ouf_gohawk = "GO FAUCON" - L.unitframes_ouf_goviper = "GO VIPÈRE" - L.unitframes_disconnected = "Déco" - L.unitframes_ouf_wrathspell = "Colère" - L.unitframes_ouf_starfirespell = "Feu stellaire" - - L.tooltip_count = "Total" - - L.bags_noslots = "Vous ne pouvez pas acheter plus de place !" - L.bags_costs = "Prix : %.2f or" - L.bags_buyslots = "Achetez un nouvel emplacement avec /bags" - L.bags_openbank = "Vous devez d'abord ouvrir votre banque." - L.bags_sort = "Trier vos sacs, ou votre banque si elle est ouverte." - L.bags_stack = "Empiler vos objets dans votre sac, ou en banque si elle est ouverte." - L.bags_buybankslot = "Acheter une place à la banque. (nécessite d'avoir votre banque ouverte)" - L.bags_search = "Recherche" - L.bags_sortmenu = "Trier" - L.bags_sortspecial = "Tri personnalisé" - L.bags_stackmenu = "Empiler" - L.bags_stackspecial = "Empilage personnalisé" - L.bags_showbags = "Montrer les sacs" - L.bags_sortingbags = "Tri terminé." - L.bags_nothingsort= "Rien à trier." - L.bags_bids = "Emplacements utilisés : " - L.bags_stackend = "Empilage terminé." - L.bags_rightclick_search = "Clic-droit pour rechercher." - - L.loot_fish = "Poisson!" - L.loot_empty = "Emplacement vide" - - L.chat_invalidtarget = "Cible non valide" - - L.mount_wintergrasp = "Joug-d'hiver" - - L.core_autoinv_enable = "Invitation automatique : invite" - L.core_autoinv_enable_c = "Invitation automatique activée " - L.core_autoinv_disable = "Invitation automatique désactivée" - L.core_wf_unlock = "Fenêtre de suivi des quêtes déverrouillée" - L.core_wf_lock = "Fenêtre de suivi des quêtes verrouillée" - L.core_welcome1 = "Bienvenue sur |cffC495DDTukui|r, version " - L.core_welcome2 = "Tapez |cff00FFFF/uihelp|r pour plus de détails ou visitez www.tukui.org" - - L.core_uihelp1 = "|cff00ff00Commandes générales|r" - L.core_uihelp2 = "|cffFF0000/moveui|r - Débloque et bouge les éléments affichés à l'écran." - L.core_uihelp3 = "|cffFF0000/rl|r - Recharge votre interface utilisateur." - L.core_uihelp4 = "|cffFF0000/gm|r - Envoi un ticket ou consulte l'aide en jeu." - L.core_uihelp5 = "|cffFF0000/frame|r - Detecte l'élément de l'interface désigné par le pointeur de la souris. (Vraiment pratique pour éditer un fichier .lua)" - L.core_uihelp6 = "|cffFF0000/heal|r - Active le schéma de raid soigneur." - L.core_uihelp7 = "|cffFF0000/dps|r - Active le schéma de raid dps/tank." - L.core_uihelp8 = "|cffFF0000/bags|r - Pour trier, acheter un emplacement à la banque ou empiler les objets dans vos sacs." - L.core_uihelp9 = "|cffFF0000/resetui|r - Relance Tukui par défaut." - L.core_uihelp10 = "|cffFF0000/rd|r - Dissout le raid." - L.core_uihelp11 = "|cffFF0000/ainv|r - Active l'auto-invitation via mot clef par message privé. Vous pouvez définir votre mot clef en saisissant la commande `/ainv votremot`" - L.core_uihelp100 = "(Faites défiler le texte vers le haut pour plus de commandes...)" - - L.symbol_CLEAR = "Aucun" - L.symbol_SKULL = "Crâne" - L.symbol_CROSS = "Croix" - L.symbol_SQUARE = "Carré" - L.symbol_MOON = "Lune" - L.symbol_TRIANGLE = "Triangle" - L.symbol_DIAMOND = "Losange" - L.symbol_CIRCLE = "Cercle" - L.symbol_STAR = "Etoile" - - L.bind_combat = "Vous ne pouvez pas assigner une touche en combat." - L.bind_saved = "Vos assignations de touches ont été sauvegardées." - L.bind_discard = "Vos nouvelles assignations de touches n'ont pas été sauvegardées." - L.bind_instruct = "Passez votre souris sur la barre d'action pour assigner une touche. Appuyez sur la touche ECHAP ou faites un clic droit pour effacer le bouton d'action en cours." - L.bind_save = "Sauvegarder les assignations." - L.bind_discardbind = "Annuler les assignations." - - L.hunter_unhappy = "Votre familier n'est pas heureux !" - L.hunter_content = "Votre familier est heureux !" - L.hunter_happy = "Votre familier est très heureux !" - - L.move_tooltip = "Bouger l'infobulle" - L.move_minimap = "Bouger la Minimap" - L.move_watchframe = "Bouger la fenêtre d'Objectifs" - L.move_gmframe = "Bouger le Ticket MJ" - L.move_buffs = "Bouger les améliorations du joueur" - L.move_debuffs = "Bouger les afflictions du joueur" - L.move_shapeshift = "Bouger la barre de formes/totems" - L.move_achievements = "Bouger la fenêtre des Hauts-Faits" - L.move_roll = "Bouger la fenêtre d'attribution du butin" - L.move_vehicle = "Bouger le schéma du véhicule" - L.move_extrabutton = "Extra Button" - - -- tuto/install - L.install_header_1 = "Bienvenue" - L.install_header_2 = "1. Principal" - L.install_header_3 = "2. Unitframes" - L.install_header_4 = "3. Caractéristiques" - L.install_header_5 = "4. Ce que vous devez savoir !" - L.install_header_6 = "5. Commandes" - L.install_header_7 = "6. Terminé" - L.install_header_8 = "1. Options Principales" - L.install_header_9 = "2. Social" - L.install_header_10= "3. Cadres" - L.install_header_11= "4. Succès !" - - L.install_init_line_1 = "Merci d'avoir choisi Tukui !" - L.install_init_line_2 = "Vous serez guidé au travers du processus d'installation par quelques étapes simples. A chaque étape, vous pouvez décider d'appliquer ou non les paramètres présentés." - L.install_init_line_3 = "Vous avez également la possibilité de voir un bref tutoriel sur les différentes caractéristiques de Tukui." - L.install_init_line_4 = "Appuyez sur le bouton 'Tutoriel' pour être guidé au travers de cette petite introduction, ou appuyez sur 'Installation' pour passer cette étape." - - L.tutorial_step_1_line_1 = "Ce bref tutoriel vous montrera quelques caractéristiques de Tukui." - L.tutorial_step_1_line_2 = "Tout d'abord, l'essentiel de ce que vous devez savoir avant de pouvoir jouer avec cette interface." - L.tutorial_step_1_line_3 = "Cette installation est partiellement spécifique par personnage. Bien que certains paramètres qui seront appliqués plus tard sont pour tout votre compte, vous devez lancer le script d'installation pour chaque nouveau personnage utilisant Tukui. Le script est montré automatiquement au chargement de chaque nouveau personnage la première fois. En outre, les options peuvent être trouvées dans /Tukui/config/config.lua pour les utilisateurs confirmés ou en tapant /tukui en jeu pour les autres." - L.tutorial_step_1_line_4 = "Un utilisateur confirmé est un utilisateur d'ordinateur qui est capable d'utiliser des fonctions avancées (ex: édition Lua ) lesquelles ne sont pas à portée d'un utilisateur normal. Un utilisateur de base est un utilisateur normal et qui n'est forcément capable de programmer. Il leur est recommandé d'utiliser l'outil de configuration en jeu (/tukui) pour paramétrer ce qu'ils veulent afficher sur Tukui." - - L.tutorial_step_2_line_1 = "Tukui comprend une version embarquée de oUF créé par Trond (Haste) A Ekseth. Ceci manipule beaucoup de Unitframe sur l'écran, les buffs et debuffs, et les éléments spécifiques à une classe." - L.tutorial_step_2_line_2 = "Vous pouvez vous rendre sur wowinterface.com et cherchez après oUF pour plus d'information sur cet outil." - L.tutorial_step_2_line_3 = "Si vous jouez comme soigneur ou leader de raid, vous pouvez activer l'interface de soigneur. Elle affiche beaucoup plus d'informations sur le raid. (/heal) Un dps ou tank utilisera l'affichage simple du raid. (/dps) Si vous ne voulez afficher aucun d'eux et utiliser un autre addon, vous pouvez les désactiver via le gestionnaire d'addon au chargement des personnages." - L.tutorial_step_2_line_4 = "Vous avez juste à taper /moveui pour bouger les Unitframes facilement." - - L.tutorial_step_3_line_1 = "Tukui est une interface refaite de Blizzard. Ni plus, ni moins. A peu près toutes les caractéristiques que vous pouvez voir sur l'interface de base sont disponibles par Tukui. Les seules caractéristiques non disponible sur l'interface par défaut sont quelques caractéristiques automatiques non réellement visibles à l'écran, par exemple vente auto des objets gris chez un marchand ou trier les objets dans les sacs." - L.tutorial_step_3_line_2 = "Parce que tout le monde n'apprécie pas des addons comme les DPS meters, Boss mods, gestion des menaces, etc, nous jugeons que c'est la meilleure chose à faire. Tukui est réalisé dans l'idée de s'adapter au maximum de classes, rôles, spécialisation, type de jeu, goûts des joueurs, etc. C'est pourquoi Tukui est l'une des interfaces les plus populaires du moment. Cela convient à tout style de jeu et est éditable à souhait. C'est aussi présenté afin d'être un bon départ pour celui qui veut faire sa propre interface personnalisée sans dépendre d'autres addons. Des tonnes d'utilisateurs depuis 2009 utilisent désormais Tukui comme une base pour leur propre interface. Allez faire un tour dans notre section 'Edited Packages' sur notre site !" - L.tutorial_step_3_line_3 = "Les utilisateurs peuvent visiter notre section 'extra mods' sur notre site ou visiter WoWInterface." - L.tutorial_step_3_line_4 = "" - - L.tutorial_step_4_line_1 = "Pour définir le nombre de barres que vous voulez, placez votre souris sur la gauche, droite ou le dessous du cadre de fond de la barre d'action. Faites la même chose sur la droite de l'écran, en haut ou en bas du cadre. Pour copier le texte de la fenêtre de dialogue, cliquez sur le bouton vu en passant la souris sur le coin droit de la fenêtre de discussion." - L.tutorial_step_4_line_2 = "Les bords de la mini carte changent de couleur. C'est vert lorsque vous avez du courrier, rouge lorsque vous avez une nouvelle invitation calendrier, orange lorsque ce sont les deux." - L.tutorial_step_4_line_3 = "Vous pouvez faire un clic gauche sur 80% des données textes pour afficher divers panneaux de Blizzard. Les données textes Amis et Guilde ont des caractéristiques via clic droit aussi." - L.tutorial_step_4_line_4 = "Il y a quelques menus contextuels disponibles. Clic droit sur [X] (Fermer) de la fenêtre des sacs vous montrera un menu qui permet de montrer les sacs, les trier, montrer les clés, etc. Clic du milieu sur la mini carte permet d'afficher le micro menu." - - L.tutorial_step_5_line_1 = "Enfin, Tukui comprend des commandes utiles. Voici la liste ci-dessous." - L.tutorial_step_5_line_2 = "/moveui vous permet de bouger beaucoup de cadres n'importe où à l'écran. /enable et /disable sont utilisés pour (dés)activer des addons. /rl recharge l'interface. /heal active l'interface de raid pour soigneur et /dps active l'interface raid pour dps/tank." - L.tutorial_step_5_line_3 = "/tt vous permet du chuchoter à votre cible. /rc permet de demander si tout le monde est prêt. /rd dissoud un groupe ou raid. /bags affiche quelques options disponibles par ligne de commande. /ainv active l'auto-invitation en vous chuchotant. (/ainv off) pour le désactiver" - L.tutorial_step_5_line_4 = "/gm affiche la fenêtre d'aide. Les commandes /install, /resetui ou /tutorial lancent cette installation. /frame affiche le nom et parent du cadre sous le curseur avec des informations supplémentaires." - - L.tutorial_step_6_line_1 = "Le tutoriel est terminé. Vous pouvez le reconsulter à tout moment en tapant /tutorial." - L.tutorial_step_6_line_2 = "Je vous suggère de regarder le fichier /config/config.lua ou en tapant /Tukui pour customiser l'interface selon vos besoins." - L.tutorial_step_6_line_3 = "Vous pouvez maintenant continuer l'installation de l'interface si ce n'est pas encore fait ou si vous voulez remettre le tout par défaut !" - L.tutorial_step_6_line_4 = "" - - L.install_step_1_line_1 = "Ces étapes appliqueront les paramètres CVar corrects pour Tukui." - L.install_step_1_line_2 = "La première étape applique les paramètres essentiels." - L.install_step_1_line_3 = "C'est |cffff0000recommandé|r pour tout utilisateur, à moins que vous ne vouliez appliquer qu'une partie spécifique des paramètres." - L.install_step_1_line_4 = "Cliquez sur 'Continuer' pour appliquer les paramètres, ou cliquez sur 'Passer' si vous voulez passer cette étape." - - L.install_step_2_line_0 = "Un autre addon de discussion a été trouvé. Nous allons ignorer cette étape. Appuyez sur 'Passer' pour continuer l'installation." - L.install_step_2_line_1 = "La seconde étape applique les paramètres corrects des fenêtres de discussion." - L.install_step_2_line_2 = "Si vous êtes un nouvel utilisateur, cette étape est recommandée. Si vous êtes un utilisateur habitué, vous pouvez passer cette étape." - L.install_step_2_line_3 = "Il est normal que la police de discussion apparaisse trop grande lors de l'application de ces paramètres. Cela redeviendra normal une fois l'installation terminée." - L.install_step_2_line_4 = "Cliquez sur 'Continuer' pour appliquer les paramètres, ou cliquez sur 'Passer' si vous voulez passer cette étape." - - L.install_step_3_line_1 = "La troisième et dernière étape applique le positionnement des cadres par défaut." - L.install_step_3_line_2 = "Cette étape est |cffff0000recommandée|r pour tout nouvel utilisateur." - L.install_step_3_line_3 = "" - L.install_step_3_line_4 = "Cliquez sur 'Continuer' pour appliquer les paramètres, ou cliquez sur 'Passer' si vous voulez passer cette étape." - - L.install_step_4_line_1 = "Installation terminée." - L.install_step_4_line_2 = "Appuyez sur le bouton 'Terminer' pour recharger l'interface." - L.install_step_4_line_3 = "" - L.install_step_4_line_4 = "Bon Jeu avec Tukui ! Et venez visiter http://www.tukui.org pour les MàJ et les informations sur votre interface Tukui !" - - L.install_button_tutorial = "Tutoriel" - L.install_button_install = "Installation" - L.install_button_next = "Suivant" - L.install_button_skip = "Passer" - L.install_button_continue = "Continuer" - L.install_button_finish = "Terminer" - L.install_button_close = "Fermer" -end diff --git a/Tukui/locales/german.lua b/Tukui/locales/german.lua deleted file mode 100644 index 50e0ad1..0000000 --- a/Tukui/locales/german.lua +++ /dev/null @@ -1,303 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -if T.client == "deDE" then - L.chat_BATTLEGROUND_GET = "B" - L.chat_BATTLEGROUND_LEADER_GET = "B" - L.chat_BN_WHISPER_GET = "Von" - L.chat_GUILD_GET = "G" - L.chat_OFFICER_GET = "O" - L.chat_PARTY_GET = "P" - L.chat_PARTY_GUIDE_GET = "P" - L.chat_PARTY_LEADER_GET = "P" - L.chat_RAID_GET = "R" - L.chat_RAID_LEADER_GET = "R" - L.chat_RAID_WARNING_GET = "W" - L.chat_WHISPER_GET = "Von" - L.chat_FLAG_AFK = "[AFK]" - L.chat_FLAG_DND = "[DND]" - L.chat_FLAG_GM = "[GM]" - L.chat_ERR_FRIEND_ONLINE_SS = "ist jetzt |cff298F00online|r" - L.chat_ERR_FRIEND_OFFLINE_S = "ist jetzt |cffff0000offline|r" - - L.chat_general = "Allgemein" - L.chat_trade = "Handel" - L.chat_defense = "LokaleVerteidigung" - L.chat_recrutment = "Gildenrekrutierung" - L.chat_lfg = "SucheNachGruppe" - - L.disband = "Gruppe wird aufgelöst ?" - - L.datatext_notalents ="Keine Spezalisierung" --changed - L.datatext_download = "Download: " - L.datatext_bandwidth = "Bandbreite: " - L.datatext_guild = "Gilde" - L.datatext_noguild = "Keine Gilde" - L.datatext_bags = "Tasche: " - L.datatext_friends = "Freunde" - L.datatext_online = "Online: " - L.datatext_armor = "Rüstung" - L.datatext_earned = "Erhalten:" - L.datatext_spent = "Ausgegeben:" - L.datatext_deficit = "Differenz:" - L.datatext_profit = "Gewinn:" - L.datatext_timeto = "Zeit bis" - L.datatext_friendlist = "Freundesliste:" - L.datatext_playersp = "sp" - L.datatext_playerap = "ap" - L.datatext_playerhaste = "haste" - L.datatext_dps = "dps" - L.datatext_hps = "hps" - L.datatext_playerarp = "arp" - L.datatext_session = "Sitzung: " - L.datatext_character = "Charakter: " - L.datatext_server = "Server: " - L.datatext_totalgold = "Gesamt: " - L.datatext_savedraid = "Instanz ID(s)" - L.datatext_currency = "Währung:" - L.datatext_fps = " fps & " - L.datatext_ms = " ms" - L.datatext_playercrit = " crit" - L.datatext_playerheal = " heal" - L.datatext_avoidancebreakdown = "Vermeidungsübersicht" - L.datatext_lvl = "lvl" - L.datatext_boss = "Boss" - L.datatext_miss = "Verfehlen" - L.datatext_dodge = "Ausweichen" - L.datatext_block = "Blocken" - L.datatext_parry = "Parieren" - L.datatext_playeravd = "avd: " - L.datatext_servertime = "Serverzeit: " - L.datatext_localtime = "Ortszeit: " - L.datatext_mitigation = "Schadensverringerung nach Level: " - L.datatext_healing = "Heilung : " - L.datatext_damage = "Schaden : " - L.datatext_honor = "Ehre : " - L.datatext_killingblows = "Todesstöße : " - L.datatext_ttstatsfor = "Stats für " - L.datatext_ttkillingblows = "Todesstöße:" - L.datatext_tthonorkills = "Ehrenhafte Siege:" - L.datatext_ttdeaths = "Tode:" - L.datatext_tthonorgain = "Ehre erhalten:" - L.datatext_ttdmgdone = "Schaden verursacht:" - L.datatext_tthealdone = "Heilung verursacht:" - L.datatext_basesassaulted = "Basen angegriffen:" - L.datatext_basesdefended = "Basen verteidigt:" - L.datatext_towersassaulted = "Türme angegriffen:" - L.datatext_towersdefended = "Türme verteidigt:" - L.datatext_flagscaptured = "Flaggen eingenommen:" - L.datatext_flagsreturned = "Flaggen zurückgebracht:" - L.datatext_graveyardsassaulted = "Friedhöfe angegriffen:" - L.datatext_graveyardsdefended = "Friedhöfe verteidigt:" - L.datatext_demolishersdestroyed = "Verwüster zerstört:" - L.datatext_gatesdestroyed = "Tore zerstört:" - L.datatext_totalmemusage = "Gesamte Speichernutzung:" - L.datatext_control = "Kontrolliert von:" - - L.Slots = { - [1] = {1, "Kopf", 1000}, - [2] = {3, "Schultern", 1000}, - [3] = {5, "Brust", 1000}, - [4] = {6, "Gürtel", 1000}, - [5] = {9, "Handgelenke", 1000}, - [6] = {10, "Hände", 1000}, - [7] = {7, "Beine", 1000}, - [8] = {8, "Füße", 1000}, - [9] = {16, "Waffenhand", 1000}, - [10] = {17, "Schildhand", 1000}, - [11] = {18, "Distanzwaffe", 1000} - } - - L.popup_disableui = "Tukui funktioniert nicht mit deiner Auflösung, möchtest du Tukui ausschalten? (Drücke Abbrechen, falls du eine andere Auflösung testen willst.)" - L.popup_install = "Dies ist das erste Mal mit Tukui V13 mit diesem Charakter. Du musst dein UI neu laden, um Aktionsleisten, Variabeln und den Chat einzustellen." - L.popup_reset = "Warnung! Alles wird auf Tukui Standardwerte zurückgesetzt. Trotzdem fortfahren?" - L.popup_2raidactive = "2 Raid layouts sind aktiv, bitte eins wählen." - L.popup_install_yes = "Yeah! (empfohlen!)" - L.popup_install_no = "Nein, das is echt großer Mist" - L.popup_reset_yes = "Yeah baby!" - L.popup_reset_no = "Nein!" - L.popup_fix_ab = "Etwas stimmt nicht mit der Aktionsleiste. Willst du UI neu laden um es zu beheben?" --changed - - L.merchant_repairnomoney = "Du hast nicht genügend Gold zum Reparieren!" - L.merchant_repaircost = "Deine Rüstung wurde repariert für" - L.merchant_trashsell = "Dein Abfall wurde verkauft und du erhältst" - - L.goldabbrev = "|cffffd700g|r" - L.silverabbrev = "|cffc7c7cfs|r" - L.copperabbrev = "|cffeda55fk|r" - - L.error_noerror = "Kein Fehler bis jetzt." - - L.unitframes_ouf_offline = "Offline" - L.unitframes_ouf_dead = "Tot" - L.unitframes_ouf_ghost = "Geist" - L.unitframes_ouf_lowmana = "WENIG MANA" - L.unitframes_ouf_threattext = "Bedrohung am aktuellen Ziel:" - L.unitframes_ouf_offlinedps = "Offline" - L.unitframes_ouf_deaddps = "|cffff0000[TOT]|r" - L.unitframes_ouf_ghostheal = "GEIST" - L.unitframes_ouf_deadheal = "TOT" - L.unitframes_ouf_gohawk = "GO FALKE" - L.unitframes_ouf_goviper = "GO VIPER" - L.unitframes_disconnected = "D/C" - L.unitframes_ouf_wrathspell = "Zorn" - L.unitframes_ouf_starfirespell = "Sternenfeuer" - - L.tooltip_count = "Anzahl" - - L.bags_noslots = "Kann keine weiteren Taschenplätze kaufen!" - L.bags_costs = "Kosten: %.2f Gold" - L.bags_buyslots = "Kaufe neuen Platz mit /bags purchase yes" - L.bags_openbank = "Du musst erst das Bankfach öffnen." - L.bags_sort = "Sortiert deine Taschen oder die Bank, falls geöffnet." - L.bags_stack = "Stapelt Items neu in deinen Taschen und der Bank, falls geöffnet." - L.bags_buybankslot = "Kaufe Bankplatz. (Bank muss geöffnet sein)" - L.bags_search = "Suchen" - L.bags_sortmenu = "Sortieren" - L.bags_sortspecial = "Sortieren Spezialtasche" - L.bags_stackmenu = "Stapeln" - L.bags_stackspecial = "Stapeln Spezialtasche" - L.bags_showbags = "Zeige Taschen" - L.bags_sortingbags = "Sortieren abgeschlossen." - L.bags_nothingsort= "Nichts zu sortieren." - L.bags_bids = "Benutze Taschen: " - L.bags_stackend = "Neu stapeln abgeschlossen." - L.bags_rightclick_search = "Rechtsklick, um zu suchen." - - L.loot_fish = "Faule Beute" --changed - L.loot_empty = "Leerer slot" --changed - - L.chat_invalidtarget = "Falsches Ziel" - - L.mount_wintergrasp = "Tausendwinter" - - L.core_autoinv_enable = "Autoinvite AN: invite" - L.core_autoinv_enable_c = "Autoinvite AN: " - L.core_autoinv_disable = "Autoinvite AUS" - L.core_wf_unlock = "Quest Tracker entriegelt" - L.core_wf_lock = "Quest Tracker verriegelt" - L.core_welcome1 = "Willkommen bei |cffC495DDTukui|r Version " - L.core_welcome2 = "Tippe |cff00FFFF/uihelp|r für mehr Informationen" - - L.core_uihelp1 = "|cff00ff00General Slash Befehle|r" - L.core_uihelp2 = "|cffFF0000/moveui|r - UI Elemente entsperren zum Bewegen." - L.core_uihelp3 = "|cffFF0000/rl|r - UI neu laden." - L.core_uihelp4 = "|cffFF0000/gm|r - GM Tickets schreiben oder WoW Hilfe anzeigen." - L.core_uihelp5 = "|cffFF0000/frame|r - Name des Frames unter dem Mauszeiger ausgeben. (für lua coder nützlich)" - L.core_uihelp6 = "|cffFF0000/heal|r - Heil-Layout aktivieren." - L.core_uihelp7 = "|cffFF0000/dps|r - Dps/Tank-Layout aktivieren." - L.core_uihelp8 = "|cffFF0000/bags|r - Taschen sortieren, Bankplätze kaufen oder gegenstände stapeln." - L.core_uihelp9 = "|cffFF0000/resetui|r - Auf Tukui Standard zurücksetzen." - L.core_uihelp10 = "|cffFF0000/rd|r - Raid auflösen." - L.core_uihelp11 = "|cffFF0000/ainv|r - Automatische Gruppeneinladung beim Anflüstern mit Schlüsselwort aktivieren. Du kannst dein eigenes Schlüsselwort mit `/ainv myword` einstellen" - L.core_uihelp100 = "(Hochscrollen wenn du mehr Befehle sehen willst ...)" - - L.symbol_CLEAR = "Entfernen" - L.symbol_SKULL = "Totenschädel" - L.symbol_CROSS = "Kreuz" - L.symbol_SQUARE = "Quadrat" - L.symbol_MOON = "Mond" - L.symbol_TRIANGLE = "Dreieck" - L.symbol_DIAMOND = "Diamant" - L.symbol_CIRCLE = "Kreis" - L.symbol_STAR = "Stern" - - L.bind_combat = "Du kannst keine Tasten im Kampf belegen." - L.bind_saved = "Alle Tastenbelegungen wurden gespeichert." - L.bind_discard = "Alle gerade neu belegten Tastenbelegungen wurden verworfen." - L.bind_instruct = "Bewege deine Maus über einen Aktionsbutton, um ihn mit einem Hotkey zu belegen. Drücke Escape oder die rechte Maustaste, um die aktuelle Tastenbelegung des Buttons zu löschen." - L.bind_save = "Tastenbelegung speichern" - L.bind_discardbind = "Tastenbelegung verwerfen" - - L.hunter_unhappy = "Dein Begleiter ist unzufrieden!" - L.hunter_content = "Dein Begleiter ist zufrieden!" - L.hunter_happy = "Dein Begleiter ist glücklich!" - - L.move_tooltip = "Tooltip bewegen" - L.move_minimap = "Minimap bewegen" - L.move_watchframe = "Quests bewegen" - L.move_gmframe = "Ticket bewegen" - L.move_buffs = "Spieler Stärkungszauber bewegen" - L.move_debuffs = "Spieler Schwächungszauber bewegen" - L.move_shapeshift = "Haltungs-/Totemleiste bewegen" - L.move_achievements = "Erfolgsfenster bewegen" - L.move_roll = "Würfelfenster bewegen" - L.move_vehicle = "Fahrzeugausstieg bewegen" - L.move_extrabutton = "Extra Button" - - -- tuto/install - L.install_header_1 = "Willkommen" - L.install_header_2 = "1. Grundlegendes" - L.install_header_3 = "2. Einheitenfenster" - L.install_header_4 = "3. Funktionen" - L.install_header_5 = "4. Das solltest Du wissen!" - L.install_header_6 = "5. Kommandos" - L.install_header_7 = "6. Abgeschlossen" - L.install_header_8 = "1. Grundeinstellungen" - L.install_header_9 = "2. Chat" - L.install_header_10= "3. Frames" - L.install_header_11= "4. Abschluss!" - - L.install_init_line_1 = "Danke, dass Du Dich für Tukui entschieden hast!" - L.install_init_line_2 = "Du wirst mit einigen einfachen Schritten durch die Installation geführt. Bei jedem Schritt kannst Du entscheiden, ob Du die Standardeinstellungen übernehmen oder überspringen möchtest." - L.install_init_line_3 = "Du hast auch die Möglichkeit, eine Einführung in einige der Funktionen von Tukui zu erhalten." - L.install_init_line_4 = "Klicke auf 'Tutorial' um eine kleine Einleitung zu erhalten, oder klicke auf 'Installation' um diesen Schritt zu überspringen." - - L.tutorial_step_1_line_1 = "Dieses kurze Tutorial wird Dir einige Funktionen von Tukui zeigen." - L.tutorial_step_1_line_2 = "Zuerst das Wichtigste, das Du wissen solltest, bevor Du mit diesem UI spielst." - L.tutorial_step_1_line_3 = "Diese Installation ist teilweise charakterbezogen. Während einige Einstellungen, die später angewandt werden, accountweit sind, musst Du die Installation für jeden neuen Charakter starten der Tukui nutzt. Dieses Script wird automatisch beim ersten Einloggen eines Charakters mit Tukui gezeigt. Die Optionen können benutzerfreundlich mit dem Befehl /tukui angepasst werden. Erfahrene Benutzer können die Optionen auch unter /Tukui/config/config.lua anpassen." - L.tutorial_step_1_line_4 = "Das Bearbeiten der Config.lua benötigt unter anderem Erfahrung in der Programmierung von Lua. Es wird empfohlen, die Konfiguration im Spiel per /tukui zu ändern, sollten diese Kenntnisse nicht vorhanden sein." - - L.tutorial_step_2_line_1 = "Tukui verwendet eine eingebettete Version von oUF, programmiert von Trond (Haste) A Ekseth. Es kümmert sich um alle Einheitenfenster, Buffs und Debuffs und alle klassenspezifischen Elemente." - L.tutorial_step_2_line_2 = "Du kannst auf wowinterface.com nach oUF suchen, um mehr über dieses Werkzeug zu erfahren." - L.tutorial_step_2_line_3 = "Falls Du einen Heiler oder Schlachtzugsleiter spielst, möchtest Du vielleicht die Heiler-Einheitenfenster aktivieren. Diese zeigen Dir mehr Informationen über Deinen Schlachtzug an. (/heal) Als DPS-Klasse oder als Tank solltest Du die schlanke Raidansicht auswählen. (/dps) Falls Du keine der beiden Ansichten oder etwas anderes benutzen möchtest, kannst Du im Addon-Manager in der Charakterübersicht diese deaktivieren." - L.tutorial_step_2_line_4 = "Um die Positionen der Einheitenfenster zu verschieben, tippe einfach /moveui ein." - - L.tutorial_step_3_line_1 = "Tukui ist ein neudesigntes Blizzard Interface. Nicht mehr, nicht weniger. Nahezu alle Funktionen des normalen Interfaces sind auch in Tukui verfügbar. Die einzigen Funktionen, die nicht im Standard-Interface verfügbar sind, sind automatisierte Prozesse, die nicht auf dem Bildschirm sichtbar sind. Zum Beispiel automatisches Verkaufen von grauen Gegenständen beim Händlerbesuch. Oder, ein weiteres Beispiel, automatisches Sortieren der Gegenstände in den Taschen." - L.tutorial_step_3_line_2 = "Weil nicht jeder Sachen wie DPS-Meter, Boss Mods, Aggro-Meter und ähnliches mag, haben wir uns entschieden, dass dies die beste Möglichkeit ist. Tukui wurde mit der Idee entwickelt, auf alle Klassen, Rollen, Talente, Spielstile, Vorlieben der Benutzer etc. zu passen. Deswegen ist Tukui momentan eines der populärsten Interfaces. Es passt zum Spielstil jedes Einzelnen und ist extrem anpassbar. Es ist auch so entwickelt worden, jedem einen sehr guten Start für sein eigenes Interface zu bieten, ohne dabei auf weitere Addons angewiesen zu sein. Unzählige Spieler nutzen Tukui seit 2009 als Basis für ihre eigenen Interfaces. Wirf doch mal einen Blick auf die angepassten Pakete auf unserer Webseite!" - L.tutorial_step_3_line_3 = "Für weitere Modifikationen und Funktionen kann die entsprechende Mods-Sektion auf unserer Webseite oder http://www.wowinterface.com besucht werden." - L.tutorial_step_3_line_4 = "" - - L.tutorial_step_4_line_1 = "Um festzulegen, wie viele Aktionsleisten Du möchtest, bewege Deine Maus an den linken oder rechten Rand der untersten Aktionsleiste. Mache das Gleiche auf der rechten Seite über dem unteren und oberen Rand. Um Text aus dem Chat zu kopieren, klicke den Knopf, der beim Überfahren des Chatfensters mit der Maus in der rechten Ecke auftaucht." - L.tutorial_step_4_line_2 = "Die Miniaturkarte ändert die Randfarbe. Sie ist Grün, wenn Du neue Post hast. Rot, wenn Du eine neue Kalendereinladung hast, und Orange bei beidem." - L.tutorial_step_4_line_3 = "Du kannst 80% der Datenfelder linksklicken, um verschiedene Fenster von Blizzard zu öffnen. Die Datenfelder `Freunde` und `Gilde` haben auch eine Funktion bei Rechtsklick." - L.tutorial_step_4_line_4 = "Hier sind einige Aufklappmenüs verfügbar. Bei Rechtsklick auf [X] (Schliessen) der Tasche wird ein Aufklappmenü erscheinen, um die Taschen anzuzeigen, Gegenstände zu sortieren, den Schlüsselbund anzuzeigen, etc. Ein Klicken mit dem Mausrad auf die Miniaturkarte öffnet das Mikromenü." - - L.tutorial_step_5_line_1 = "Zu guter Letzt beinhaltet Tukui eine Reihe nützlicher Kommandos." - L.tutorial_step_5_line_2 = "/moveui erlaubt Dir das Bewegen vieler Fenster überall auf dem Bildschirm. /enable und /disable sind nützlich um schnell Addons ein- oder auszuschalten. /rl lädt das Interface neu. /heal aktiviert das Heiler-Raidinterface und /dps aktiviert das Tank/DPS-Raidinterface." - L.tutorial_step_5_line_3 = "/tt erlaubt es dir, dein Ziel anzuflüstern. /rc startet einen Bereitschaftscheck. /rd löst Deine Gruppe oder Raid auf. /bags zeigt einige Funktionen, die über die Kommandozeile verfügbar sind. /ainv aktiviert automatisches Einladen per anflüstern. (/ainv off) deaktiviert dies wieder." - L.tutorial_step_5_line_4 = "/gm öffnet das Hilfe-Fenster. /install, /resetui oder /tutorial lädt dieses Installationsprogramm. /frame zeigt den Namen des Fensters unter deinem Mauszeiger und dem des übergeordneten Fensters mit einigen anderen Informationen an." - - L.tutorial_step_6_line_1 = "Die Einführung ist abgeschlossen. Du kannst sie jeder Zeit wieder starten, indem Du /tutorial eingibst." - L.tutorial_step_6_line_2 = "Ich schlage vor, Du wirfst mal einen Blick auf die Datei Tukui/config/config.lua oder gibst /tukui ein, um das Interface deinen Bedürfnissen anzupassen." - L.tutorial_step_6_line_3 = "Du kannst nun mit der Installation des Interface fortfahren, wenn diese noch nicht abgeschlossen ist oder Du das Interface auf die Standardeinstellungen zurücksetzen willst." - L.tutorial_step_6_line_4 = "" - - L.install_step_1_line_1 = "Diese Schritte setzen die richtigen CVar Einstellungen für Tukui." - L.install_step_1_line_2 = "Der erste Schritt setzt grundlegende Einstellungen." - L.install_step_1_line_3 = "Dieser Schritt wird jedem Benutzer empfohlen, es sei denn, Du willst nur spezielle Teile der Einstellungen aktivieren." - L.install_step_1_line_4 = "Klicke 'Weiter', um die Einstellungen anzuwenden, oder klicke 'Überspringen', wenn Du diesen Schritt überspringen möchtest." - - L.install_step_2_line_0 = "Ein weiteres Chataddon wurde gefunden. Wir überspringen diesen Schritt. Bitte drücke 'Überspringen', um mit der Installation fortzufahren." - L.install_step_2_line_1 = "Der zweite Schritt aktiviert die richtigen Chateinstellungen." - L.install_step_2_line_2 = "Wenn Du ein neuer Nutzer bist, ist dieser Schritt empfohlen. Wenn Du Tukui bereits benutzt, möchtest Du diesen Schritt vielleicht überspringen." - L.install_step_2_line_3 = "Es ist normal, dass Deine Schriftgröße während der Aktivierung der Einstellungen etwas zu groß wirkt, dies wird am Ende der Installation wieder zurückgesetzt." - L.install_step_2_line_4 = "Klicke 'Weiter', um die Einstellungen anzuwenden, oder klicke 'Überspringen', wenn Du diesen Schritt überspringen möchtest." - - L.install_step_3_line_1 = "Der dritte und letzte Schritt übernimmt die standardmässige Position der Frames." - L.install_step_3_line_2 = "Dieser Schritt ist für jeden neuen Charakter empfohlen ." - L.install_step_3_line_3 = "" - L.install_step_3_line_4 = "Klicke 'Weiter', um die Einstellungen anzuwenden, oder klicke 'Überspringen', wenn Du diesen Schritt überspringen möchtest." - - L.install_step_4_line_1 = "Installation abgeschlossen." - L.install_step_4_line_2 = "Bitte klicke auf 'Abschließen', um das Interface neu zu laden." - L.install_step_4_line_3 = "" - L.install_step_4_line_4 = "Viel Spass mit Tukui! Besuche uns auf http://www.tukui.org!" - - L.install_button_tutorial = "Tutorial" - L.install_button_install = "Installation" - L.install_button_next = "Weiter" - L.install_button_skip = "Überspringen" - L.install_button_continue = "Weiter" - L.install_button_finish = "Abschließen" - L.install_button_close = "Schließen" -end \ No newline at end of file diff --git a/Tukui/locales/korean.lua b/Tukui/locales/korean.lua deleted file mode 100644 index d4d5586..0000000 --- a/Tukui/locales/korean.lua +++ /dev/null @@ -1,310 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -if T.client == "koKR" then - L.chat_BATTLEGROUND_GET = "B" - L.chat_BATTLEGROUND_LEADER_GET = "B" - L.chat_BN_WHISPER_GET = "FR" - L.chat_GUILD_GET = "G" - L.chat_OFFICER_GET = "O" - L.chat_PARTY_GET = "P" - L.chat_PARTY_GUIDE_GET = "P" - L.chat_PARTY_LEADER_GET = "P" - L.chat_RAID_GET = "R" - L.chat_RAID_LEADER_GET = "R" - L.chat_RAID_WARNING_GET = "W" - L.chat_WHISPER_GET = "FR" - L.chat_FLAG_AFK = "[AFK]" - L.chat_FLAG_DND = "[DND]" - L.chat_FLAG_GM = "[GM]" - L.chat_ERR_FRIEND_ONLINE_SS = "|cff298F00접속|r했습니다" - L.chat_ERR_FRIEND_OFFLINE_S = "|cffff0000접속종료|r했습니다" - - L.chat_general = "일반" - L.chat_trade = "거래" - L.chat_defense = "수비" - L.chat_recrutment = "길드모집" - L.chat_lfg = "파티찾기" - - L.disband = "공격대를 해체합니까?" - - L.datatext_notalents ="특성 없음" - L.datatext_download = "다운로드: " - L.datatext_bandwidth = "대역폭: " - L.datatext_guild = "길드" - L.datatext_noguild = "길드 없음" - L.datatext_bags = "소지품: " - L.datatext_friends = "친구" - L.datatext_online = "온라인: " - L.datatext_armor = "방어구" - L.datatext_earned = "수입:" - L.datatext_spent = "지출:" - L.datatext_deficit = "적자:" - L.datatext_profit = "흑자:" - L.datatext_timeto = "전투 시간" - L.datatext_friendlist = "친구 목록:" - L.datatext_playersp = "주문력" - L.datatext_playerap = "전투력" - L.datatext_playerhaste = "가속도" - L.datatext_dps = "dps" - L.datatext_hps = "hps" - L.datatext_playerarp = "방관" - L.datatext_session = "세션: " - L.datatext_character = "캐릭터: " - L.datatext_server = "서버: " - L.datatext_totalgold = "전체: " - L.datatext_savedraid = "귀속된 던전" - L.datatext_currency = "화폐:" - L.datatext_fps = " fps & " - L.datatext_ms = " ms" - L.datatext_playercrit = " 치명타율" - L.datatext_playerheal = " 극대화율" - L.datatext_avoidancebreakdown = "완방 수치" - L.datatext_lvl = "레벨" - L.datatext_boss = "우두머리" - L.datatext_miss = "빗맞힘" - L.datatext_dodge = "회피율" - L.datatext_block = "방패 막기" - L.datatext_parry = "무기 막기" - L.datatext_playeravd = "완방: " - L.datatext_servertime = "서버 시간: " - L.datatext_localtime = "지역 시간: " - L.datatext_mitigation = "레벨에 따른 경감수준: " - L.datatext_healing = "치유량 : " - L.datatext_damage = "피해량 : " - L.datatext_honor = "명예 점수 : " - L.datatext_killingblows = "결정타 : " - L.datatext_ttstatsfor = "점수 : " - L.datatext_ttkillingblows = "결정타:" - L.datatext_tthonorkills = "명예 승수:" - L.datatext_ttdeaths = "죽은 수:" - L.datatext_tthonorgain = "획득한 명예:" - L.datatext_ttdmgdone = "피해량:" - L.datatext_tthealdone = "치유량:" - L.datatext_basesassaulted = "거점 공격:" - L.datatext_basesdefended = "거점 방어:" - L.datatext_towersassaulted = "경비탑 점령:" - L.datatext_towersdefended = "경비탑 방어:" - L.datatext_flagscaptured = "깃발 쟁탈:" - L.datatext_flagsreturned = "깃발 반환:" - L.datatext_graveyardsassaulted = "무덤 점령:" - L.datatext_graveyardsdefended = "무덤 방어:" - L.datatext_demolishersdestroyed = "파괴한 파괴전차:" - L.datatext_gatesdestroyed = "파괴한 관문:" - L.datatext_totalmemusage = "총 메모리 사용량:" - L.datatext_control = "현재 진영:" - - L.bg_warsong = "전쟁노래 협곡" - L.bg_arathi = "아라시 분지" - L.bg_eye = "폭풍의 눈" - L.bg_alterac = "알터랙 계곡" - L.bg_strand = "고대의 해안" - L.bg_isle = "정복의 섬" - - L.Slots = { - [1] = {1, "머리", 1000}, - [2] = {3, "어깨", 1000}, - [3] = {5, "가슴", 1000}, - [4] = {6, "허리", 1000}, - [5] = {9, "손목", 1000}, - [6] = {10, "손", 1000}, - [7] = {7, "다리", 1000}, - [8] = {8, "발", 1000}, - [9] = {16, "주장비", 1000}, - [10] = {17, "보조장비", 1000}, - [11] = {18, "원거리", 1000} - } - - L.popup_disableui = "Tukui는 현재 해상도에 최적화되어 있지 않습니다. Tukui를 비활성화하시겠습니까? (다른 해상도로 시도해보려면 취소)" - L.popup_install = "현재 캐릭터는 Tukui를 처음 사용합니다. 행동 단축바, 대화창, 다양한 설정을 위해 UI를 다시 시작하셔야만 합니다." - L.popup_2raidactive = "2개의 공격대 인터페이스가 사용 중입니다. 한 가지만 사용하셔야 합니다." - L.popup_reset = "경고! Tukui의 모든것을 기본값으로 변경합니다. 실행하시겠습니까?" - L.popup_install_yes = "예" - L.popup_install_no = "아니오" - L.popup_reset_yes = "예" - L.popup_reset_no = "아니오" - L.popup_fix_ab = "귀하의 행동단축바에 문제가 있습니다. reloadui를 하여 문제를 해결하시겠습니까?" - - L.merchant_repairnomoney = "수리에 필요한 돈이 충분하지 않습니다!" - L.merchant_repaircost = "모든 아이템이 수리되었습니다: " - L.merchant_trashsell = "불필요한 아이템이 판매되었습니다: " - - L.goldabbrev = "|cffffd700●|r" - L.silverabbrev = "|cffc7c7cf●|r" - L.copperabbrev = "|cffeda55f●|r" - - L.error_noerror = "오류가 발견되지 않았습니다." - - L.unitframes_ouf_offline = "오프라인" - L.unitframes_ouf_dead = "죽음" - L.unitframes_ouf_ghost = "유령" - L.unitframes_ouf_lowmana = "마나 적음" - L.unitframes_ouf_threattext = "현재 대상에 대한 위협수준:" - L.unitframes_ouf_offlinedps = "오프라인" - L.unitframes_ouf_deaddps = "|cffff0000[죽음]|r" - L.unitframes_ouf_ghostheal = "유령" - L.unitframes_ouf_deadheal = "죽음" - L.unitframes_ouf_gohawk = "매의 상으로 전환" - L.unitframes_ouf_goviper = "독사의 상으로 전환" - L.unitframes_disconnected = "연결끊김" - L.unitframes_ouf_wrathspell = "격노" - L.unitframes_ouf_starfirespell = "별빛 섬광" - - L.tooltip_count = "개수" - - L.bags_noslots = "더이상 가방보관함을 구입할 수 없습니다." - L.bags_costs = "가격: %.2f 골" - L.bags_buyslots = "가방 보관함을 추가로 구입하시려면 /bags를 입력해주세요." - L.bags_openbank = "먼저 은행을 열어야 합니다." - L.bags_sort = "열려있는 가방이나 은행에 있는 아이템을 정리합니다." - L.bags_stack = "띄엄띄엄 있는 아이템을 정리합니다." - L.bags_buybankslot = "가방 보관함을 추가로 구입합니다." - L.bags_search = "검색" - L.bags_sortmenu = "분류" - L.bags_sortspecial = "특수물품 분류" - L.bags_stackmenu = "정리" - L.bags_stackspecial = "특수물품 정리" - L.bags_showbags = "가방 보기" - L.bags_sortingbags = "분류 완료." - L.bags_nothingsort= "분류할 것이 없습니다." - L.bags_bids = "사용 중인 가방: " - L.bags_stackend = "재정리 완료." - L.bags_rightclick_search = "검색하려면 오른쪽 클릭" - - L.loot_fish = "전리품" - L.loot_empty = "빈 슬롯" - - L.chat_invalidtarget = "잘못된 대상" - - L.mount_wintergrasp = "겨울손아귀" - - L.core_autoinv_enable = "자동초대 활성화: 초대" - L.core_autoinv_enable_c = "자동초대 활성화: " - L.core_autoinv_disable = "자동초대 비활성화" - L.core_wf_unlock = "임무 추적창 잠금 해제" - L.core_wf_lock = "임무 추적창 잠금" - L.core_welcome1 = "|cffC495DDTukui|r를 사용해주셔서 감사합니다. 버전 " - L.core_welcome2 = "자세한 사항은 |cff00FFFF/uihelp|r를 입력하거나 www.tukui.org 에 방문하시면 확인 가능합니다." - - L.core_uihelp1 = "|cff00ff00일반적인 명령어|r" - L.core_uihelp2 = "|cffFF0000/moveui|r - 화면 주위 요소들을 잠금해제하고 이동합니다." - L.core_uihelp3 = "|cffFF0000/rl|r - 당신의 인터페이스를 다시 불러옵니다." - L.core_uihelp4 = "|cffFF0000/gm|r - 도움 요청(지식 열람실, GM 요청하기) 창을 엽니다." - L.core_uihelp5 = "|cffFF0000/frame|r - 커서가 위치한 창의 이름을 보여줍니다. (lua 편집 시 매우 유용)" - L.core_uihelp6 = "|cffFF0000/heal|r - 힐러용 공격대 레이아웃을 사용합니다." - L.core_uihelp7 = "|cffFF0000/dps|r - DPS/탱커용 레이아웃을 사용합니다." - L.core_uihelp8 = "|cffFF0000/bags|r - 분류, 정리, 가방 보관함을 추가 구입을 할 수 있습니다." - L.core_uihelp9 = "|cffFF0000/resetui|r - Tukui를 기본값으로 초기화 합니다." - L.core_uihelp10 = "|cffFF0000/rd|r - 공격대를 해체합니다." - L.core_uihelp11 = "|cffFF0000/ainv|r - 자동초대 기능을 사용합니다. '/ainv 단어'를 입력하여 해당 단어가 들어간 귓속말이 올 경우 자동으로 초대를 합니다." - L.core_uihelp100 = "(위로 올리십시오 ...)" - - L.symbol_CLEAR = "초기화" - L.symbol_SKULL = "해골" - L.symbol_CROSS = "가위표" - L.symbol_SQUARE = "네모" - L.symbol_MOON = "달" - L.symbol_TRIANGLE = "세모" - L.symbol_DIAMOND = "다이아몬드" - L.symbol_CIRCLE = "동그라미" - L.symbol_STAR = "별" - - L.bind_combat = "전투 중에는 단축키를 지정할 수 없습니다." - L.bind_saved = "새로 지정한 모든 단축키가 저장되었습니다." - L.bind_discard = "새로 지정한 모든 단축키가 저장되지 않았습니다." - L.bind_instruct = "커서가 위치한 단축버튼에 단축키를 지정할 수 있습니다. 오른쪽 클릭으로 해당 단축버튼의 단축키를 초기화할 수 있습니다." - L.bind_save = "저장" - L.bind_discardbind = "취소" - - L.hunter_unhappy = "소환수의 만족도: 불만족" - L.hunter_content = "소환수의 만족도: 만족" - L.hunter_happy = "소환수의 만족도: 매우 만족" - - L.move_tooltip = "툴팁 이동" - L.move_minimap = "미니맵 이동" - L.move_watchframe = "퀘스트 이동" - L.move_gmframe = "대기표 이동" - L.move_buffs = "플레이어 버프 이동" - L.move_debuffs = "플레이어 디버프 이동" - L.move_shapeshift = "태세/토템 바 이동" - L.move_achievements = "업적창 이동" - L.move_roll = "주사위 창 이동" - L.move_vehicle = "탈것 창 이동" - L.move_extrabutton = "추가 버튼" - - -- tuto/install - L.install_header_1 = "환영합니다" - L.install_header_2 = "1. 필수사항" - L.install_header_3 = "2. 유닛프레임" - L.install_header_4 = "3. 기능" - L.install_header_5 = "4. 알아야할 사항!" - L.install_header_6 = "5. 명령어" - L.install_header_7 = "6. 완료" - L.install_header_8 = "1. 필수 설치" - L.install_header_9 = "2. 친목" - L.install_header_10= "3. 프레임" - L.install_header_11= "4. 성공!" - - L.install_init_line_1 = "Tukui를 사용해 주셔서 감사합니다.!" - L.install_init_line_2 = "몇차례 간단한 설치 단계를 통해서 안내될것입니다. 각 단계에서 현 설치를 적용시킬지 아닐지를 결정하실수 있습니다." - L.install_init_line_3 = "간단한 지침서를 볼수있는 몇가지 Tukui 기능들 또한 주어집니다." - L.install_init_line_4 = "이 간단한 지침을 안내받고 싶으시면 '지침서' 버튼을 누르십시요., 이 단계를 넘기시고 싶으시면 '설치'를 누르시면 됩니다." - - L.tutorial_step_1_line_1 = "이 짧은 지침서는 몇가지 Tukui의 기능들을 보여줄것입니다." - L.tutorial_step_1_line_2 = "먼저, 이 UI로 플레이 하기 전 알셔야할 필수사항들입니다." - L.tutorial_step_1_line_3 = "이 설치기는 부분적으로 특정 캐릭터에 해당됩니다. 반면, 몇몇 설정들은 전캐릭터에 추후 적용됩니다. 각 새로운 캐릭터에 Tukui를 실행시키기 위해 설치 스크립트를 실행시켜야 합니다. 스크립트는 최초 Tukui 사용시 매 새로운 캐릭터 로그인할때 마다 자동으로 보여집니다. 또한, 파워사용자는 /Tukui/config/config.lua에서 옵션 설정을 하시면 됩니다. 친근사용자는 게임내에 /tukui 입력을 통해 옵션설정이 가능합니다." - L.tutorial_step_1_line_4 = "파워 사용자는 보통 사용자들의 능력을 넘어서 고급 기능 (예를들면 Lua 수정)을 사용할 능력을 지닌 개인컴퓨터 사용자를 일컸습니다. 친근 사용자는 보통 사용자를 일컫으며 프로그래밍 능력이 꼭 필요한것은 아닙니다. 이들에게는 Tukui 사용자 설정을 위해 (/tukui)를 통해 게임내 설정도구 사용을 추천합니다." - - L.tutorial_step_2_line_1 = "Tukui는 Trond (Haste) A Ekseth에 의해 고안된 oUF의 버전을 포함하고 있습니다. 이는 화면상에 모든 유닛프레임, 버프 및 디버프, 직업 특정 요소들을 다룹니다." - L.tutorial_step_2_line_2 = "이 도구에 대해 oUF에 대한 좀더 자세한 정보를 원하시면 wowinterface.com 방문하셔서 찾아보시기 바랍니다." - L.tutorial_step_2_line_3 = "만약 힐러나 공대장으로 플레이하시는 분이라면, 힐러 유닛 프레임을 선호하실 겁니다. 이는 공격대에서 좀더 자세한 정보를 보여줍니다. (/heal) 딜러나 탱커는 심플한 레이드 표시기를 사용하시면 됩니다.(/dps) 어떤것도 사용하길 원치 않으시는 분이나 다른 애드온을 사용하시는 분은, 로그인시 캐릭터 선택 화면 애드온 설정에서 사용안함으로 하시면 됩니다." - L.tutorial_step_2_line_4 = "간단한 유닛프레임 위치 이동을 원하시면, /moveui를 입력하시기 바랍니다." - - L.tutorial_step_3_line_1 = "Tukui는 블리자드 UI를 새롭게 디자인한 것입니다. 더도덜도 없습니다. 기본 UI에서 볼수있는 거의 모든 기능들은 Tukui를 통해 가능합니다. 기본 UI의 오직 불가능한 기능은 실제적으로 화면상에선 볼수 없는 몇몇 자동 기능들뿐입니다. 상점에서 회색템 자동 판매와 가방 아이템 자동 정리를 예를 들수 있습니다." - L.tutorial_step_3_line_2 = "모든 이가 데미지미터기, 보스 경보 모드, 위협수준미터기등 같은것을 선호하는게 아니기 때문에, 최선의 방법이라 판단합니다. Tukui는 모든 직업, 역할, 사양, 게임스타일, 사용자의 취향등에 최대한 맞추기 위해 고안되었습니다. 그래서 Tukui는 현재 가장 선호하는 UI중에 하나입니다. 모든이의 게임스타일에 맞고 최대한 수정가능합니다. 또한 애드온에 의존없이 자신만의 맞춤 UI를 만들기 원하는 모든이를 위한 매우 좋은 개시로 디자인되었습니다. 현재 2009년부터 많은 사용자들이 자신만의 UI를 토대로 Tukui를 사용중입니다. Tukui 웹사이트에 Edited Packages를 한번 살펴보세요.!" - L.tutorial_step_3_line_3 = "Tukui 웹사이트에 extra mods 부분을 방문해 보시기 바랍니다. 또는 추가 기능 및 양식 설치를 원하시는 분들은 http://www.wowinterface.com 방문하시기 바랍니다." - L.tutorial_step_3_line_4 = "" - - L.tutorial_step_4_line_1 = "액션바 갯수 설정은 하단 액션바 배경의 왼쪽 혹은 오른쪽에 마우스를 대십시요. 오른쪽 액션바도 마찬가지로 배경 위와 아래쪽에 마우스를 대시면 됩니다. 채팅창에서 텍스트 복사는 채팅창 오른쪽 코너에 마우스를 대시면 나타나는 버튼을 클릭하시면 됩니다." - L.tutorial_step_4_line_2 = "미니맵 테두리 색상변경. 새 메일을 받으면 녹색으로, 달력 초대를 받으면 빨강색으로, 새 메일과 달력초대가 동시에 있으면 오렌지 색상으로 변경됩니다." - L.tutorial_step_4_line_3 = "블리자드의 다양한 판넬을 보려면 데이타텍스트의 80%는 마우스 왼쪽 클릭하시면 됩니다. 친구와 길드 데이타텍스트도 물론 마우스 오른쪽 클릭으로 기능을 살펴보실수 있습니다." - L.tutorial_step_4_line_4 = "몇가지 사용가능한 드롭다운 메뉴가 있습니다. 가방 닫기 버튼을 오른쪽 클릭하시면 드롭다운 메뉴가 보여지며 이는 가방보이기, 아이템 정리, 열쇠가방등이 나타납니다. 마우스 중앙 버튼을 미니맵에 누르시면 micro 메뉴가 나타납니다." - - L.tutorial_step_5_line_1 = "마지막으로, Tukui는 유용한 슬래시 명령어를 포함하고 있습니다. 하기 리스트를 참고하세요." - L.tutorial_step_5_line_2 = "/moveui는 화면 어디든 많은 프레임 이동을 가능하게 합니다. /enable과 /disable은 빠르게 애드온 적용과 미적용에 사용됩니다. /rl은 UI를 다시 불러올때. /heal은 힐러 레이드 유닛프레임을 사용 /dps는 딜러/탱커 레이드 유닛프레임을 사용." - L.tutorial_step_5_line_3 = "/tt는 대상타겟에게 귓속말을 보낼때. /rc는 전투준비 체크. /rd 파티나 레이드 해체. /bags 명령어 라인으로 가능한 몇가지 기능을 보여줍니다. /ainv 귓속말 대상 자동초대를 가능하게 합니다. (/ainv off) 자동초대 기능 끄기" - L.tutorial_step_5_line_4 = "/gm 지엠창 끄기 켜기. /install, /resetui 또는 /tutorial은 설치를 불러옵니다. /frame 커서가 위치한 프레임의 이름과 추가정보를 보여줍니다." - - L.tutorial_step_6_line_1 = "지침서가 완료되었습니다. 재조정을 원하시면 언제든지 /tutorial 입력하시면 됩니다." - L.tutorial_step_6_line_2 = "config/config.lua 파일을 살펴보시기 바랍니다. 혹은 /Tukui 입력을 통해 원하시는대로 UI 구성을 하시면 됩니다." - L.tutorial_step_6_line_3 = "아직 완료전이거나 기본으로 리셋을 원하시면 UI 설치를 계속하실수 있습니다.!" - L.tutorial_step_6_line_4 = "" - - L.install_step_1_line_1 = "이번 단계들은 Tukui의 정확한 CVar 설치를 적용시킬것입니다." - L.install_step_1_line_2 = "1단계는 필수 설치에 적용됩니다." - L.install_step_1_line_3 = "특정 부분설치에만 적용시키길 원하지 않는 한, 모든 사용자는 |cffff0000recommended|r 이 적용됩니다." - L.install_step_1_line_4 = "이 설치를 적용시키려면 '계속' 버튼을 눌러주세요., 이 단계를 넘기시려면 '무시' 버튼을 누르시면 됩니다." - - L.install_step_2_line_0 = "다른 채팅 애드온이 발견되면 이 단계는 무시될것입니다. 계속 설치를 위해 '무시' 버튼을 눌러주세요." - L.install_step_2_line_1 = "2단계는 옳바른 채팅 구성이 적용됩니다." - L.install_step_2_line_2 = "이 단계는 처음이신 사용자분에게 추천합니다. 기존 사용자분들은 이 단계는 넘기셔도 됩니다." - L.install_step_2_line_3 = "이 설치를 기반으로 적용시키면 채팅 폰트는 크게 보여집니다. 설치를 마치면 다시 정상적으로 나타납니다." - L.install_step_2_line_4 = "이 설치를 적용시키려면 '계속' 버튼을 눌러주세요., 이 단계를 넘기시려면 '무시' 버튼을 누르시면 됩니다." - - L.install_step_3_line_1 = "3단계와 마지막 단계는 기본 프레임 위치 적용입니다." - L.install_step_3_line_2 = "이 단계 |cffff0000recommended|r 는 처음이신 사용자를 위한것입니다." - L.install_step_3_line_3 = "" - L.install_step_3_line_4 = "이 설치를 적용시키려면 '계속' 버튼을 눌러주세요., 이 단계를 넘기시려면 '무시' 버튼을 누르시면 됩니다." - - L.install_step_4_line_1 = "설치가 완료되었습니다." - L.install_step_4_line_2 = "UI를 다시 불러오시려면 '마침' 버튼을 눌러주세요." - L.install_step_4_line_3 = "" - L.install_step_4_line_4 = "Tukui를 즐기세요! http://www.tukui.org를 통해 방문하실수 있습니다.!" - - L.install_button_tutorial = "지침서" - L.install_button_install = "설치" - L.install_button_next = "다음" - L.install_button_skip = "무시" - L.install_button_continue = "계속" - L.install_button_finish = "마침" - L.install_button_close = "종료" -end diff --git a/Tukui/locales/portuguese.lua b/Tukui/locales/portuguese.lua deleted file mode 100644 index cb4e59e..0000000 --- a/Tukui/locales/portuguese.lua +++ /dev/null @@ -1,303 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -if T.client == "ptBR" then - L.chat_BATTLEGROUND_GET = "B" - L.chat_BATTLEGROUND_LEADER_GET = "B" - L.chat_BN_WHISPER_GET = "From" - L.chat_GUILD_GET = "G" - L.chat_OFFICER_GET = "O" - L.chat_PARTY_GET = "P" - L.chat_PARTY_GUIDE_GET = "P" - L.chat_PARTY_LEADER_GET = "P" - L.chat_RAID_GET = "R" - L.chat_RAID_LEADER_GET = "R" - L.chat_RAID_WARNING_GET = "W" - L.chat_WHISPER_GET = "From" - L.chat_FLAG_AFK = "[AFK]" - L.chat_FLAG_DND = "[DND]" - L.chat_FLAG_GM = "[GM]" - L.chat_ERR_FRIEND_ONLINE_SS = "is now |cff298F00online|r" - L.chat_ERR_FRIEND_OFFLINE_S = "is now |cffff0000offline|r" - - L.chat_general = "綜合" - L.chat_trade = "交易" - L.chat_defense = "本地防務" - L.chat_recrutment = "公會招募" - L.chat_lfg = "尋求組隊" - - L.disband = "正在解散隊伍" - - L.datatext_notalents ="No Talents" - L.datatext_download = "下載: " - L.datatext_bandwidth = "寬頻: " - L.datatext_guild = "公會" - L.datatext_noguild = "沒有公會" - L.datatext_bags = "背包: " - L.datatext_friends = "好友" - L.datatext_online = "線上: " - L.datatext_armor = "耐久度" - L.datatext_earned = "賺取:" - L.datatext_spent = "花費:" - L.datatext_deficit = "赤字:" - L.datatext_profit = "利潤:" - L.datatext_timeto = "時間直到" - L.datatext_friendlist = "好友名單:" - L.datatext_playersp = "法傷" - L.datatext_playerap = "強度" - L.datatext_playerhaste = "加速" - L.datatext_dps = "dps" - L.datatext_hps = "hps" - L.datatext_playerarp = "護甲穿透" - L.datatext_session = "本次概況: " - L.datatext_character = "角色: " - L.datatext_server = "伺服器: " - L.datatext_totalgold = "總額: " - L.datatext_savedraid = "已有進度的團隊副本" - L.datatext_currency = "兌換通貨:" - L.datatext_fps = " fps & " - L.datatext_ms = " ms" - L.datatext_playercrit = "% 致命" - L.datatext_playerheal = " 治療" - L.datatext_avoidancebreakdown = "免傷分析" - L.datatext_lvl = "等級" - L.datatext_boss = "首領" - L.datatext_miss = "未擊中" - L.datatext_dodge = "閃躲" - L.datatext_block = "格檔" - L.datatext_parry = "招架" - L.datatext_playeravd = "免傷: " - L.datatext_servertime = "伺服器時間: " - L.datatext_localtime = "本地時間: " - L.datatext_mitigation = "等級緩和: " - L.datatext_healing = "治療: " - L.datatext_damage = "傷害: " - L.datatext_honor = "榮譽: " - L.datatext_killingblows = "擊殺 : " - L.datatext_ttstatsfor = "狀態 " - L.datatext_ttkillingblows = "擊殺:" - L.datatext_tthonorkills = "榮譽擊殺:" - L.datatext_ttdeaths = "死亡:" - L.datatext_tthonorgain = "獲得榮譽:" - L.datatext_ttdmgdone = "傷害輸出:" - L.datatext_tthealdone = "治療輸出:" - L.datatext_basesassaulted = "基地突襲:" - L.datatext_basesdefended = "基地防禦:" - L.datatext_towersassaulted = "哨塔突襲:" - L.datatext_towersdefended = "哨塔防禦:" - L.datatext_flagscaptured = "佔領旗幟:" - L.datatext_flagsreturned = "交還旗幟:" - L.datatext_graveyardsassaulted = "墓地突襲:" - L.datatext_graveyardsdefended = "墓地防守:" - L.datatext_demolishersdestroyed = "石毀車摧毀:" - L.datatext_gatesdestroyed = "大門摧毀:" - L.datatext_totalmemusage = "總共記憶體使用:" - L.datatext_control = "控制方:" - - L.Slots = { - [1] = {1, "頭部", 1000}, - [2] = {3, "肩部", 1000}, - [3] = {5, "胸部", 1000}, - [4] = {6, "腰部", 1000}, - [5] = {9, "手腕", 1000}, - [6] = {10, "手", 1000}, - [7] = {7, "腿部", 1000}, - [8] = {8, "腳", 1000}, - [9] = {16, "主手", 1000}, - [10] = {17, "副手", 1000}, - [11] = {18, "遠程", 1000} - } - - L.popup_disableui = "Tukui並不支援此解析度, 你想要停用Tukui嗎? (若果您想要嘗試其他解析度, 請按取消)" - L.popup_install = "這個角色首次使用Tukui V13, 您必需先重載介面以完成設定" - L.popup_reset = "警告! 此動作會重置任何設定至Tukui預設值. 您是否依然決定這樣做?" - L.popup_2raidactive = "2個團隊框架正在運行, 請選擇以下其中一個." - L.popup_install_yes = "當然是! (建議!)" - L.popup_install_no = "不用了, 救命這UI真差" - L.popup_reset_yes = "當然啦, 預設就是美!" - L.popup_reset_no = "不囉, 不然我會發文抱怨!" - L.popup_fix_ab = "There is something wrong with your action bar. Do you want to reloadui to fix it?" - - L.merchant_repairnomoney = "您沒有足夠的金錢來修理!" - L.merchant_repaircost = "您的裝備已修理, 花費了" - L.merchant_trashsell = "您背包內的粗糙物品已被自動賣出, 您賺取了" - - L.goldabbrev = "|cffffd700g|r" - L.silverabbrev = "|cffc7c7cfs|r" - L.copperabbrev = "|cffeda55fc|r" - - L.error_noerror = "沒有錯誤" - - L.unitframes_ouf_offline = "離線" - L.unitframes_ouf_dead = "死亡" - L.unitframes_ouf_ghost = "鬼魂" - L.unitframes_ouf_lowmana = "法力過低" - L.unitframes_ouf_threattext = "當前目標的仇恨:" - L.unitframes_ouf_offlinedps = "離線" - L.unitframes_ouf_deaddps = "|cffff0000[死亡]|r" - L.unitframes_ouf_ghostheal = "鬼魂" - L.unitframes_ouf_deadheal = "死亡" - L.unitframes_ouf_gohawk = "切換為雄鷹守護" - L.unitframes_ouf_goviper = "切換為蝮蛇守護" - L.unitframes_disconnected = "斷線" - L.unitframes_ouf_wrathspell = "憤怒" - L.unitframes_ouf_starfirespell = "星火術" - - L.tooltip_count = "數量" - - L.bags_noslots = "不能再購買更多的背包欄位!" - L.bags_costs = "花費: %.2f 金" - L.bags_buyslots = "輸入 /bags purchase yes 以購買銀行背包欄位" - L.bags_openbank = "您需要先造訪您的銀行" - L.bags_sort = "將背包或銀行內的物品分類及排序" - L.bags_stack = "將背包或銀行內的不完整的物品堆疊重新堆疊" - L.bags_buybankslot = "購買銀行背包欄位. (需要造訪銀行)" - L.bags_search = "搜尋" - L.bags_sortmenu = "分類及排序" - L.bags_sortspecial = "分類及排序特殊物品" - L.bags_stackmenu = "堆疊" - L.bags_stackspecial = "堆疊特殊物品" - L.bags_showbags = "顯示背包" - L.bags_sortingbags = "分類及排序完成" - L.bags_nothingsort= "不需要分類" - L.bags_bids = "使用背包: " - L.bags_stackend = "重新堆疊完成" - L.bags_rightclick_search = "點擊右鍵以搜尋物品." - - L.loot_fish = "Fishy loot" - L.loot_empty = "Empty slot" - - L.chat_invalidtarget = "無效的目標" - - L.mount_wintergrasp = "冬握湖" - - L.core_autoinv_enable = "啟用自動邀請: invite" - L.core_autoinv_enable_c = "自動邀請功能已啟用: " - L.core_autoinv_disable = "自動邀請功能已關閉" - L.core_wf_unlock = "解鎖任務追蹤" - L.core_wf_lock = "鎖定任務追蹤" - L.core_welcome1 = "歡迎使用 |cffC495DDTukui|r " - L.core_welcome2 = "輸入 |cff00FFFF/uihelp|r 以獲得更多資訊" - - L.core_uihelp1 = "|cff00ff00通用指令|r" - L.core_uihelp2 = "|cffFF0000/moveui|r - 解鎖並移動任何您看得見的框架及UI元素" - L.core_uihelp3 = "|cffFF0000/rl|r - 重新載入UI" - L.core_uihelp4 = "|cffFF0000/gm|r - 傳送回報單給GM或開啟幫助介面" - L.core_uihelp5 = "|cffFF0000/frame|r - 偵測滑鼠位置下的框架名稱. (對lua編輯者非常有幫助!)" - L.core_uihelp6 = "|cffFF0000/heal|r - 啟用Heal介面" - L.core_uihelp7 = "|cffFF0000/dps|r - 啟用Dps/Tank介面" - L.core_uihelp8 = "|cffFF0000/bags|r - 排序背包, 購買銀行背包位置或堆疊物品" - L.core_uihelp9 = "|cffFF0000/resetui|r - 重置Tukui到預設設置" - L.core_uihelp10 = "|cffFF0000/rd|r - 解散團隊" - L.core_uihelp11 = "|cffFF0000/ainv|r - 啟用密語自動邀請, 您可以設定輸入`/ainv myword`以設置您的密語關鍵字" - L.core_uihelp100 = "(想看更多? 向上拉吧! ...)" - - L.symbol_CLEAR = "清除" - L.symbol_SKULL = "頭顱" - L.symbol_CROSS = "十字" - L.symbol_SQUARE = "方形" - L.symbol_MOON = "月亮" - L.symbol_TRIANGLE = "三角" - L.symbol_DIAMOND = "鑽石" - L.symbol_CIRCLE = "圈圈" - L.symbol_STAR = "星星" - - L.bind_combat = "您不能在戰鬥中設定快捷鍵" - L.bind_saved = "所有快捷鍵修改已儲存" - L.bind_discard = "這次的快捷鍵修改已重設為上一次修改" - L.bind_instruct = "將滑鼠指向動作列上以綁定快捷鍵, 您可以按ESC或以右鍵點擊快捷列上任何一格以清除該位置的設定" - L.bind_save = "儲存" - L.bind_discardbind = "放棄" - - L.hunter_unhappy = "你的寵物感到不高興!" - L.hunter_content = "你的寵物感到滿足!" - L.hunter_happy = "你的寵物感到高興!" - - L.move_tooltip = "移動指示資訊" - L.move_minimap = "移動小地圖" - L.move_watchframe = "移動任務追蹤框架" - L.move_gmframe = "移動GM回報單及幫助介面" - L.move_buffs = "移動玩家Buff介面" - L.move_debuffs = "移動玩家Debuff介面" - L.move_shapeshift = "移動變形或圖騰列" - L.move_achievements = "移動成就介面" - L.move_roll = "移動Roll戰利品的介面" - L.move_vehicle = "移動載具坐位介面" - L.move_extrabutton = "Extra Button" - - -- tuto/install - L.install_header_1 = "歡迎" - L.install_header_2 = "1. 基本要素" - L.install_header_3 = "2. 單位框架" - L.install_header_4 = "3. 特點" - L.install_header_5 = "4. 您應該知道的事!" - L.install_header_6 = "5. 指令" - L.install_header_7 = "6. 完成" - L.install_header_8 = "1. 必要的設定" - L.install_header_9 = "2. 社交" - L.install_header_10= "3. 框架" - L.install_header_11= "4. 成功!" - - L.install_init_line_1 = "感謝您選擇Tukui!" - L.install_init_line_2 = "透過幾個簡單的步驟,將會引導您通過整個安裝過程。每個步驟您都可以決定是否套用或略過所呈現的設定。" - L.install_init_line_3 = "您也可以選擇顯示關於Tukui功能的簡短指南。" - L.install_init_line_4 = "點選'指南'來獲得簡介,或者點選'安裝'以略過這步驟。" - - L.tutorial_step_1_line_1 = "這個快速指南將向您展示一些Tukui的特點及功能。" - L.tutorial_step_1_line_2 = "首先,基本要素將會告訴您使用這個UI前該知道的事項。" - L.tutorial_step_1_line_3 = "這個安裝程序部分是角色特定,一些設定將會全帳號套用,您必須為每一個有使用Tukui的新角色執行安裝程序。程序將會在新角色第一次登入Tukui時自動顯示。同時,進階使用者可以在/Tukui/config/config.lua中找到選項,友善使用者可以在遊戲中輸入/tukui。" - L.tutorial_step_1_line_4 = "進階使用者是指有能力會使用一般使用者所不會的進階功能(如:編輯lua)的個人電腦使用者。友善使用者為一般使用者,並不需要編寫程式的能力,推薦他們使用我們的遊戲內設定工具(/tukui)來設定Tukui上想呈現的功能。" - - L.tutorial_step_2_line_1 = "Tukui包含一個內建版本的oUF,由Trond (Haste) A Ekseth創造,處理畫面中所有的單位框架,增/減益狀態及職業特色元素。" - L.tutorial_step_2_line_2 = "您可以拜訪 http://www.wowinterface.com 蒐尋oUF以獲得更多這項工具的資訊。" - L.tutorial_step_2_line_3 = "假如您是治療者或是團隊領隊,您可能想啟用治療者團隊框架,它們提供更多團隊資訊(/heal)。傷害輸出玩家或是坦克應該使用簡潔的團隊框架(/dps)。如果不想顯示任一團隊框架或是其他東西,您可以在角色選單的插件管理中關閉它。" - L.tutorial_step_2_line_4 = "鍵入/moveui可以簡單地改變單位框架的位置。" - - L.tutorial_step_3_line_1 = "Tukui是一個重新設計過的Blizzard UI,不多也不少。大部分你可以在預設UI上看到的都是Tukui,只有一些自動化功能是畫面中看不到的,如:拜訪商人時自動販賣灰色物品,或是自動分類背包中的物品。" - L.tutorial_step_3_line_2 = "並不是每個人都滿意傷害輸出統計、首領模組,仇恨監控等等,但我們認為這是最好的事情。Tukui是在符合所有職業、角色、天賦、玩法、玩家品味...等等的概念下產生,這就是為什麼Tukui是現今最受歡迎的UI之一,它適合每個人的玩法且可任意地調整。它也設計成可讓任何想做客製化UI卻沒有關聯插件的人有一個好的開始。自2009年後,許多玩家使用Tukui為基礎來創作自己的UI,可以到我們網站的Edited Packages論壇專區看看!" - L.tutorial_step_3_line_3 = "使用者可能有興趣到我們網站的額外模組專區看看,或是拜訪 http://www.wowinterface.com 來獲得額外的功能或模組。" - L.tutorial_step_3_line_4 = "" - - L.tutorial_step_4_line_1 = "將滑鼠移至在底部快捷列背景的最左/右邊,可設定底部快捷列的數目,畫面右邊的快捷列同樣可藉由上方或底部調整。點擊對話框的右上角游標懸停顯示的按鈕即可複製聊天文字。" - L.tutorial_step_4_line_2 = "小地圖邊框將會改變顏色,收到新郵件時為綠色,受到新的行事曆邀請時為紅色,兩項皆有時為橘色。" - L.tutorial_step_4_line_3 = "您可以左鍵點擊80%的資訊欄位來顯示各種Blizzard的面板,好友資訊及公會資訊同時擁有右鍵點擊功能。" - L.tutorial_step_4_line_4 = "這裡有一些下拉式選單可供使用。右鍵點擊背包的[X](關閉)按鈕將會顯示功能選單以顯示背包、排列物品、顯示鑰匙圈等等。中鍵點擊小地圖可顯示微型選單。" - - L.tutorial_step_5_line_1 = "最近,Tukui有許多實用的指令,以下列表。" - L.tutorial_step_5_line_2 = "/moveui 允許你移動畫面上大部分的框架。 /enable 及 /disable 快速啟用或關閉插件。 /rl 重新載入UI。 /heal 啟用治療者團隊框架。 /dps 啟用傷害輸出/坦克團隊框架。" - L.tutorial_step_5_line_3 = "/tt 密語目標。 /rc 發起團隊確認。 /rd 解散隊伍或團隊。 /bags 顯示可用的背包指令。 /ainv 啟用自動密語邀請。(/ainv off 關閉功能)" - L.tutorial_step_5_line_4 = "/gm 開啟尋求幫助選單。 /install, /resetui 或 /tutorial 載入安裝程序。 /frame 列出滑鼠游標下的框架名稱及額外資訊。" - - L.tutorial_step_6_line_1 = "指南到此結束,您可藉由輸入/tutorial 以再次諮詢。" - L.tutorial_step_6_line_2 = "建議您開啟config/config.lua或鍵入/Tukui來自訂符合您需求的UI。" - L.tutorial_step_6_line_3 = "如果安裝程序未完成,您現在可繼續安裝此UI。或者您想重置至預設值!" - L.tutorial_step_6_line_4 = "" - - L.install_step_1_line_1 = "這些步驟將為Tukui套用正確的CVar設定。" - L.install_step_1_line_2 = "第一個步驟套用必要的設定。" - L.install_step_1_line_3 = "這個步驟|cffff0000建議|r給任何一位新使用者,除非您只想套用這些設定的特定部分。" - L.install_step_1_line_4 = "點選'繼續'以套用設定,如果您希望跳過這個步驟請點選'略過'。" - - L.install_step_2_line_0 = "發現到其他的聊天插件。我們將會忽略這個步驟,請點擊略過以繼續安裝。" - L.install_step_2_line_1 = "第二個步驟將會套用正確的聊天設定。" - L.install_step_2_line_2 = "如果您是一位新使用者,我們建議這個步驟。如果是現有使用者,您可能想略過這個步驟。" - L.install_step_2_line_3 = "經由這些設定,您的聊天字體顯示過大是正常的,當安裝完成後將會還原。" - L.install_step_2_line_4 = "點選'繼續'以套用設定,如果您希望跳過這個步驟請點選'略過'。" - - L.install_step_3_line_1 = "第三和最後的步驟將套用預設框架位置。" - L.install_step_3_line_2 = "我們|cffff0000建議|r這個步驟給任何一位新使用者。" - L.install_step_3_line_3 = "" - L.install_step_3_line_4 = "點選'繼續'以套用這些設定,如果您希望跳過這個步驟請點選'略過'。" - - L.install_step_4_line_1 = "安裝完成。" - L.install_step_4_line_2 = "請點擊'完成'以重新載入UI。" - L.install_step_4_line_3 = "" - L.install_step_4_line_4 = "享受Tukui吧! 拜訪我們 http://www.tukui.org!" - - L.install_button_tutorial = "指南" - L.install_button_install = "安裝" - L.install_button_next = "下一步" - L.install_button_skip = "略過" - L.install_button_continue = "繼續" - L.install_button_finish = "完成" - L.install_button_close = "關閉" -end diff --git a/Tukui/locales/russian.lua b/Tukui/locales/russian.lua deleted file mode 100644 index 66678dd..0000000 --- a/Tukui/locales/russian.lua +++ /dev/null @@ -1,303 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -if T.client == "ruRU" then - L.chat_BATTLEGROUND_GET = "ПБ" - L.chat_BATTLEGROUND_LEADER_GET = "ЛПБ" - L.chat_BN_WHISPER_GET = "От" - L.chat_GUILD_GET = "Г" - L.chat_OFFICER_GET = "О" - L.chat_PARTY_GET = "Гр" - L.chat_PARTY_GUIDE_GET = "Гр" - L.chat_PARTY_LEADER_GET = "Лгр" - L.chat_RAID_GET = "Р" - L.chat_RAID_LEADER_GET = "ЛР" - L.chat_RAID_WARNING_GET = "ОР" - L.chat_WHISPER_GET = "От" - L.chat_FLAG_AFK = "[АФК]" - L.chat_FLAG_DND = "[ДНД]" - L.chat_FLAG_GM = "[ГМ]" - L.chat_ERR_FRIEND_ONLINE_SS = "|cff298F00входит|r" - L.chat_ERR_FRIEND_OFFLINE_S = "|cffff0000выходит|r" - - L.chat_general = "Общий" - L.chat_trade = "Торговля" - L.chat_defense = "ОборонаЛокальный" - L.chat_recrutment = "Гильдии" - L.chat_lfg = "ПоискСпутников" - - L.disband = "Роспуск группы ?" - - L.datatext_notalents ="Нет талантов" - L.datatext_download = "Загрузка: " - L.datatext_bandwidth = "Скорость: " - L.datatext_guild = "Гильдия" - L.datatext_noguild = "Не в Гильдии" - L.datatext_bags = "Сумки: " - L.datatext_friends = "Друзья" - L.datatext_online = "В игре: " - L.datatext_armor = "Броня" - L.datatext_earned = "Получено:" - L.datatext_spent = "Потрачено:" - L.datatext_deficit = "Убыток:" - L.datatext_profit = "Прибыль:" - L.datatext_timeto = "Времени до" - L.datatext_friendlist = "Список друзей:" - L.datatext_playersp = "sp" - L.datatext_playerap = "ap" - L.datatext_playerhaste = "скорость" - L.datatext_dps = "дпс" - L.datatext_hps = "хпс" - L.datatext_playerarp = "арп" - L.datatext_session = "Сеанс: " - L.datatext_character = "Персонаж: " - L.datatext_server = "Сервер: " - L.datatext_totalgold = "Всего: " - L.datatext_savedraid = "Сохранения:" - L.datatext_currency = "Валюта:" - L.datatext_fps = " к/с & " - L.datatext_ms = " мс" - L.datatext_playercrit = " crit" - L.datatext_playerheal = " heal" - L.datatext_avoidancebreakdown = "Распределение" - L.datatext_lvl = "ур" - L.datatext_boss = "Босс" - L.datatext_miss = "Промах" - L.datatext_dodge = "Уклонение" - L.datatext_block = "Блок" - L.datatext_parry = "Парирование" - L.datatext_playeravd = "avd: " - L.datatext_servertime = "Серверное время: " - L.datatext_localtime = "Местное время: " - L.datatext_mitigation = "Уменьшение по уровню: " - L.datatext_healing = "Исцеление : " - L.datatext_damage = "Урон : " - L.datatext_honor = "Очки чести : " - L.datatext_killingblows = "Смерт. удары : " - L.datatext_ttstatsfor = "Статистика по " - L.datatext_ttkillingblows = "Смерт. удары:" - L.datatext_tthonorkills = "Почетные победы:" - L.datatext_ttdeaths = "Смерти:" - L.datatext_tthonorgain = "Получено чести:" - L.datatext_ttdmgdone = "Нанесено урона:" - L.datatext_tthealdone = "Исцелено урона:" - L.datatext_basesassaulted = "Штурмы баз:" - L.datatext_basesdefended = "Оборона баз:" - L.datatext_towersassaulted = "Штурмы башен:" - L.datatext_towersdefended = "Оборона башен:" - L.datatext_flagscaptured = "Захваты флага:" - L.datatext_flagsreturned = "Возвраты флага:" - L.datatext_graveyardsassaulted = "Штурмы кладбищ:" - L.datatext_graveyardsdefended = "Оборона кладбищ:" - L.datatext_demolishersdestroyed = "Разрушителей уничтожено:" - L.datatext_gatesdestroyed = "Врат разрушено:" - L.datatext_totalmemusage = "Общее использование памяти:" - L.datatext_control = "Под контролем:" - - L.Slots = { - [1] = {1, "Голова", 1000}, - [2] = {3, "Плечо", 1000}, - [3] = {5, "Грудь", 1000}, - [4] = {6, "Пояс", 1000}, - [5] = {9, "Запястья", 1000}, - [6] = {10, "Кисти рук", 1000}, - [7] = {7, "Ноги", 1000}, - [8] = {8, "Ступни", 1000}, - [9] = {16, "Правая рука", 1000}, - [10] = {17, "Левая рука", 1000}, - [11] = {18, "Оружие дальнего боя", 1000} - } - - L.popup_disableui = "Tukui не работает на этом разрешении, хотите отключить Tukui? (Отмена если хотите попробовать другое разрешение)" - L.popup_install = "Это первый запуск Tukui V13 для этого персонажа. Необходимо перезагрузить интерфейс для настройки Панелей, Переменных и Окон Чата." - L.popup_2raidactive = "Обе рейдовые раскладки активны, пожалуйста, выберите одну." - L.popup_reset = "Внимание! Это сбросит все настройки Tukui. Вы хотите продолжить?" - L.popup_install_yes = "Да! (рекомендуется!)" - L.popup_install_no = "Нет, это слишком сложно" - L.popup_reset_yes = "О да, детка!" - L.popup_reset_no = "Нет, я посмотрю на QQ форуме!" - L.popup_fix_ab = "Что-то не то с вашей панелью действий. Хотите перезагрузить интерфейс, чтобы исправить это?" - - L.merchant_repairnomoney = "Недостаточно денег на починку" - L.merchant_repaircost = "Предметы починены за" - L.merchant_trashsell = "Серые предметы проданы и Вы получили" - - L.goldabbrev = "|cffffd700з|r" - L.silverabbrev = "|cffc7c7cfс|r" - L.copperabbrev = "|cffeda55fм|r" - - L.error_noerror = "Ошибок не обнаружено." - - L.unitframes_ouf_offline = "Оффлайн" - L.unitframes_ouf_dead = "Труп" - L.unitframes_ouf_ghost = "Призрак" - L.unitframes_ouf_lowmana = "МАНА" - L.unitframes_ouf_threattext = "Угроза на цели:" - L.unitframes_ouf_offlinedps = "Оффлайн" - L.unitframes_ouf_deaddps = "|cffff0000[Труп]|r" - L.unitframes_ouf_ghostheal = "ПРИЗРАК" - L.unitframes_ouf_deadheal = "ТРУП" - L.unitframes_ouf_gohawk = "Дух Ястреба" - L.unitframes_ouf_goviper = "Дух Гадюки" - L.unitframes_disconnected = "D/C" - L.unitframes_ouf_wrathspell = "Гнев" - L.unitframes_ouf_starfirespell = "Звездный огонь" - - L.tooltip_count = "Кол-во" - - L.bags_noslots = "невозможно купить еще ячеек!" - L.bags_costs = "Цена: %.2f золотых" - L.bags_buyslots = "Купить новую ячейку коммандой /bags purchase yes" - L.bags_openbank = "Сначала откройте банк." - L.bags_sort = "Сортировать предметы в сумке или банке, если они открыты." - L.bags_stack = "Заполнить неполные стопки в сумках или банке, если они открыты." - L.bags_buybankslot = "купить банковскую ячейку. (банк должен быть открыт)" - L.bags_search = "Поиск" - L.bags_sortmenu = "Сортировать" - L.bags_sortspecial = "Сортировать в спецсумках" - L.bags_stackmenu = "Сложить" - L.bags_stackspecial = "Сложить в спецсумках" - L.bags_showbags = "Показать сумки" - L.bags_sortingbags = "Сортировка завершена." - L.bags_nothingsort= "Нечего сортировать." - L.bags_bids = "Использование сумок: " - L.bags_stackend = "Заполнение завершено." - L.bags_rightclick_search = "ПКМ для поиска." - - L.loot_fish = "Рыбалка" - L.loot_empty = "Пусто" - - L.chat_invalidtarget = "Неверная цель" - - L.mount_wintergrasp = "Озеро Ледяных Оков" - - L.core_autoinv_enable = "Автоприглашение ВКЛ: invite" - L.core_autoinv_enable_c = "Автоприглашение ВКЛ: " - L.core_autoinv_disable = "Автоприглашение ВЫКЛ" - L.core_wf_unlock = "Окно отслеживания заданий разблокировано" - L.core_wf_lock = "Окно отслеживания заданий закреплено" - L.core_welcome1 = "Добро пожаловать в |cffC495DDTukui|r версии " - L.core_welcome2 = "Напечатайте |cff00FFFF/uihelp|r для получения доп. информации" - - L.core_uihelp1 = "|cff00ff00основные команды|r" - L.core_uihelp2 = "|cffFF0000/moveui|r - Разблокировать и передвинуть элементы интерфейса." - L.core_uihelp3 = "|cffFF0000/rl|r - Перегрузить интерфейс." - L.core_uihelp4 = "|cffFF0000/gm|r - Обратится за помощью к ГМ." - L.core_uihelp5 = "|cffFF0000/frame|r - Показать имя окна под мышкой. (очень удобно для правки lua)" - L.core_uihelp6 = "|cffFF0000/heal|r - Включить рейдовый интерфейс для хила." - L.core_uihelp7 = "|cffFF0000/dps|r - Включить рейдовый интерфейс для ДПС/Танка." - L.core_uihelp8 = "|cffFF0000/bags|r - Сортировка сумок, покупка слотов в банке." - L.core_uihelp9 = "|cffFF0000/resetui|r - Сбросить Tukui к настройкам по умолчанию." - L.core_uihelp10 = "|cffFF0000/rd|r - Распустить рейд." - L.core_uihelp11 = "|cffFF0000/ainv|r - Включить автоинвайт по определенному слову в приват. Вы можете установить ваше слово коммандой `/ainv слово`" - L.core_uihelp100 = "(Прокрутите вверх, чтобы увидеть больше команд...)" - - L.symbol_CLEAR = "Очистить" - L.symbol_SKULL = "Череп" - L.symbol_CROSS = "Крест" - L.symbol_SQUARE = "Квадрат" - L.symbol_MOON = "Полумесяц" - L.symbol_TRIANGLE = "Треугольник" - L.symbol_DIAMOND = "Ромб" - L.symbol_CIRCLE = "Круг" - L.symbol_STAR = "Звезда" - - L.bind_combat = "Вы не можете назначать клавиши в бою." - L.bind_saved = "Все назначения клавиш сохранены." - L.bind_discard = "Все новые назначения клавиш были отменены." - L.bind_instruct = "Наведите указатель мыши на кнопку действия, чтобы назначить клавишу. Нажмите клавишу ESC или правую кнопку мыши чтобы убрать назначение." - L.bind_save = "Сохранить назначения" - L.bind_discardbind = "Отменить назначения" - - L.hunter_unhappy = "Ваш питомец несчастлив!" - L.hunter_content = "Ваш питомец доволен!" - L.hunter_happy = "Ваш питомец счастлив!" - - L.move_tooltip = "Передвинуть подсказку" - L.move_minimap = "Передвинуть миникарту" - L.move_watchframe = "Передвинуть квесты" - L.move_gmframe = "Передвинуть тикет" - L.move_buffs = "Передвинуть баффы" - L.move_debuffs = "Передвинуть дебаффы" - L.move_shapeshift = "Передвинуть панель стоек/тотемов" - L.move_achievements = "Передвинуть всплывающее окно достижений" - L.move_roll = "Передвинуть окно розыгрыша добычи" - L.move_vehicle = "Передвинуть фрейм транспорта" - L.move_extrabutton = "Передвинуть доп. кнопку" - - -- tuto/install - L.install_header_1 = "Добро пожаловать!" - L.install_header_2 = "1. Необходимые элементы" - L.install_header_3 = "2. Рамки портретов" - L.install_header_4 = "3. Особенности" - L.install_header_5 = "4. Что нужно знать!" - L.install_header_6 = "5. Команды" - L.install_header_7 = "6. Завершено" - L.install_header_8 = "1. Основные настройки" - L.install_header_9 = "2. Панель общения" - L.install_header_10= "3. Портреты" - L.install_header_11= "4. Готово!" - - L.install_init_line_1 = "Спасибо за использование Tukui!" - L.install_init_line_2 = "Мы Вам поможем с процессом установки с помощью всего нескольких простых шагов. На каждом шагу, Вы можете выбрать, хотите ли Вы применить выбранные настройки или пропустить этот шаг." - L.install_init_line_3 = "Также у Вас есть возможность просмотреть введение, которое расскажет о некоторых особенностях Tukui." - L.install_init_line_4 = "Нажмите `Введение` для перехода или нажмите `Установить` для пропуска данного шага." - - L.tutorial_step_1_line_1 = "Это быстрое введение расскажет Вам об особенностях TukUI" - L.tutorial_step_1_line_2 = "Во-первых, важная информация, которую Вы должны знать перед тем, как приступить к игре, используя TukUI." - L.tutorial_step_1_line_3 = "Данный установщик отчасти индивидуален для каждого персонажа. Одни настройки будут применены для всех персонажей Вашего аккаунта, некоторые же другие настройки Вам будет необходимо устанавливать для каждого персонажа отдельно, для чего будет использовано диалоговое окно. Дbfлоговое окно будет показано каждый раз, когда Вы входите в игру новым персонажем, первый раз использующим TukUI. Также, для продвинутых пользователей предусмотрена возможность редактирования настроек через изменение файла конфигурации, который находится по пути /Tukui/config/config.lua. Интуитивно понятный интерфейс по изменению настроек для обычных пользователей вызывается командой /tukui" - L.tutorial_step_1_line_4 = "Продвинутый пользователь - это пользователь компьютера, который обладает определенными навыками (например, LUA-кодировкой). Обычный пользователь - пользователь, не обладающий навыками программирования. Для них рекомендуется использование команды /tukui для отображения настроек" - - L.tutorial_step_2_line_1 = "Tukui включает в себя встроенную версию oUF, созданную Trond'ом (Haste) A Ekseth'ом. Данная встроенная версия oUF отвечает за все рамки портретов, эффекты и ауры, а также за уникальные для каждого класса элементы" - L.tutorial_step_2_line_2 = "Вы можете посетить wowinterface.com и поискать oUF для более полной информации" - L.tutorial_step_2_line_3 = "Если вы играете хилером (лекарем) или лидером рейда, возможно, Вы захотите включить специально разработанные панели для хилеров (лекарей). Они отображают более детальную информацию о членах вашей группы/рейда. Включается командой /heal. ДПСерам (ДДшникам) и танкам рекомендуется использовать простой интерфейс для рейда. Включается командой /dps. Если Вы не хотите использовать ни один из предложенных вариантов или желаете использовать что-то другое, Вы можете отключить эту функцию через панель модификаций на странице выбора персонажа" - L.tutorial_step_2_line_4 = "Для легкого изменения позиции рамки портрета просто наберите /moveui" - - L.tutorial_step_3_line_1 = "TukUI - это модифицированный вариант оригинального интерфейса от Близзард. Ни больше, ни меньше. Практически ве функции, которые Вы можете встретить в оригинальном интерфейсе, присутствуют и в TukUI, кроме, например, таких уникальных для TukUI функций, как продажа серых вещей автоматически при посещении вендора (торговца) или авто-сортировка вещей в сумках." - L.tutorial_step_3_line_2 = "Хотя не все игроки любят использовать такие вещи, как ДПС метры, моды для боссов, аггро (угроза) метры и прочее, мы считаем, что лучше их использовать. TukUI создан именно для того, чтобы любой игрок любого класса, с любым вкусом и видом геймплея, мог использовать TukUI, как ему нравится, так как данный интерфейс легко редактируемый. Также TukUI может служить наглядным пособием для тех, кто хочет создать свой интерфейс без помощи посторонних аддонов (модификаций). Именно поэтому TukUI так популярен! С 2009 года множество игроков использовали TukUI, чтоьы создать свой уникальный интерфейс! Чтобы убедиться, зайдите в раздел Edited packages на нашей сайте!" - L.tutorial_step_3_line_3 = "Пользователи могут захотеть посетить страничку с дополнительными модификациями на нашей сайте или же посетить wowinterface.com" - L.tutorial_step_3_line_4 = "" - - L.tutorial_step_4_line_1 = "Чтобы выбрать, сколько панелей команд Вы хотите, наведите курсор мыши слева или справа от нижней панели команд. Тем же путем вы можете выбрать количество панелей справа, наведя курсором соответственно снизу или сверху панели команд. Чтобы скопировать текст из окошка общения, нажмите на кнопку в правом углу окошка общения." - L.tutorial_step_4_line_2 = "Окантовка мини-карты меняет цвет. Она зеленая, когда у вас новое письмо, красная, когда у вас новое приглашение в игровом календаре, оранжевая, когда и то, и то в одно время..." - L.tutorial_step_4_line_3 = "Вы можете нажать левой кнопкой мыши почти на каждый дата-текст внизу экрана и под мини-картой для открытия соответствующий окошек (гильдия/друзья/календарь/прочее). Также дата-текст гильдии (там, где отображается количество членов гильдии онлайн) имеет некторые функции при нажатии правой кнопкой мыши на дата-текст." - L.tutorial_step_4_line_4 = "К тому же, имеются некоторые выпадающие меню. Нажмите правой кнопкой мыши на [Х] (Закрыть) кнопке окошка сумок для отображения меню, при помощи которого можно автоматически сортировать вещи в сумках, показать, какие у вас сумки, ключи и прочее. Щелчок колесиком по мини-карте вызовет мини-меню.." - - L.tutorial_step_5_line_1 = "Напоследок, TukUI имеет широкий набор консольных команд (слэш-команды). Ниже приведен список некоторых из них. " - L.tutorial_step_5_line_2 = "/moveui позволяет вам двигать почти все элементы интерфейса на любую точку. /enable and /disable используются для быстрого включения и отключения аддонов (модификаций). /rl перезагружает интерфейс. /heal включает интерфейс хилера (лекаря), а /dps включает интерфейс для ДДшников (ДПСеров) и танков." - L.tutorial_step_5_line_3 = "/tt позволяет Вам послать сообщение вашей цели. /rc производить проверку готовности вашей группы/рейда (рэди-чек). /rd распускает группу или рейд. /bags отображает некоторые особенности команд, используемых через командную строку.. /ainv включает автоматическое приглашение в группу (инвайт) через посылку Вам сообщения. /ainv off отключает эту функцию" - L.tutorial_step_5_line_4 = "/gm открывает окно помощи. /install, /resetui или /tutorial загружает данный установщик. /frame показывает вам имя и дополнительную информацию об элементе интерфейса, на который Вы навели курсор." - - L.tutorial_step_6_line_1 = "Введение завершено. Вы можете повторить его в любое время, просто напечатав /tutorial." - L.tutorial_step_6_line_2 = "Рекомендую Вам взглянуть на файл конфигурации, который находится по пути config/config.lua, или же просто напечатайте /Tukui для настройки интерфейса, как Вам нравится." - L.tutorial_step_6_line_3 = "Сейчас Вы можете продолжить установку данного интерфейса, если вы еще не закончили, или же сбросить все настройки на настройки по умолчанию!" - L.tutorial_step_6_line_4 = "" - - L.install_step_1_line_1 = "Данные шаги применят правильные CVar настройки для Tukui." - L.install_step_1_line_2 = "Первый шаг применяет основные настройки." - L.install_step_1_line_3 = "|cffff0000Рекомендуется|r для любого пользователя, если Вы не собираетесь применить только определенные параметры." - L.install_step_1_line_4 = "Нажмите «Продолжить», чтобы сохранить настройки, или нажмите «Пропустить», если вы хотите пропустить данный шаг." - - L.install_step_2_line_0 = "Найдена другая модификация чата. Мы пропустим этот шаг. Пожалуйста, нажмите «Пропустить» для продолжения установки." - L.install_step_2_line_1 = "Второй шаг применит настройки для чата." - L.install_step_2_line_2 = "Если вы новый пользователь, этот шаг рекомендуется. Если Вы уже пользовались этим интерфейсом, возможно, Вы захотите пропустить данный шаг." - L.install_step_2_line_3 = "Это нормально, если размер шрифта будет слишком большим, пока Вы не применили настройки. Шрифт будет нормальным, когда Вы закончите установку. " - L.install_step_2_line_4 = "Нажмите «Продолжить» для сохранения настроек или нажмите «Пропустить», чтобы пропустить данный шаг." - - L.install_step_3_line_1 = "Третий и последний шаг применит настройки положения рамок портретов и элементов интерфейса" - L.install_step_3_line_2 = "Этот шаг |cffff0000рекомендуется|r для любого пользователя." - L.install_step_3_line_3 = "" - L.install_step_3_line_4 = " Нажмите «Продолжить» для сохранения настроек или нажмите «Пропустить», чтобы пропустить данный шаг. " - - L.install_step_4_line_1 = "Установка завершена." - L.install_step_4_line_2 = "Пожалуйста, нажмите «Завершить» для перезагрузки интерфейса." - L.install_step_4_line_3 = "" - L.install_step_4_line_4 = "Наслаждайтесь Tukui! Посетите нас на http://www.tukui.org!" - - L.install_button_tutorial = "Введение" - L.install_button_install = "Установка" - L.install_button_next = "Далее" - L.install_button_skip = "Пропустить" - L.install_button_continue = "Продолжить" - L.install_button_finish = "Завершить" - L.install_button_close = "Закрыть" -end \ No newline at end of file diff --git a/Tukui/locales/spanish.lua b/Tukui/locales/spanish.lua deleted file mode 100644 index a866390..0000000 --- a/Tukui/locales/spanish.lua +++ /dev/null @@ -1,291 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -if T.client == "esES" or T.client == "esMX" then - L.chat_BATTLEGROUND_GET = "B" - L.chat_BATTLEGROUND_LEADER_GET = "B" - L.chat_BN_WHISPER_GET = "De" - L.chat_GUILD_GET = "G" - L.chat_OFFICER_GET = "O" - L.chat_PARTY_GET = "P" - L.chat_PARTY_GUIDE_GET = "P" - L.chat_PARTY_LEADER_GET = "P" - L.chat_RAID_GET = "R" - L.chat_RAID_LEADER_GET = "R" - L.chat_RAID_WARNING_GET = "RW" - L.chat_WHISPER_GET = "De" - L.chat_FLAG_AFK = "[AUS]" - L.chat_FLAG_DND = "[DND]" - L.chat_FLAG_GM = "[GM]" - L.chat_ERR_FRIEND_ONLINE_SS = "is now |cff298F00online|r" - L.chat_ERR_FRIEND_OFFLINE_S = "is now |cffff0000offline|r" - - L.chat_general = "General" - L.chat_trade = "Comercio" - L.chat_defense = "DefensaLocal" - L.chat_recrutment = "ReclutamientoHermandad" - L.chat_lfg = "BuscandoGrupo" - - L.disband = "¿Deshacer grupo?" - - L.datatext_notalents ="Sin Talentos" - L.datatext_download = "Descarga: " - L.datatext_bandwidth = "Ancho de banda: " - L.datatext_guild = "Hermandad" - L.datatext_noguild = "Sin Hermandad" - L.datatext_bags = "Mochila: " - L.datatext_friends = "Amigos" - L.datatext_online = "Conectados: " - L.datatext_armor = "Armadura" - L.datatext_earned = "Ganado:" - L.datatext_spent = "Gastado:" - L.datatext_deficit = "Balance:" - L.datatext_profit = "Beneficios:" - L.datatext_timeto = "Tiempo para:" - L.datatext_friendlist = "Lista de Amigos:" - L.datatext_playersp = "PH" - L.datatext_playerap = "PA" - L.datatext_playerhaste = "Celeridad" - L.datatext_dps = "Dps" - L.datatext_hps = "Sps" - L.datatext_playerarp = "ArP" - L.datatext_session = "Sesión: " - L.datatext_character = "Personaje: " - L.datatext_server = "Reino: " - L.datatext_totalgold = "Total: " - L.datatext_savedraid = "Mazmorras Registradas" - L.datatext_currency = "Monedas:" - L.datatext_fps = " fps & " - L.datatext_ms = " ms" - L.datatext_playercrit = " crit" - L.datatext_playerheal = " Sanación" - L.datatext_avoidancebreakdown = "Desglose de Evasión" - L.datatext_lvl = "nivel" - L.datatext_boss = "Jefe" - L.datatext_miss = "Fallo" - L.datatext_dodge = "Esquiva" - L.datatext_block = "Bloqueo" - L.datatext_parry = "Parada" - L.datatext_playeravd = "avd: " - L.datatext_servertime = "Hora del servidor: " - L.datatext_localtime = "Hora Local: " - L.datatext_mitigation = "Mitigación por Nivel: " - L.datatext_healing = "Sanación : " - L.datatext_damage = "Daño : " - L.datatext_honor = "Honor : " - L.datatext_killingblows = "Golpes de Gracia: " - L.datatext_ttstatsfor = "Estadísticas para " - L.datatext_ttkillingblows = "Golpes de Gracia:" - L.datatext_tthonorkills = "Golpes de Gracia con Honor:" - L.datatext_ttdeaths = "Muertes :" - L.datatext_tthonorgain = "Honor Ganado:" - L.datatext_ttdmgdone = "Daño Realizado:" - L.datatext_tthealdone = "Sanación Realizada :" - L.datatext_basesassaulted = "Bases Asaltadas:" - L.datatext_basesdefended = "Bases Defendidas:" - L.datatext_towersassaulted = "Torres Asaltadas:" - L.datatext_towersdefended = "Torres Defendidas:" - L.datatext_flagscaptured = "Banderas Capturadas:" - L.datatext_flagsreturned = "Banderas Devueltas:" - L.datatext_graveyardsassaulted = "Cementerios Asaltados:" - L.datatext_graveyardsdefended = "Cementerios Defendidos:" - L.datatext_demolishersdestroyed = "Catapultas Destruidas:" - L.datatext_gatesdestroyed = "Puertas Destruidas:" - L.datatext_totalmemusage = "Total de Memoria Usada:" - L.datatext_control = "Controlado por:" - - L.Slots = { - [1] = {1, "Cabeza", 1000}, - [2] = {3, "Hombro", 1000}, - [3] = {5, "Pecho", 1000}, - [4] = {6, "Cintura", 1000}, - [5] = {9, "Muñeca", 1000}, - [6] = {10, "Manos", 1000}, - [7] = {7, "Piernas", 1000}, - [8] = {8, "Pies", 1000}, - [9] = {16, "Mano Derecha", 1000}, - [10] = {17, "Mano Izquierda", 1000}, - [11] = {18, "A Distancia", 1000} - } - - L.popup_disableui = "Tukui no funciona con esta resolución, ¿Quieres desactivar Tukui? (Pulsa cancelar si quieres probar otra resolución)" - L.popup_install = "Es la primera vez que usas Tukui V14 con este personaje. Debes recargar la Interfaz para ajustar las barras de acción, las variables y los marcos de chat." - L.popup_2raidactive = "Hay dos entornos disponibles para bandas, por favor selecciona uno." - L.popup_reset = "¡Cuidado! Esto reiniciará Tukui por completo. ¿Quieres continuar?" - L.popup_install_yes = "¡Sí! (¡recomendado!)" - L.popup_install_no = "No, ¡realmente apesta!" - L.popup_reset_yes = "¡Oh, si nena!" - L.popup_reset_no = "No, ¡preguntare en los foros!" - L.popup_fix_ab = "Algo anda mal con tu barra de acción. ¿Quieres recargar la IU para arreglarlo?" - - L.merchant_repairnomoney = "¡No tienes suficiente dinero para reparar!" - L.merchant_repaircost = "Tus objetos han sido reparados por: " - L.merchant_trashsell = "Has vendido toda la basura a cambio de: " - - L.goldabbrev = "|cffffd700g|r" - L.silverabbrev = "|cffc7c7cfs|r" - L.copperabbrev = "|cffeda55fc|r" - - L.error_noerror = "Aún sin errores." - - L.unitframes_ouf_offline = "Desconectado" - L.unitframes_ouf_dead = "Muerto" - L.unitframes_ouf_ghost = "Fantasma" - L.unitframes_ouf_lowmana = "Mana Bajo" - L.unitframes_ouf_threattext = "Amenaza en el objetivo:" - L.unitframes_ouf_offlinedps = "Desconectado" - L.unitframes_ouf_deaddps = "|cffff0000[Muerto]|r" - L.unitframes_ouf_ghostheal = "FANTASMA" - L.unitframes_ouf_deadheal = "MUERTO" - L.unitframes_ouf_gohawk = "HALCÓN YA!" - L.unitframes_ouf_goviper = "VÍBORA YA!" - L.unitframes_disconnected = "D/C" - L.unitframes_ouf_wrathspell = "Cólera" - L.unitframes_ouf_starfirespell = "Fuego Estelar" - - L.tooltip_count = "Count" - - L.bags_noslots = "¡no puedes comprar más espacios!" - L.bags_costs = "Costo: %.2f oro" - L.bags_buyslots = "Compra un nuevo espacio mediante '/bags purchase yes'" - L.bags_openbank = "Necesitas abrir el banco primero." - L.bags_sort = "Ordena tu bolsa, o tu banco si está abierto." - L.bags_stack = "Llena los montones incompletos en tu bolsa, o en tu banco si está abierto" - L.bags_buybankslot = "Compra un espacio en el banco. (Necesitas tener el banco abierto)" - L.bags_search = "Buscar" - L.bags_sortmenu = "Ordenar" - L.bags_sortspecial = "Ordenar Especial" - L.bags_stackmenu = "Amontonar" - L.bags_stackspecial = "Amontonar Especial" - L.bags_showbags = "Mostrar Bolsas" - L.bags_sortingbags = "Se ha acabado de ordenar." - L.bags_nothingsort= "No hay nada que ordenar." - L.bags_bids = "Usando las bolsas: " - L.bags_stackend = "Se ha acabado de amontonar." - L.bags_rightclick_search = "Click derecho para buscar." - - L.loot_fish = "Botín de Pesca" - L.loot_empty = "Espacio Vacío" - - L.chat_invalidtarget = "Objetivo Invalido" - - L.mount_wintergrasp = "Conquista De Invierno" - - L.core_autoinv_enable = "Auto Invitar ON: invite" - L.core_autoinv_enable_c = "Auto Invitar ON: " - L.core_autoinv_disable = "Auto Invitar OFF" - L.core_wf_unlock = "Registro de Misiones Desbloqueado" - L.core_wf_lock = "Registro de Misiones Bloqueado" - L.core_welcome1 = "Bienvenido a |cffC495DDTukui|r versión " - L.core_welcome2 = "Escribe |cff00FFFF/uihelp|r para más información o visita |cff00FFFFwww.tukui.org|r" - - L.core_uihelp1 = "|cff00ff00Comandos Generales|r" - L.core_uihelp2 = "|cffFF0000/moveui|r - Desbloquea y mueve elementos por la pantalla." - L.core_uihelp3 = "|cffFF0000/rl|r - Recarga la interfaz del usuario." - L.core_uihelp4 = "|cffFF0000/gm|r - Envia un ticket a un MJ o muestra la ayuda en juego del WoW." - L.core_uihelp5 = "|cffFF0000/frame|r - Detecta el nombre del marco sobre el que tienes el cursor. (muy util para editores de lua)" - L.core_uihelp6 = "|cffFF0000/heal|r - Activa el perfil de banda de sanación." - L.core_uihelp7 = "|cffFF0000/dps|r - Activa el perfil de banda de Dps/Tanque." - L.core_uihelp8 = "|cffFF0000/bags|r - Para buscar, comprar un hueco del banco o amontonar objetos en tus bolsas." - L.core_uihelp9 = "|cffFF0000/resetui|r - Resetea Tukui por completo." - L.core_uihelp10 = "|cffFF0000/rd|r - Deshacer banda." - L.core_uihelp11 = "|cffFF0000/ainv|r - Activa el autoinvitar via palabra clave en susurro. Puedes escoger la palabra clave escribiendo `/ainv palabraclave`" - L.core_uihelp100 = "(Sube el chat para ver mas comandos ...)" - - L.symbol_CLEAR = "Nada" - L.symbol_SKULL = "Calavera" - L.symbol_CROSS = "Cruz" - L.symbol_SQUARE = "Cuadrado" - L.symbol_MOON = "Luna" - L.symbol_TRIANGLE = "Triangulo" - L.symbol_DIAMOND = "Diamante" - L.symbol_CIRCLE = "Circulo" - L.symbol_STAR = "Estrella" - - L.bind_combat = "No puedes asignar teclas en combate." - L.bind_saved = "La configuración de las teclas ha sido guardada." - L.bind_discard = "Se han descartado los cambios en la configuración de las teclas." - L.bind_instruct = "Coloca el cursor encima de cualquier botón para asignar una tecla. Presiona la tecla ESC o el botón derecho del ratón para quitar la asignación actual." - L.bind_save = "Guardar los cambios" - L.bind_discardbind = "Descartar los cambios" - - L.hunter_unhappy = "Tu mascota está descontenta!" - L.hunter_content = "Tu mascota está contenta!" - L.hunter_happy = "Tu mascota está feliz!" - - L.move_tooltip = "Mover Descripción" - L.move_minimap = "Mover Minimapa" - L.move_watchframe = "Mover Misiones" - L.move_gmframe = "Mover Ticket" - L.move_buffs = "Mover Beneficios del Jugador" - L.move_debuffs = "Mover Perjuicios del Jugador" - L.move_shapeshift = "Mover Barra de cambio de forma/Totems" - L.move_achievements = "Mover Logros" - L.move_roll = "Mover Marco de Lanzamiento de Dados por Botín" - L.move_vehicle = "Mover Asiento del vehiculo" - L.move_extrabutton = "Botón Extra" - - -- tuto and install - L.install_header_1 = "Bienvenido/a" - L.install_header_2 = "1. Esencial" - L.install_header_3 = "2. Marcos de Unidad" - L.install_header_4 = "3. Características" - L.install_header_5 = "4. ¡Cosas que deberías saber!" - L.install_header_6 = "5. Comandos" - L.install_header_7 = "6. Finalizado" - L.install_header_8 = "1. Configuración esencial" - L.install_header_9 = "2. Social" - L.install_header_10= "3. Marcos" - L.install_header_11= "4. ¡Listo!" - L.install_init_line_1 = "¡Gracias por escoger Tukui!" - L.install_init_line_2 = "Se te guiará a través de un proceso de instalación en simples pasos. En cada uno de ellos podrás decidir qué quieres y que no quieres aplicar o saltar ese paso." - L.install_init_line_3 = "También se te da la posibilidad de mostrarte un breve tutorial con algunas de las características de Tukui." - L.install_init_line_4 = "Pulsa el botón 'Tutorial' para ser guiado/a a través de esta pequeña introducción, o pulsa 'Instalar' para saltar este paso." - L.tutorial_step_1_line_1 = "Este rápido tutorial te mostrara algunas de las características de Tukui." - L.tutorial_step_1_line_2 = "Primero, lo más básico que debes conocer antes de poder jugar usando esta UI." - L.tutorial_step_1_line_3 = "Este instalador es parcialmente específico para cada clase. Algunas de las opciones son aplicadas a todos tus personajes pero necesitaras usar el script de instalación en cada nuevo personaje que utilice Tukui. El script se muestra automáticamente en cada personaje nuevo que se conecta por primera vez con Tukui. Además, las opciones se pueden encontrar en /Tukui/config/config.lua para usuarios avanzados escribiendo /tukui en el chat del juego para usuarios casuales." - L.tutorial_step_1_line_4 = "Un usuario avanzado es un usuario de un ordenador que tiene la habilidad de usar características avanzadas (ej: edición de Lua) las cuales están por encima de las habilidades de los usuarios comunes. Un usuario casual es un usuario normal y no necesariamente capaz de programar. Se recomienda para ellos que usen nuestra herramienta de configuración en el juego (/tukui) para configurar Tukui a su gusto." - L.tutorial_step_2_line_1 = "Tukui incluye una versión incrustada de oUF creada por Trond (Haste) A Ejseth. Esto se encarga de manejar todos los marcos de unidad, los beneficios y perjuicios y los elementos específicos de clase." - L.tutorial_step_2_line_2 = "Puedes visitar wowinterface.com y buscar oUF para obtener más información a cerca de esta herramienta." - L.tutorial_step_2_line_3 = "Si juegas como sanador o sanador de banda, puedes activar los marcos de unidad de sanador. Estos muestran más información acerca de tu banda. (/heal) Un dps o tanque debería usar nuestra interfaz simple de banda. (/dps) Si no quieres usar ninguna de las dos o usar otra diferente, puedes desactivarlo en el administrador de addons en la pantalla de selección de personajes." - L.tutorial_step_2_line_4 = "Para cambiar fácilmente la posición de los marcos de unidad, escribe simplemente /moveui." - L.tutorial_step_3_line_1 = "Tukui es un rediseño de la interfaz de Blizzard. Nada menos, ni nada más. Aproximadamente todas las características que puedes ver en la interfaz por defecto las puedes encontrar en Tukui. Las únicas características no disponibles en la interfaz por defecto son aquellas automatizadas que no son realmente visibles en pantalla, como por ejemplo vender automáticamente los objetos grises al visitar a un vendedor o, otro ejemplo, ordenar automáticamente tus objetos en las bolsas." - L.tutorial_step_3_line_2 = "Porque no a todo el mundo le gustan cosas como los medidores de DPS, mods de Jefes, medidores de Amenaza, etc, nosotros juzgamos que es la mejor cosa que hacer. Tukui esta hecha con la idea de encajar al máximo con todas las clases, roles, funciones, tipos de juego, gustos de usuarios, etc. Es por eso que Tukui es una de las UIs más populares en este momento. Se ajusta al juego de todos y es extremadamente configurable. Esta también diseñada para ser un buen comienzo para todos los que quieran hacerse su propia UI sin depender de addons. Montones de usuarios desde 2009 esta usando Tukui como base para su propia UI. ¡Hecha un vistazo dentro de nuestra sección `Editet Packages` en nuestro sitio web!" - L.tutorial_step_3_line_3 = "Los usuarios quizá quieran visitar nuestra sección de modificaciones extra (AddOns) en nuestra web o visitando http://www.wowinterface.com para instalar características adicionales o mods." - L.tutorial_step_3_line_4 = "" - L.tutorial_step_4_line_1 = "Para determinar cuantas barras quieres, pasa el ratón sobre la derecha o izquierda del fondo de la barra de acción de abajo. Haz lo mismo en la derecha a través de los botones de arriba y abajo. Para copiar texto del chat, haz click en el botón mostrar pasando el ratón por la esquina derecha del chat." - L.tutorial_step_4_line_2 = "El borde del Mini mapa cambia de color. Se pone verde cuando tienes un nuevo correo, rojo cuando tienes una invitación nueva en el calendario, y naranja cuando tienes ambas." - L.tutorial_step_4_line_3 = "Puedes hacer click izquierdo en un 80% de los textos de datos para mostrar varios paneles de Blizzard. Los de Amigos y Hermandad tienen funciones con click derecho también." - L.tutorial_step_4_line_4 = "Hay un menú desplegable disponible. Haciendo click derecho en el botón [X] (Cerrar) de la bolsa abrirá un menú desplegable para mostrar las bolsas, organizar objetos, mostrar llavero, etc. Haciendo click con la rueda del ratón en el Mini mapa mostrará el micro menú." - L.tutorial_step_5_line_1 = "Finalmente, Tukui incluye diversos comandos utiles. Debajo hay una lista." - L.tutorial_step_5_line_2 = "/moveui te permite mover un montón de marcos por toda la pantalla. /enable y /disable se usan para activar o desactivar rápidamente los addons. /rl recarga la interfaz. /heal activa los marcos de banda de sanador y /dps activa los de dps/tanque." - L.tutorial_step_5_line_3 = "/tt te permite susurrar a tu objetivo. /rc inicia una comprobación de disponibilidad (Listos). /rd deshace el grupo o banda. /bags muestra algunas de las caracteristicas disponibles a través de línea de comandos. /ainv activa la invitación automática cuando te susurren. (/ainv off) lo desactiva." - L.tutorial_step_5_line_4 = "/gm muestra el marco de Ayuda. /install, /resetui o /tutorial cargan el instalador. /frame escribe el nombre y anclaje del marco bajo el cursor con información adicional." - L.tutorial_step_6_line_1 = "Se ha completado el tutorial. Puedes escoger consultarlo de nuevo en cualquier momento escribiendo /tutorial." - L.tutorial_step_6_line_2 = "Sugiero que eches un vistazo en config/config.lua o escribas /Tukui para adaptar la interfaz a tus necesidades." - L.tutorial_step_6_line_3 = "¡Puedes continuar instalando la IU si aún no está hecho o si quieres déjala como viene por defecto!" - L.tutorial_step_6_line_4 = "" - L.install_step_1_line_1 = "Estos pasos aplicaran la correcta configuración de CVar para Tukui." - L.install_step_1_line_2 = "El primer paso aplica la configuración primordial." - L.install_step_1_line_3 = "Esto se recomienda para cualquier usuario, a menos que desees aplicar únicamente una parte de la configuración." - L.install_step_1_line_4 = "Haz click en 'Continuar' para aplicar la configuración, o haz click en 'Saltar' si quieres saltar este paso." - L.install_step_2_line_0 = "Se ha encontrado otro addon para el chat. Ignoraremos este paso. Por favor pulsa saltar para continuar la instalación." - L.install_step_2_line_1 = "El segundo paso aplica la correcta configuración del chat." - L.install_step_2_line_2 = "Si eres un usuario nuevo, se recomienda este paso. Si ya eres un usuario de Tukui, quizá quieras saltar este paso." - L.install_step_2_line_3 = "Es normal que la fuente del chat aparezca demasiado grande al aplicar esta configuración. Volverá a ser normal al final de la instalación." - L.install_step_2_line_4 = "Haz click en 'Continuar' para aplicar la configuración, o haz click en 'Saltar' si quieres saltar este paso." - L.install_step_3_line_1 = "El tercero y final paso aplica la posición por defecto de los marcos." - L.install_step_3_line_2 = "Este paso se recomienda para cualquier usuario nuevo." - L.install_step_3_line_3 = "" - L.install_step_3_line_4 = "Haz click en 'Continuar' para aplicar la configuración, o haz click en 'Saltar' si quieres saltar este paso." - L.install_step_4_line_1 = "Se ha completado la instalación" - L.install_step_4_line_2 = "Por favor, haz click en 'Finalizar' para recargar la IU." - L.install_step_4_line_3 = "" - L.install_step_4_line_4 = "¡Disfruta de Tukui! ¡Visítanos en http://www.tukui.org!" - L.install_button_tutorial = "Tutorial" - L.install_button_install = "Instalar" - L.install_button_next = "Siguiente" - L.install_button_skip = "Saltar" - L.install_button_continue = "Continuar" - L.install_button_finish = "Finalizar" - L.install_button_close = "Cerrar" -end diff --git a/Tukui/locales/taiwan.lua b/Tukui/locales/taiwan.lua deleted file mode 100644 index 37dd136..0000000 --- a/Tukui/locales/taiwan.lua +++ /dev/null @@ -1,303 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -if T.client == "zhTW" then - L.chat_BATTLEGROUND_GET = "B" - L.chat_BATTLEGROUND_LEADER_GET = "B" - L.chat_BN_WHISPER_GET = "From" - L.chat_GUILD_GET = "G" - L.chat_OFFICER_GET = "O" - L.chat_PARTY_GET = "P" - L.chat_PARTY_GUIDE_GET = "P" - L.chat_PARTY_LEADER_GET = "P" - L.chat_RAID_GET = "R" - L.chat_RAID_LEADER_GET = "R" - L.chat_RAID_WARNING_GET = "W" - L.chat_WHISPER_GET = "From" - L.chat_FLAG_AFK = "[AFK]" - L.chat_FLAG_DND = "[DND]" - L.chat_FLAG_GM = "[GM]" - L.chat_ERR_FRIEND_ONLINE_SS = "is now |cff298F00online|r" - L.chat_ERR_FRIEND_OFFLINE_S = "is now |cffff0000offline|r" - - L.chat_general = "綜合" - L.chat_trade = "交易" - L.chat_defense = "本地防務" - L.chat_recrutment = "公會招募" - L.chat_lfg = "尋求組隊" - - L.disband = "正在解散隊伍" - - L.datatext_notalents ="無天賦" - L.datatext_download = "下載: " - L.datatext_bandwidth = "寬頻: " - L.datatext_guild = "公會" - L.datatext_noguild = "沒有公會" - L.datatext_bags = "背包: " - L.datatext_friends = "好友" - L.datatext_online = "線上: " - L.datatext_armor = "耐久度" - L.datatext_earned = "賺取:" - L.datatext_spent = "花費:" - L.datatext_deficit = "赤字:" - L.datatext_profit = "利潤:" - L.datatext_timeto = "時間直到" - L.datatext_friendlist = "好友名單:" - L.datatext_playersp = "法傷" - L.datatext_playerap = "強度" - L.datatext_playerhaste = "加速" - L.datatext_dps = "dps" - L.datatext_hps = "hps" - L.datatext_playerarp = "護甲穿透" - L.datatext_session = "本次概況: " - L.datatext_character = "角色: " - L.datatext_server = "伺服器: " - L.datatext_totalgold = "總額: " - L.datatext_savedraid = "已有進度的團隊副本" - L.datatext_currency = "兌換通貨:" - L.datatext_fps = " fps & " - L.datatext_ms = " ms" - L.datatext_playercrit = "% 致命" - L.datatext_playerheal = " 治療" - L.datatext_avoidancebreakdown = "免傷分析" - L.datatext_lvl = "等級" - L.datatext_boss = "首領" - L.datatext_miss = "未擊中" - L.datatext_dodge = "閃躲" - L.datatext_block = "格檔" - L.datatext_parry = "招架" - L.datatext_playeravd = "免傷: " - L.datatext_servertime = "伺服器時間: " - L.datatext_localtime = "本地時間: " - L.datatext_mitigation = "等級緩和: " - L.datatext_healing = "治療: " - L.datatext_damage = "傷害: " - L.datatext_honor = "榮譽: " - L.datatext_killingblows = "擊殺 : " - L.datatext_ttstatsfor = "狀態 " - L.datatext_ttkillingblows = "擊殺:" - L.datatext_tthonorkills = "榮譽擊殺:" - L.datatext_ttdeaths = "死亡:" - L.datatext_tthonorgain = "獲得榮譽:" - L.datatext_ttdmgdone = "傷害輸出:" - L.datatext_tthealdone = "治療輸出:" - L.datatext_basesassaulted = "基地突襲:" - L.datatext_basesdefended = "基地防禦:" - L.datatext_towersassaulted = "哨塔突襲:" - L.datatext_towersdefended = "哨塔防禦:" - L.datatext_flagscaptured = "佔領旗幟:" - L.datatext_flagsreturned = "交還旗幟:" - L.datatext_graveyardsassaulted = "墓地突襲:" - L.datatext_graveyardsdefended = "墓地防守:" - L.datatext_demolishersdestroyed = "石毀車摧毀:" - L.datatext_gatesdestroyed = "大門摧毀:" - L.datatext_totalmemusage = "總共記憶體使用:" - L.datatext_control = "控制方:" - - L.Slots = { - [1] = {1, "頭部", 1000}, - [2] = {3, "肩部", 1000}, - [3] = {5, "胸部", 1000}, - [4] = {6, "腰部", 1000}, - [5] = {9, "手腕", 1000}, - [6] = {10, "手", 1000}, - [7] = {7, "腿部", 1000}, - [8] = {8, "腳", 1000}, - [9] = {16, "主手", 1000}, - [10] = {17, "副手", 1000}, - [11] = {18, "遠程", 1000} - } - - L.popup_disableui = "Tukui並不支援此解析度, 你想要停用Tukui嗎? (若果您想要嘗試其他解析度, 請按取消)" - L.popup_install = "這個角色首次使用Tukui V13, 您必需先重載介面以完成設定" - L.popup_reset = "警告! 此動作會重置任何設定至Tukui預設值. 您是否依然決定這樣做?" - L.popup_2raidactive = "2個團隊框架正在運行, 請選擇以下其中一個." - L.popup_install_yes = "當然是! (建議!)" - L.popup_install_no = "不用了, 救命這UI真差" - L.popup_reset_yes = "當然啦, 預設就是美!" - L.popup_reset_no = "不囉, 不然我會發文抱怨!" - L.popup_fix_ab = "動作列發生問題, 您想要重新載入介面來修復嗎?" - - L.merchant_repairnomoney = "您沒有足夠的金錢來修理!" - L.merchant_repaircost = "您的裝備已修理, 花費了" - L.merchant_trashsell = "您背包內的粗糙物品已被自動賣出, 您賺取了" - - L.goldabbrev = "|cffffd700g|r" - L.silverabbrev = "|cffc7c7cfs|r" - L.copperabbrev = "|cffeda55fc|r" - - L.error_noerror = "沒有錯誤" - - L.unitframes_ouf_offline = "離線" - L.unitframes_ouf_dead = "死亡" - L.unitframes_ouf_ghost = "鬼魂" - L.unitframes_ouf_lowmana = "法力過低" - L.unitframes_ouf_threattext = "當前目標的仇恨:" - L.unitframes_ouf_offlinedps = "離線" - L.unitframes_ouf_deaddps = "|cffff0000[死亡]|r" - L.unitframes_ouf_ghostheal = "鬼魂" - L.unitframes_ouf_deadheal = "死亡" - L.unitframes_ouf_gohawk = "切換為雄鷹守護" - L.unitframes_ouf_goviper = "切換為蝮蛇守護" - L.unitframes_disconnected = "斷線" - L.unitframes_ouf_wrathspell = "憤怒" - L.unitframes_ouf_starfirespell = "星火術" - - L.tooltip_count = "數量" - - L.bags_noslots = "不能再購買更多的背包欄位!" - L.bags_costs = "花費: %.2f 金" - L.bags_buyslots = "輸入 /bags purchase yes 以購買銀行背包欄位" - L.bags_openbank = "您需要先造訪您的銀行" - L.bags_sort = "將背包或銀行內的物品分類及排序" - L.bags_stack = "將背包或銀行內的不完整的物品堆疊重新堆疊" - L.bags_buybankslot = "購買銀行背包欄位. (需要造訪銀行)" - L.bags_search = "搜尋" - L.bags_sortmenu = "分類及排序" - L.bags_sortspecial = "分類及排序特殊物品" - L.bags_stackmenu = "堆疊" - L.bags_stackspecial = "堆疊特殊物品" - L.bags_showbags = "顯示背包" - L.bags_sortingbags = "分類及排序完成" - L.bags_nothingsort= "不需要分類" - L.bags_bids = "使用背包: " - L.bags_stackend = "重新堆疊完成" - L.bags_rightclick_search = "點擊右鍵以搜尋物品." - - L.loot_fish = "漁獲" - L.loot_empty = "無戰利品" - - L.chat_invalidtarget = "無效的目標" - - L.mount_wintergrasp = "冬握湖" - - L.core_autoinv_enable = "啟用自動邀請: invite" - L.core_autoinv_enable_c = "自動邀請功能已啟用: " - L.core_autoinv_disable = "自動邀請功能已關閉" - L.core_wf_unlock = "解鎖任務追蹤" - L.core_wf_lock = "鎖定任務追蹤" - L.core_welcome1 = "歡迎使用 |cffC495DDTukui|r " - L.core_welcome2 = "輸入 |cff00FFFF/uihelp|r 以獲得更多資訊" - - L.core_uihelp1 = "|cff00ff00通用指令|r" - L.core_uihelp2 = "|cffFF0000/moveui|r - 解鎖並移動任何您看得見的框架及UI元素" - L.core_uihelp3 = "|cffFF0000/rl|r - 重新載入UI" - L.core_uihelp4 = "|cffFF0000/gm|r - 傳送回報單給GM或開啟幫助介面" - L.core_uihelp5 = "|cffFF0000/frame|r - 偵測滑鼠位置下的框架名稱. (對lua編輯者非常有幫助!)" - L.core_uihelp6 = "|cffFF0000/heal|r - 啟用Heal介面" - L.core_uihelp7 = "|cffFF0000/dps|r - 啟用Dps/Tank介面" - L.core_uihelp8 = "|cffFF0000/bags|r - 排序背包, 購買銀行背包位置或堆疊物品" - L.core_uihelp9 = "|cffFF0000/resetui|r - 重置Tukui到預設設置" - L.core_uihelp10 = "|cffFF0000/rd|r - 解散團隊" - L.core_uihelp11 = "|cffFF0000/ainv|r - 啟用密語自動邀請, 您可以設定輸入`/ainv myword`以設置您的密語關鍵字" - L.core_uihelp100 = "(想看更多? 向上拉吧! ...)" - - L.symbol_CLEAR = "清除" - L.symbol_SKULL = "頭顱" - L.symbol_CROSS = "十字" - L.symbol_SQUARE = "方形" - L.symbol_MOON = "月亮" - L.symbol_TRIANGLE = "三角" - L.symbol_DIAMOND = "鑽石" - L.symbol_CIRCLE = "圈圈" - L.symbol_STAR = "星星" - - L.bind_combat = "您不能在戰鬥中設定快捷鍵" - L.bind_saved = "所有快捷鍵修改已儲存" - L.bind_discard = "這次的快捷鍵修改已重設為上一次修改" - L.bind_instruct = "將滑鼠指向動作列上以綁定快捷鍵, 您可以按ESC或以右鍵點擊快捷列上任何一格以清除該位置的設定" - L.bind_save = "儲存" - L.bind_discardbind = "放棄" - - L.hunter_unhappy = "你的寵物感到不高興!" - L.hunter_content = "你的寵物感到滿足!" - L.hunter_happy = "你的寵物感到高興!" - - L.move_tooltip = "移動指示資訊" - L.move_minimap = "移動小地圖" - L.move_watchframe = "移動任務追蹤框架" - L.move_gmframe = "移動GM回報單及幫助介面" - L.move_buffs = "移動玩家Buff介面" - L.move_debuffs = "移動玩家Debuff介面" - L.move_shapeshift = "移動變形或圖騰列" - L.move_achievements = "移動成就介面" - L.move_roll = "移動Roll戰利品的介面" - L.move_vehicle = "移動載具坐位介面" - L.move_extrabutton = "額外的按鈕" - - -- tuto/install - L.install_header_1 = "歡迎" - L.install_header_2 = "1. 基本要素" - L.install_header_3 = "2. 單位框架" - L.install_header_4 = "3. 特點" - L.install_header_5 = "4. 您應該知道的事!" - L.install_header_6 = "5. 指令" - L.install_header_7 = "6. 完成" - L.install_header_8 = "1. 必要的設定" - L.install_header_9 = "2. 社交" - L.install_header_10= "3. 框架" - L.install_header_11= "4. 成功!" - - L.install_init_line_1 = "感謝您選擇Tukui!" - L.install_init_line_2 = "透過幾個簡單的步驟,將會引導您通過整個安裝過程。每個步驟您都可以決定是否套用或略過所呈現的設定。" - L.install_init_line_3 = "您也可以選擇顯示關於Tukui功能的簡短指南。" - L.install_init_line_4 = "點選'指南'來獲得簡介,或者點選'安裝'以略過這步驟。" - - L.tutorial_step_1_line_1 = "這個快速指南將向您展示一些Tukui的特點及功能。" - L.tutorial_step_1_line_2 = "首先,基本要素將會告訴您使用這個UI前該知道的事項。" - L.tutorial_step_1_line_3 = "這個安裝程序部分是角色特定,一些設定將會全帳號套用,您必須為每一個有使用Tukui的新角色執行安裝程序。程序將會在新角色第一次登入Tukui時自動顯示。同時,進階使用者可以在/Tukui/config/config.lua中找到選項,友善使用者可以在遊戲中輸入/tukui。" - L.tutorial_step_1_line_4 = "進階使用者是指有能力會使用一般使用者所不會的進階功能(如:編輯lua)的個人電腦使用者。友善使用者為一般使用者,並不需要編寫程式的能力,推薦他們使用我們的遊戲內設定工具(/tukui)來設定Tukui上想呈現的功能。" - - L.tutorial_step_2_line_1 = "Tukui包含一個內建版本的oUF,由Trond (Haste) A Ekseth創造,處理畫面中所有的單位框架,增/減益狀態及職業特色元素。" - L.tutorial_step_2_line_2 = "您可以拜訪 http://www.wowinterface.com 蒐尋oUF以獲得更多這項工具的資訊。" - L.tutorial_step_2_line_3 = "假如您是治療者或是團隊領隊,您可能想啟用治療者團隊框架,它們提供更多團隊資訊(/heal)。傷害輸出玩家或是坦克應該使用簡潔的團隊框架(/dps)。如果不想顯示任一團隊框架或是其他東西,您可以在角色選單的插件管理中關閉它。" - L.tutorial_step_2_line_4 = "鍵入/moveui可以簡單地改變單位框架的位置。" - - L.tutorial_step_3_line_1 = "Tukui是一個重新設計過的Blizzard UI,不多也不少。大部分你可以在預設UI上看到的都是Tukui,只有一些自動化功能是畫面中看不到的,如:拜訪商人時自動販賣灰色物品,或是自動分類背包中的物品。" - L.tutorial_step_3_line_2 = "並不是每個人都滿意傷害輸出統計、首領模組,仇恨監控等等,但我們認為這是最好的事情。Tukui是在符合所有職業、角色、天賦、玩法、玩家品味...等等的概念下產生,這就是為什麼Tukui是現今最受歡迎的UI之一,它適合每個人的玩法且可任意地調整。它也設計成可讓任何想做客製化UI卻沒有關聯插件的人有一個好的開始。自2009年後,許多玩家使用Tukui為基礎來創作自己的UI,可以到我們網站的Edited Packages論壇專區看看!" - L.tutorial_step_3_line_3 = "使用者可能有興趣到我們網站的額外模組專區看看,或是拜訪 http://www.wowinterface.com 來獲得額外的功能或模組。" - L.tutorial_step_3_line_4 = "" - - L.tutorial_step_4_line_1 = "將滑鼠移至在底部快捷列背景的最左/右邊,可設定底部快捷列的數目,畫面右邊的快捷列同樣可藉由上方或底部調整。點擊對話框的右上角游標懸停顯示的按鈕即可複製聊天文字。" - L.tutorial_step_4_line_2 = "小地圖邊框將會改變顏色,收到新郵件時為綠色,受到新的行事曆邀請時為紅色,兩項皆有時為橘色。" - L.tutorial_step_4_line_3 = "您可以左鍵點擊80%的資訊欄位來顯示各種Blizzard的面板,好友資訊及公會資訊同時擁有右鍵點擊功能。" - L.tutorial_step_4_line_4 = "這裡有一些下拉式選單可供使用。右鍵點擊背包的[X](關閉)按鈕將會顯示功能選單以顯示背包、排列物品、顯示鑰匙圈等等。中鍵點擊小地圖可顯示微型選單。" - - L.tutorial_step_5_line_1 = "最近,Tukui有許多實用的指令,以下列表。" - L.tutorial_step_5_line_2 = "/moveui 允許你移動畫面上大部分的框架。 /enable 及 /disable 快速啟用或關閉插件。 /rl 重新載入UI。 /heal 啟用治療者團隊框架。 /dps 啟用傷害輸出/坦克團隊框架。" - L.tutorial_step_5_line_3 = "/tt 密語目標。 /rc 發起團隊確認。 /rd 解散隊伍或團隊。 /bags 顯示可用的背包指令。 /ainv 啟用自動密語邀請。(/ainv off 關閉功能)" - L.tutorial_step_5_line_4 = "/gm 開啟尋求幫助選單。 /install, /resetui 或 /tutorial 載入安裝程序。 /frame 列出滑鼠游標下的框架名稱及額外資訊。" - - L.tutorial_step_6_line_1 = "指南到此結束,您可藉由輸入/tutorial 以再次諮詢。" - L.tutorial_step_6_line_2 = "建議您開啟config/config.lua或鍵入/Tukui來自訂符合您需求的UI。" - L.tutorial_step_6_line_3 = "如果安裝程序未完成,您現在可繼續安裝此UI。或者您想重置至預設值!" - L.tutorial_step_6_line_4 = "" - - L.install_step_1_line_1 = "這些步驟將為Tukui套用正確的CVar設定。" - L.install_step_1_line_2 = "第一個步驟套用必要的設定。" - L.install_step_1_line_3 = "這個步驟|cffff0000建議|r給任何一位新使用者,除非您只想套用這些設定的特定部分。" - L.install_step_1_line_4 = "點選'繼續'以套用設定,如果您希望跳過這個步驟請點選'略過'。" - - L.install_step_2_line_0 = "發現到其他的聊天插件。我們將會忽略這個步驟,請點擊略過以繼續安裝。" - L.install_step_2_line_1 = "第二個步驟將會套用正確的聊天設定。" - L.install_step_2_line_2 = "如果您是一位新使用者,我們建議這個步驟。如果是現有使用者,您可能想略過這個步驟。" - L.install_step_2_line_3 = "經由這些設定,您的聊天字體顯示過大是正常的,當安裝完成後將會還原。" - L.install_step_2_line_4 = "點選'繼續'以套用設定,如果您希望跳過這個步驟請點選'略過'。" - - L.install_step_3_line_1 = "第三和最後的步驟將套用預設框架位置。" - L.install_step_3_line_2 = "我們|cffff0000建議|r這個步驟給任何一位新使用者。" - L.install_step_3_line_3 = "" - L.install_step_3_line_4 = "點選'繼續'以套用這些設定,如果您希望跳過這個步驟請點選'略過'。" - - L.install_step_4_line_1 = "安裝完成。" - L.install_step_4_line_2 = "請點擊'完成'以重新載入UI。" - L.install_step_4_line_3 = "" - L.install_step_4_line_4 = "享受Tukui吧! 拜訪我們 http://www.tukui.org!" - - L.install_button_tutorial = "指南" - L.install_button_install = "安裝" - L.install_button_next = "下一步" - L.install_button_skip = "略過" - L.install_button_continue = "繼續" - L.install_button_finish = "完成" - L.install_button_close = "關閉" -end diff --git a/Tukui/medias/fonts/combat_font.ttf b/Tukui/medias/fonts/combat_font.ttf deleted file mode 100644 index 2d4e04e..0000000 Binary files a/Tukui/medias/fonts/combat_font.ttf and /dev/null differ diff --git a/Tukui/medias/fonts/combat_font_rus.ttf b/Tukui/medias/fonts/combat_font_rus.ttf deleted file mode 100644 index d0db805..0000000 Binary files a/Tukui/medias/fonts/combat_font_rus.ttf and /dev/null differ diff --git a/Tukui/medias/fonts/invisible_font.ttf b/Tukui/medias/fonts/invisible_font.ttf deleted file mode 100644 index 39748bc..0000000 Binary files a/Tukui/medias/fonts/invisible_font.ttf and /dev/null differ diff --git a/Tukui/medias/fonts/normal_font.ttf b/Tukui/medias/fonts/normal_font.ttf deleted file mode 100644 index fab582b..0000000 Binary files a/Tukui/medias/fonts/normal_font.ttf and /dev/null differ diff --git a/Tukui/medias/fonts/pixel_font.ttf b/Tukui/medias/fonts/pixel_font.ttf deleted file mode 100644 index 870130d..0000000 Binary files a/Tukui/medias/fonts/pixel_font.ttf and /dev/null differ diff --git a/Tukui/medias/fonts/uf_font.ttf b/Tukui/medias/fonts/uf_font.ttf deleted file mode 100644 index 5577c00..0000000 Binary files a/Tukui/medias/fonts/uf_font.ttf and /dev/null differ diff --git a/Tukui/medias/medias.lua b/Tukui/medias/medias.lua deleted file mode 100644 index 44ecb1d..0000000 --- a/Tukui/medias/medias.lua +++ /dev/null @@ -1,72 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -C["media"] = { - -- fonts (ENGLISH, SPANISH) - ["font"] = [=[Interface\Addons\Tukui\medias\fonts\normal_font.ttf]=], -- general font of tukui - ["uffont"] = [[Interface\AddOns\Tukui\medias\fonts\uf_font.ttf]], -- general font of unitframes - ["dmgfont"] = [[Interface\AddOns\Tukui\medias\fonts\combat_font.ttf]], -- general font of dmg / sct - - -- fonts (DEUTSCH) - ["de_font"] = [=[Interface\Addons\Tukui\medias\fonts\normal_font.ttf]=], -- general font of tukui - ["de_uffont"] = [[Interface\AddOns\Tukui\medias\fonts\uf_font.ttf]], -- general font of unitframes - ["de_dmgfont"] = [[Interface\AddOns\Tukui\medias\fonts\combat_font.ttf]], -- general font of dmg / sct - - -- fonts (FRENCH) - ["fr_font"] = [=[Interface\Addons\Tukui\medias\fonts\normal_font.ttf]=], -- general font of tukui - ["fr_uffont"] = [[Interface\AddOns\Tukui\medias\fonts\uf_font.ttf]], -- general font of unitframes - ["fr_dmgfont"] = [=[Interface\AddOns\Tukui\medias\fonts\combat_font.ttf]=], -- general font of dmg / sct - - -- fonts (RUSSIAN) - ["ru_font"] = [=[Interface\Addons\Tukui\medias\fonts\normal_font.ttf]=], -- general font of tukui - ["ru_uffont"] = [[Fonts\ARIALN.TTF]], -- general font of unitframes - ["ru_dmgfont"] = [[Interface\AddOns\Tukui\medias\fonts\combat_font_rus.ttf]], -- general font of dmg / sct - - -- fonts (TAIWAN ONLY) - ["tw_font"] = [=[Fonts\bLEI00D.ttf]=], -- general font of tukui - ["tw_uffont"] = [[Fonts\bLEI00D.ttf]], -- general font of unitframes - ["tw_dmgfont"] = [[Fonts\bLEI00D.ttf]], -- general font of dmg / sct - - -- fonts (KOREAN ONLY) - ["kr_font"] = [=[Fonts\2002.TTF]=], -- general font of tukui - ["kr_uffont"] = [[Fonts\2002.TTF]], -- general font of unitframes - ["kr_dmgfont"] = [[Fonts\2002.TTF]], -- general font of dmg / sct - - ["cn_font"] = [=[Fonts\ZYKai_T.TTF]=], -- general font of tukui - ["cn_uffont"] = [[Fonts\ZYHei.TTF]], -- general font of unitframes - ["cn_dmgfont"] = [[Fonts\ZYKai_C.TTF]], -- general font of dmg / sct - - -- fonts (GLOBAL) - ["pixelfont"] = [=[Interface\Addons\Tukui\medias\fonts\pixel_font.ttf]=], -- general font of tukui - - -- textures - ["normTex"] = [[Interface\AddOns\Tukui\medias\textures\normTex]], -- texture used for tukui healthbar/powerbar/etc - ["glowTex"] = [[Interface\AddOns\Tukui\medias\textures\glowTex]], -- the glow text around some frame. - ["bubbleTex"] = [[Interface\AddOns\Tukui\medias\textures\bubbleTex]], -- unitframes combo points - ["copyicon"] = [[Interface\AddOns\Tukui\medias\textures\copy]], -- copy icon - ["blank"] = [[Interface\AddOns\Tukui\medias\textures\blank]], -- the main texture for all borders/panels - ["buttonhover"] = [[Interface\AddOns\Tukui\medias\textures\button_hover]], - - -- colors - ["bordercolor"] = C.general.bordercolor or { .6,.6,.6 }, -- border color of tukui panels - ["backdropcolor"] = C.general.backdropcolor or { .1,.1,.1 }, -- background color of tukui panels - ["datatextcolor1"] = { 1, 1, 1 }, -- color of datatext title - ["datatextcolor2"] = { 1, 1, 1 }, -- color of datatext result - - -- sound - ["whisper"] = [[Interface\AddOns\Tukui\medias\sounds\whisper.mp3]], - ["warning"] = [[Interface\AddOns\Tukui\medias\sounds\warning.mp3]], -} - -------------------------------------------------------------------- --- Used to overwrite default medias outside Tukui -------------------------------------------------------------------- - -local settings = TukuiEditedDefaultConfig -if settings then - local media = settings.media - if media then - for option, value in pairs(media) do - C.media[option] = value - end - end -end \ No newline at end of file diff --git a/Tukui/medias/sounds/whisper.mp3 b/Tukui/medias/sounds/whisper.mp3 deleted file mode 100644 index 160459d..0000000 Binary files a/Tukui/medias/sounds/whisper.mp3 and /dev/null differ diff --git a/Tukui/medias/textures/Party.tga b/Tukui/medias/textures/Party.tga deleted file mode 100644 index 12420fb..0000000 Binary files a/Tukui/medias/textures/Party.tga and /dev/null differ diff --git a/Tukui/medias/textures/Raid.tga b/Tukui/medias/textures/Raid.tga deleted file mode 100644 index 37bfe40..0000000 Binary files a/Tukui/medias/textures/Raid.tga and /dev/null differ diff --git a/Tukui/medias/textures/arrowdown.tga b/Tukui/medias/textures/arrowdown.tga deleted file mode 100644 index 1bf565a..0000000 Binary files a/Tukui/medias/textures/arrowdown.tga and /dev/null differ diff --git a/Tukui/medias/textures/arrowup.tga b/Tukui/medias/textures/arrowup.tga deleted file mode 100644 index 109547c..0000000 Binary files a/Tukui/medias/textures/arrowup.tga and /dev/null differ diff --git a/Tukui/medias/textures/blank.tga b/Tukui/medias/textures/blank.tga deleted file mode 100644 index 2b33801..0000000 Binary files a/Tukui/medias/textures/blank.tga and /dev/null differ diff --git a/Tukui/medias/textures/bubbleTex.tga b/Tukui/medias/textures/bubbleTex.tga deleted file mode 100644 index 88eb623..0000000 Binary files a/Tukui/medias/textures/bubbleTex.tga and /dev/null differ diff --git a/Tukui/medias/textures/copy.tga b/Tukui/medias/textures/copy.tga deleted file mode 100644 index d70ad66..0000000 Binary files a/Tukui/medias/textures/copy.tga and /dev/null differ diff --git a/Tukui/medias/textures/glowTex.tga b/Tukui/medias/textures/glowTex.tga deleted file mode 100644 index 62905cc..0000000 Binary files a/Tukui/medias/textures/glowTex.tga and /dev/null differ diff --git a/Tukui/medias/textures/indicator.tga b/Tukui/medias/textures/indicator.tga deleted file mode 100644 index 035352b..0000000 Binary files a/Tukui/medias/textures/indicator.tga and /dev/null differ diff --git a/Tukui/medias/textures/lfdicons.blp b/Tukui/medias/textures/lfdicons.blp deleted file mode 100644 index f4cceec..0000000 Binary files a/Tukui/medias/textures/lfdicons.blp and /dev/null differ diff --git a/Tukui/medias/textures/mail.tga b/Tukui/medias/textures/mail.tga deleted file mode 100644 index e154114..0000000 Binary files a/Tukui/medias/textures/mail.tga and /dev/null differ diff --git a/Tukui/medias/textures/normTex.tga b/Tukui/medias/textures/normTex.tga deleted file mode 100644 index 2d99837..0000000 Binary files a/Tukui/medias/textures/normTex.tga and /dev/null differ diff --git a/Tukui/medias/textures/picon.tga b/Tukui/medias/textures/picon.tga deleted file mode 100644 index be9c236..0000000 Binary files a/Tukui/medias/textures/picon.tga and /dev/null differ diff --git a/Tukui/medias/textures/raidicons.blp b/Tukui/medias/textures/raidicons.blp deleted file mode 100644 index 81c7f7c..0000000 Binary files a/Tukui/medias/textures/raidicons.blp and /dev/null differ diff --git a/Tukui/modules/actionbars/Bar1.lua b/Tukui/modules/actionbars/Bar1.lua deleted file mode 100644 index 158b16f..0000000 --- a/Tukui/modules/actionbars/Bar1.lua +++ /dev/null @@ -1,97 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -if not C["actionbar"].enable == true then return end - ---------------------------------------------------------------------------- --- Setup Main Action Bar. --- Now used for stances, Bonus, Vehicle at the same time. --- Since t12, it's also working for druid cat stealth. (a lot requested) ---------------------------------------------------------------------------- - -local bar = TukuiBar1 ---[[ - Bonus bar classes id - - DRUID: Caster: 0, Cat: 1, Tree of Life: 0, Bear: 3, Moonkin: 4 - WARRIOR: Battle Stance: 1, Defensive Stance: 2, Berserker Stance: 3 - ROGUE: Normal: 0, Stealthed: 1 - PRIEST: Normal: 0, Shadowform: 1 - - When Possessing a Target: 5 -]]-- - -local shd = 7 -if C.actionbar.ownshdbar then shd = 10 end - -local Page = { - ["DRUID"] = "[bonusbar:1,nostealth] 7; [bonusbar:1,stealth] 8; [bonusbar:2] 8; [bonusbar:3] 9; [bonusbar:4] 10;", - ["WARRIOR"] = "[bonusbar:1] 7; [bonusbar:2] 8; [bonusbar:3] 9;", - ["PRIEST"] = "[bonusbar:1] 7;", - ["ROGUE"] = "[bonusbar:1] 7; [form:3] "..shd..";", - ["DEFAULT"] = "[bonusbar:5] 11; [bar:2] 2; [bar:3] 3; [bar:4] 4; [bar:5] 5; [bar:6] 6;", -} - -local function GetBar() - local condition = Page["DEFAULT"] - local class = T.myclass - local page = Page[class] - if page then - condition = condition.." "..page - end - condition = condition.." 1" - return condition -end - -bar:RegisterEvent("PLAYER_LOGIN") -bar:RegisterEvent("PLAYER_ENTERING_WORLD") -bar:RegisterEvent("KNOWN_CURRENCY_TYPES_UPDATE") -bar:RegisterEvent("CURRENCY_DISPLAY_UPDATE") -bar:RegisterEvent("BAG_UPDATE") -bar:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") -bar:SetScript("OnEvent", function(self, event, ...) - if event == "PLAYER_LOGIN" then - local button - for i = 1, NUM_ACTIONBAR_BUTTONS do - button = _G["ActionButton"..i] - self:SetFrameRef("ActionButton"..i, button) - end - - self:Execute([[ - buttons = table.new() - for i = 1, 12 do - table.insert(buttons, self:GetFrameRef("ActionButton"..i)) - end - ]]) - - self:SetAttribute("_onstate-page", [[ - for i, button in ipairs(buttons) do - button:SetAttribute("actionpage", tonumber(newstate)) - end - ]]) - - RegisterStateDriver(self, "page", GetBar()) - elseif event == "PLAYER_ENTERING_WORLD" then - if T.toc < 40200 then MainMenuBar_UpdateKeyRing() end - - local button - for i = 1, 12 do - button = _G["ActionButton"..i] - button:SetSize(T.buttonsize, T.buttonsize) - button:ClearAllPoints() - button:SetParent(bar) - button:SetFrameStrata("BACKGROUND") - button:SetFrameLevel(15) - if i == 1 then - button:SetPoint("BOTTOMLEFT", T.buttonspacing, T.buttonspacing) - else - local previous = _G["ActionButton"..i-1] - button:SetPoint("LEFT", previous, "RIGHT", T.buttonspacing, 0) - end - end - elseif event == "ACTIVE_TALENT_GROUP_CHANGED" then - -- attempt to fix blocked glyph change after switching spec. - LoadAddOn("Blizzard_GlyphUI") - else - MainMenuBar_OnEvent(self, event, ...) - end -end) \ No newline at end of file diff --git a/Tukui/modules/actionbars/Bar2.lua b/Tukui/modules/actionbars/Bar2.lua deleted file mode 100644 index 0c71bed..0000000 --- a/Tukui/modules/actionbars/Bar2.lua +++ /dev/null @@ -1,34 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -if not C["actionbar"].enable == true then return end - ---------------------------------------------------------------------------- --- setup MultiBarBottomLeft as bar #2 ---------------------------------------------------------------------------- - -local bar = TukuiBar2 -MultiBarBottomLeft:SetParent(bar) - --- setup the bar -for i=1, 12 do - local b = _G["MultiBarBottomLeftButton"..i] - local b2 = _G["MultiBarBottomLeftButton"..i-1] - b:SetSize(T.buttonsize, T.buttonsize) - b:ClearAllPoints() - b:SetFrameStrata("BACKGROUND") - b:SetFrameLevel(15) - - if i == 1 then - b:SetPoint("BOTTOMLEFT", bar, T.buttonspacing, T.buttonspacing) - elseif i == 7 then - b:SetPoint("TOPLEFT", bar, T.buttonspacing, -T.buttonspacing) - else - b:SetPoint("LEFT", b2, "RIGHT", T.buttonspacing, 0) - end -end - -for i=7, 12 do - local b = _G["MultiBarBottomLeftButton"..i] - local b2 = _G["MultiBarBottomLeftButton1"] - b:SetFrameLevel(b2:GetFrameLevel() - 2) -end \ No newline at end of file diff --git a/Tukui/modules/actionbars/Bar3.lua b/Tukui/modules/actionbars/Bar3.lua deleted file mode 100644 index eeba6e1..0000000 --- a/Tukui/modules/actionbars/Bar3.lua +++ /dev/null @@ -1,32 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["actionbar"].enable == true then return end - ---------------------------------------------------------------------------- --- setup MultiBarLeft as bar #3 ---------------------------------------------------------------------------- - -local bar = TukuiBar3 -MultiBarBottomRight:SetParent(bar) - -for i= 1, 12 do - local b = _G["MultiBarBottomRightButton"..i] - local b2 = _G["MultiBarBottomRightButton"..i-1] - b:SetSize(T.buttonsize, T.buttonsize) - b:ClearAllPoints() - b:SetFrameStrata("BACKGROUND") - b:SetFrameLevel(15) - - if i == 1 then - b:SetPoint("BOTTOMLEFT", bar, T.buttonspacing, T.buttonspacing) - elseif i == 7 then - b:SetPoint("TOPLEFT", bar, T.buttonspacing, -T.buttonspacing) - else - b:SetPoint("LEFT", b2, "RIGHT", T.buttonspacing, 0) - end -end - -for i=7, 12 do - local b = _G["MultiBarBottomRightButton"..i] - local b2 = _G["MultiBarBottomRightButton1"] - b:SetFrameLevel(b2:GetFrameLevel() - 2) -end \ No newline at end of file diff --git a/Tukui/modules/actionbars/Bar4.lua b/Tukui/modules/actionbars/Bar4.lua deleted file mode 100644 index b37ce49..0000000 --- a/Tukui/modules/actionbars/Bar4.lua +++ /dev/null @@ -1,25 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["actionbar"].enable == true then return end - ---------------------------------------------------------------------------- --- setup MultiBarRight as bar #4 ---------------------------------------------------------------------------- - -local bar = TukuiBar4 -bar:SetAlpha(1) -MultiBarLeft:SetParent(bar) - -for i= 1, 12 do - local b = _G["MultiBarLeftButton"..i] - local b2 = _G["MultiBarLeftButton"..i-1] - b:SetSize(T.buttonsize, T.buttonsize) - b:ClearAllPoints() - b:SetFrameStrata("BACKGROUND") - b:SetFrameLevel(15) - - if i == 1 then - b:SetPoint("TOPLEFT", bar, T.buttonspacing, -T.buttonspacing) - else - b:SetPoint("LEFT", b2, "RIGHT", T.buttonspacing, 0) - end -end \ No newline at end of file diff --git a/Tukui/modules/actionbars/Bar5.lua b/Tukui/modules/actionbars/Bar5.lua deleted file mode 100644 index e063430..0000000 --- a/Tukui/modules/actionbars/Bar5.lua +++ /dev/null @@ -1,25 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["actionbar"].enable == true then return end - ---------------------------------------------------------------------------- --- setup MultiBarBottomRight as bar #5 ---------------------------------------------------------------------------- - -local bar = TukuiBar5 -bar:SetAlpha(1) -MultiBarRight:SetParent(bar) - -for i= 1, 12 do - local b = _G["MultiBarRightButton"..i] - local b2 = _G["MultiBarRightButton"..i-1] - b:SetSize(T.buttonsize, T.buttonsize) - b:ClearAllPoints() - b:SetFrameStrata("BACKGROUND") - b:SetFrameLevel(15) - - if i == 1 then - b:SetPoint("TOPRIGHT", bar, -T.buttonspacing, -T.buttonspacing) - else - b:SetPoint("TOP", b2, "BOTTOM", 0, -T.buttonspacing) - end -end \ No newline at end of file diff --git a/Tukui/modules/actionbars/Bar6.lua b/Tukui/modules/actionbars/Bar6.lua deleted file mode 100644 index 07e4763..0000000 --- a/Tukui/modules/actionbars/Bar6.lua +++ /dev/null @@ -1,24 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["actionbar"].enable == true or not T.lowversion then return end - -TukuiBar5:SetWidth((T.buttonsize * 3) + (T.buttonspacing * 4)) - -local bar = TukuiBar6 -bar:SetAlpha(1) -MultiBarBottomLeft:SetParent(bar) - --- setup the bar -for i=1, 12 do - local b = _G["MultiBarBottomLeftButton"..i] - local b2 = _G["MultiBarBottomLeftButton"..i-1] - b:SetSize(T.buttonsize, T.buttonsize) - b:ClearAllPoints() - b:SetFrameStrata("BACKGROUND") - b:SetFrameLevel(15) - - if i == 1 then - b:SetPoint("TOPLEFT", bar, T.buttonspacing, -T.buttonspacing) - else - b:SetPoint("TOP", b2, "BOTTOM", 0, -T.buttonspacing) - end -end \ No newline at end of file diff --git a/Tukui/modules/actionbars/Bar7.lua b/Tukui/modules/actionbars/Bar7.lua deleted file mode 100644 index d913463..0000000 --- a/Tukui/modules/actionbars/Bar7.lua +++ /dev/null @@ -1,22 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["actionbar"].enable == true or not T.lowversion then return end - -local bar = TukuiBar7 -bar:SetAlpha(1) -MultiBarBottomRight:SetParent(bar) - -for i= 1, 12 do - local b = _G["MultiBarBottomRightButton"..i] - local b2 = _G["MultiBarBottomRightButton"..i-1] - b:SetSize(T.buttonsize, T.buttonsize) - b:ClearAllPoints() - b:SetFrameStrata("BACKGROUND") - b:SetFrameLevel(15) - - if i == 1 then - b:SetPoint("TOP", bar, 0, -T.buttonspacing) - else - b:SetPoint("TOP", b2, "BOTTOM", 0, -T.buttonspacing) - end -end - diff --git a/Tukui/modules/actionbars/BarPet.lua b/Tukui/modules/actionbars/BarPet.lua deleted file mode 100644 index 3ca98d3..0000000 --- a/Tukui/modules/actionbars/BarPet.lua +++ /dev/null @@ -1,55 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["actionbar"].enable == true then return end - ---------------------------------------------------------------------------- --- setup PetActionBar ---------------------------------------------------------------------------- - -local bar = TukuiPetBar -local link = TukuiLineToPetActionBarBackground -link:SetAlpha(.8) - -bar:RegisterEvent("PLAYER_LOGIN") -bar:RegisterEvent("PLAYER_CONTROL_LOST") -bar:RegisterEvent("PLAYER_CONTROL_GAINED") -bar:RegisterEvent("PLAYER_ENTERING_WORLD") -bar:RegisterEvent("PLAYER_FARSIGHT_FOCUS_CHANGED") -bar:RegisterEvent("PET_BAR_UPDATE") -bar:RegisterEvent("PET_BAR_UPDATE_USABLE") -bar:RegisterEvent("PET_BAR_UPDATE_COOLDOWN") -bar:RegisterEvent("PET_BAR_HIDE") -bar:RegisterEvent("UNIT_PET") -bar:RegisterEvent("UNIT_FLAGS") -bar:RegisterEvent("UNIT_AURA") -bar:SetScript("OnEvent", function(self, event, arg1) - if event == "PLAYER_LOGIN" then - -- bug reported by Affli on t12 BETA - PetActionBarFrame.showgrid = 1 -- hack to never hide pet button. :X - - local button - for i = 1, 10 do - button = _G["PetActionButton"..i] - button:ClearAllPoints() - button:SetParent(TukuiPetBar) - - button:SetSize(T.petbuttonsize, T.petbuttonsize) - if i == 1 then - button:SetPoint("TOPLEFT", T.buttonspacing,-T.buttonspacing) - else - button:SetPoint("TOP", _G["PetActionButton"..(i - 1)], "BOTTOM", 0, -T.buttonspacing) - end - button:Show() - self:SetAttribute("addchild", button) - end - RegisterStateDriver(self, "visibility", "[pet,novehicleui,nobonusbar:5] show; hide") - hooksecurefunc("PetActionBar_Update", T.TukuiPetBarUpdate) - elseif event == "PET_BAR_UPDATE" or event == "UNIT_PET" and arg1 == "player" - or event == "PLAYER_CONTROL_LOST" or event == "PLAYER_CONTROL_GAINED" or event == "PLAYER_FARSIGHT_FOCUS_CHANGED" or event == "UNIT_FLAGS" - or arg1 == "pet" and (event == "UNIT_AURA") then - T.TukuiPetBarUpdate() - elseif event == "PET_BAR_UPDATE_COOLDOWN" then - PetActionBar_UpdateCooldowns() - else - T.StylePet() - end -end) \ No newline at end of file diff --git a/Tukui/modules/actionbars/BarShift.lua b/Tukui/modules/actionbars/BarShift.lua deleted file mode 100644 index 6455b7b..0000000 --- a/Tukui/modules/actionbars/BarShift.lua +++ /dev/null @@ -1,94 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["actionbar"].enable == true then return end - ---------------------------------------------------------------------------- --- Setup Shapeshift Bar ---------------------------------------------------------------------------- - --- used for anchor totembar or shapeshiftbar -local TukuiShift = CreateFrame("Frame","TukuiShiftBar",UIParent) -TukuiShift:SetPoint("TOPLEFT", 4, -46) -TukuiShift:SetWidth((T.petbuttonsize * 5) + (T.petbuttonsize * 4)) -TukuiShift:SetHeight(10) -TukuiShift:SetFrameStrata("MEDIUM") -TukuiShift:SetMovable(true) -TukuiShift:SetClampedToScreen(true) - --- shapeshift command to move totem or shapeshift in-game -local ssmover = CreateFrame("Frame", "TukuiShapeShiftHolder", UIParent) -ssmover:SetAllPoints(TukuiShift) -ssmover:SetTemplate("Default") -ssmover:SetFrameStrata("HIGH") -ssmover:SetBackdropBorderColor(1,0,0) -ssmover:SetAlpha(0) -ssmover.text = T.SetFontString(ssmover, C.media.uffont, 12) -ssmover.text:SetPoint("CENTER") -ssmover.text:SetText(L.move_shapeshift) - --- hide it if not needed and stop executing code -if C.actionbar.hideshapeshift then TukuiShift:Hide() return end - --- create the shapeshift bar if we enabled it -local bar = CreateFrame("Frame", "TukuiShapeShift", TukuiShift, "SecureHandlerStateTemplate") -bar:ClearAllPoints() -bar:SetAllPoints(TukuiShift) - -local States = { - ["DRUID"] = "show", - ["WARRIOR"] = "show", - ["PALADIN"] = "show", - ["DEATHKNIGHT"] = "show", - ["ROGUE"] = "show,", - ["PRIEST"] = "show,", - ["HUNTER"] = "show,", - ["WARLOCK"] = "show,", -} - -bar:RegisterEvent("PLAYER_LOGIN") -bar:RegisterEvent("PLAYER_ENTERING_WORLD") -bar:RegisterEvent("UPDATE_SHAPESHIFT_FORMS") -bar:RegisterEvent("UPDATE_SHAPESHIFT_USABLE") -bar:RegisterEvent("UPDATE_SHAPESHIFT_COOLDOWN") -bar:RegisterEvent("UPDATE_SHAPESHIFT_FORM") -bar:RegisterEvent("ACTIONBAR_PAGE_CHANGED") -bar:SetScript("OnEvent", function(self, event, ...) - if event == "PLAYER_LOGIN" then - local button - for i = 1, NUM_SHAPESHIFT_SLOTS do - button = _G["ShapeshiftButton"..i] - button:ClearAllPoints() - button:SetParent(self) - button:SetFrameStrata("LOW") - if i == 1 then - button:Point("BOTTOMLEFT", TukuiShift, 0, 24) - else - local previous = _G["ShapeshiftButton"..i-1] - button:Point("LEFT", previous, "RIGHT", T.buttonspacing, 0) - end - local _, name = GetShapeshiftFormInfo(i) - if name then - button:Show() - end - end - RegisterStateDriver(self, "visibility", States[T.myclass] or "hide") - elseif event == "UPDATE_SHAPESHIFT_FORMS" then - -- Update Shapeshift Bar Button Visibility - -- I seriously don't know if it's the best way to do it on spec changes or when we learn a new stance. - if InCombatLockdown() then return end -- > just to be safe ;p - local button - for i = 1, NUM_SHAPESHIFT_SLOTS do - button = _G["ShapeshiftButton"..i] - local _, name = GetShapeshiftFormInfo(i) - if name then - button:Show() - else - button:Hide() - end - end - T.TukuiShiftBarUpdate() - elseif event == "PLAYER_ENTERING_WORLD" then - T.StyleShift() - else - T.TukuiShiftBarUpdate() - end -end) \ No newline at end of file diff --git a/Tukui/modules/actionbars/BarTotem.lua b/Tukui/modules/actionbars/BarTotem.lua deleted file mode 100644 index 3049846..0000000 --- a/Tukui/modules/actionbars/BarTotem.lua +++ /dev/null @@ -1,23 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C["actionbar"].enable ~= true then return end - --- we just use default totem bar for shaman --- we parent it to our shapeshift bar. --- This is approx the same script as it was in WOTLK Tukui version. - -if T.myclass == "SHAMAN" then - if MultiCastActionBarFrame then - MultiCastActionBarFrame:SetScript("OnUpdate", nil) - MultiCastActionBarFrame:SetScript("OnShow", nil) - MultiCastActionBarFrame:SetScript("OnHide", nil) - MultiCastActionBarFrame:SetParent(TukuiShiftBar) - MultiCastActionBarFrame:ClearAllPoints() - MultiCastActionBarFrame:Point("BOTTOMLEFT", TukuiShiftBar, -3, 23) - - hooksecurefunc("MultiCastActionButton_Update",function(actionbutton) if not InCombatLockdown() then actionbutton:SetAllPoints(actionbutton.slotButton) end end) - - MultiCastActionBarFrame.SetParent = T.dummy - MultiCastActionBarFrame.SetPoint = T.dummy - MultiCastRecallSpellButton.SetPoint = T.dummy - end -end \ No newline at end of file diff --git a/Tukui/modules/actionbars/Bind.lua b/Tukui/modules/actionbars/Bind.lua deleted file mode 100644 index f3c639b..0000000 --- a/Tukui/modules/actionbars/Bind.lua +++ /dev/null @@ -1,300 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --- keybind feature -local bind = CreateFrame("Frame", "TukuiHoverBind", UIParent) - --- SLASH COMMAND -SlashCmdList.MOUSEOVERBIND = function() - if InCombatLockdown() then print(L.bind_combat) return end - if not bind.loaded then - local find = string.find - local _G = getfenv(0) - - bind:SetFrameStrata("DIALOG") - bind:EnableMouse(true) - bind:EnableKeyboard(true) - bind:EnableMouseWheel(true) - bind.texture = bind:CreateTexture() - bind.texture:SetAllPoints(bind) - bind.texture:SetTexture(0, 0, 0, .25) - bind:Hide() - - local elapsed = 0 - GameTooltip:HookScript("OnUpdate", function(self, e) - elapsed = elapsed + e - if elapsed < .2 then return else elapsed = 0 end - if (not self.comparing and IsModifiedClick("COMPAREITEMS")) then - GameTooltip_ShowCompareItem(self) - self.comparing = true - elseif ( self.comparing and not IsModifiedClick("COMPAREITEMS")) then - for _, frame in pairs(self.shoppingTooltips) do - frame:Hide() - end - self.comparing = false - end - end) - hooksecurefunc(GameTooltip, "Hide", function(self) for _, tt in pairs(self.shoppingTooltips) do tt:Hide() end end) - - bind:SetScript("OnEvent", function(self) self:Deactivate(false) end) - bind:SetScript("OnLeave", function(self) self:HideFrame() end) - bind:SetScript("OnKeyUp", function(self, key) self:Listener(key) end) - bind:SetScript("OnMouseUp", function(self, key) self:Listener(key) end) - bind:SetScript("OnMouseWheel", function(self, delta) if delta>0 then self:Listener("MOUSEWHEELUP") else self:Listener("MOUSEWHEELDOWN") end end) - - function bind:Update(b, spellmacro) - if not self.enabled or InCombatLockdown() then return end - self.button = b - self.spellmacro = spellmacro - - self:ClearAllPoints() - self:SetAllPoints(b) - self:Show() - - ShoppingTooltip1:Hide() - - if spellmacro=="SPELL" then - self.button.id = SpellBook_GetSpellBookSlot(self.button) - self.button.name = GetSpellBookItemName(self.button.id, SpellBookFrame.bookType) - - GameTooltip:AddLine("Trigger") - GameTooltip:Show() - GameTooltip:SetScript("OnHide", function(self) - self:SetOwner(bind, "ANCHOR_NONE") - self:SetPoint("BOTTOM", bind, "TOP", 0, 1) - self:AddLine(bind.button.name, 1, 1, 1) - bind.button.bindings = {GetBindingKey(spellmacro.." "..bind.button.name)} - if #bind.button.bindings == 0 then - self:AddLine("No bindings set.", .6, .6, .6) - else - self:AddDoubleLine("Binding", "Key", .6, .6, .6, .6, .6, .6) - for i = 1, #bind.button.bindings do - self:AddDoubleLine(i, bind.button.bindings[i]) - end - end - self:Show() - self:SetScript("OnHide", nil) - end) - elseif spellmacro=="MACRO" then - self.button.id = self.button:GetID() - - if floor(.5+select(2,MacroFrameTab1Text:GetTextColor())*10)/10==.8 then self.button.id = self.button.id + 36 end - - self.button.name = GetMacroInfo(self.button.id) - - GameTooltip:SetOwner(bind, "ANCHOR_NONE") - GameTooltip:SetPoint("BOTTOM", bind, "TOP", 0, 1) - GameTooltip:AddLine(bind.button.name, 1, 1, 1) - - bind.button.bindings = {GetBindingKey(spellmacro.." "..bind.button.name)} - if #bind.button.bindings == 0 then - GameTooltip:AddLine("No bindings set.", .6, .6, .6) - else - GameTooltip:AddDoubleLine("Binding", "Key", .6, .6, .6, .6, .6, .6) - for i = 1, #bind.button.bindings do - GameTooltip:AddDoubleLine("Binding"..i, bind.button.bindings[i], 1, 1, 1) - end - end - GameTooltip:Show() - elseif spellmacro=="STANCE" or spellmacro=="PET" then - self.button.id = tonumber(b:GetID()) - self.button.name = b:GetName() - - if not self.button.name then return end - - if not self.button.id or self.button.id < 1 or self.button.id > (spellmacro=="STANCE" and 10 or 12) then - self.button.bindstring = "CLICK "..self.button.name..":LeftButton" - else - self.button.bindstring = (spellmacro=="STANCE" and "SHAPESHIFTBUTTON" or "BONUSACTIONBUTTON")..self.button.id - end - - GameTooltip:AddLine("Trigger") - GameTooltip:Show() - GameTooltip:SetScript("OnHide", function(self) - self:SetOwner(bind, "ANCHOR_NONE") - self:SetPoint("BOTTOM", bind, "TOP", 0, 1) - self:AddLine(bind.button.name, 1, 1, 1) - bind.button.bindings = {GetBindingKey(bind.button.bindstring)} - if #bind.button.bindings == 0 then - self:AddLine("No bindings set.", .6, .6, .6) - else - self:AddDoubleLine("Binding", "Key", .6, .6, .6, .6, .6, .6) - for i = 1, #bind.button.bindings do - self:AddDoubleLine(i, bind.button.bindings[i]) - end - end - self:Show() - self:SetScript("OnHide", nil) - end) - else - self.button.action = tonumber(b.action) - self.button.name = b:GetName() - - if not self.button.name then return end - - if not self.button.action or self.button.action < 1 or self.button.action > 132 then - self.button.bindstring = "CLICK "..self.button.name..":LeftButton" - else - local modact = 1+(self.button.action-1)%12 - if self.button.action < 25 or self.button.action > 72 then - self.button.bindstring = "ACTIONBUTTON"..modact - elseif self.button.action < 73 and self.button.action > 60 then - self.button.bindstring = "MULTIACTIONBAR1BUTTON"..modact - elseif self.button.action < 61 and self.button.action > 48 then - self.button.bindstring = "MULTIACTIONBAR2BUTTON"..modact - elseif self.button.action < 49 and self.button.action > 36 then - self.button.bindstring = "MULTIACTIONBAR4BUTTON"..modact - elseif self.button.action < 37 and self.button.action > 24 then - self.button.bindstring = "MULTIACTIONBAR3BUTTON"..modact - end - end - - GameTooltip:AddLine("Trigger") - GameTooltip:Show() - GameTooltip:SetScript("OnHide", function(self) - self:SetOwner(bind, "ANCHOR_NONE") - self:SetPoint("BOTTOM", bind, "TOP", 0, 1) - self:AddLine(bind.button.name, 1, 1, 1) - bind.button.bindings = {GetBindingKey(bind.button.bindstring)} - if #bind.button.bindings == 0 then - self:AddLine("No bindings set.", .6, .6, .6) - else - self:AddDoubleLine("Binding", "Key", .6, .6, .6, .6, .6, .6) - for i = 1, #bind.button.bindings do - self:AddDoubleLine(i, bind.button.bindings[i]) - end - end - self:Show() - self:SetScript("OnHide", nil) - end) - end - end - - function bind:Listener(key) - if key == "ESCAPE" or key == "RightButton" then - for i = 1, #self.button.bindings do - SetBinding(self.button.bindings[i]) - end - print("All keybindings cleared for |cff00ff00"..self.button.name.."|r.") - self:Update(self.button, self.spellmacro) - if self.spellmacro~="MACRO" then GameTooltip:Hide() end - return - end - - if key == "LSHIFT" - or key == "RSHIFT" - or key == "LCTRL" - or key == "RCTRL" - or key == "LALT" - or key == "RALT" - or key == "UNKNOWN" - or key == "LeftButton" - then return end - - if key == "MiddleButton" then key = "BUTTON3" end - if key == "Button4" then key = "BUTTON4" end - if key == "Button5" then key = "BUTTON5" end - - local alt = IsAltKeyDown() and "ALT-" or "" - local ctrl = IsControlKeyDown() and "CTRL-" or "" - local shift = IsShiftKeyDown() and "SHIFT-" or "" - - if not self.spellmacro or self.spellmacro=="PET" or self.spellmacro=="STANCE" then - SetBinding(alt..ctrl..shift..key, self.button.bindstring) - else - SetBinding(alt..ctrl..shift..key, self.spellmacro.." "..self.button.name) - end - print(alt..ctrl..shift..key.." |cff00ff00bound to |r"..self.button.name..".") - self:Update(self.button, self.spellmacro) - if self.spellmacro~="MACRO" then GameTooltip:Hide() end - end - function bind:HideFrame() - self:ClearAllPoints() - self:Hide() - GameTooltip:Hide() - end - function bind:Activate() - self.enabled = true - self:RegisterEvent("PLAYER_REGEN_DISABLED") - end - function bind:Deactivate(save) - if save then - SaveBindings(2) - print(L.bind_saved) - else - LoadBindings(2) - print(L.bind_discard) - end - self.enabled = false - self:HideFrame() - self:UnregisterEvent("PLAYER_REGEN_DISABLED") - StaticPopup_Hide("TUKUI_KEYBIND_MODE") - end - - StaticPopupDialogs["TUKUI_KEYBIND_MODE"] = { - text = L.bind_instruct, - button1 = L.bind_save, - button2 = L.bind_discardbind, - OnAccept = function() bind:Deactivate(true) end, - OnCancel = function() bind:Deactivate(false) end, - timeout = 0, - whileDead = 1, - hideOnEscape = false, - preferredIndex = 3, - } - - -- REGISTERING - local stance = ShapeshiftButton1:GetScript("OnClick") - local pet = PetActionButton1:GetScript("OnClick") - local button = SecureActionButton_OnClick - - local function register(val) - if val.IsProtected and val.GetObjectType and val.GetScript and val:GetObjectType()=="CheckButton" and val:IsProtected() then - local script = val:GetScript("OnClick") - if script==button then - val:HookScript("OnEnter", function(self) bind:Update(self) end) - elseif script==stance then - val:HookScript("OnEnter", function(self) bind:Update(self, "STANCE") end) - elseif script==pet then - val:HookScript("OnEnter", function(self) bind:Update(self, "PET") end) - end - end - end - - local val = EnumerateFrames() - while val do - register(val) - val = EnumerateFrames(val) - end - - for i=1,12 do - local b = _G["SpellButton"..i] - b:HookScript("OnEnter", function(self) bind:Update(self, "SPELL") end) - end - - local function registermacro() - for i=1,36 do - local b = _G["MacroButton"..i] - b:HookScript("OnEnter", function(self) bind:Update(self, "MACRO") end) - end - end - - if not IsAddOnLoaded("Blizzard_MacroUI") then - hooksecurefunc("LoadAddOn", function(addon) - if addon=="Blizzard_MacroUI" then - registermacro() - end - end) - else - registermacro() - end - bind.loaded = 1 - end - if not bind.enabled then - bind:Activate() - StaticPopup_Show("TUKUI_KEYBIND_MODE") - end -end -SLASH_MOUSEOVERBIND1 = "/bindkey" -SLASH_MOUSEOVERBIND2 = "/hoverbind" -if not IsAddOnLoaded("HealBot") then - SLASH_MOUSEOVERBIND3 = "/hb" -end \ No newline at end of file diff --git a/Tukui/modules/actionbars/Cooldowns.lua b/Tukui/modules/actionbars/Cooldowns.lua deleted file mode 100644 index 1c9e77e..0000000 --- a/Tukui/modules/actionbars/Cooldowns.lua +++ /dev/null @@ -1,216 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales ---[[ - An edited lightweight OmniCC for Tukui - A featureless, 'pure' version of OmniCC. - This version should work on absolutely everything, but I've removed pretty much all of the options ---]] - -if IsAddOnLoaded("OmniCC") or IsAddOnLoaded("ncCooldown") or C["cooldown"].enable ~= true then return end - ---constants! -OmniCC = true --hack to work around detection from other addons for OmniCC -local ICON_SIZE = 36 --the normal size for an icon (don't change this) -local DAY, HOUR, MINUTE = 86400, 3600, 60 --used for formatting text -local DAYISH, HOURISH, MINUTEISH = 3600 * 23.5, 60 * 59.5, 59.5 --used for formatting text at transition points -local HALFDAYISH, HALFHOURISH, HALFMINUTEISH = DAY/2 + 0.5, HOUR/2 + 0.5, MINUTE/2 + 0.5 --used for calculating next update times - ---configuration settings -local FONT_FACE = C["media"].font --what font to use -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 = 2.5 --the minimum duration to show cooldown text for -local EXPIRING_DURATION = C["cooldown"].treshold --the minimum number of seconds a cooldown must be to use to display in the expiring format - -local EXPIRING_FORMAT = T.RGBToHex(1, 0, 0)..'%.1f|r' --format for timers that are soon to expire -local SECONDS_FORMAT = T.RGBToHex(1, 1, 0)..'%d|r' --format for timers that have seconds remaining -local MINUTES_FORMAT = T.RGBToHex(1, 1, 1)..'%dm|r' --format for timers that have minutes remaining -local HOURS_FORMAT = T.RGBToHex(0.4, 1, 1)..'%dh|r' --format for timers that have hours remaining -local DAYS_FORMAT = T.RGBToHex(0.4, 0.4, 1)..'%dh|r' --format for timers that have days remaining - ---local bindings! -local floor = math.floor -local min = math.min -local GetTime = GetTime - ---returns both what text to display, and how long until the next update -local function getTimeText(s) - --format text as seconds when below a minute - if s < MINUTEISH then - local seconds = tonumber(T.Round(s)) - if seconds > EXPIRING_DURATION then - return SECONDS_FORMAT, seconds, s - (seconds - 0.51) - else - return EXPIRING_FORMAT, s, 0.051 - end - --format text as minutes when below an hour - elseif s < HOURISH then - local minutes = tonumber(T.Round(s/MINUTE)) - return MINUTES_FORMAT, minutes, minutes > 1 and (s - (minutes*MINUTE - HALFMINUTEISH)) or (s - MINUTEISH) - --format text as hours when below a day - elseif s < DAYISH then - local hours = tonumber(T.Round(s/HOUR)) - return HOURS_FORMAT, hours, hours > 1 and (s - (hours*HOUR - HALFHOURISH)) or (s - HOURISH) - --format text as days - else - local days = tonumber(T.Round(s/DAY)) - return DAYS_FORMAT, days, days > 1 and (s - (days*DAY - HALFDAYISH)) or (s - DAYISH) - end -end - ---stops the timer -local function Timer_Stop(self) - self.enabled = nil - self:Hide() -end - ---forces the given timer to update on the next frame -local function Timer_ForceUpdate(self) - self.nextUpdate = 0 - self:Show() -end - ---adjust font size whenever the timer's parent size changes ---hide if it gets too tiny -local function Timer_OnSizeChanged(self, width, height) - local fontScale = T.Round(width) / ICON_SIZE - if fontScale == self.fontScale then - return - end - - self.fontScale = fontScale - if fontScale < MIN_SCALE then - self:Hide() - else - self.text:SetFont(FONT_FACE, fontScale * FONT_SIZE, 'OUTLINE') - self.text:SetShadowColor(0, 0, 0, 0.5) - self.text:SetShadowOffset(2, -2) - if self.enabled then - Timer_ForceUpdate(self) - end - end -end - ---update timer text, if it needs to be ---hide the timer if done -local function Timer_OnUpdate(self, elapsed) - if self.nextUpdate > 0 then - self.nextUpdate = self.nextUpdate - elapsed - else - local remain = self.duration - (GetTime() - self.start) - if tonumber(T.Round(remain)) > 0 then - if (self.fontScale * self:GetEffectiveScale() / UIParent:GetScale()) < MIN_SCALE then - self.text:SetText('') - self.nextUpdate = 1 - else - local formatStr, time, nextUpdate = getTimeText(remain) - self.text:SetFormattedText(formatStr, time) - self.nextUpdate = nextUpdate - end - else - Timer_Stop(self) - end - end -end - ---returns a new timer object -local function Timer_Create(self) - --a frame to watch for OnSizeChanged events - --needed since OnSizeChanged has funny triggering if the frame with the handler is not shown - local scaler = CreateFrame('Frame', nil, self) - scaler:SetAllPoints(self) - - local timer = CreateFrame('Frame', nil, scaler); timer:Hide() - timer:SetAllPoints(scaler) - timer:SetScript('OnUpdate', Timer_OnUpdate) - - local text = timer:CreateFontString(nil, 'OVERLAY') - text:Point("CENTER", 2, 0) - text:SetJustifyH("CENTER") - timer.text = text - - Timer_OnSizeChanged(timer, scaler:GetSize()) - scaler:SetScript('OnSizeChanged', function(self, ...) Timer_OnSizeChanged(timer, ...) end) - - self.timer = timer - return timer -end - ---hook the SetCooldown method of all cooldown frames ---ActionButton1Cooldown is used here since its likely to always exist ---and I'd rather not create my own cooldown frame to preserve a tiny bit of memory -local function Timer_Start(self, start, duration) - if self.noOCC then return end - --start timer - if start > 0 and duration > MIN_DURATION then - local timer = self.timer or Timer_Create(self) - timer.start = start - timer.duration = duration - timer.enabled = true - timer.nextUpdate = 0 - if timer.fontScale >= MIN_SCALE then timer:Show() end - --stop timer - else - local timer = self.timer - if timer then - Timer_Stop(timer) - end - end -end - -hooksecurefunc(getmetatable(ActionButton1Cooldown).__index, "SetCooldown", Timer_Start) - -if T.toc < 40300 then return end - -local active = {} -local hooked = {} - -local function cooldown_OnShow(self) - active[self] = true -end - -local function cooldown_OnHide(self) - active[self] = nil -end - -local function cooldown_ShouldUpdateTimer(self, start, duration) - local timer = self.timer - if not timer then - return true - end - return timer.start ~= start -end - -local function cooldown_Update(self) - local button = self:GetParent() - local start, duration, enable = GetActionCooldown(button.action) - - if cooldown_ShouldUpdateTimer(self, start, duration) then - Timer_Start(self, start, duration) - end -end - -local EventWatcher = CreateFrame("Frame") -EventWatcher:Hide() -EventWatcher:SetScript("OnEvent", function(self, event) - for cooldown in pairs(active) do - cooldown_Update(cooldown) - end -end) -EventWatcher:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN") - -local function actionButton_Register(frame) - local cooldown = frame.cooldown - if not hooked[cooldown] then - cooldown:HookScript("OnShow", cooldown_OnShow) - cooldown:HookScript("OnHide", cooldown_OnHide) - hooked[cooldown] = true - end -end - -if _G["ActionBarButtonEventsFrame"].frames then - for i, frame in pairs(_G["ActionBarButtonEventsFrame"].frames) do - actionButton_Register(frame) - end -end - -hooksecurefunc("ActionBarButtonEventsFrame_RegisterFrame", actionButton_Register) \ No newline at end of file diff --git a/Tukui/modules/actionbars/Extra.lua b/Tukui/modules/actionbars/Extra.lua deleted file mode 100644 index d90bb9b..0000000 --- a/Tukui/modules/actionbars/Extra.lua +++ /dev/null @@ -1,45 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -if T.toc < 40300 then return end -if not C.actionbar.enable then return end - --- create the holder to allow moving extra button -local holder = CreateFrame("Frame", "TukuiExtraActionBarFrameHolder", UIParent) -holder:Size(160, 80) -holder:SetPoint("BOTTOM", 0, 250) -holder:SetMovable(true) -holder:SetTemplate("Default") -holder:SetBackdropBorderColor(0,0,0,0) -holder:SetBackdropColor(0,0,0,0) -holder.text = T.SetFontString(holder, C.media.uffont, 12) -holder.text:SetPoint("CENTER") -holder.text:SetText(L.move_extrabutton) -holder.text:Hide() - --- We never use MainMenuBar, so we need to parent this frame outside of it else it will not work. -ExtraActionBarFrame:SetParent(holder) -ExtraActionBarFrame:ClearAllPoints() -ExtraActionBarFrame:SetPoint("CENTER", holder, "CENTER", 0, 0) - --- hook the texture, idea by roth via WoWInterface forums -local button = ExtraActionButton1 -local icon = button.icon -local texture = button.style -local disableTexture = function(style, texture) - if string.sub(texture,1,9) == "Interface" then - style:SetTexture("") - end -end -button.style:SetTexture("") -hooksecurefunc(texture, "SetTexture", disableTexture) - --- spell icon -icon:SetTexCoord(.08, .92, .08, .92) -icon:Point("TOPLEFT", button, 2, -2) -icon:Point("BOTTOMRIGHT", button, -2, 2) -icon:SetDrawLayer("ARTWORK") - --- pushed/hover -button:StyleButton(true) - --- backdrop -button:SetTemplate("Default") \ No newline at end of file diff --git a/Tukui/modules/actionbars/Hide.lua b/Tukui/modules/actionbars/Hide.lua deleted file mode 100644 index 8155d49..0000000 --- a/Tukui/modules/actionbars/Hide.lua +++ /dev/null @@ -1,61 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["actionbar"].enable == true then return end - ---------------------------------------------------------------------------- --- Hide all Blizzard stuff that we don't need ---------------------------------------------------------------------------- - -do - MainMenuBar:SetScale(0.00001) - MainMenuBar:EnableMouse(false) - VehicleMenuBar:SetScale(0.00001) - VehicleMenuBar:EnableMouse(false) - PetActionBarFrame:EnableMouse(false) - ShapeshiftBarFrame:EnableMouse(false) - - local elements = { - MainMenuBar, MainMenuBarArtFrame, BonusActionBarFrame, VehicleMenuBar, - PossessBarFrame, PetActionBarFrame, ShapeshiftBarFrame, - ShapeshiftBarLeft, ShapeshiftBarMiddle, ShapeshiftBarRight, - } - for _, element in pairs(elements) do - if element:GetObjectType() == "Frame" then - element:UnregisterAllEvents() - end - - -- Because of code changes by Blizzard developer thought 4.0.6 about action bars, we must have MainMenuBar always visible. :X - -- MultiActionBar_Update() and IsNormalActionBarState() Blizzard functions make shit thought our bars. (example: Warrior after /rl) - -- See 4.0.6 MultiActionBars.lua for more info at line ~25. - if element ~= MainMenuBar then - element:Hide() - end - element:SetAlpha(0) - end - elements = nil - - -- fix main bar keybind not working after a talent switch. :X - hooksecurefunc('TalentFrame_LoadUI', function() - PlayerTalentFrame:UnregisterEvent('ACTIVE_TALENT_GROUP_CHANGED') - end) -end - -do - local uiManagedFrames = { - "MultiBarLeft", - "MultiBarRight", - "MultiBarBottomLeft", - "MultiBarBottomRight", - "ShapeshiftBarFrame", - "PossessBarFrame", - "PETACTIONBAR_YPOS", - "MultiCastActionBarFrame", - "MULTICASTACTIONBAR_YPOS", - "ChatFrame1", - "ChatFrame2", - "ExtraActionBarFrame", - } - for _, frame in pairs(uiManagedFrames) do - UIPARENT_MANAGED_FRAME_POSITIONS[frame] = nil - end - uiManagedFrames = nil -end \ No newline at end of file diff --git a/Tukui/modules/actionbars/Others.lua b/Tukui/modules/actionbars/Others.lua deleted file mode 100644 index 2d5202d..0000000 --- a/Tukui/modules/actionbars/Others.lua +++ /dev/null @@ -1,62 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -if not C["actionbar"].enable == true then - TukuiPetBar:Hide() - TukuiBar5:Hide() - TukuiBar6:Hide() - TukuiBar7:Hide() - TukuiBar5ButtonTop:Hide() - TukuiBar5ButtonBottom:Hide() - return -end - ---------------------------------------------------------------------------- --- Manage all others stuff for actionbars ---------------------------------------------------------------------------- - -local TukuiOnLogon = CreateFrame("Frame") -TukuiOnLogon:RegisterEvent("PLAYER_ENTERING_WORLD") -TukuiOnLogon:SetScript("OnEvent", function(self, event) - self:UnregisterEvent("PLAYER_ENTERING_WORLD") - - -- look if our 4 bars are enabled because some people disable them with others UI - -- even if Tukui have been already installed and they don't know how to restore them. - local installed = TukuiDataPerChar.install - if installed then - local b1, b2, b3, b4 = GetActionBarToggles() - if (not b1 or not b2 or not b3 or not b4) then - SetActionBarToggles(1, 1, 1, 1) - StaticPopup_Show("TUKUI_FIX_AB") - end - end - - -- enable or disable grid display - if C["actionbar"].showgrid == true then - ActionButton_HideGrid = T.dummy - for i = 1, 12 do - local button = _G[format("ActionButton%d", i)] - button:SetAttribute("showgrid", 1) - ActionButton_ShowGrid(button) - - button = _G[format("BonusActionButton%d", i)] - button:SetAttribute("showgrid", 1) - ActionButton_ShowGrid(button) - - button = _G[format("MultiBarRightButton%d", i)] - button:SetAttribute("showgrid", 1) - ActionButton_ShowGrid(button) - - button = _G[format("MultiBarBottomRightButton%d", i)] - button:SetAttribute("showgrid", 1) - ActionButton_ShowGrid(button) - - button = _G[format("MultiBarLeftButton%d", i)] - button:SetAttribute("showgrid", 1) - ActionButton_ShowGrid(button) - - button = _G[format("MultiBarBottomLeftButton%d", i)] - button:SetAttribute("showgrid", 1) - ActionButton_ShowGrid(button) - end - end -end) \ No newline at end of file diff --git a/Tukui/modules/actionbars/Range.lua b/Tukui/modules/actionbars/Range.lua deleted file mode 100644 index d02b047..0000000 --- a/Tukui/modules/actionbars/Range.lua +++ /dev/null @@ -1,319 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales ---[[ - Thx to Tulla - Adds out of range coloring to action buttons - Derived from RedRange and TullaRange ---]] - -if not C["actionbar"].enable == true then return end - ---locals and speed -local _G = _G -local UPDATE_DELAY = 0.15 -local ATTACK_BUTTON_FLASH_TIME = ATTACK_BUTTON_FLASH_TIME -local SPELL_POWER_HOLY_POWER = SPELL_POWER_HOLY_POWER -local ActionButton_GetPagedID = ActionButton_GetPagedID -local ActionButton_IsFlashing = ActionButton_IsFlashing -local ActionHasRange = ActionHasRange -local IsActionInRange = IsActionInRange -local IsUsableAction = IsUsableAction -local HasAction = HasAction - ---code for handling defaults -local function removeDefaults(tbl, defaults) - for k, v in pairs(defaults) do - if type(tbl[k]) == 'table' and type(v) == 'table' then - removeDefaults(tbl[k], v) - if next(tbl[k]) == nil then - tbl[k] = nil - end - elseif tbl[k] == v then - tbl[k] = nil - end - end - return tbl -end - -local function copyDefaults(tbl, defaults) - for k, v in pairs(defaults) do - if type(v) == 'table' then - tbl[k] = copyDefaults(tbl[k] or {}, v) - elseif tbl[k] == nil then - tbl[k] = v - end - end - return tbl -end - -local function timer_Create(parent, interval) - local updater = parent:CreateAnimationGroup() - updater:SetLooping('NONE') - updater:SetScript('OnFinished', function(self) - if parent:Update() then - parent:Start(interval) - end - end) - - local a = updater:CreateAnimation('Animation'); a:SetOrder(1) - - parent.Start = function(self) - self:Stop() - a:SetDuration(interval) - updater:Play() - return self - end - - parent.Stop = function(self) - if updater:IsPlaying() then - updater:Stop() - end - return self - end - - parent.Active = function(self) - return updater:IsPlaying() - end - - return parent -end - ---stuff for holy power detection -local PLAYER_IS_PALADIN = select(2, UnitClass('player')) == 'PALADIN' -local HAND_OF_LIGHT = GetSpellInfo(90174) -local isHolyPowerAbility -do - local HOLY_POWER_SPELLS = { - [85256] = GetSpellInfo(85256), --Templar's Verdict - [53600] = GetSpellInfo(53600), --Shield of the Righteous - -- [84963] = GetSpellInfo(84963), --Inquisition - -- [85673] = GetSpellInfo(85673), --Word of Glory - -- [85222] = GetSpellInfo(85222), --Light of Dawn - } - - isHolyPowerAbility = function(actionId) - local actionType, id = GetActionInfo(actionId) - if actionType == 'macro' then - local macroSpell = GetMacroSpell(id) - if macroSpell then - for spellId, spellName in pairs(HOLY_POWER_SPELLS) do - if macroSpell == spellName then - return true - end - end - end - else - return HOLY_POWER_SPELLS[id] - end - return false - end -end - ---[[ The main thing ]]-- -local TukuiRange = timer_Create(CreateFrame('Frame', 'TukuiRange'), UPDATE_DELAY) - -function TukuiRange:Load() - self:SetScript('OnEvent', self.OnEvent) - self:RegisterEvent('PLAYER_LOGIN') - self:RegisterEvent('PLAYER_LOGOUT') -end - - ---[[ Frame Events ]]-- -function TukuiRange:OnEvent(event, ...) - local action = self[event] - if action then - action(self, event, ...) - end -end - ---[[ Game Events ]]-- -function TukuiRange:PLAYER_LOGIN() - if not TukuiRange_COLORS then - TukuiRange_COLORS = {} - end - self.colors = copyDefaults(TukuiRange_COLORS, self:GetDefaults()) - - --add options loader - local f = CreateFrame('Frame', nil, InterfaceOptionsFrame) - f:SetScript('OnShow', function(self) - self:SetScript('OnShow', nil) - LoadAddOn('TukuiRange_Config') - end) - - self.buttonsToUpdate = {} - - hooksecurefunc('ActionButton_OnUpdate', self.RegisterButton) - hooksecurefunc('ActionButton_UpdateUsable', self.OnUpdateButtonUsable) - hooksecurefunc('ActionButton_Update', self.OnButtonUpdate) -end - -function TukuiRange:PLAYER_LOGOUT() - removeDefaults(TukuiRange_COLORS, self:GetDefaults()) -end - ---[[ Actions ]]-- -function TukuiRange:Update() - return self:UpdateButtons(UPDATE_DELAY) -end - -function TukuiRange:ForceColorUpdate() - for button in pairs(self.buttonsToUpdate) do - TukuiRange.OnUpdateButtonUsable(button) - end -end - -function TukuiRange:UpdateActive() - if next(self.buttonsToUpdate) then - if not self:Active() then - self:Start() - end - else - self:Stop() - end -end - -function TukuiRange:UpdateButtons(elapsed) - if next(self.buttonsToUpdate) then - for button in pairs(self.buttonsToUpdate) do - self:UpdateButton(button, elapsed) - end - return true - end - return false -end - -function TukuiRange:UpdateButton(button, elapsed) - TukuiRange.UpdateButtonUsable(button) - TukuiRange.UpdateFlash(button, elapsed) -end - -function TukuiRange:UpdateButtonStatus(button) - local action = ActionButton_GetPagedID(button) - if button:IsVisible() and action and HasAction(action) and ActionHasRange(action) then - self.buttonsToUpdate[button] = true - else - self.buttonsToUpdate[button] = nil - end - self:UpdateActive() -end - ---[[ Button Hooking ]]-- -function TukuiRange.RegisterButton(button) - button:HookScript('OnShow', TukuiRange.OnButtonShow) - button:HookScript('OnHide', TukuiRange.OnButtonHide) - button:SetScript('OnUpdate', nil) - - TukuiRange:UpdateButtonStatus(button) -end - -function TukuiRange.OnButtonShow(button) - TukuiRange:UpdateButtonStatus(button) -end - -function TukuiRange.OnButtonHide(button) - TukuiRange:UpdateButtonStatus(button) -end - -function TukuiRange.OnUpdateButtonUsable(button) - button.TukuiRangeColor = nil - TukuiRange.UpdateButtonUsable(button) -end - -function TukuiRange.OnButtonUpdate(button) - TukuiRange:UpdateButtonStatus(button) -end - ---[[ Range Coloring ]]-- -function TukuiRange.UpdateButtonUsable(button) - local action = ActionButton_GetPagedID(button) - local isUsable, notEnoughMana = IsUsableAction(action) - - --usable - if isUsable then - --but out of range - if IsActionInRange(action) == 0 then - TukuiRange.SetButtonColor(button, 'oor') - --a holy power abilty, and we're less than 3 Holy Power - elseif PLAYER_IS_PALADIN and isHolyPowerAbility(action) and not(UnitPower('player', SPELL_POWER_HOLY_POWER) == 3 or UnitBuff('player', HAND_OF_LIGHT)) then - TukuiRange.SetButtonColor(button, 'ooh') - --in range - else - TukuiRange.SetButtonColor(button, 'normal') - end - --out of mana - elseif notEnoughMana then - TukuiRange.SetButtonColor(button, 'oom') - --unusable - else - button.TukuiRangeColor = 'unusuable' - end -end - -function TukuiRange.SetButtonColor(button, colorType) - if button.TukuiRangeColor ~= colorType then - button.TukuiRangeColor = colorType - - local r, g, b = TukuiRange:GetColor(colorType) - - local icon = _G[button:GetName() .. 'Icon'] - icon:SetVertexColor(r, g, b) - end -end - -function TukuiRange.UpdateFlash(button, elapsed) - if ActionButton_IsFlashing(button) then - local flashtime = button.flashtime - elapsed - - if flashtime <= 0 then - local overtime = -flashtime - if overtime >= ATTACK_BUTTON_FLASH_TIME then - overtime = 0 - end - flashtime = ATTACK_BUTTON_FLASH_TIME - overtime - - local flashTexture = _G[button:GetName() .. 'Flash'] - if flashTexture:IsShown() then - flashTexture:Hide() - else - flashTexture:Show() - end - end - - button.flashtime = flashtime - end -end - - ---[[ Configuration ]]-- -function TukuiRange:GetDefaults() - return { - normal = {1, 1, 1}, - oor = {1, 0.1, 0.1}, - oom = {0.1, 0.3, 1}, - ooh = {0.45, 0.45, 1}, - } -end - -function TukuiRange:Reset() - TukuiRange_COLORS = {} - self.colors = copyDefaults(TukuiRange_COLORS, self:GetDefaults()) - - self:ForceColorUpdate() -end - -function TukuiRange:SetColor(index, r, g, b) - local color = self.colors[index] - color[1] = r - color[2] = g - color[3] = b - - self:ForceColorUpdate() -end - -function TukuiRange:GetColor(index) - local color = self.colors[index] - return color[1], color[2], color[3] -end - ---[[ Load The Thing ]]-- -TukuiRange:Load() diff --git a/Tukui/modules/actionbars/Style.lua b/Tukui/modules/actionbars/Style.lua deleted file mode 100644 index fe1f5da..0000000 --- a/Tukui/modules/actionbars/Style.lua +++ /dev/null @@ -1,447 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["actionbar"].enable == true then return end - -local _G = _G -local media = C["media"] -local securehandler = CreateFrame("Frame", nil, nil, "SecureHandlerBaseTemplate") -local replace = string.gsub - -local function style(self) - local name = self:GetName() - - --> fixing a taint issue while changing totem flyout button in combat. - if name:match("MultiCast") then return end - - --> don't skin the boss encounter extra button to match texture (4.3 patch) - --> http://www.tukui.org/storage/viewer.php?id=913811extrabar.jpg - if name:match("ExtraActionButton") then return end - - local action = self.action - local Button = self - local Icon = _G[name.."Icon"] - local Count = _G[name.."Count"] - local Flash = _G[name.."Flash"] - local HotKey = _G[name.."HotKey"] - local Border = _G[name.."Border"] - local Btname = _G[name.."Name"] - local normal = _G[name.."NormalTexture"] - local BtnBG = _G[name..'FloatingBG'] - - Flash:SetTexture("") - Button:SetNormalTexture("") - - if Border then - Border:Hide() - Border = T.dummy - end - - Count:ClearAllPoints() - Count:Point("BOTTOMRIGHT", 0, 2) - Count:SetFont(C["media"].font, 12, "OUTLINE") - - if Btname then - Btname:SetText("") - Btname:Kill() - end - - if not _G[name.."Panel"] then - -- resize all button not matching T.buttonsize - if self:GetHeight() ~= T.buttonsize and not InCombatLockdown() then --Taint fix for Flyout Buttons - self:SetSize(T.buttonsize, T.buttonsize) - end - - -- create the bg/border panel - local panel = CreateFrame("Frame", name.."Panel", self) - panel:CreatePanel("Default", T.buttonsize, T.buttonsize, "CENTER", self, "CENTER", 0, 0) - - panel:SetFrameStrata(self:GetFrameStrata()) - panel:SetFrameLevel(self:GetFrameLevel() - 1) - - Icon:SetTexCoord(.08, .92, .08, .92) - Icon:Point("TOPLEFT", Button, 2, -2) - Icon:Point("BOTTOMRIGHT", Button, -2, 2) - end - - HotKey:ClearAllPoints() - HotKey:Point("TOPRIGHT", 0, -3) - HotKey:SetFont(C["media"].font, 12, "OUTLINE") - HotKey.ClearAllPoints = T.dummy - HotKey.SetPoint = T.dummy - - if not C["actionbar"].hotkey == true then - HotKey:SetText("") - HotKey:Kill() - end - - if normal then - normal:ClearAllPoints() - normal:SetPoint("TOPLEFT") - normal:SetPoint("BOTTOMRIGHT") - end - - if BtnBG then - BtnBG:Kill() - end -end - -local function stylesmallbutton(normal, button, icon, name, pet) - button:SetNormalTexture("") - - -- bug fix when moving spell from bar - button.SetNormalTexture = T.dummy - - local Flash = _G[name.."Flash"] - Flash:SetTexture("") - - if not _G[name.."Panel"] then - button:SetWidth(T.petbuttonsize) - button:SetHeight(T.petbuttonsize) - - local panel = CreateFrame("Frame", name.."Panel", button) - panel:CreatePanel("Default", T.petbuttonsize, T.petbuttonsize, "CENTER", button, "CENTER", 0, 0) - panel:SetBackdropColor(unpack(media.backdropcolor)) - panel:SetFrameStrata(button:GetFrameStrata()) - panel:SetFrameLevel(button:GetFrameLevel() - 1) - - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - if pet then - if T.petbuttonsize < 30 then - local autocast = _G[name.."AutoCastable"] - autocast:SetAlpha(0) - end - local shine = _G[name.."Shine"] - shine:Size(T.petbuttonsize, T.petbuttonsize) - shine:ClearAllPoints() - shine:SetPoint("CENTER", button, 0, 0) - icon:Point("TOPLEFT", button, 2, -2) - icon:Point("BOTTOMRIGHT", button, -2, 2) - else - icon:Point("TOPLEFT", button, 2, -2) - icon:Point("BOTTOMRIGHT", button, -2, 2) - end - end - - if normal then - normal:ClearAllPoints() - normal:SetPoint("TOPLEFT") - normal:SetPoint("BOTTOMRIGHT") - end -end - -function T.StyleShift() - for i=1, NUM_SHAPESHIFT_SLOTS do - local name = "ShapeshiftButton"..i - local button = _G[name] - local icon = _G[name.."Icon"] - local normal = _G[name.."NormalTexture"] - stylesmallbutton(normal, button, icon, name) - end -end - -function T.StylePet() - for i=1, NUM_PET_ACTION_SLOTS do - local name = "PetActionButton"..i - local button = _G[name] - local icon = _G[name.."Icon"] - local normal = _G[name.."NormalTexture2"] - stylesmallbutton(normal, button, icon, name, true) - end -end - -local function updatehotkey(self, actionButtonType) - local hotkey = _G[self:GetName() .. 'HotKey'] - local text = hotkey:GetText() - - text = replace(text, '(s%-)', 'S') - text = replace(text, '(a%-)', 'A') - text = replace(text, '(c%-)', 'C') - text = replace(text, '(Mouse Button )', 'M') - text = replace(text, '(Middle Mouse)', 'M3') - text = replace(text, '(Mouse Wheel Up)', 'MU') - text = replace(text, '(Mouse Wheel Down)', 'MD') - text = replace(text, '(Num Pad )', 'N') - text = replace(text, '(Page Up)', 'PU') - text = replace(text, '(Page Down)', 'PD') - text = replace(text, '(Spacebar)', 'SpB') - text = replace(text, '(Insert)', 'Ins') - text = replace(text, '(Home)', 'Hm') - text = replace(text, '(Delete)', 'Del') - - if hotkey:GetText() == _G['RANGE_INDICATOR'] then - hotkey:SetText('') - else - hotkey:SetText(text) - end -end - --- rescale cooldown spiral to fix texture. -local buttonNames = { "ActionButton", "MultiBarBottomLeftButton", "MultiBarBottomRightButton", "MultiBarLeftButton", "MultiBarRightButton", "ShapeshiftButton", "PetActionButton", "MultiCastActionButton"} -for _, name in ipairs( buttonNames ) do - for index = 1, 12 do - local buttonName = name .. tostring(index) - local button = _G[buttonName] - local cooldown = _G[buttonName .. "Cooldown"] - - if ( button == nil or cooldown == nil ) then - break - end - - cooldown:ClearAllPoints() - cooldown:Point("TOPLEFT", button, "TOPLEFT", 2, -2) - cooldown:Point("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2) - end -end - -local buttons = 0 -local function SetupFlyoutButton() - for i=1, buttons do - --prevent error if you don't have max ammount of buttons - if _G["SpellFlyoutButton"..i] then - style(_G["SpellFlyoutButton"..i]) - - if _G["SpellFlyoutButton"..i]:GetChecked() then - _G["SpellFlyoutButton"..i]:SetChecked(nil) - end - end - end -end -SpellFlyout:HookScript("OnShow", SetupFlyoutButton) - - ---Hide the Mouseover texture and attempt to find the ammount of buttons to be skinned -local function styleflyout(self) - if not self.FlyoutArrow then return end - - self.FlyoutBorder:SetAlpha(0) - self.FlyoutBorderShadow:SetAlpha(0) - - SpellFlyoutHorizontalBackground:SetAlpha(0) - SpellFlyoutVerticalBackground:SetAlpha(0) - SpellFlyoutBackgroundEnd:SetAlpha(0) - - for i=1, GetNumFlyouts() do - local x = GetFlyoutID(i) - local _, _, numSlots, isKnown = GetFlyoutInfo(x) - if isKnown then - buttons = numSlots - break - end - end - - --Change arrow direction depending on what bar the button is on - local arrowDistance - if ((SpellFlyout and SpellFlyout:IsShown() and SpellFlyout:GetParent() == self) or GetMouseFocus() == self) then - arrowDistance = 5 - else - arrowDistance = 2 - end - - if self:GetParent():GetParent():GetName() == "SpellBookSpellIconsFrame" then return end - - if self:GetAttribute("flyoutDirection") ~= nil then - local point, _, _, _, _ = self:GetParent():GetParent():GetPoint() - - if strfind(point, "BOTTOM") then - self.FlyoutArrow:ClearAllPoints() - self.FlyoutArrow:SetPoint("TOP", self, "TOP", 0, arrowDistance) - SetClampedTextureRotation(self.FlyoutArrow, 0) - if not InCombatLockdown() then self:SetAttribute("flyoutDirection", "UP") end - else - self.FlyoutArrow:ClearAllPoints() - self.FlyoutArrow:SetPoint("LEFT", self, "LEFT", -arrowDistance, 0) - SetClampedTextureRotation(self.FlyoutArrow, 270) - if not InCombatLockdown() then self:SetAttribute("flyoutDirection", "LEFT") end - end - end -end - --- rework the mouseover, pushed, checked texture to match Tukui theme. -do - for i = 1, 12 do - _G["ActionButton"..i]:StyleButton(true) - _G["MultiBarBottomLeftButton"..i]:StyleButton(true) - _G["MultiBarBottomRightButton"..i]:StyleButton(true) - _G["MultiBarLeftButton"..i]:StyleButton(true) - _G["MultiBarRightButton"..i]:StyleButton(true) - end - - for i=1, 10 do - _G["ShapeshiftButton"..i]:StyleButton(true) - _G["PetActionButton"..i]:StyleButton(true) - end -end - -hooksecurefunc("ActionButton_Update", style) -hooksecurefunc("ActionButton_UpdateHotkeys", updatehotkey) -hooksecurefunc("ActionButton_UpdateFlyout", styleflyout) - ---------------------------------------------------------------- --- Totem Style, they need a lot more work than "normal" buttons --- Because of this, we skin it via separate styling codes --- Special thank's to DarthAndroid ---------------------------------------------------------------- - --- don't continue executing code in this file is not playing a shaman. -if not T.myclass == "SHAMAN" then return end - --- Tex Coords for empty buttons -SLOT_EMPTY_TCOORDS = { - [EARTH_TOTEM_SLOT] = { - left = 66 / 128, - right = 96 / 128, - top = 3 / 256, - bottom = 33 / 256, - }, - [FIRE_TOTEM_SLOT] = { - left = 67 / 128, - right = 97 / 128, - top = 100 / 256, - bottom = 130 / 256, - }, - [WATER_TOTEM_SLOT] = { - left = 39 / 128, - right = 69 / 128, - top = 209 / 256, - bottom = 239 / 256, - }, - [AIR_TOTEM_SLOT] = { - left = 66 / 128, - right = 96 / 128, - top = 36 / 256, - bottom = 66 / 256, - }, -} - -local function StyleTotemFlyout(flyout) - -- remove blizzard flyout texture - flyout.top:SetTexture(nil) - flyout.middle:SetTexture(nil) - - -- Skin buttons - local last = nil - - for _,button in ipairs(flyout.buttons) do - button:SetTemplate("Default") - local icon = select(1,button:GetRegions()) - icon:SetTexCoord(.09,.91,.09,.91) - icon:SetDrawLayer("ARTWORK") - icon:Point("TOPLEFT",button,"TOPLEFT",2,-2) - icon:Point("BOTTOMRIGHT",button,"BOTTOMRIGHT",-2,2) - if not InCombatLockdown() then - button:Size(30,30) - button:ClearAllPoints() - button:Point("BOTTOM",last,"TOP",0,4) - end - if button:IsVisible() then last = button end - button:SetBackdropBorderColor(flyout.parent:GetBackdropBorderColor()) - button:StyleButton() - end - - flyout.buttons[1]:SetPoint("BOTTOM",flyout,"BOTTOM") - - if flyout.type == "slot" then - local tcoords = SLOT_EMPTY_TCOORDS[flyout.parent:GetID()] - flyout.buttons[1].icon:SetTexCoord(tcoords.left,tcoords.right,tcoords.top,tcoords.bottom) - end - - -- Skin Close button - local close = MultiCastFlyoutFrameCloseButton - close:SetTemplate("Default") - close:GetHighlightTexture():SetTexture([[Interface\Buttons\ButtonHilight-Square]]) - close:GetHighlightTexture():Point("TOPLEFT",close,"TOPLEFT",1,-1) - close:GetHighlightTexture():Point("BOTTOMRIGHT",close,"BOTTOMRIGHT",-1,1) - close:GetNormalTexture():SetTexture(nil) - close:ClearAllPoints() - close:Point("BOTTOMLEFT",last,"TOPLEFT",0,4) - close:Point("BOTTOMRIGHT",last,"TOPRIGHT",0,4) - close:Height(8) - - close:SetBackdropBorderColor(last:GetBackdropBorderColor()) - flyout:ClearAllPoints() - flyout:Point("BOTTOM",flyout.parent,"TOP",0,4) -end -hooksecurefunc("MultiCastFlyoutFrame_ToggleFlyout",function(self) StyleTotemFlyout(self) end) - -local function StyleTotemOpenButton(button, parent) - button:GetHighlightTexture():SetTexture(nil) - button:GetNormalTexture():SetTexture(nil) - button:Height(20) - button:ClearAllPoints() - button:Point("BOTTOMLEFT", parent, "TOPLEFT", 0, -3) - button:Point("BOTTOMRIGHT", parent, "TOPRIGHT", 0, -3) - if not button.visibleBut then - button.visibleBut = CreateFrame("Frame",nil,button) - button.visibleBut:Height(8) - button.visibleBut:Width(button:GetWidth() + 2) - button.visibleBut:SetPoint("CENTER") - button.visibleBut.highlight = button.visibleBut:CreateTexture(nil,"HIGHLIGHT") - button.visibleBut.highlight:SetTexture([[Interface\Buttons\ButtonHilight-Square]]) - button.visibleBut.highlight:Point("TOPLEFT",button.visibleBut,"TOPLEFT",1,-1) - button.visibleBut.highlight:Point("BOTTOMRIGHT",button.visibleBut,"BOTTOMRIGHT",-1,1) - button.visibleBut:SetTemplate("Default") - end - - button.visibleBut:SetBackdropBorderColor(parent:GetBackdropBorderColor()) -end -hooksecurefunc("MultiCastFlyoutFrameOpenButton_Show",function(button,_, parent) StyleTotemOpenButton(button, parent) end) - --- the color we use for border -local bordercolors = { - {.23,.45,.13}, -- Earth - {.58,.23,.10}, -- Fire - {.19,.48,.60}, -- Water - {.42,.18,.74}, -- Air -} - -local function StyleTotemSlotButton(button, index) - button:SetTemplate("Default") - button.overlayTex:SetTexture(nil) - button.background:SetDrawLayer("ARTWORK") - button.background:ClearAllPoints() - button.background:Point("TOPLEFT",button,"TOPLEFT",2,-2) - button.background:Point("BOTTOMRIGHT",button,"BOTTOMRIGHT",-2,2) - if not InCombatLockdown() then button:Size(30) end - button:SetBackdropBorderColor(unpack(bordercolors[((index-1) % 4) + 1])) - button:StyleButton() -end -hooksecurefunc("MultiCastSlotButton_Update",function(self, slot) StyleTotemSlotButton(self,tonumber( string.match(self:GetName(),"MultiCastSlotButton(%d)"))) end) - --- Skin the actual totem buttons -local function StyleTotemActionButton(button, index) - local icon = select(1,button:GetRegions()) - icon:SetTexCoord(.09,.91,.09,.91) - icon:SetDrawLayer("ARTWORK") - icon:Point("TOPLEFT",button,"TOPLEFT",2,-2) - icon:Point("BOTTOMRIGHT",button,"BOTTOMRIGHT",-2,2) - button.overlayTex:SetTexture(nil) - button.overlayTex:Hide() - button:GetNormalTexture():SetTexCoord(0,0,0,0) - if not InCombatLockdown() and button.slotButton then - button:ClearAllPoints() - button:SetAllPoints(button.slotButton) - button:SetFrameLevel(button.slotButton:GetFrameLevel()+1) - end - button:SetBackdropBorderColor(unpack(bordercolors[((index-1) % 4) + 1])) - button:SetBackdropColor(0,0,0,0) - button:StyleButton(true) -end -hooksecurefunc("MultiCastActionButton_Update",function(actionButton, actionId, actionIndex, slot) StyleTotemActionButton(actionButton,actionIndex) end) - --- Skin the summon and recall buttons -local function StyleTotemSpellButton(button, index) - if not button then return end - local icon = select(1,button:GetRegions()) - icon:SetTexCoord(.09,.91,.09,.91) - icon:SetDrawLayer("ARTWORK") - icon:Point("TOPLEFT",button,"TOPLEFT",2,-2) - icon:Point("BOTTOMRIGHT",button,"BOTTOMRIGHT",-2,2) - button:SetTemplate("Default") - button:GetNormalTexture():SetTexture(nil) - if not InCombatLockdown() then button:Size(30, 30) end - _G[button:GetName().."Highlight"]:SetTexture(nil) - _G[button:GetName().."NormalTexture"]:SetTexture(nil) - button:StyleButton() -end -hooksecurefunc("MultiCastSummonSpellButton_Update", function(self) StyleTotemSpellButton(self,0) end) -hooksecurefunc("MultiCastRecallSpellButton_Update", function(self) StyleTotemSpellButton(self,5) end) \ No newline at end of file diff --git a/Tukui/modules/actionbars/buttons.lua b/Tukui/modules/actionbars/buttons.lua deleted file mode 100644 index f536e3c..0000000 --- a/Tukui/modules/actionbars/buttons.lua +++ /dev/null @@ -1,321 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function ShowOrHideBar(bar, button) - local db = TukuiDataPerChar - - if bar:IsShown() then - if bar == TukuiBar5 and T.lowversion then - if button == TukuiBar5ButtonTop then - if TukuiBar7:IsShown() then - TukuiBar7:Hide() - bar:SetWidth((T.buttonsize * 2) + (T.buttonspacing * 3)) - db.hidebar7 = true - elseif TukuiBar6:IsShown() then - TukuiBar6:Hide() - bar:SetWidth((T.buttonsize * 1) + (T.buttonspacing * 2)) - db.hidebar6 = true - else - bar:Hide() - end - else - if button == TukuiBar5ButtonBottom then - if not bar:IsShown() then - bar:Show() - bar:SetWidth((T.buttonsize * 1) + (T.buttonspacing * 2)) - elseif not TukuiBar6:IsShown() then - TukuiBar6:Show() - bar:SetWidth((T.buttonsize * 2) + (T.buttonspacing * 3)) - db.hidebar6 = false - else - TukuiBar7:Show() - bar:SetWidth((T.buttonsize * 3) + (T.buttonspacing * 4)) - db.hidebar7 = false - end - end - end - else - bar:Hide() - end - - -- for bar 2+3+4, high reso only - if bar == TukuiBar4 then - TukuiBar1:SetHeight((T.buttonsize * 1) + (T.buttonspacing * 2)) - TukuiBar2:SetHeight(TukuiBar1:GetHeight()) - TukuiBar3:SetHeight(TukuiBar1:GetHeight()) - TukuiBar2Button:SetHeight(TukuiBar1:GetHeight()) - TukuiBar3Button:SetHeight(TukuiBar1:GetHeight()) - if not T.lowversion then - for i = 7, 12 do - local left = _G["MultiBarBottomLeftButton"..i] - local right = _G["MultiBarBottomRightButton"..i] - left:SetAlpha(0) - right:SetAlpha(0) - end - end - end - else - if bar == TukuiBar5 and T.lowversion then - if TukuiBar7:IsShown() then - TukuiBar7:Show() - TukuiBar5:SetWidth((T.buttonsize * 3) + (T.buttonspacing * 4)) - elseif TukuiBar6:IsShown() then - TukuiBar6:Show() - TukuiBar5:SetWidth((T.buttonsize * 2) + (T.buttonspacing * 3)) - else - bar:Show() - end - else - bar:Show() - end - - -- for bar 2+3+4, high reso only - if bar == TukuiBar4 then - TukuiBar1:SetHeight((T.buttonsize * 2) + (T.buttonspacing * 3)) - TukuiBar2:SetHeight(TukuiBar4:GetHeight()) - TukuiBar3:SetHeight(TukuiBar4:GetHeight()) - TukuiBar2Button:SetHeight(TukuiBar2:GetHeight()) - TukuiBar3Button:SetHeight(TukuiBar3:GetHeight()) - if not T.lowversion then - for i = 7, 12 do - local left = _G["MultiBarBottomLeftButton"..i] - local right = _G["MultiBarBottomRightButton"..i] - left:SetAlpha(1) - right:SetAlpha(1) - end - end - end - end -end - -local function MoveButtonBar(button, bar) - local db = TukuiDataPerChar - - if button == TukuiBar2Button then - if bar:IsShown() then - db.hidebar2 = false - button:ClearAllPoints() - button:Point("BOTTOMRIGHT", TukuiBar2, "BOTTOMLEFT", -2, 0) - button.text:SetText("|cff4BAF4C>|r") - else - db.hidebar2 = true - button:ClearAllPoints() - button:Point("BOTTOMRIGHT", TukuiBar1, "BOTTOMLEFT", -2, 0) - button.text:SetText("|cff4BAF4C<|r") - end - end - - if button == TukuiBar3Button then - if bar:IsShown() then - db.hidebar3 = false - button:ClearAllPoints() - button:Point("BOTTOMLEFT", TukuiBar3, "BOTTOMRIGHT", 2, 0) - button.text:SetText("|cff4BAF4C<|r") - else - db.hidebar3 = true - button:ClearAllPoints() - button:Point("BOTTOMLEFT", TukuiBar1, "BOTTOMRIGHT", 2, 0) - button.text:SetText("|cff4BAF4C>|r") - end - end - - if button == TukuiBar4Button then - if bar:IsShown() then - db.hidebar4 = false - button.text:SetText("|cff4BAF4C- - - - - -|r") - else - db.hidebar4 = true - button.text:SetText("|cff4BAF4C+ + + + + +|r") - end - end - - if button == TukuiBar5ButtonTop or button == TukuiBar5ButtonBottom then - local buttontop = TukuiBar5ButtonTop - local buttonbot = TukuiBar5ButtonBottom - if bar:IsShown() then - db.hidebar5 = false - buttontop:ClearAllPoints() - buttontop:Size(bar:GetWidth(), 17) - buttontop:Point("BOTTOM", bar, "TOP", 0, 2) - if not T.lowversion then buttontop.text:SetText("|cff4BAF4C>|r") end - buttonbot:ClearAllPoints() - buttonbot:Size(bar:GetWidth(), 17) - buttonbot:Point("TOP", bar, "BOTTOM", 0, -2) - if not T.lowversion then buttonbot.text:SetText("|cff4BAF4C>|r") end - - -- move the pet - TukuiPetBar:ClearAllPoints() - TukuiPetBar:Point("RIGHT", bar, "LEFT", -6, 0) - else - db.hidebar5 = true - buttonbot:ClearAllPoints() - buttonbot:SetSize(TukuiLineToPetActionBarBackground:GetWidth(), TukuiLineToPetActionBarBackground:GetHeight()) - buttonbot:Point("LEFT", TukuiPetBar, "RIGHT", 2, 0) - if not T.lowversion then buttonbot.text:SetText("|cff4BAF4C<|r") end - buttontop:ClearAllPoints() - buttontop:SetSize(TukuiLineToPetActionBarBackground:GetWidth(), TukuiLineToPetActionBarBackground:GetHeight()) - buttontop:Point("LEFT", TukuiPetBar, "RIGHT", 2, 0) - if not T.lowversion then buttontop.text:SetText("|cff4BAF4C<|r") end - - -- move the pet - TukuiPetBar:ClearAllPoints() - TukuiPetBar:Point("RIGHT", UIParent, "RIGHT", -23, -14) - end - end -end - -local function UpdateBar(self, bar) -- guess what! :P - if InCombatLockdown() then print(ERR_NOT_IN_COMBAT) return end - - local button = self - - ShowOrHideBar(bar, button) - MoveButtonBar(button, bar) -end - -local TukuiBar2Button = CreateFrame("Button", "TukuiBar2Button", UIParent) -TukuiBar2Button:Width(17) -TukuiBar2Button:SetHeight(TukuiBar2:GetHeight()) -if T.lowversion then - TukuiBar2Button:Point("BOTTOMRIGHT", TukuiBar1, "BOTTOMLEFT", -2, 0) -else - TukuiBar2Button:Point("BOTTOMRIGHT", TukuiBar2, "BOTTOMLEFT", -2, 0) -end -TukuiBar2Button:SetTemplate("Default") -TukuiBar2Button:RegisterForClicks("AnyUp") -TukuiBar2Button:SetAlpha(0) -TukuiBar2Button:SetScript("OnClick", function(self) UpdateBar(self, TukuiBar2) end) -TukuiBar2Button:SetScript("OnEnter", function(self) self:SetAlpha(1) end) -TukuiBar2Button:SetScript("OnLeave", function(self) self:SetAlpha(0) end) -TukuiBar2Button.text = T.SetFontString(TukuiBar2Button, C.media.uffont, 20) -TukuiBar2Button.text:Point("CENTER", 1, 1) -TukuiBar2Button.text:SetText("|cff4BAF4C>|r") - -local TukuiBar3Button = CreateFrame("Button", "TukuiBar3Button", UIParent) -TukuiBar3Button:Width(17) -TukuiBar3Button:SetHeight(TukuiBar3:GetHeight()) -if T.lowversion then - TukuiBar3Button:Point("BOTTOMLEFT", TukuiBar1, "BOTTOMRIGHT", 2, 0) -else - TukuiBar3Button:Point("BOTTOMLEFT", TukuiBar3, "BOTTOMRIGHT", 2, 0) -end -TukuiBar3Button:SetTemplate("Default") -TukuiBar3Button:RegisterForClicks("AnyUp") -TukuiBar3Button:SetAlpha(0) -TukuiBar3Button:SetScript("OnClick", function(self) UpdateBar(self, TukuiBar3) end) -TukuiBar3Button:SetScript("OnEnter", function(self) self:SetAlpha(1) end) -TukuiBar3Button:SetScript("OnLeave", function(self) self:SetAlpha(0) end) -TukuiBar3Button.text = T.SetFontString(TukuiBar3Button, C.media.uffont, 20) -TukuiBar3Button.text:Point("CENTER", 1, 1) -TukuiBar3Button.text:SetText("|cff4BAF4C<|r") - -local TukuiBar4Button = CreateFrame("Button", "TukuiBar4Button", UIParent) -TukuiBar4Button:SetWidth(TukuiBar1:GetWidth()) -TukuiBar4Button:Height(10) -TukuiBar4Button:Point("TOP", TukuiBar1, "BOTTOM", 0, -2) -TukuiBar4Button:SetTemplate("Default") -TukuiBar4Button:RegisterForClicks("AnyUp") -TukuiBar4Button:SetAlpha(0) -TukuiBar4Button:SetScript("OnClick", function(self) UpdateBar(self, TukuiBar4) end) -TukuiBar4Button:SetScript("OnEnter", function(self) self:SetAlpha(1) end) -TukuiBar4Button:SetScript("OnLeave", function(self) self:SetAlpha(0) end) -TukuiBar4Button.text = T.SetFontString(TukuiBar4Button, C.media.uffont, 30) -TukuiBar4Button.text:SetPoint("CENTER", 0, 0) -TukuiBar4Button.text:SetText("|cff4BAF4C- - - - - -|r") - -local TukuiBar5ButtonTop = CreateFrame("Button", "TukuiBar5ButtonTop", UIParent) -TukuiBar5ButtonTop:SetWidth(TukuiBar5:GetWidth()) -TukuiBar5ButtonTop:Height(17) -TukuiBar5ButtonTop:Point("BOTTOM", TukuiBar5, "TOP", 0, 2) -TukuiBar5ButtonTop:SetTemplate("Default") -TukuiBar5ButtonTop:RegisterForClicks("AnyUp") -TukuiBar5ButtonTop:SetAlpha(0) -TukuiBar5ButtonTop:SetScript("OnClick", function(self) UpdateBar(self, TukuiBar5) end) -TukuiBar5ButtonTop:SetScript("OnEnter", function(self) self:SetAlpha(1) end) -TukuiBar5ButtonTop:SetScript("OnLeave", function(self) self:SetAlpha(0) end) -TukuiBar5ButtonTop.text = T.SetFontString(TukuiBar5ButtonTop, C.media.uffont, 20) -TukuiBar5ButtonTop.text:Point("CENTER", 1, 1) -TukuiBar5ButtonTop.text:SetText("|cff4BAF4C>|r") - -local TukuiBar5ButtonBottom = CreateFrame("Button", "TukuiBar5ButtonBottom", UIParent) -TukuiBar5ButtonBottom:SetFrameLevel(TukuiBar5ButtonTop:GetFrameLevel() + 1) -TukuiBar5ButtonBottom:SetWidth(TukuiBar5:GetWidth()) -TukuiBar5ButtonBottom:Height(17) -TukuiBar5ButtonBottom:Point("TOP", TukuiBar5, "BOTTOM", 0, -2) -TukuiBar5ButtonBottom:SetTemplate("Default") -TukuiBar5ButtonBottom:RegisterForClicks("AnyUp") -TukuiBar5ButtonBottom:SetAlpha(0) -TukuiBar5ButtonBottom:SetScript("OnClick", function(self) UpdateBar(self, TukuiBar5) end) -TukuiBar5ButtonBottom:SetScript("OnEnter", function(self) self:SetAlpha(1) end) -TukuiBar5ButtonBottom:SetScript("OnLeave", function(self) self:SetAlpha(0) end) -TukuiBar5ButtonBottom.text = T.SetFontString(TukuiBar5ButtonBottom, C.media.uffont, 20) -TukuiBar5ButtonBottom.text:Point("CENTER", 1, 1) -if T.lowversion then TukuiBar5ButtonBottom.text:SetText("|cff4BAF4C<|r") else TukuiBar5ButtonBottom.text:SetText("|cff4BAF4C>|r") end - --- exit vehicle button on left side of bottom action bar -local vehicleleft = CreateFrame("Button", "TukuiExitVehicleButtonLeft", UIParent, "SecureHandlerClickTemplate") -vehicleleft:SetAllPoints(TukuiBar2Button) -vehicleleft:SetFrameStrata(TukuiBar2Button:GetFrameStrata()) -vehicleleft:SetFrameLevel(TukuiBar2Button:GetFrameLevel() + 1) -vehicleleft:SetTemplate("Default") -vehicleleft:SetBackdropBorderColor(75/255, 175/255, 76/255) -vehicleleft:RegisterForClicks("AnyUp") -vehicleleft:SetScript("OnClick", function() VehicleExit() end) -vehicleleft.text = T.SetFontString(vehicleleft, C.media.uffont, 20) -vehicleleft.text:Point("CENTER", 1, 1) -vehicleleft.text:SetText("|cff4BAF4CV|r") -RegisterStateDriver(vehicleleft, "visibility", "[target=vehicle,exists] show;hide") - --- exit vehicle button on right side of bottom action bar -local vehicleright = CreateFrame("Button", "TukuiExitVehicleButtonRight", UIParent, "SecureHandlerClickTemplate") -vehicleright:SetAllPoints(TukuiBar3Button) -vehicleright:SetTemplate("Default") -vehicleright:SetFrameStrata(TukuiBar3Button:GetFrameStrata()) -vehicleright:SetFrameLevel(TukuiBar3Button:GetFrameLevel() + 1) -vehicleright:SetBackdropBorderColor(75/255, 175/255, 76/255) -vehicleright:RegisterForClicks("AnyUp") -vehicleright:SetScript("OnClick", function() VehicleExit() end) -vehicleright.text = T.SetFontString(vehicleright, C.media.uffont, 20) -vehicleright.text:Point("CENTER", 1, 1) -vehicleright.text:SetText("|cff4BAF4CV|r") -RegisterStateDriver(vehicleright, "visibility", "[target=vehicle,exists] show;hide") - -local init = CreateFrame("Frame") -init:RegisterEvent("VARIABLES_LOADED") -init:SetScript("OnEvent", function(self, event) - if not TukuiDataPerChar then TukuiDataPerChar = {} end - local db = TukuiDataPerChar - - if not T.lowversion and db.hidebar2 then - UpdateBar(TukuiBar2Button, TukuiBar2) - end - - if not T.lowversion and db.hidebar3 then - UpdateBar(TukuiBar3Button, TukuiBar3) - end - - if db.hidebar4 then - UpdateBar(TukuiBar4Button, TukuiBar4) - end - - if T.lowversion then - -- because we use bar6.lua and bar7.lua with TukuiBar5Button for lower reso. - TukuiBar2Button:Hide() - TukuiBar3Button:Hide() - if db.hidebar7 then - TukuiBar7:Hide() - TukuiBar5:SetWidth((T.buttonsize * 2) + (T.buttonspacing * 3)) - end - - if db.hidebar6 then - TukuiBar6:Hide() - TukuiBar5:SetWidth((T.buttonsize * 1) + (T.buttonspacing * 2)) - end - - TukuiBar5ButtonTop:SetWidth(TukuiBar5:GetWidth()) - TukuiBar5ButtonBottom:SetWidth(TukuiBar5:GetWidth()) - end - - if db.hidebar5 then - UpdateBar(TukuiBar5ButtonTop, TukuiBar5) - end -end) \ No newline at end of file diff --git a/Tukui/modules/bags/bags.lua b/Tukui/modules/bags/bags.lua deleted file mode 100644 index 34f3dc7..0000000 --- a/Tukui/modules/bags/bags.lua +++ /dev/null @@ -1,1400 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - --- NOTE for myself, this will need a total rewrite for MoP. --- This bag script has become out of control - ---[[ - A featureless, 'pure' version of Stuffing. - This version should work on absolutely everything, - but I've removed pretty much all of the options. - - All credits of this bags script is by Stuffing and his author Hungtar. - Special Thank's to Hungtar to allow me to use his bag mod for T. ---]] - -if not C["bags"].enable == true then return end - -local bags_BACKPACK = {0, 1, 2, 3, 4} -local bags_BANK = {-1, 5, 6, 7, 8, 9, 10, 11} -local BAGSFONT = C["media"].font -local ST_NORMAL = 1 -local ST_FISHBAG = 2 -local ST_SPECIAL = 3 -local bag_bars = 0 - --- hide bags options in default interface -InterfaceOptionsDisplayPanelShowFreeBagSpace:Hide() - -Stuffing = CreateFrame ("Frame", nil, UIParent) -Stuffing:RegisterEvent("ADDON_LOADED") -Stuffing:RegisterEvent("PLAYER_ENTERING_WORLD") -Stuffing:SetScript("OnEvent", function(this, event, ...) - Stuffing[event](this, ...) -end) - --- stub for localization. -local Loc = setmetatable({}, { - __index = function (t, v) - t[v] = v - return v - end -}) - - -local function Print (x) - DEFAULT_CHAT_FRAME:AddMessage("|cffC495DDTukui:|r " .. x) -end - -local function Stuffing_Sort(args) - if not args then - args = "" - end - - Stuffing.itmax = 0 - Stuffing:SetBagsForSorting(args) - Stuffing:SortBags() -end - - -local function Stuffing_OnShow() - Stuffing:PLAYERBANKSLOTS_CHANGED(29) -- XXX: hack to force bag frame update - - Stuffing:Layout() - Stuffing:SearchReset() -end - - -local function StuffingBank_OnHide() - CloseBankFrame() - if Stuffing.frame:IsShown() then - Stuffing.frame:Hide() - end -end - - -local function Stuffing_OnHide() - if Stuffing.bankFrame and Stuffing.bankFrame:IsShown() then - Stuffing.bankFrame:Hide() - end -end - - -local function Stuffing_Open() - Stuffing.frame:Show() -end - - -local function Stuffing_Close() - Stuffing.frame:Hide() -end - - -local function Stuffing_Toggle() - if Stuffing.frame:IsShown() then - Stuffing.frame:Hide() - else - Stuffing.frame:Show() - end -end - - -local function Stuffing_ToggleBag(id) - if id == -2 then - ToggleKeyRing() - return - end - Stuffing_Toggle() -end - - --- --- bag slot stuff --- -local trashParent = CreateFrame("Frame", nil, UIParent) -local trashButton = {} -local trashBag = {} - --- for the tooltip frame used to scan item tooltips -local StuffingTT = nil - --- mostly from carg.bags_Aurora -local QUEST_ITEM_STRING = nil - -function Stuffing:SlotUpdate(b) - local texture, count, locked = GetContainerItemInfo (b.bag, b.slot) - local clink = GetContainerItemLink(b.bag, b.slot) - - -- set all slot color to default tukui on update - if not b.frame.lock then - b.frame:SetBackdropBorderColor(unpack(C.media.bordercolor)) - end - - if b.Cooldown then - local cd_start, cd_finish, cd_enable = GetContainerItemCooldown(b.bag, b.slot) - CooldownFrame_SetTimer(b.Cooldown, cd_start, cd_finish, cd_enable) - end - - if(clink) then - local iType - b.name, _, b.rarity, _, _, iType = GetItemInfo(clink) - - -- color slot according to item quality - if not b.frame.lock and b.rarity and b.rarity > 1 then - b.frame:SetBackdropBorderColor(GetItemQualityColor(b.rarity)) - end - - if not StuffingTT then - StuffingTT = CreateFrame("GameTooltip", "StuffingTT", nil, "GameTooltipTemplate") - StuffingTT:Hide() - end - - if QUEST_ITEM_STRING == nil then - -- GetItemInfo returns a localized item type. - -- this is to figure out what that string is. - local t = {GetAuctionItemClasses()} - QUEST_ITEM_STRING = t[#t] -- #t == 12 - end - - -- load tooltip, check if ITEM_BIND_QUEST ("Quest Item") is in it. - -- If the tooltip says its a quest item, we assume it is a quest item - -- and ignore the item type from GetItemInfo. - StuffingTT:SetOwner(WorldFrame, "ANCHOR_NONE") - StuffingTT:ClearLines() - StuffingTT:SetBagItem(b.bag, b.slot) - for i = 1, StuffingTT:NumLines() do - local txt = getglobal("StuffingTTTextLeft" .. i) - if txt then - local text = txt:GetText() - if string.find (txt:GetText(), ITEM_BIND_QUEST) then - iType = QUEST_ITEM_STRING - end - end - end - - if iType and iType == QUEST_ITEM_STRING then - b.qitem = true - -- color quest item red - if not b.frame.lock then b.frame:SetBackdropBorderColor(1.0, 0.3, 0.3) end - else - b.qitem = nil - end - else - b.name, b.rarity, b.qitem = nil, nil, nil - end - - SetItemButtonTexture(b.frame, texture) - SetItemButtonCount(b.frame, count) - SetItemButtonDesaturated(b.frame, locked, 0.5, 0.5, 0.5) - - b.frame:Show() -end - - -function Stuffing:BagSlotUpdate(bag) - if not self.buttons then - return - end - - for _, v in ipairs (self.buttons) do - if v.bag == bag then - self:SlotUpdate(v) - end - end -end - - -function Stuffing:BagFrameSlotNew (slot, p) - for _, v in ipairs(self.bagframe_buttons) do - if v.slot == slot then - --print ("found " .. slot) - return v, false - end - end - - --print ("new " .. slot) - local ret = {} - local tpl - - if slot > 3 then - ret.slot = slot - slot = slot - 4 - tpl = "BankItemButtonBagTemplate" - ret.frame = CreateFrame("CheckButton", "TukuiBankBag" .. slot, p, tpl) - ret.frame:StyleButton() - ret.frame:SetTemplate("Default") - local icon = _G["TukuiBankBag" .. slot .. "IconTexture"] - local border = _G["TukuiBankBag" .. slot .. "NormalTexture"] - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - border:SetTexture("") - ret.frame:SetID(slot + 4) - table.insert(self.bagframe_buttons, ret) - - BankFrameItemButton_Update(ret.frame) - BankFrameItemButton_UpdateLocked(ret.frame) - - if not ret.frame.tooltipText then - ret.frame.tooltipText = "" - end - else - tpl = "BagSlotButtonTemplate" - ret.frame = CreateFrame("CheckButton", "TukuiBackBag" .. slot .. "Slot", p, tpl) - ret.frame:StyleButton() - ret.frame:SetTemplate("Default") - local icon = _G["TukuiBackBag" .. slot .. "SlotIconTexture"] - local border = _G["TukuiBackBag" .. slot .. "SlotNormalTexture"] - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - border:SetTexture("") - ret.slot = slot - table.insert(self.bagframe_buttons, ret) - end - - return ret -end - - -function Stuffing:SlotNew (bag, slot) - for _, v in ipairs(self.buttons) do - if v.bag == bag and v.slot == slot then - return v, false - end - end - - local tpl = "ContainerFrameItemButtonTemplate" - - if bag == -1 then - tpl = "BankItemButtonGenericTemplate" - end - - local ret = {} - - if #trashButton > 0 then - local f = -1 - for i, v in ipairs(trashButton) do - local b, s = v:GetName():match("(%d+)_(%d+)") - - b = tonumber(b) - s = tonumber(s) - - --print (b .. " " .. s) - if b == bag and s == slot then - f = i - break - end - end - - if f ~= -1 then - --print("found it") - ret.frame = trashButton[f] - table.remove(trashButton, f) - end - end - - if not ret.frame then - ret.frame = CreateFrame("Button", "TukuiBag_" .. bag .. "_" .. slot, self.bags[bag], tpl) - ret.frame:SetTemplate() - ret.frame:Height(31) - ret.frame:Width(31) - ret.frame:SetPushedTexture("") - ret.frame:SetNormalTexture("") - ret.frame:StyleButton() - end - - ret.bag = bag - ret.slot = slot - ret.frame:SetID(slot) - - ret.Cooldown = _G[ret.frame:GetName() .. "Cooldown"] - ret.Cooldown:Show() - - self:SlotUpdate (ret) - - return ret, true -end - - --- from OneBag - -local BAGTYPE_PROFESSION = 0x0008 + 0x0010 + 0x0020 + 0x0040 + 0x0080 + 0x0200 + 0x0400 -local BAGTYPE_FISHING = 32768 - -function Stuffing:BagType(bag) - local bagType = select(2, GetContainerNumFreeSlots(bag)) - - if bit.band(bagType, BAGTYPE_FISHING) > 0 then - return ST_FISHBAG - elseif bit.band(bagType, BAGTYPE_PROFESSION) > 0 then - return ST_SPECIAL - end - - return ST_NORMAL -end - - -function Stuffing:BagNew (bag, f) - for i, v in pairs(self.bags) do - if v:GetID() == bag then - v.bagType = self:BagType(bag) - return v - end - end - - local ret - - if #trashBag > 0 then - local f = -1 - for i, v in pairs(trashBag) do - if v:GetID() == bag then - f = i - break - end - end - - if f ~= -1 then - --print("found bag " .. bag) - ret = trashBag[f] - table.remove(trashBag, f) - ret:Show() - ret.bagType = self:BagType(bag) - return ret - end - end - - --print("new bag " .. bag) - ret = CreateFrame("Frame", "StuffingBag" .. bag, f) - ret.bagType = self:BagType(bag) - - ret:SetID(bag) - return ret -end - - -function Stuffing:SearchUpdate(str) - str = string.lower(str) - - for _, b in ipairs(self.buttons) do - if b.frame and not b.name then - b.frame:SetAlpha(.2) - end - if b.name then - if not string.find (string.lower(b.name), str, 1, true) then - SetItemButtonDesaturated(b.frame, 1, 1, 1, 1) - b.frame:SetAlpha(.2) - else - SetItemButtonDesaturated(b.frame, 0, 1, 1, 1) - b.frame:SetAlpha(1) - end - end - end -end - - -function Stuffing:SearchReset() - for _, b in ipairs(self.buttons) do - b.frame:SetAlpha(1) - SetItemButtonDesaturated(b.frame, 0, 1, 1, 1) - end -end - --- drop down menu stuff from Postal -local Stuffing_DDMenu = CreateFrame("Frame", "Stuffing_DropDownMenu") -Stuffing_DDMenu.displayMode = "MENU" -Stuffing_DDMenu.info = {} -Stuffing_DDMenu.HideMenu = function() - if UIDROPDOWNMENU_OPEN_MENU == Stuffing_DDMenu then - CloseDropDownMenus() - end -end - -function Stuffing:CreateBagFrame(w) - local n = "Tukui" .. w - local f = CreateFrame ("Frame", n, UIParent) - f:EnableMouse(1) - f:SetMovable(1) - f:SetToplevel(1) - f:SetFrameStrata("HIGH") - f:SetFrameLevel(20) - - if w == "Bank" then - f:Point("BOTTOMLEFT", TukuiInfoLeft, "TOPLEFT", 0, 5) - else - f:Point("BOTTOMRIGHT", TukuiInfoRight, "TOPRIGHT", 0, 5) - end - - -- close button - f.b_close = CreateFrame("Button", "Stuffing_CloseButton" .. w, f, "UIPanelCloseButton") - f.b_close:Width(32) - f.b_close:Height(32) - f.b_close:Point("TOPRIGHT", -1, -3) - f.b_close:SetScript("OnClick", function(self, btn) - if self:GetParent():GetName() == "TukuiBags" and btn == "RightButton" then - if Stuffing_DDMenu.initialize ~= Stuffing.Menu then - CloseDropDownMenus() - Stuffing_DDMenu.initialize = Stuffing.Menu - end - ToggleDropDownMenu(1, nil, Stuffing_DDMenu, self:GetName(), 0, 0) - return - end - self:GetParent():Hide() - end) - f.b_close:RegisterForClicks("AnyUp") - f.b_close:SetNormalTexture("") - f.b_close:SetPushedTexture("") - f.b_close:SetHighlightTexture("") - f.b_close.t = f.b_close:CreateFontString(nil, "OVERLAY") - f.b_close.t:SetFont(C.media.pixelfont, 12, "MONOCHROME") - f.b_close.t:SetPoint("CENTER", 0, 1) - f.b_close.t:SetText("X") - - -- create the bags frame - local fb = CreateFrame ("Frame", n .. "BagsFrame", f) - fb:Point("BOTTOMLEFT", f, "TOPLEFT", 0, 2) - fb:SetFrameStrata("HIGH") - f.bags_frame = fb - - return f -end - - -function Stuffing:InitBank() - if self.bankFrame then - return - end - - local f = self:CreateBagFrame("Bank") - f:SetScript("OnHide", StuffingBank_OnHide) - self.bankFrame = f -end - - -local parent_startmoving = function(self) - StartMoving(self:GetParent()) -end - - -local parent_stopmovingorsizing = function (self) - StopMoving(self:GetParent()) -end - - -function Stuffing:InitBags() - if self.frame then - return - end - - self.buttons = {} - self.bags = {} - self.bagframe_buttons = {} - - local f = self:CreateBagFrame("Bags") - f:SetScript("OnShow", Stuffing_OnShow) - f:SetScript("OnHide", Stuffing_OnHide) - - -- search editbox (tekKonfigAboutPanel.lua) - local editbox = CreateFrame("EditBox", nil, f) - editbox:Hide() - editbox:SetAutoFocus(true) - editbox:Height(32) - editbox:SetTemplate("Default") - - local resetAndClear = function (self) - self:GetParent().detail:Show() - self:GetParent().gold:Show() - self:ClearFocus() - Stuffing:SearchReset() - end - - local updateSearch = function(self, t) - if t == true then - Stuffing:SearchUpdate(self:GetText()) - end - end - - editbox:SetScript("OnEscapePressed", resetAndClear) - editbox:SetScript("OnEnterPressed", resetAndClear) - editbox:SetScript("OnEditFocusLost", editbox.Hide) - editbox:SetScript("OnEditFocusGained", editbox.HighlightText) - editbox:SetScript("OnTextChanged", updateSearch) - editbox:SetText(L.bags_search) - - - local detail = f:CreateFontString(nil, "ARTWORK", "GameFontHighlightLarge") - detail:Point("TOPLEFT", f, 12, -10) - detail:Point("RIGHT",-(16 + 24), 0) - detail:SetJustifyH("LEFT") - detail:SetText("|cff9999ff" .. "Search") - editbox:SetAllPoints(detail) - - local gold = f:CreateFontString(nil, "ARTWORK", "GameFontHighlightLarge") - gold:SetJustifyH("RIGHT") - gold:Point("RIGHT", f.b_close, "LEFT", -3, 0) - - f:SetScript("OnEvent", function (self, e) - self.gold:SetText(GetMoneyString(GetMoney(), 12)) - end) - - f:RegisterEvent("PLAYER_MONEY") - f:RegisterEvent("PLAYER_LOGIN") - f:RegisterEvent("PLAYER_TRADE_MONEY") - f:RegisterEvent("TRADE_MONEY_CHANGED") - - local OpenEditbox = function(self) - self:GetParent().detail:Hide() - self:GetParent().gold:Hide() - self:GetParent().editbox:Show() - self:GetParent().editbox:HighlightText() - end - - local button = CreateFrame("Button", nil, f) - button:EnableMouse(1) - button:RegisterForClicks("LeftButtonUp", "RightButtonUp") - button:SetAllPoints(detail) - button:SetScript("OnClick", function(self, btn) - if btn == "RightButton" then - OpenEditbox(self) - else - if self:GetParent().editbox:IsShown() then - self:GetParent().editbox:Hide() - self:GetParent().editbox:ClearFocus() - self:GetParent().detail:Show() - self:GetParent().gold:Show() - Stuffing:SearchReset() - end - end - end) - - local tooltip_hide = function() - GameTooltip:Hide() - end - - local tooltip_show = function (self) - GameTooltip:SetOwner(self, "ANCHOR_CURSOR") - GameTooltip:ClearLines() - GameTooltip:SetText(L.bags_rightclick_search) - end - - button:SetScript("OnEnter", tooltip_show) - button:SetScript("OnLeave", tooltip_hide) - - f.editbox = editbox - f.detail = detail - f.button = button - f.gold = gold - self.frame = f - f:Hide() -end - - -function Stuffing:Layout(lb) - local slots = 0 - local rows = 0 - local off = 26 - local cols - local f - local bs - - if lb then - bs = bags_BANK - if T.InfoLeftRightWidth >= 405 then - cols = 11 - elseif T.InfoLeftRightWidth >= 370 and T.InfoLeftRightWidth < 405 then - cols = 10 - elseif T.InfoLeftRightWidth >= 335 and T.InfoLeftRightWidth < 370 then - cols = 9 - else - cols = 8 - end - f = self.bankFrame - else - bs = bags_BACKPACK - if T.InfoLeftRightWidth >= 405 then - cols = 11 - elseif T.InfoLeftRightWidth >= 370 and T.InfoLeftRightWidth < 405 then - cols = 10 - elseif T.InfoLeftRightWidth >= 335 and T.InfoLeftRightWidth < 370 then - cols = 9 - else - cols = 8 - end - f = self.frame - - f.gold:SetText(GetMoneyString(GetMoney(), 12)) - f.editbox:SetFont(BAGSFONT, 12) - f.detail:SetFont(BAGSFONT, 12) - f.gold:SetFont(BAGSFONT, 12) - - f.detail:ClearAllPoints() - f.detail:Point("TOPLEFT", f, 12, -10) - f.detail:Point("RIGHT", -(16 + 24), 0) - end - - f:SetClampedToScreen(1) - f:SetTemplate("Default") - - - -- bag frame stuff - local fb = f.bags_frame - if bag_bars == 1 then - fb:SetTemplate("Default") - - local bsize = 30 - if lb then bsize = 37 end - - fb:Height(bsize + 16) - fb:Width(f:GetWidth()) - fb:Show() - else - fb:Hide() - end - - - - local idx = 0 - for _, v in ipairs(bs) do - if (not lb and v <= 3 ) or (lb and v ~= -1) then - local bsize = 30 - if lb then bsize = 37 end - - local b = self:BagFrameSlotNew(v, fb) - - local xoff = 12 - - xoff = xoff + (idx * bsize) -- 31) - xoff = xoff + (idx * 4) - - b.frame:ClearAllPoints() - b.frame:Point("LEFT", fb, "LEFT", xoff, 0) - b.frame:Show() - - - idx = idx + 1 - end - end - - - for _, i in ipairs(bs) do - local x = GetContainerNumSlots(i) - if x > 0 then - if not self.bags[i] then - self.bags[i] = self:BagNew(i, f) - end - - slots = slots + GetContainerNumSlots(i) - end - end - - - rows = floor (slots / cols) - if (slots % cols) ~= 0 then - rows = rows + 1 - end - - f:Width(cols * 31 + (cols - 1) * 4 + 12 * 2) - f:Height(rows * 31 + (rows - 1) * 4 + off + 12 * 2) - - - local idx = 0 - for _, i in ipairs(bs) do - local bag_cnt = GetContainerNumSlots(i) - - if bag_cnt > 0 then - self.bags[i] = self:BagNew(i, f) - local bagType = self.bags[i].bagType - - self.bags[i]:Show() - for j = 1, bag_cnt do - local b, isnew = self:SlotNew (i, j) - local xoff - local yoff - local x = (idx % cols) - local y = floor(idx / cols) - - if isnew then - table.insert(self.buttons, idx + 1, b) - end - - xoff = 12 + (x * 31) - + (x * 4) - - yoff = off + 12 + (y * 31) - + ((y - 1) * 4) - yoff = yoff * -1 - - b.frame:ClearAllPoints() - b.frame:Point("TOPLEFT", f, "TOPLEFT", xoff, yoff) - - b.frame:Show() - - -- color fish bag border slot to red - if bagType == ST_FISHBAG then b.frame:SetBackdropBorderColor(1, 0, 0) b.frame.lock = true end - -- color profession bag slot border ~yellow - if bagType == ST_SPECIAL then b.frame:SetBackdropBorderColor(255/255, 243/255, 82/255) b.frame.lock = true end - - local iconTex = _G[b.frame:GetName() .. "IconTexture"] - iconTex:SetTexCoord(.08, .92, .08, .92) - iconTex:Point("TOPLEFT", b.frame, 2, -2) - iconTex:Point("BOTTOMRIGHT", b.frame, -2, 2) - - iconTex:Show() - b.iconTex = iconTex - - idx = idx + 1 - end - end - end -end - - -function Stuffing:SetBagsForSorting(c) - Stuffing_Open() - - self.sortBags = {} - - local cmd = ((c == nil or c == "") and {"d"} or {strsplit("/", c)}) - - for _, s in ipairs(cmd) do - if s == "c" then - self.sortBags = {} - elseif s == "d" then - if not self.bankFrame or not self.bankFrame:IsShown() then - for _, i in ipairs(bags_BACKPACK) do - if self.bags[i] and self.bags[i].bagType == ST_NORMAL then - table.insert(self.sortBags, i) - end - end - else - for _, i in ipairs(bags_BANK) do - if self.bags[i] and self.bags[i].bagType == ST_NORMAL then - table.insert(self.sortBags, i) - end - end - end - else - if tonumber(s) == nil then - Print(string.format(Loc["Error: don't know what \"%s\" means."], s)) - end - - table.insert(self.sortBags, tonumber(s)) - end - end - - local bids = L.bags_bids - for _, i in ipairs(self.sortBags) do - bids = bids .. i .. " " - end - - Print(bids) -end - - --- slash command handler -local function StuffingSlashCmd(Cmd) - local cmd, args = strsplit(" ", Cmd:lower(), 2) - - if cmd == "config" then - Stuffing_OpenConfig() - elseif cmd == "sort" then - Stuffing_Sort(args) - elseif cmd == "stack" then - Stuffing:SetBagsForSorting(args) - Stuffing:Restack() - elseif cmd == "test" then - Stuffing:SetBagsForSorting(args) - elseif cmd == "purchase" then - -- XXX - if Stuffing.bankFrame and Stuffing.bankFrame:IsShown() then - local cnt, full = GetNumBankSlots() - if full then - Print(L.bags_noslots) - return - end - - if args == "yes" then - PurchaseSlot() - return - end - - Print(string.format(L.bags_costs, GetBankSlotCost() / 10000)) - Print(L.bags_buyslots) - else - Print(L.bags_openbank) - end - else - Print("sort - " .. L.bags_sort) - Print("stack - " .. L.bags_stack) - Print("purchase - " .. L.bags_buybankslot) - end -end - - -function Stuffing:ADDON_LOADED(addon) - if addon ~= "Tukui" then - return nil - end - - self:RegisterEvent("BAG_UPDATE") - self:RegisterEvent("ITEM_LOCK_CHANGED") - - self:RegisterEvent("BANKFRAME_OPENED") - self:RegisterEvent("BANKFRAME_CLOSED") - self:RegisterEvent("PLAYERBANKSLOTS_CHANGED") - - self:RegisterEvent("BAG_CLOSED") - - SlashCmdList["STUFFING"] = StuffingSlashCmd - SLASH_STUFFING1 = "/bags" - - self:InitBags() - - tinsert(UISpecialFrames,"TukuiBags") - - ToggleBackpack = Stuffing_Toggle - ToggleBag = Stuffing_ToggleBag - ToggleAllBags = Stuffing_Toggle - OpenAllBags = Stuffing_Open - OpenBackpack = Stuffing_Open - CloseAllBags = Stuffing_Close - CloseBackpack = Stuffing_Close - - BankFrame:UnregisterAllEvents() -end - -function Stuffing:PLAYER_ENTERING_WORLD() - -- please don't do anything after 1 player_entering_world event. - Stuffing:UnregisterEvent("PLAYER_ENTERING_WORLD") - - -- bug fix when entering world in combat and when we try to use an item in bag (example: hearthstone) - ToggleBackpack() - ToggleBackpack() - - if T.toc >= 40200 then return end - - -- hooking and setting key ring bag - -- this is just a reskin of Blizzard key bag to fit Tukui - -- hooking OnShow because sometime key max slot changes. - ContainerFrame1:HookScript("OnShow", function(self) - local keybackdrop = CreateFrame("Frame", nil, self) - keybackdrop:Point("TOPLEFT", 9, -40) - keybackdrop:Point("BOTTOMLEFT", 0, 0) - keybackdrop:Size(179,215) - keybackdrop:SetTemplate("Default") - ContainerFrame1CloseButton:Hide() - ContainerFrame1Portrait:Hide() - ContainerFrame1Name:Hide() - ContainerFrame1BackgroundTop:SetAlpha(0) - ContainerFrame1BackgroundMiddle1:SetAlpha(0) - ContainerFrame1BackgroundMiddle2:SetAlpha(0) - ContainerFrame1BackgroundBottom:SetAlpha(0) - for i=1, GetKeyRingSize() do - local slot = _G["ContainerFrame1Item"..i] - local t = _G["ContainerFrame1Item"..i.."IconTexture"] - slot:SetPushedTexture("") - slot:SetNormalTexture("") - t:SetTexCoord(.08, .92, .08, .92) - t:Point("TOPLEFT", slot, 2, -2) - t:Point("BOTTOMRIGHT", slot, -2, 2) - slot:SetTemplate("Default") - slot:SetBackdropColor(0, 0, 0, 0) - slot:StyleButton() - end - end) - - ContainerFrame1:ClearAllPoints() - ContainerFrame1:Point("BOTTOMRIGHT", TukuiInfoRight, "TOPRIGHT", 4, 5) - ContainerFrame1.ClearAllPoints = T.dummy - ContainerFrame1.SetPoint = T.dummy -end - -function Stuffing:PLAYERBANKSLOTS_CHANGED(id) - if id > 28 then - for _, v in ipairs(self.bagframe_buttons) do - if v.frame and v.frame.GetInventorySlot then - - BankFrameItemButton_Update(v.frame) - BankFrameItemButton_UpdateLocked(v.frame) - - if not v.frame.tooltipText then - v.frame.tooltipText = "" - end - end - end - end - - if self.bankFrame and self.bankFrame:IsShown() then - self:BagSlotUpdate(-1) - end -end - - -function Stuffing:BAG_UPDATE(id) - self:BagSlotUpdate(id) -end - - -function Stuffing:ITEM_LOCK_CHANGED(bag, slot) - if slot == nil then - return - end - - for _, v in ipairs(self.buttons) do - if v.bag == bag and v.slot == slot then - self:SlotUpdate(v) - break - end - end -end - - -function Stuffing:BANKFRAME_OPENED() - Stuffing_Open() - - if not self.bankFrame then - self:InitBank() - end - - self:Layout(true) - for _, x in ipairs(bags_BANK) do - self:BagSlotUpdate(x) - end - self.bankFrame:Show() -end - - -function Stuffing:BANKFRAME_CLOSED() - if not self.bankFrame then - return - end - - self.bankFrame:Hide() -end - - -function Stuffing:BAG_CLOSED(id) - local b = self.bags[id] - if b then - table.remove(self.bags, id) - b:Hide() - table.insert (trashBag, #trashBag + 1, b) - end - - while true do - local changed = false - - for i, v in ipairs(self.buttons) do - if v.bag == id then - v.frame:Hide() - v.iconTex:Hide() - - table.insert (trashButton, #trashButton + 1, v.frame) - table.remove(self.buttons, i) - - v = nil - changed = true - end - end - - if not changed then - break - end - end -end - - -function Stuffing:SortOnUpdate(e) - if not self.elapsed then - self.elapsed = 0 - end - - if not self.itmax then - self.itmax = 0 - end - - self.elapsed = self.elapsed + e - - if self.elapsed < 0.1 then - return - end - - self.elapsed = 0 - self.itmax = self.itmax + 1 - - local changed, blocked = false, false - - if self.sortList == nil or next(self.sortList, nil) == nil then - -- wait for all item locks to be released. - local locks = false - - for i, v in pairs(self.buttons) do - local _, _, l = GetContainerItemInfo(v.bag, v.slot) - if l then - locks = true - else - v.block = false - end - end - - if locks then - -- something still locked. wait some more. - return - else - -- all unlocked. get a new table. - self:SetScript("OnUpdate", nil) - self:SortBags() - - if self.sortList == nil then - return - end - end - end - - -- go through the list and move stuff if we can. - for i, v in ipairs (self.sortList) do - repeat - if v.ignore then - blocked = true - break - end - - if v.srcSlot.block then - changed = true - break - end - - if v.dstSlot.block then - changed = true - break - end - - local _, _, l1 = GetContainerItemInfo(v.dstSlot.bag, v.dstSlot.slot) - local _, _, l2 = GetContainerItemInfo(v.srcSlot.bag, v.srcSlot.slot) - - if l1 then - v.dstSlot.block = true - end - - if l2 then - v.srcSlot.block = true - end - - if l1 or l2 then - break - end - - if v.sbag ~= v.dbag or v.sslot ~= v.dslot then - if v.srcSlot.name ~= v.dstSlot.name then - v.srcSlot.block = true - v.dstSlot.block = true - PickupContainerItem (v.sbag, v.sslot) - PickupContainerItem (v.dbag, v.dslot) - changed = true - break - end - end - until true - end - - self.sortList = nil - - if (not changed and not blocked) or self.itmax > 250 then - self:SetScript("OnUpdate", nil) - self.sortList = nil - Print (L.bags_sortingbags) - end -end - - -local function InBags(x) - if not Stuffing.bags[x] then - return false - end - - for _, v in ipairs(Stuffing.sortBags) do - if x == v then - return true - end - end - return false -end - - -function Stuffing:SortBags() - if (UnitAffectingCombat("player")) then return end - - local free - local total = 0 - local bagtypeforfree - - if StuffingFrameBank and StuffingFrameBank:IsShown() then - for i = 5, 11 do - free, bagtypeforfree = GetContainerNumFreeSlots(i) - if bagtypeforfree == 0 then - total = free + total - end - end - - total = select(1, GetContainerNumFreeSlots(-1)) + total - else - for i = 0, 4 do - free, bagtypeforfree = GetContainerNumFreeSlots(i) - if bagtypeforfree == 0 then - total = free + total - end - end - end - - if total == 0 then - print("|cffff0000"..ERROR_CAPS.." - "..ERR_INV_FULL.."|r") - return - end - - local bs = self.sortBags - if #bs < 1 then - Print (L.bags_nothingsort) - return - end - - local st = {} - local bank = false - - Stuffing_Open() - - for i, v in pairs(self.buttons) do - if InBags(v.bag) then - self:SlotUpdate(v) - - if v.name then - local tex, cnt, _, _, _, _, clink = GetContainerItemInfo(v.bag, v.slot) - local n, _, q, iL, rL, c1, c2, _, Sl = GetItemInfo(clink) - table.insert(st, { - srcSlot = v, - sslot = v.slot, - sbag = v.bag, - --sort = q .. iL .. c1 .. c2 .. rL .. Sl .. n .. i, - --sort = q .. iL .. c1 .. c2 .. rL .. Sl .. n .. (#self.buttons - i), - sort = q .. c1 .. c2 .. rL .. n .. iL .. Sl .. (#self.buttons - i), - --sort = q .. (#self.buttons - i) .. n, - }) - end - end - end - - -- sort them - table.sort (st, function(a, b) - return a.sort > b.sort - end) - - -- for each button we want to sort, get a destination button - local st_idx = #bs - local dbag = bs[st_idx] - local dslot = GetContainerNumSlots(dbag) - - for i, v in ipairs (st) do - v.dbag = dbag - v.dslot = dslot - v.dstSlot = self:SlotNew(dbag, dslot) - - dslot = dslot - 1 - - if dslot == 0 then - while true do - st_idx = st_idx - 1 - - if st_idx < 0 then - break - end - - dbag = bs[st_idx] - - if Stuffing:BagType(dbag) == ST_NORMAL or Stuffing:BagType(dbag) == ST_SPECIAL or dbag < 1 then - break - end - end - - dslot = GetContainerNumSlots(dbag) - end - end - - -- throw various stuff out of the search list - local changed = true - while changed do - changed = false - -- XXX why doesn't this remove all x->x moves in one pass? - - for i, v in ipairs (st) do - - -- source is same as destination - if (v.sslot == v.dslot) and (v.sbag == v.dbag) then - table.remove (st, i) - changed = true - end - end - end - - -- kick off moving of stuff, if needed. - if st == nil or next(st, nil) == nil then - Print(L.bags_sortingbags) - self:SetScript("OnUpdate", nil) - else - self.sortList = st - self:SetScript("OnUpdate", Stuffing.SortOnUpdate) - end -end - - -function Stuffing:RestackOnUpdate(e) - if not self.elapsed then - self.elapsed = 0 - end - - self.elapsed = self.elapsed + e - - if self.elapsed < 0.1 then - return - end - - self.elapsed = 0 - self:Restack() -end - - -function Stuffing:Restack() - local st = {} - - Stuffing_Open() - - for i, v in pairs(self.buttons) do - if InBags(v.bag) then - local tex, cnt, _, _, _, _, clink = GetContainerItemInfo(v.bag, v.slot) - if clink then - local n, _, _, _, _, _, _, s = GetItemInfo(clink) - - if cnt ~= s then - if not st[n] then - st[n] = {{ - item = v, - size = cnt, - max = s - }} - else - table.insert(st[n], { - item = v, - size = cnt, - max = s - }) - end - end - end - end - end - - local did_restack = false - - for i, v in pairs(st) do - if #v > 1 then - for j = 2, #v, 2 do - local a, b = v[j - 1], v[j] - local _, _, l1 = GetContainerItemInfo(a.item.bag, a.item.slot) - local _, _, l2 = GetContainerItemInfo(b.item.bag, b.item.slot) - - if l1 or l2 then - did_restack = true - else - PickupContainerItem (a.item.bag, a.item.slot) - PickupContainerItem (b.item.bag, b.item.slot) - did_restack = true - end - end - end - end - - if did_restack then - self:SetScript("OnUpdate", Stuffing.RestackOnUpdate) - else - self:SetScript("OnUpdate", nil) - Print (L.bags_stackend) - end -end - -function Stuffing.Menu(self, level) - if not level then - return - end - - local info = self.info - - wipe(info) - - if level ~= 1 then - return - end - - wipe(info) - info.text = L.bags_sortmenu - info.notCheckable = 1 - info.func = function() - Stuffing_Sort("d") - end - UIDropDownMenu_AddButton(info, level) - - wipe(info) - info.text = L.bags_stackmenu - info.notCheckable = 1 - info.func = function() - Stuffing:SetBagsForSorting("d") - Stuffing:Restack() - end - UIDropDownMenu_AddButton(info, level) - - wipe(info) - info.text = L.bags_showbags - info.checked = function() - return bag_bars == 1 - end - - info.func = function() - if bag_bars == 1 then - bag_bars = 0 - else - bag_bars = 1 - end - Stuffing:Layout() - if Stuffing.bankFrame and Stuffing.bankFrame:IsShown() then - Stuffing:Layout(true) - end - - end - UIDropDownMenu_AddButton(info, level) - - if T.toc < 40200 then - wipe(info) - info.text = KEYRING - info.checked = function() - return key_ring == 1 - end - - info.func = function() - if key_ring == 1 then - key_ring = 0 - else - key_ring = 1 - end - Stuffing_Toggle() - ToggleKeyRing() - Stuffing:Layout() - end - UIDropDownMenu_AddButton(info, level) - end - - wipe(info) - info.disabled = nil - info.notCheckable = 1 - info.text = CLOSE - info.func = self.HideMenu - info.tooltipTitle = CLOSE - UIDropDownMenu_AddButton(info, level) -end \ No newline at end of file diff --git a/Tukui/modules/blizzard/achievements.lua b/Tukui/modules/blizzard/achievements.lua deleted file mode 100644 index 5e0617e..0000000 --- a/Tukui/modules/blizzard/achievements.lua +++ /dev/null @@ -1,81 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -local AchievementHolder = CreateFrame("Frame", "TukuiAchievementHolder", UIParent) -AchievementHolder:Width(180) -AchievementHolder:Height(20) -AchievementHolder:SetPoint("CENTER", UIParent, "CENTER", 0, 170) -AchievementHolder:SetTemplate("Default") -AchievementHolder:SetBackdropBorderColor(1, 0, 0) -AchievementHolder:SetClampedToScreen(true) -AchievementHolder:SetMovable(true) -AchievementHolder:SetAlpha(0) -AchievementHolder.text = T.SetFontString(AchievementHolder, C.media.uffont, 12) -AchievementHolder.text:SetPoint("CENTER") -AchievementHolder.text:SetText(L.move_achievements) - -local pos = "TOP" - -function T.AchievementMove(self, event, ...) - local previousFrame - for i=1, MAX_ACHIEVEMENT_ALERTS do - local aFrame = _G["AchievementAlertFrame"..i] - if ( aFrame ) then - aFrame:ClearAllPoints() - if pos == "TOP" then - if ( previousFrame and previousFrame:IsShown() ) then - aFrame:SetPoint("TOP", previousFrame, "BOTTOM", 0, -10) - else - aFrame:SetPoint("TOP", AchievementHolder, "BOTTOM") - end - else - if ( previousFrame and previousFrame:IsShown() ) then - aFrame:SetPoint("BOTTOM", previousFrame, "TOP", 0, 10) - else - aFrame:SetPoint("BOTTOM", AchievementHolder, "TOP") - end - end - - previousFrame = aFrame - end - end - -end -hooksecurefunc("AchievementAlertFrame_FixAnchors", T.AchievementMove) - -hooksecurefunc("DungeonCompletionAlertFrame_FixAnchors", function() - for i=MAX_ACHIEVEMENT_ALERTS, 1, -1 do - local aFrame = _G["AchievementAlertFrame"..i] - if ( aFrame and aFrame:IsShown() ) then - DungeonCompletionAlertFrame1:ClearAllPoints() - if pos == "TOP" then - DungeonCompletionAlertFrame1:SetPoint("TOP", aFrame, "BOTTOM", 0, -10) - else - DungeonCompletionAlertFrame1:SetPoint("BOTTOM", aFrame, "TOP", 0, 10) - end - - return - end - - DungeonCompletionAlertFrame1:ClearAllPoints() - if pos == "TOP" then - DungeonCompletionAlertFrame1:SetPoint("TOP", AchievementHolder, "BOTTOM") - else - DungeonCompletionAlertFrame1:SetPoint("BOTTOM", AchievementHolder, "TOP") - end - end -end) - -function T.PostAchievementMove(frame) - local point = select(1, frame:GetPoint()) - - if string.find(point, "TOP") or point == "CENTER" or point == "LEFT" or point == "RIGHT" then - pos = "TOP" - else - pos = "BOTTOM" - end - T.AchievementMove() -end - -local frame = CreateFrame("Frame") -frame:RegisterEvent("ACHIEVEMENT_EARNED") -frame:SetScript("OnEvent", function(self, event, ...) T.AchievementMove(self, event, ...) end) \ No newline at end of file diff --git a/Tukui/modules/blizzard/capturebar.lua b/Tukui/modules/blizzard/capturebar.lua deleted file mode 100644 index 5fa5a1a..0000000 --- a/Tukui/modules/blizzard/capturebar.lua +++ /dev/null @@ -1,22 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --- reposition capture bar to top/center of the screen - -local function CaptureUpdate() - if NUM_EXTENDED_UI_FRAMES then - local captureBar - for i=1, NUM_EXTENDED_UI_FRAMES do - captureBar = getglobal("WorldStateCaptureBar" .. i) - - if captureBar and captureBar:IsVisible() then - captureBar:ClearAllPoints() - - if( i == 1 ) then - captureBar:Point("TOP", UIParent, "TOP", 0, -120) - else - captureBar:Point("TOPLEFT", getglobal("WorldStateCaptureBar" .. i - 1 ), "TOPLEFT", 0, -25) - end - end - end - end -end -hooksecurefunc("UIParent_ManageFramePositions", CaptureUpdate) \ No newline at end of file diff --git a/Tukui/modules/blizzard/durability.lua b/Tukui/modules/blizzard/durability.lua deleted file mode 100644 index d9a0616..0000000 --- a/Tukui/modules/blizzard/durability.lua +++ /dev/null @@ -1,13 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --- move durability frame. - -hooksecurefunc(DurabilityFrame,"SetPoint",function(self,_,parent) - if (parent == "MinimapCluster") or (parent == _G["MinimapCluster"]) then - self:ClearAllPoints() - if C["actionbar"].bottomrows == true then - self:Point("BOTTOM", UIParent, "BOTTOM", 0, 228) - else - self:Point("BOTTOM", UIParent, "BOTTOM", 0, 200) - end - end -end) \ No newline at end of file diff --git a/Tukui/modules/blizzard/error.lua b/Tukui/modules/blizzard/error.lua deleted file mode 100644 index 999f733..0000000 --- a/Tukui/modules/blizzard/error.lua +++ /dev/null @@ -1 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -- hide error in center of the screen except for those we added in filter. local db, f, o = C["error"], CreateFrame("Frame"), L.error_noerror if not db.enable then return end f:SetScript("OnEvent", function(self, event, error) if db.filter[error] then UIErrorsFrame:AddMessage(error, 1, 0 ,0) else o = error end end) SLASH_TUKUIERROR1 = "/error" function SlashCmdList.TUKUIERROR() print(o) end UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE") f:RegisterEvent("UI_ERROR_MESSAGE") \ No newline at end of file diff --git a/Tukui/modules/blizzard/font.lua b/Tukui/modules/blizzard/font.lua deleted file mode 100644 index cf5594e..0000000 --- a/Tukui/modules/blizzard/font.lua +++ /dev/null @@ -1,83 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -local TukuiFonts = CreateFrame("Frame", "TukuiFonts", UIParent) - -local SetFont = function(obj, font, size, style, r, g, b, sr, sg, sb, sox, soy) - obj:SetFont(font, size, style) - if sr and sg and sb then obj:SetShadowColor(sr, sg, sb) 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 - -TukuiFonts:RegisterEvent("ADDON_LOADED") -TukuiFonts:SetScript("OnEvent", function(self, event, addon) - if addon ~= "Tukui" then return end - - local NORMAL = C.media.font - local COMBAT = C.media.dmgfont - local NUMBER = C.media.font - - if T.eyefinity then - -- damage are huge on eyefinity, so we disable it - 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 - local INVISIBLE = [=[Interface\Addons\Tukui\medias\fonts\invisible_font.ttf]=] - COMBAT = INVISIBLE - end - - UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = 12 - CHAT_FONT_HEIGHTS = {12, 13, 14, 15, 16, 17, 18, 19, 20} - - UNIT_NAME_FONT = NORMAL - NAMEPLATE_FONT = NORMAL - DAMAGE_TEXT_FONT = COMBAT - STANDARD_TEXT_FONT = NORMAL - - -- Base fonts - SetFont(GameTooltipHeader, NORMAL, 12) - SetFont(NumberFont_OutlineThick_Mono_Small, NUMBER, 12, "OUTLINE") - SetFont(NumberFont_Outline_Huge, NUMBER, 28, "THICKOUTLINE", 28) - SetFont(NumberFont_Outline_Large, NUMBER, 15, "OUTLINE") - SetFont(NumberFont_Outline_Med, NUMBER, 13, "OUTLINE") - SetFont(NumberFont_Shadow_Med, NORMAL, 12) - SetFont(NumberFont_Shadow_Small, NORMAL, 12) - SetFont(QuestFont, NORMAL, 14) - SetFont(QuestFont_Large, NORMAL, 14) - SetFont(SystemFont_Large, NORMAL, 15) - SetFont(SystemFont_Med1, NORMAL, 12) - SetFont(SystemFont_Med3, NORMAL, 13) - SetFont(SystemFont_OutlineThick_Huge2, NORMAL, 20, "THICKOUTLINE") - SetFont(SystemFont_Outline_Small, NUMBER, 12, "OUTLINE") - SetFont(SystemFont_Shadow_Large, NORMAL, 15) - SetFont(SystemFont_Shadow_Med1, NORMAL, 12) - SetFont(SystemFont_Shadow_Med3, NORMAL, 13) - SetFont(SystemFont_Shadow_Outline_Huge2, NORMAL, 20, "OUTLINE") - SetFont(SystemFont_Shadow_Small, NORMAL, 11) - SetFont(SystemFont_Small, NORMAL, 12) - SetFont(SystemFont_Tiny, NORMAL, 12) - SetFont(Tooltip_Med, NORMAL, 12) - SetFont(Tooltip_Small, NORMAL, 12) - SetFont(CombatTextFont, COMBAT, 100, "OUTLINE") -- number here just increase the font quality. - SetFont(SystemFont_Shadow_Huge1, NORMAL, 20, "THINOUTLINE") - SetFont(ZoneTextString, NORMAL, 32, "OUTLINE") - SetFont(SubZoneTextString, NORMAL, 25, "OUTLINE") - SetFont(PVPInfoTextString, NORMAL, 22, "THINOUTLINE") - SetFont(PVPArenaTextString, NORMAL, 22, "THINOUTLINE") - SetFont(FriendsFont_Normal, NORMAL, 12) - SetFont(FriendsFont_Small, NORMAL, 11) - SetFont(FriendsFont_Large, NORMAL, 14) - SetFont(FriendsFont_UserText, NORMAL, 11) - - SetFont = nil - self:SetScript("OnEvent", nil) - self:UnregisterAllEvents() - self = nil -end) \ No newline at end of file diff --git a/Tukui/modules/blizzard/ghostframe.lua b/Tukui/modules/blizzard/ghostframe.lua deleted file mode 100644 index 23d0396..0000000 --- a/Tukui/modules/blizzard/ghostframe.lua +++ /dev/null @@ -1,20 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --- GhostFrame at top -GhostFrame:SetTemplate("Default") -GhostFrame:SetBackdropColor(0,0,0,0) -GhostFrame:SetBackdropBorderColor(0,0,0,0) -GhostFrame.SetBackdropColor = T.dummy -GhostFrame.SetBackdropBorderColor = T.dummy -GhostFrameContentsFrame:SetTemplate("Default") -GhostFrameContentsFrame:CreateShadow() -GhostFrameContentsFrameIcon:SetTexture(nil) -GhostFrameContentsFrame:Width(148) -GhostFrameContentsFrame:ClearAllPoints() -GhostFrameContentsFrame:SetPoint("CENTER") -GhostFrameContentsFrame.SetPoint = T.dummy -GhostFrame:SetFrameStrata("HIGH") -GhostFrame:SetFrameLevel(10) -GhostFrame:ClearAllPoints() -GhostFrame:Point("TOP", UIParent, 0, 26) -GhostFrameContentsFrameText:ClearAllPoints() -GhostFrameContentsFrameText:Point("BOTTOM", 0, 5) \ No newline at end of file diff --git a/Tukui/modules/blizzard/gm.lua b/Tukui/modules/blizzard/gm.lua deleted file mode 100644 index aaea928..0000000 --- a/Tukui/modules/blizzard/gm.lua +++ /dev/null @@ -1,32 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales ------------------------------------------------------------------------- --- GM ticket position ------------------------------------------------------------------------- - --- create our moving area -local TukuiGMFrameAnchor = CreateFrame("Button", "TukuiGMFrameAnchor", UIParent) -TukuiGMFrameAnchor:SetFrameStrata("TOOLTIP") -TukuiGMFrameAnchor:SetFrameLevel(20) -TukuiGMFrameAnchor:SetHeight(40) -TukuiGMFrameAnchor:SetWidth(TicketStatusFrameButton:GetWidth()) -TukuiGMFrameAnchor:SetClampedToScreen(true) -TukuiGMFrameAnchor:SetMovable(true) -TukuiGMFrameAnchor:SetTemplate("Default") -TukuiGMFrameAnchor:SetBackdropBorderColor(1,0,0,1) -TukuiGMFrameAnchor:SetBackdropColor(unpack(C.media.backdropcolor)) -TukuiGMFrameAnchor:Point("TOPLEFT", 4, -4) -TukuiGMFrameAnchor.text = T.SetFontString(TukuiGMFrameAnchor, C.media.uffont, 12) -TukuiGMFrameAnchor.text:SetPoint("CENTER") -TukuiGMFrameAnchor.text:SetText(L.move_gmframe) -TukuiGMFrameAnchor.text:SetParent(TukuiGMFrameAnchor) -TukuiGMFrameAnchor:Hide() - -TicketStatusFrame:ClearAllPoints() -TicketStatusFrame:SetPoint("TOP", TukuiGMFrameAnchor, "TOP") - ------------------------------------------------------------------------- --- GM toggle command ------------------------------------------------------------------------- - -SLASH_GM1 = "/gm" -SlashCmdList["GM"] = function() ToggleHelpFrame() end \ No newline at end of file diff --git a/Tukui/modules/blizzard/kill.lua b/Tukui/modules/blizzard/kill.lua deleted file mode 100644 index f2650d9..0000000 --- a/Tukui/modules/blizzard/kill.lua +++ /dev/null @@ -1,130 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --- here we kill all shit stuff on default UI that we don't need! - -local Kill = CreateFrame("Frame") -Kill:RegisterEvent("ADDON_LOADED") -Kill:SetScript("OnEvent", function(self, event, addon) - if addon == "Blizzard_AchievementUI" then - if C.tooltip.enable then - hooksecurefunc("AchievementFrameCategories_DisplayButton", function(button) button.showTooltipFunc = nil end) - end - end - - -- disable Blizzard party & raid frame if our Raid Frames are loaded - if addon == "Tukui_Raid" or addon == "Tukui_Raid_Healing" then - InterfaceOptionsFrameCategoriesButton11:SetScale(0.00001) - InterfaceOptionsFrameCategoriesButton11:SetAlpha(0) - - local function KillRaidFrame() - CompactRaidFrameManager:UnregisterAllEvents() - if not InCombatLockdown() then CompactRaidFrameManager:Hide() end - - local shown = CompactRaidFrameManager_GetSetting("IsShown") - if shown and shown ~= "0" then - CompactRaidFrameManager_SetSetting("IsShown", "0") - end - end - - hooksecurefunc("CompactRaidFrameManager_UpdateShown", function() - KillRaidFrame() - end) - - KillRaidFrame() - - -- kill party 1 to 5 - local function KillPartyFrame() - CompactPartyFrame:Kill() - - for i=1, MEMBERS_PER_RAID_GROUP do - local name = "CompactPartyFrameMember" .. i - local frame = _G[name] - frame:UnregisterAllEvents() - end - end - - for i=1, MAX_PARTY_MEMBERS do - local name = "PartyMemberFrame" .. i - local frame = _G[name] - - frame:Kill() - - _G[name .. "HealthBar"]:UnregisterAllEvents() - _G[name .. "ManaBar"]:UnregisterAllEvents() - end - - if CompactPartyFrame then - KillPartyFrame() - elseif CompactPartyFrame_Generate then -- 4.1 - hooksecurefunc("CompactPartyFrame_Generate", KillPartyFrame) - end - end - - if addon ~= "Tukui" then return end - - StreamingIcon:Kill() - Advanced_UseUIScale:Kill() - Advanced_UIScaleSlider:Kill() - PartyMemberBackground:Kill() - TutorialFrameAlertButton:Kill() - - if C.auras.player or C.unitframes.playerauras then - BuffFrame:Kill() - TemporaryEnchantFrame:Kill() - ConsolidatedBuffs:Kill() - -- kill the module in default interface option - InterfaceOptionsFrameCategoriesButton12:SetScale(0.00001) - InterfaceOptionsFrameCategoriesButton12:SetAlpha(0) - end - - InterfaceOptionsUnitFramePanelPartyBackground:Kill() - - -- make sure boss or arena frame is always disabled when running tukui - SetCVar("showArenaEnemyFrames", 0) - - if C.arena.unitframes then - InterfaceOptionsFrameCategoriesButton10:SetScale(0.00001) - InterfaceOptionsFrameCategoriesButton10:SetAlpha(0) - InterfaceOptionsUnitFramePanelArenaEnemyFrames:Kill() - InterfaceOptionsUnitFramePanelArenaEnemyCastBar:Kill() - InterfaceOptionsUnitFramePanelArenaEnemyPets:Kill() - end - - if C.chat.enable then - SetCVar("WholeChatWindowClickable", 0) - SetCVar("ConversationMode", "inline") - InterfaceOptionsSocialPanelWholeChatWindowClickable:Kill() - InterfaceOptionsSocialPanelConversationMode:Kill() - end - - if C.unitframes.enable then - PlayerFrame:Kill() -- Just to be sure we are safe - InterfaceOptionsFrameCategoriesButton9:SetScale(0.00001) - InterfaceOptionsFrameCategoriesButton9:SetAlpha(0) - end - - if C.actionbar.enable then - InterfaceOptionsActionBarsPanelBottomLeft:Kill() - InterfaceOptionsActionBarsPanelBottomRight:Kill() - InterfaceOptionsActionBarsPanelRight:Kill() - InterfaceOptionsActionBarsPanelRightTwo:Kill() - InterfaceOptionsActionBarsPanelAlwaysShowActionBars:Kill() - end - - if C["nameplate"].enable == true and C["nameplate"].enhancethreat == true then - InterfaceOptionsDisplayPanelAggroWarningDisplay:Kill() - end - - -- I'm seriously tired of this Blizzard taint, little hack, we don't care about SearchLFGLeave() - -- This taint is blaming every addon even if we are not calling SearchLFGLeave() function in our addon ... - --[[ TAINT LOG - 10/18 21:46:01.774 An action was blocked because of taint from Tukui - SearchLFGLeave() - 10/18 21:46:01.774 Interface\FrameXML\LFRFrame.lua:395 LFRBrowseFrame_OnUpdateAlways() - 10/18 21:46:01.774 UIParent:OnUpdate() - --]] - local TaintFix = CreateFrame("Frame") - TaintFix:SetScript("OnUpdate", function(self, elapsed) - if LFRBrowseFrame.timeToClear then - LFRBrowseFrame.timeToClear = nil - end - end) -end) \ No newline at end of file diff --git a/Tukui/modules/blizzard/mirror.lua b/Tukui/modules/blizzard/mirror.lua deleted file mode 100644 index 7c7f8cc..0000000 --- a/Tukui/modules/blizzard/mirror.lua +++ /dev/null @@ -1,163 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - ---------------------------------------------------------------------- --- original by haste, edited for tukui :) ---------------------------------------------------------------------- - -local _, settings = ... - -local _DEFAULTS = { - width = T.Scale(220), - height = T.Scale(18), - texture = C["media"].blank, - - position = { - ["BREATH"] = 'TOP#UIParent#TOP#0#-96'; - ["EXHAUSTION"] = 'TOP#UIParent#TOP#0#-119'; - ["FEIGNDEATH"] = 'TOP#UIParent#TOP#0#-142'; - }; - - colors = { - EXHAUSTION = {1, .9, 0}; - BREATH = {0.31, 0.45, 0.63}; - DEATH = {1, .7, 0}; - FEIGNDEATH = {1, .7, 0}; - }; -} - -do - settings = setmetatable(settings, {__index = _DEFAULTS}) - for k,v in next, settings do - if(type(v) == 'table') then - settings[k] = setmetatable(settings[k], {__index = _DEFAULTS[k]}) - end - end -end - -local Spawn, PauseAll -do - local barPool = {} - - local loadPosition = function(self) - local pos = settings.position[self.type] - local p1, frame, p2, x, y = strsplit("#", pos) - - return self:Point(p1, frame, p2, x, y) - end - - local OnUpdate = function(self, elapsed) - if(self.paused) then return end - - self:SetValue(GetMirrorTimerProgress(self.type) / 1e3) - end - - local Start = function(self, value, maxvalue, scale, paused, text) - if(paused > 0) then - self.paused = 1 - elseif(self.paused) then - self.paused = nil - end - - self.text:SetText(text) - - self:SetMinMaxValues(0, maxvalue / 1e3) - self:SetValue(value / 1e3) - - if(not self:IsShown()) then self:Show() end - end - - function Spawn(type) - if(barPool[type]) then return barPool[type] end - local frame = CreateFrame('StatusBar', nil, UIParent) - - frame:SetScript("OnUpdate", OnUpdate) - - local r, g, b = unpack(settings.colors[type]) - - local bg = frame:CreateTexture(nil, 'BACKGROUND') - bg:SetAllPoints(frame) - bg:SetTexture(settings.texture) - bg:SetVertexColor(r * .5, g * .5, b * .5) - - local border = CreateFrame("Frame", nil, frame) - border:Point("TOPLEFT", frame, -2, 2) - border:Point("BOTTOMRIGHT", frame, 2, -2) - border:SetTemplate("Default") - border:SetFrameLevel(0) - - local text = frame:CreateFontString(nil, 'OVERLAY') - text:SetFont(C["media"].uffont, 12, "THINOUTLINE") - text:SetShadowOffset(.8, -.8) - text:SetShadowColor(0, 0, 0, 1) - - text:SetJustifyH'CENTER' - text:SetTextColor(1, 1, 1) - - text:SetPoint('LEFT', frame) - text:SetPoint('RIGHT', frame) - text:SetPoint('TOP', frame) - text:SetPoint('BOTTOM', frame) - - frame:SetSize(settings.width, settings.height) - - frame:SetStatusBarTexture(settings.texture) - frame:SetStatusBarColor(r, g, b) - - frame.type = type - frame.text = text - - frame.Start = Start - frame.Stop = Stop - - loadPosition(frame) - - barPool[type] = frame - return frame - end - - function PauseAll(val) - for _, bar in next, barPool do - bar.paused = val - end - end -end - -local frame = CreateFrame'Frame' -frame:SetScript('OnEvent', function(self, event, ...) - return self[event](self, ...) -end) - -function frame:ADDON_LOADED(addon) - if(addon == 'Tukui') then - UIParent:UnregisterEvent'MIRROR_TIMER_START' - - self:UnregisterEvent'ADDON_LOADED' - self.ADDON_LOADED = nil - end -end -frame:RegisterEvent'ADDON_LOADED' - -function frame:PLAYER_ENTERING_WORLD() - for i=1, MIRRORTIMER_NUMTIMERS do - local type, value, maxvalue, scale, paused, text = GetMirrorTimerInfo(i) - if(type ~= 'UNKNOWN') then - Spawn(type):Start(value, maxvalue, scale, paused, text) - end - end -end -frame:RegisterEvent'PLAYER_ENTERING_WORLD' - -function frame:MIRROR_TIMER_START(type, value, maxvalue, scale, paused, text) - return Spawn(type):Start(value, maxvalue, scale, paused, text) -end -frame:RegisterEvent'MIRROR_TIMER_START' - -function frame:MIRROR_TIMER_STOP(type) - return Spawn(type):Hide() -end -frame:RegisterEvent'MIRROR_TIMER_STOP' - -function frame:MIRROR_TIMER_PAUSE(duration) - return PauseAll((duration > 0 and duration) or nil) -end -frame:RegisterEvent'MIRROR_TIMER_PAUSE' diff --git a/Tukui/modules/blizzard/quests.lua b/Tukui/modules/blizzard/quests.lua deleted file mode 100644 index 0d35e92..0000000 --- a/Tukui/modules/blizzard/quests.lua +++ /dev/null @@ -1,25 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - --- add quest level into Quest list frame. -if (IsAddOnLoaded("QuestGuru")) then return end - -local function questlevel() - local buttons = QuestLogScrollFrame.buttons - local numButtons = #buttons - local scrollOffset = HybridScrollFrame_GetOffset(QuestLogScrollFrame) - local numEntries, numQuests = GetNumQuestLogEntries() - - for i = 1, numButtons do - local questIndex = i + scrollOffset - local questLogTitle = buttons[i] - if questIndex <= numEntries then - local title, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily = GetQuestLogTitle(questIndex) - if not isHeader then - questLogTitle:SetText("[" .. level .. "] " .. title) - QuestLogTitleButton_Resize(questLogTitle) - end - end - end -end -hooksecurefunc("QuestLog_Update", questlevel) -QuestLogScrollFrameScrollBar:HookScript("OnValueChanged", questlevel) \ No newline at end of file diff --git a/Tukui/modules/blizzard/symbol.lua b/Tukui/modules/blizzard/symbol.lua deleted file mode 100644 index 78667ff..0000000 --- a/Tukui/modules/blizzard/symbol.lua +++ /dev/null @@ -1,37 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - ---[[ - original code by alza, edited by tukz for tukui ---]] - -local menuFrame = CreateFrame("Frame", "TukuiMarkingFrame", UIParent, "UIDropDownMenuTemplate") -local menuList = { - {text = L.symbol_CLEAR, - func = function() SetRaidTarget("target", 0) end}, - {text = L.symbol_SKULL, - func = function() SetRaidTarget("target", 8) end}, - {text = "|cffff0000"..L.symbol_CROSS.."|r", - func = function() SetRaidTarget("target", 7) end}, - {text = "|cff00ffff"..L.symbol_SQUARE.."|r", - func = function() SetRaidTarget("target", 6) end}, - {text = "|cffC7C7C7"..L.symbol_MOON.."|r", - func = function() SetRaidTarget("target", 5) end}, - {text = "|cff00ff00"..L.symbol_TRIANGLE.."|r", - func = function() SetRaidTarget("target", 4) end}, - {text = "|cff912CEE"..L.symbol_DIAMOND.."|r", - func = function() SetRaidTarget("target", 3) end}, - {text = "|cffFF8000"..L.symbol_CIRCLE.."|r", - func = function() SetRaidTarget("target", 2) end}, - {text = "|cffffff00"..L.symbol_STAR.."|r", - func = function() SetRaidTarget("target", 1) end}, -} - -WorldFrame:HookScript("OnMouseDown", function(self, button) - if(button=="LeftButton" and IsShiftKeyDown() and IsControlKeyDown() and UnitExists("mouseover")) then - local inParty = (GetNumPartyMembers() > 0) - local inRaid = (GetNumRaidMembers() > 0) - if(inRaid and (IsRaidLeader() or IsRaidOfficer()) or (inParty and not inRaid)) then - EasyMenu(menuList, menuFrame, "cursor", 0, 0, "MENU", 1) - end - end -end) diff --git a/Tukui/modules/blizzard/timertracker.lua b/Tukui/modules/blizzard/timertracker.lua deleted file mode 100644 index 155299e..0000000 --- a/Tukui/modules/blizzard/timertracker.lua +++ /dev/null @@ -1,41 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function SkinIt(bar) - local _, originalPoint, _, _, _ = bar:GetPoint() - - bar:ClearAllPoints() - bar:Point("TOPLEFT", originalPoint, "TOPLEFT", 2, -2) - bar:Point("BOTTOMRIGHT", originalPoint, "BOTTOMRIGHT", -2, 2) - - for i=1, bar:GetNumRegions() do - local region = select(i, bar:GetRegions()) - if region:GetObjectType() == "Texture" then - region:SetTexture(nil) - elseif region:GetObjectType() == "FontString" then - region:SetFont(C["media"].font, 12, "THINOUTLINE") - region:SetShadowColor(0,0,0,0) - end - end - - bar:SetStatusBarTexture(C["media"].normTex) - bar:SetStatusBarColor(170/255, 10/255, 10/255) - - bar.backdrop = CreateFrame("Frame", nil, bar) - bar.backdrop:SetFrameLevel(0) - bar.backdrop:SetTemplate("Default") - bar.backdrop:SetAllPoints(originalPoint) -end - - -local function SkinBlizzTimer(self, event) - for _, b in pairs(TimerTracker.timerList) do - if not b["bar"].skinned then - SkinIt(b["bar"]) - b["bar"].skinned = true - end - end -end - -local load = CreateFrame("Frame") -load:RegisterEvent("START_TIMER") -load:SetScript("OnEvent", SkinBlizzTimer) \ No newline at end of file diff --git a/Tukui/modules/blizzard/vehicle.lua b/Tukui/modules/blizzard/vehicle.lua deleted file mode 100644 index 731fde0..0000000 --- a/Tukui/modules/blizzard/vehicle.lua +++ /dev/null @@ -1,70 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------------- --- move vehicle indicator --------------------------------------------------------------------------- - -local anchor = CreateFrame("Frame", "TukuiVehicleAnchor", UIParent) -anchor:Point("BOTTOM", UIParent, "BOTTOM", 0, 208) -anchor:Size(120, 20) -anchor:SetMovable(true) -anchor:SetClampedToScreen(true) -anchor:SetTemplate("Default") -anchor:SetBackdropBorderColor(1,0,0) -anchor:SetAlpha(0) -anchor.text = T.SetFontString(anchor, C.media.uffont, 12) -anchor.text:SetPoint("CENTER") -anchor.text:SetText(L.move_vehicle) - -hooksecurefunc(VehicleSeatIndicator,"SetPoint",function(_,_,parent) -- vehicle seat indicator - if (parent == "MinimapCluster") or (parent == _G["MinimapCluster"]) then - VehicleSeatIndicator:ClearAllPoints() - VehicleSeatIndicator:Point("BOTTOM", anchor, "BOTTOM", 0, 24) - end -end) - --------------------------------------------------------------------------- --- vehicule on mouseover because this shit take too much space on screen --------------------------------------------------------------------------- - -local function VehicleNumSeatIndicator() - if VehicleSeatIndicatorButton6 then - T.numSeat = 6 - elseif VehicleSeatIndicatorButton5 then - T.numSeat = 5 - elseif VehicleSeatIndicatorButton4 then - T.numSeat = 4 - elseif VehicleSeatIndicatorButton3 then - T.numSeat = 3 - elseif VehicleSeatIndicatorButton2 then - T.numSeat = 2 - elseif VehicleSeatIndicatorButton1 then - T.numSeat = 1 - end -end - -local function vehmousebutton(alpha) - for i=1, T.numSeat do - local pb = _G["VehicleSeatIndicatorButton"..i] - pb:SetAlpha(alpha) - end -end - -local function vehmouse() - if VehicleSeatIndicator:IsShown() then - VehicleSeatIndicator:SetAlpha(0) - VehicleSeatIndicator:EnableMouse(true) - - VehicleNumSeatIndicator() - - VehicleSeatIndicator:HookScript("OnEnter", function() VehicleSeatIndicator:SetAlpha(1) vehmousebutton(1) end) - VehicleSeatIndicator:HookScript("OnLeave", function() VehicleSeatIndicator:SetAlpha(0) vehmousebutton(0) end) - - for i=1, T.numSeat do - local pb = _G["VehicleSeatIndicatorButton"..i] - pb:SetAlpha(0) - pb:HookScript("OnEnter", function(self) VehicleSeatIndicator:SetAlpha(1) vehmousebutton(1) end) - pb:HookScript("OnLeave", function(self) VehicleSeatIndicator:SetAlpha(0) vehmousebutton(0) end) - end - end -end -hooksecurefunc("VehicleSeatIndicator_Update", vehmouse) \ No newline at end of file diff --git a/Tukui/modules/blizzard/watchframe.lua b/Tukui/modules/blizzard/watchframe.lua deleted file mode 100644 index d243382..0000000 --- a/Tukui/modules/blizzard/watchframe.lua +++ /dev/null @@ -1,107 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -local TukuiWatchFrame = CreateFrame("Frame", "TukuiWatchFrame", UIParent) -TukuiWatchFrame:RegisterEvent("PLAYER_ENTERING_WORLD") - --- to be compatible with blizzard option -local wideFrame = GetCVar("watchFrameWidth") - --- create our moving area -local TukuiWatchFrameAnchor = CreateFrame("Button", "TukuiWatchFrameAnchor", UIParent) -TukuiWatchFrameAnchor:SetFrameStrata("HIGH") -TukuiWatchFrameAnchor:SetFrameLevel(20) -TukuiWatchFrameAnchor:SetHeight(20) -TukuiWatchFrameAnchor:SetClampedToScreen(true) -TukuiWatchFrameAnchor:SetMovable(true) -TukuiWatchFrameAnchor:EnableMouse(false) -TukuiWatchFrameAnchor:SetTemplate("Default") -TukuiWatchFrameAnchor:SetBackdropBorderColor(0,0,0,0) -TukuiWatchFrameAnchor:SetBackdropColor(0,0,0,0) -TukuiWatchFrameAnchor.text = T.SetFontString(TukuiWatchFrameAnchor, C.media.uffont, 12) -TukuiWatchFrameAnchor.text:SetPoint("CENTER") -TukuiWatchFrameAnchor.text:SetText(L.move_watchframe) -TukuiWatchFrameAnchor.text:Hide() - --- set default position according to how many right bars we have -TukuiWatchFrameAnchor:Point("TOPRIGHT", UIParent, -210, -220) - --- width of the watchframe according to our Blizzard cVar. -if wideFrame == "1" then - TukuiWatchFrame:SetWidth(350) - TukuiWatchFrameAnchor:SetWidth(350) -else - TukuiWatchFrame:SetWidth(250) - TukuiWatchFrameAnchor:SetWidth(250) -end - -local screenheight = T.screenheight -TukuiWatchFrame:SetParent(TukuiWatchFrameAnchor) -TukuiWatchFrame:SetHeight(screenheight / 1.6) -TukuiWatchFrame:ClearAllPoints() -TukuiWatchFrame:SetPoint("TOP") - -local function init() - TukuiWatchFrame:UnregisterEvent("PLAYER_ENTERING_WORLD") - TukuiWatchFrame:RegisterEvent("CVAR_UPDATE") - TukuiWatchFrame:SetScript("OnEvent", function(_,_,cvar,value) - if cvar == "WATCH_FRAME_WIDTH_TEXT" then - if not WatchFrame.userCollapsed then - if value == "1" then - TukuiWatchFrame:SetWidth(350) - TukuiWatchFrameAnchor:SetWidth(350) - else - TukuiWatchFrame:SetWidth(250) - TukuiWatchFrameAnchor:SetWidth(250) - end - end - wideFrame = value - end - end) -end - -local function setup() - WatchFrame:SetParent(TukuiWatchFrame) - WatchFrame:SetFrameStrata("LOW") - WatchFrame:SetFrameLevel(3) - WatchFrame:SetClampedToScreen(false) - WatchFrame:ClearAllPoints() - WatchFrame.ClearAllPoints = function() end - WatchFrame:SetPoint("TOPLEFT", 32,-2.5) - WatchFrame:SetPoint("BOTTOMRIGHT", 4,0) - WatchFrame.SetPoint = T.dummy - - WatchFrameTitle:SetParent(TukuiWatchFrame) - WatchFrameCollapseExpandButton:SetParent(TukuiWatchFrame) - WatchFrameCollapseExpandButton:SetSize(16, 16) - WatchFrameCollapseExpandButton:SetFrameStrata(WatchFrameHeader:GetFrameStrata()) - WatchFrameCollapseExpandButton:SetFrameLevel(WatchFrameHeader:GetFrameLevel() + 1) - WatchFrameCollapseExpandButton:SetNormalTexture("") - WatchFrameCollapseExpandButton:SetPushedTexture("") - WatchFrameCollapseExpandButton:SetHighlightTexture("") - T.SkinCloseButton(WatchFrameCollapseExpandButton) - WatchFrameCollapseExpandButton.t:SetFont(C.media.font, 12, "OUTLINE") - WatchFrameCollapseExpandButton:HookScript("OnClick", function(self) - if WatchFrame.collapsed then - self.t:SetText("V") - else - self.t:SetText("X") - end - end) - WatchFrameTitle:Kill() -end - ------------------------------------------------------------------------- --- Execute setup after we enter world ------------------------------------------------------------------------- - -local f = CreateFrame("Frame") -f:Hide() -f.elapsed = 0 -f:SetScript("OnUpdate", function(self, elapsed) - f.elapsed = f.elapsed + elapsed - if f.elapsed > .5 then - setup() - f:Hide() - end -end) -TukuiWatchFrame:SetScript("OnEvent", function() if not IsAddOnLoaded("Who Framed Watcher Wabbit") or not IsAddOnLoaded("Fux") then init() f:Show() end end) \ No newline at end of file diff --git a/Tukui/modules/buffs/buffs.lua b/Tukui/modules/buffs/buffs.lua deleted file mode 100644 index 37f4690..0000000 --- a/Tukui/modules/buffs/buffs.lua +++ /dev/null @@ -1,253 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - ---[[ This is a forked file by Haste, rewrite by Tukz for Tukui. ]]-- - -local frame = CreateFrame("Frame", "TukuiAuras") -frame.content = {} - -local icon -local faction = T.myfaction -local alliance = [[Interface\Icons\Pvpcurrency-honor-alliance]] -local horde = [[Interface\Icons\Pvpcurrency-honor-horde]] -local flash = C.auras.flash -local filter = C.auras.consolidate - --- Set our proxy icon -if faction == "Horde" then - icon = horde -else - icon = alliance -end - -local StartStopFlash = function(self, timeLeft) - if(timeLeft < 31) then - if(not self:IsPlaying()) then - self:Play() - end - elseif(self:IsPlaying()) then - self:Stop() - end -end - -local OnUpdate = function(self, elapsed) - local timeLeft - - -- Handle refreshing of temporary enchants. - if(self.offset) then - local expiration = select(self.offset, GetWeaponEnchantInfo()) - if(expiration) then - timeLeft = expiration / 1e3 - else - timeLeft = 0 - end - else - timeLeft = self.timeLeft - elapsed - end - - self.timeLeft = timeLeft - - if(timeLeft <= 0) then - -- Kill the tracker so we don't end up with stuck timers. - self.timeLeft = nil - - self.Duration:SetText("") - return self:SetScript("OnUpdate", nil) - else - local text = T.FormatTime(timeLeft) - - if(timeLeft < 60.5) then - if flash then - StartStopFlash(self.Animation, timeLeft) - end - - if(timeLeft < 5) then - self.Duration:SetTextColor(255/255, 20/255, 20/255) - else - self.Duration:SetTextColor(255/255, 165/255, 0/255) - end - else - self.Duration:SetTextColor(.9, .9, .9) - end - - self.Duration:SetText(text) - end -end - -local UpdateAura = function(self, index) - local name, rank, texture, count, dtype, duration, expirationTime, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff = UnitAura(self:GetParent():GetAttribute"unit", index, self.filter) - local consolidate = self.consolidate - if(name) then - if(duration > 0 and expirationTime and not consolidate) then - local timeLeft = expirationTime - GetTime() - if(not self.timeLeft) then - self.timeLeft = timeLeft - self:SetScript("OnUpdate", OnUpdate) - else - self.timeLeft = timeLeft - end - - -- We do the check here as well, that way we don't have to check on - -- every single OnUpdate call. - if flash then - StartStopFlash(self.Animation, timeLeft) - end - else - if flash then - self.Animation:Stop() - end - self.timeLeft = nil - self.Duration:SetText("") - self:SetScript("OnUpdate", nil) - end - - if(count > 1) then - self.Count:SetText(count) - else - self.Count:SetText("") - end - - if(self.filter == "HARMFUL") then - local color = DebuffTypeColor[dtype or "none"] - self:SetBackdropBorderColor(color.r * 3/5, color.g * 3/5, color.b * 3/5) - end - - self.Icon:SetTexture(texture) - end -end - -local UpdateTempEnchant = function(self, slot) - self.Icon:SetTexture(GetInventoryItemTexture("player", slot)) - - local offset - local weapon = self:GetName():sub(-1) - if weapon:match("1") then - -- GetWeaponEnchantInfo() use #2 returned value for timeleft on this weapon - offset = 2 - elseif weapon:match("2") then - -- GetWeaponEnchantInfo() use #5 returned value for timeleft on this weapon - offset = 5 - elseif weapon:match("3") then - -- GetWeaponEnchantInfo() use #5 returned value for timeleft on this weapon - offset = 8 - end - - local expiration = select(offset, GetWeaponEnchantInfo()) - if(expiration) then - self.offset = offset - self:SetScript("OnUpdate", OnUpdate) - else - self.offset = nil - self.timeLeft = nil - self:SetScript("OnUpdate", nil) - end -end - -local OnAttributeChanged = function(self, attribute, value) - if(attribute == "index") then - -- look if the current buff is consolidated - if filter then - local consolidate = self:GetName():match("Consolidate") - if consolidate then - self.consolidate = true - end - end - - return UpdateAura(self, value) - elseif(attribute == "target-slot") then - return UpdateTempEnchant(self, value) - end -end - -local Skin = function(self) - local proxy = self:GetName():sub(-11) == "ProxyButton" - local Icon = self:CreateTexture(nil, "BORDER") - Icon:SetTexCoord(.07, .93, .07, .93) - Icon:Point("TOPLEFT", 2, -2) - Icon:Point("BOTTOMRIGHT", -2, 2) - self.Icon = Icon - - local Count = self:CreateFontString(nil, "OVERLAY") - Count:SetFontObject(NumberFontNormal) - Count:SetPoint("TOP", self, 1, -4) - self.Count = Count - - if(not proxy) then - local Duration = self:CreateFontString(nil, "OVERLAY") - local font, size, flags = C.media.font, 12, "OUTLINE" - Duration:SetFont(font, size, flags) - Duration:SetPoint("BOTTOM", 0, -17) - self.Duration = Duration - - if flash then - local Animation = self:CreateAnimationGroup() - Animation:SetLooping"BOUNCE" - - local FadeOut = Animation:CreateAnimation"Alpha" - FadeOut:SetChange(-.5) - FadeOut:SetDuration(.4) - FadeOut:SetSmoothing("IN_OUT") - - self.Animation = Animation - end - - -- Kinda meh way to piggyback on the secure aura headers update loop. - self:SetScript("OnAttributeChanged", OnAttributeChanged) - - self.filter = self:GetParent():GetAttribute"filter" - else - local Overlay = self:CreateTexture(nil, "OVERLAY") - local x = self:GetWidth() - local y = self:GetHeight() - Overlay:SetTexture(icon) - Overlay:SetPoint("CENTER") - Overlay:Size(x - 2, y - 2) - Overlay:SetTexCoord(.07, .93, .07, .93) - self.Overlay = Overlay - end - - -- Set a template - self:SetTemplate("Default") -end - -frame:SetScript("OnEvent", function(self, event, ...) - self[event](self, event, ...) -end) - -function frame:PLAYER_ENTERING_WORLD() - for _, header in next, frame.content do - local child = header:GetAttribute"child1" - local i = 1 - while(child) do - UpdateAura(child, child:GetID()) - - i = i + 1 - child = header:GetAttribute("child" .. i) - end - end -end -frame:RegisterEvent("PLAYER_ENTERING_WORLD") - -function frame:VARIABLES_LOADED() - for _, header in next, frame.content do - if header == TukuiAurasPlayerBuffs then - local buffs = TukuiAurasPlayerBuffs - local debuffs = TukuiAurasPlayerDebuffs - local position = buffs:GetPoint() - if position:match("LEFT") then - buffs:SetAttribute("xOffset", 35) - buffs:SetAttribute("point", position) - debuffs:SetAttribute("xOffset", 35) - debuffs:SetAttribute("point", position) - end - end - end -end -frame:RegisterEvent("VARIABLES_LOADED") - --- Expose ourselves: -for frame, func in next, { - Skin = Skin, - Update = Update, -} do - TukuiAuras[frame] = func -end \ No newline at end of file diff --git a/Tukui/modules/buffs/header.lua b/Tukui/modules/buffs/header.lua deleted file mode 100644 index b017123..0000000 --- a/Tukui/modules/buffs/header.lua +++ /dev/null @@ -1,114 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -if not C.auras.player then return end - -local frame = TukuiAuras -local content = TukuiAuras.content - -for _, frame in next, { - "TukuiAurasPlayerBuffs", - "TukuiAurasPlayerDebuffs", - "TukuiAurasPlayerConsolidate", -} do - local header - - local wrap - if T.lowversion then - wrap = 8 - else - wrap = 12 - end - - if(frame == "TukuiAurasPlayerConsolidate") then - header = CreateFrame("Frame", frame, UIParent, "SecureFrameTemplate") - header:SetAttribute("wrapAfter", 1) - header:SetAttribute("wrapYOffset", -35) - else - header = CreateFrame("Frame", frame, UIParent, "SecureAuraHeaderTemplate") - header:SetClampedToScreen(true) - header:SetMovable(true) - header:SetAttribute("minHeight", 30) - header:SetAttribute("wrapAfter", wrap) - header:SetAttribute("wrapYOffset", -67.5) - header:SetAttribute("xOffset", -35) - end - header:SetAttribute("minWidth", wrap * 35) - header:SetAttribute("template", "TukuiAurasAuraTemplate") - header:SetAttribute("weaponTemplate", "TukuiAurasAuraTemplate") - header:SetSize(30, 30) - - -- Swap the unit to vehicle when we enter a vehicle *gasp*. - RegisterAttributeDriver(header, "unit", "[vehicleui] vehicle; player") - - table.insert(content, header) -end - -local buffs = TukuiAurasPlayerBuffs -local debuffs = TukuiAurasPlayerDebuffs -local consolidate = TukuiAurasPlayerConsolidate -local filter = 0 - -if C.auras.consolidate then - filter = 1 -end - --- set our buff header -buffs:SetPoint("TOPRIGHT", UIParent, -184, -22) -buffs:SetAttribute("filter", "HELPFUL") -buffs:SetAttribute("consolidateProxy", CreateFrame("Frame", buffs:GetName() .. "ProxyButton", buffs, "TukuiAurasProxyTemplate")) -buffs:SetAttribute("consolidateHeader", consolidate) - --- blizzard introduced bugs with secure aura headers in 4.3, disabling it until fixed -if T.toc < 40300 then - buffs:SetAttribute("consolidateTo", filter) - buffs:SetAttribute("includeWeapons", 1) -end - -buffs:SetAttribute("consolidateDuration", -1) -buffs:Show() - --- create the consolidated button -local proxy = buffs:GetAttribute("consolidateProxy") -proxy:HookScript("OnShow", function(self) if consolidate:IsShown() then consolidate:Hide() end end) -- kind of bug fix for secure aura header - --- create the dropdown and register click -local dropdown = CreateFrame("BUTTON", "TukuiAurasPlayerConsolidateDropdownButton", proxy, "SecureHandlerClickTemplate") -dropdown:SetAllPoints() -dropdown:RegisterForClicks("AnyUp") -dropdown:SetAttribute("_onclick", [=[ - local header = self:GetParent():GetFrameRef"header" - - local numChild = 0 - repeat - numChild = numChild + 1 - local child = header:GetFrameRef("child" .. numChild) - until not child or not child:IsShown() - - numChild = numChild - 1 - - -- needed, else the dropdown is not positionned correctly on opening - local x, y = self:GetWidth(), self:GetHeight() - header:SetWidth(x) - header:SetHeight(y) - - if header:IsShown() then - header:Hide() - else - header:Show() - end -]=]); - --- set our consolidate header -consolidate:SetAttribute("point", "RIGHT") -consolidate:SetAttribute("minHeight", nil) -consolidate:SetAttribute("minWidth", nil) -consolidate:SetParent(proxy) -consolidate:ClearAllPoints() -consolidate:SetPoint("CENTER", proxy, "CENTER", 0, -35) -consolidate:Hide() -SecureHandlerSetFrameRef(proxy, "header", consolidate) - --- set our debuff header -debuffs:SetPoint("TOP", buffs, "BOTTOM", 0, -84) -debuffs:SetAttribute("filter", "HARMFUL") -debuffs:Show() \ No newline at end of file diff --git a/Tukui/modules/buffs/template.xml b/Tukui/modules/buffs/template.xml deleted file mode 100644 index af7f89d..0000000 --- a/Tukui/modules/buffs/template.xml +++ /dev/null @@ -1,39 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Button name="TukuiAurasAuraTemplate" inherits="SecureActionButtonTemplate" virtual="true"> - <Size x="30" y="30"/> - - <Attributes> - <Attribute name="type" value="cancelaura"/> - </Attributes> - - <Scripts> - <OnLoad> - -- Avoiding XML 101: - TukuiAuras.Skin(self) - - self:RegisterForClicks'RightButtonUp' - </OnLoad> - - <OnEnter> - GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMLEFT', -5, -5) - if(self:GetAttribute'index') then - GameTooltip:SetUnitAura(SecureButton_GetUnit(self:GetParent()), self:GetID(), self.filter) - elseif(self:GetAttribute'target-slot') then - GameTooltip:SetInventoryItem('player', self:GetID()) - end - </OnEnter> - - <OnLeave function="GameTooltip_Hide" /> - </Scripts> - </Button> - - <Frame name="TukuiAurasProxyTemplate" inherits="SecureUnitButtonTemplate, SecureHandlerEnterLeaveTemplate" virtual="true"> - <Size x="30" y="30"/> - <Scripts> - <OnLoad> - -- Avoiding XML 101: - TukuiAuras.Skin(self) - </OnLoad> - </Scripts> - </Frame> -</Ui> \ No newline at end of file diff --git a/Tukui/modules/chat/chatframes.lua b/Tukui/modules/chat/chatframes.lua deleted file mode 100644 index 8587a72..0000000 --- a/Tukui/modules/chat/chatframes.lua +++ /dev/null @@ -1,274 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C["chat"].enable ~= true then return end - ------------------------------------------------------------------------ --- SETUP TUKUI CHATS ------------------------------------------------------------------------ - -local TukuiChat = CreateFrame("Frame", "TukuiChat") -local tabalpha = 1 -local tabnoalpha = 0 -local _G = _G -local origs = {} -local type = type -local strings = { - BATTLEGROUND = L.chat_BATTLEGROUND_GET, - GUILD = L.chat_GUILD_GET, - PARTY = L.chat_PARTY_GET, - RAID = L.chat_RAID_GET, - OFFICER = L.chat_OFFICER_GET, - BATTLEGROUND_LEADER = L.chat_BATTLEGROUND_LEADER_GET, - PARTY_LEADER = L.chat_PARTY_LEADER_GET, - RAID_LEADER = L.chat_RAID_LEADER_GET, -} - --- function to rename channel and other stuff -local function ShortChannel(channel) - return string.format("|Hchannel:%s|h[%s]|h", channel, strings[channel] or channel:gsub("channel:", "")) -end - -local function AddMessage(frame, str, ...) - str = str:gsub("|Hplayer:(.-)|h%[(.-)%]|h", "|Hplayer:%1|h%2|h") - str = str:gsub("|HBNplayer:(.-)|h%[(.-)%]|h", "|HBNplayer:%1|h%2|h") - str = str:gsub("|Hchannel:(.-)|h%[(.-)%]|h", ShortChannel) - - str = str:gsub("^To (.-|h)", "|cffad2424@|r%1") - str = str:gsub("^(.-|h) whispers", "%1") - str = str:gsub("^(.-|h) says", "%1") - str = str:gsub("^(.-|h) yells", "%1") - str = str:gsub("<"..AFK..">", "|cffFF0000"..L.chat_FLAG_AFK.."|r ") - str = str:gsub("<"..DND..">", "|cffE7E716"..L.chat_FLAG_DND.."|r ") - str = str:gsub("^%["..RAID_WARNING.."%]", L.chat_RAID_WARNING_GET) - - return origs[frame](frame, str, ...) -end - --- Hide friends micro button (added in 3.3.5) -FriendsMicroButton:Kill() - --- hide chat bubble menu button -ChatFrameMenuButton:Kill() - --- set the chat style -local function SetChatStyle(frame) - local id = frame:GetID() - local chat = frame:GetName() - local tab = _G[chat.."Tab"] - - -- always set alpha to 1, don"t fade it anymore - tab:SetAlpha(1) - tab.SetAlpha = UIFrameFadeRemoveFrame - - if not C.chat.background and not frame.temp then - -- hide text when setting chat - _G[chat.."TabText"]:Hide() - - -- now show text if mouse is found over tab. - tab:HookScript("OnEnter", function() _G[chat.."TabText"]:Show() end) - tab:HookScript("OnLeave", function() _G[chat.."TabText"]:Hide() end) - end - - -- change tab font - _G[chat.."TabText"]:SetFont(C.media.font, 11) - - -- yeah baby - _G[chat]:SetClampRectInsets(0,0,0,0) - - -- Removes crap from the bottom of the chatbox so it can go to the bottom of the screen. - _G[chat]:SetClampedToScreen(false) - - -- Stop the chat chat from fading out - _G[chat]:SetFading(false) - - -- set min height/width to original tukui size - _G[chat]:SetMinResize(371,111) - _G[chat]:SetMinResize(T.InfoLeftRightWidth + 1,111) - - -- move the chat edit box - _G[chat.."EditBox"]:ClearAllPoints() - _G[chat.."EditBox"]:Point("TOPLEFT", TukuiTabsLeftBackground or TukuiInfoLeft, 2, -2) - _G[chat.."EditBox"]:Point("BOTTOMRIGHT", TukuiTabsLeftBackground or TukuiInfoLeft, -2, 2) - - -- Hide textures - for j = 1, #CHAT_FRAME_TEXTURES do - _G[chat..CHAT_FRAME_TEXTURES[j]]:SetTexture(nil) - end - - -- Removes Default ChatFrame Tabs texture - _G[format("ChatFrame%sTabLeft", id)]:Kill() - _G[format("ChatFrame%sTabMiddle", id)]:Kill() - _G[format("ChatFrame%sTabRight", id)]:Kill() - - _G[format("ChatFrame%sTabSelectedLeft", id)]:Kill() - _G[format("ChatFrame%sTabSelectedMiddle", id)]:Kill() - _G[format("ChatFrame%sTabSelectedRight", id)]:Kill() - - _G[format("ChatFrame%sTabHighlightLeft", id)]:Kill() - _G[format("ChatFrame%sTabHighlightMiddle", id)]:Kill() - _G[format("ChatFrame%sTabHighlightRight", id)]:Kill() - - -- Killing off the new chat tab selected feature - _G[format("ChatFrame%sTabSelectedLeft", id)]:Kill() - _G[format("ChatFrame%sTabSelectedMiddle", id)]:Kill() - _G[format("ChatFrame%sTabSelectedRight", id)]:Kill() - - -- Kills off the new method of handling the Chat Frame scroll buttons as well as the resize button - -- Note: This also needs to include the actual frame textures for the ButtonFrame onHover - _G[format("ChatFrame%sButtonFrameUpButton", id)]:Kill() - _G[format("ChatFrame%sButtonFrameDownButton", id)]:Kill() - _G[format("ChatFrame%sButtonFrameBottomButton", id)]:Kill() - _G[format("ChatFrame%sButtonFrameMinimizeButton", id)]:Kill() - _G[format("ChatFrame%sButtonFrame", id)]:Kill() - - -- Kills off the retarded new circle around the editbox - _G[format("ChatFrame%sEditBoxFocusLeft", id)]:Kill() - _G[format("ChatFrame%sEditBoxFocusMid", id)]:Kill() - _G[format("ChatFrame%sEditBoxFocusRight", id)]:Kill() - - -- Kill off editbox artwork - local a, b, c = select(6, _G[chat.."EditBox"]:GetRegions()) a:Kill() b:Kill() c:Kill() - - -- bubble tex & glow killing from privates - if tab.conversationIcon then tab.conversationIcon:Kill() end - - -- Disable alt key usage - _G[chat.."EditBox"]:SetAltArrowKeyMode(false) - - -- hide editbox on login - _G[chat.."EditBox"]:Hide() - - -- script to hide editbox instead of fading editbox to 0.35 alpha via IM Style - _G[chat.."EditBox"]:HookScript("OnEditFocusLost", function(self) self:Hide() end) - - -- hide edit box every time we click on a tab - _G[chat.."Tab"]:HookScript("OnClick", function() _G[chat.."EditBox"]:Hide() end) - - -- create our own texture for edit box - local EditBoxBackground = CreateFrame("frame", "TukuiChatchatEditBoxBackground", _G[chat.."EditBox"]) - EditBoxBackground:CreatePanel("Default", 1, 1, "LEFT", _G[chat.."EditBox"], "LEFT", 0, 0) - EditBoxBackground:ClearAllPoints() - EditBoxBackground:SetAllPoints(TukuiTabsLeftBackground or TukuiInfoLeft) - EditBoxBackground:SetFrameStrata("LOW") - EditBoxBackground:SetFrameLevel(1) - - local function colorize(r,g,b) - EditBoxBackground:SetBackdropBorderColor(r, g, b) - end - - -- update border color according where we talk - hooksecurefunc("ChatEdit_UpdateHeader", function() - local type = _G[chat.."EditBox"]:GetAttribute("chatType") - if ( type == "CHANNEL" ) then - local id = GetChannelName(_G[chat.."EditBox"]:GetAttribute("channelTarget")) - if id == 0 then - colorize(unpack(C.media.bordercolor)) - else - colorize(ChatTypeInfo[type..id].r,ChatTypeInfo[type..id].g,ChatTypeInfo[type..id].b) - end - else - colorize(ChatTypeInfo[type].r,ChatTypeInfo[type].g,ChatTypeInfo[type].b) - end - end) - - if _G[chat] ~= _G["ChatFrame2"] then - origs[_G[chat]] = _G[chat].AddMessage - _G[chat].AddMessage = AddMessage - else - CombatLogQuickButtonFrame_Custom:StripTextures() - CombatLogQuickButtonFrame_Custom:SetTemplate("Default") - T.SkinCloseButton(CombatLogQuickButtonFrame_CustomAdditionalFilterButton) - CombatLogQuickButtonFrame_CustomAdditionalFilterButton.t:SetText("V") - CombatLogQuickButtonFrame_CustomAdditionalFilterButton.t:ClearAllPoints() - CombatLogQuickButtonFrame_CustomAdditionalFilterButton.t:Point("RIGHT", -8, 4) - CombatLogQuickButtonFrame_CustomProgressBar:ClearAllPoints() - CombatLogQuickButtonFrame_CustomProgressBar:SetPoint("TOPLEFT", CombatLogQuickButtonFrame_Custom, 2, -2) - CombatLogQuickButtonFrame_CustomProgressBar:SetPoint("BOTTOMRIGHT", CombatLogQuickButtonFrame_Custom, -2, 2) - CombatLogQuickButtonFrame_CustomProgressBar:SetStatusBarTexture(C.media.normTex) - end - - frame.isSkinned = true -end - --- Setup chatframes 1 to 10 on login. -local function SetupChat(self) - for i = 1, NUM_CHAT_WINDOWS do - local frame = _G[format("ChatFrame%s", i)] - SetChatStyle(frame) - FCFTab_UpdateAlpha(frame) - end - - -- Remember last channel - ChatTypeInfo.WHISPER.sticky = 1 - ChatTypeInfo.BN_WHISPER.sticky = 1 - ChatTypeInfo.OFFICER.sticky = 1 - ChatTypeInfo.RAID_WARNING.sticky = 1 - ChatTypeInfo.CHANNEL.sticky = 1 -end - -TukuiChat:RegisterEvent("ADDON_LOADED") -TukuiChat:SetScript("OnEvent", function(self, event, addon) - if addon == "Blizzard_CombatLog" then - self:UnregisterEvent("ADDON_LOADED") - SetupChat(self) - end -end) - --- Setup temp chat (BN, WHISPER) when needed. -local function SetupTempChat() - local frame = FCF_GetCurrentChatFrame() - - -- do a check if we already did a skinning earlier for this temp chat frame - if frame.isSkinned then return end - - -- style it - frame.temp = true - SetChatStyle(frame) -end -hooksecurefunc("FCF_OpenTemporaryWindow", SetupTempChat) - --- reposition battle.net popup over chat #1 -BNToastFrame:HookScript("OnShow", function(self) - self:ClearAllPoints() - if C.chat.background and TukuiChatBackgroundLeft then - self:Point("BOTTOMLEFT", TukuiChatBackgroundLeft, "TOPLEFT", 0, 6) - else - self:Point("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 6) - end -end) - --- reskin Toast Frame Close Button -T.SkinCloseButton(BNToastFrameCloseButton) - --- kill the default reset button -ChatConfigFrameDefaultButton:Kill() - --- default position of chat #1 (left) and chat #4 (right) -T.SetDefaultChatPosition = function(frame) - if frame then - local id = frame:GetID() - local name = FCF_GetChatWindowInfo(id) - local fontSize = select(2, frame:GetFont()) - - -- well... tukui font under fontsize 12 is unreadable. Just a small protection! - if fontSize < 12 then - FCF_SetChatWindowFontSize(nil, frame, 12) - else - FCF_SetChatWindowFontSize(nil, frame, fontSize) - end - - if id == 1 then - frame:ClearAllPoints() - frame:Point("BOTTOMLEFT", TukuiInfoLeft, "TOPLEFT", 0, 6) - elseif id == 4 and name == LOOT then - if not frame.isDocked then - frame:ClearAllPoints() - frame:Point("BOTTOMRIGHT", TukuiInfoRight, "TOPRIGHT", 0, 6) - frame:SetJustifyH("RIGHT") - end - end - - -- lock them if unlocked - if not frame.isLocked then FCF_SetLocked(frame, 1) end - end -end -hooksecurefunc("FCF_RestorePositionAndDimensions", T.SetDefaultChatPosition) \ No newline at end of file diff --git a/Tukui/modules/chat/copychat.lua b/Tukui/modules/chat/copychat.lua deleted file mode 100644 index 0590df8..0000000 --- a/Tukui/modules/chat/copychat.lua +++ /dev/null @@ -1,100 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales ------------------------------------------------------------------------------ --- Copy on chatframes feature ------------------------------------------------------------------------------ - -if C["chat"].enable ~= true then return end - -local lines = {} -local frame = nil -local editBox = nil -local isf = nil - -local function CreatCopyFrame() - frame = CreateFrame("Frame", "TukuiChatCopyFrame", UIParent) - frame:SetTemplate("Default") - if T.lowversion then - frame:Width(TukuiBar1:GetWidth() + 10) - else - frame:Width((TukuiBar1:GetWidth() * 2) + 20) - end - frame:Height(250) - frame:SetScale(1) - frame:Point("BOTTOM", UIParent, "BOTTOM", 0, 10) - frame:Hide() - frame:SetFrameStrata("DIALOG") - - local scrollArea = CreateFrame("ScrollFrame", "TukuiChatCopyScroll", frame, "UIPanelScrollFrameTemplate") - scrollArea:Point("TOPLEFT", frame, "TOPLEFT", 8, -30) - scrollArea:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -30, 8) - - editBox = CreateFrame("EditBox", "CopyBox", frame) - editBox:SetMultiLine(true) - editBox:SetMaxLetters(99999) - editBox:EnableMouse(true) - editBox:SetAutoFocus(false) - editBox:SetFontObject(ChatFontNormal) - if T.lowversion then - editBox:Width(TukuiBar1:GetWidth() + 10) - else - editBox:Width((TukuiBar1:GetWidth() * 2) + 20) - end - editBox:Height(250) - editBox:SetScript("OnEscapePressed", function() frame:Hide() end) - - scrollArea:SetScrollChild(editBox) - - local close = CreateFrame("Button", "CopyCloseButton", frame, "UIPanelCloseButton") - close:SetPoint("TOPRIGHT", frame, "TOPRIGHT") - T.SkinCloseButton(close) - T.SkinScrollBar(TukuiChatCopyScrollScrollBar) - - isf = true -end - -local function GetLines(...) - --[[ Grab all those lines ]]-- - local ct = 1 - for i = select("#", ...), 1, -1 do - local region = select(i, ...) - if region:GetObjectType() == "FontString" then - lines[ct] = tostring(region:GetText()) - ct = ct + 1 - end - end - return ct - 1 -end - -local function Copy(cf) - local _, size = cf:GetFont() - FCF_SetChatWindowFontSize(cf, cf, 0.01) - local lineCt = GetLines(cf:GetRegions()) - local text = table.concat(lines, "\n", 1, lineCt) - FCF_SetChatWindowFontSize(cf, cf, size) - if not isf then CreatCopyFrame() end - if frame:IsShown() then frame:Hide() return end - frame:Show() - editBox:SetText(text) -end - -local function ChatCopyButtons() - for i = 1, NUM_CHAT_WINDOWS do - local cf = _G[format("ChatFrame%d", i)] - local button = CreateFrame("Button", format("TukuiButtonCF%d", i), cf) - button:SetPoint("TOPRIGHT", 0, 0) - button:Height(20) - button:Width(20) - button:SetNormalTexture(C.media.copyicon) - button:SetAlpha(0) - button:SetTemplate("Default") - - button:SetScript("OnMouseUp", function(self) - Copy(cf) - end) - button:SetScript("OnEnter", function() - button:SetAlpha(1) - end) - button:SetScript("OnLeave", function() button:SetAlpha(0) end) - end -end -ChatCopyButtons() \ No newline at end of file diff --git a/Tukui/modules/chat/copyurl.lua b/Tukui/modules/chat/copyurl.lua deleted file mode 100644 index 1336955..0000000 --- a/Tukui/modules/chat/copyurl.lua +++ /dev/null @@ -1,66 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C["chat"].enable ~= true then return end - -local SetItemRef_orig = SetItemRef -function ReURL_SetItemRef(link, text, button, chatFrame) - if (strsub(link, 1, 3) == "url") then - local ChatFrameEditBox = ChatEdit_ChooseBoxForSend() - local url = strsub(link, 5); - if (not ChatFrameEditBox:IsShown()) then - ChatEdit_ActivateChat(ChatFrameEditBox) - end - ChatFrameEditBox:Insert(url) - ChatFrameEditBox:HighlightText() - - else - SetItemRef_orig(link, text, button, chatFrame) - end -end -SetItemRef = ReURL_SetItemRef - -function ReURL_AddLinkSyntax(chatstring) - if (type(chatstring) == "string") then - local extraspace; - if (not strfind(chatstring, "^ ")) then - extraspace = true; - chatstring = " "..chatstring; - end - chatstring = gsub (chatstring, " www%.([_A-Za-z0-9-]+)%.(%S+)%s?", ReURL_Link("www.%1.%2")) - chatstring = gsub (chatstring, " (%a+)://(%S+)%s?", ReURL_Link("%1://%2")) - chatstring = gsub (chatstring, " ([_A-Za-z0-9-%.]+)@([_A-Za-z0-9-]+)(%.+)([_A-Za-z0-9-%.]+)%s?", ReURL_Link("%1@%2%3%4")) - chatstring = gsub (chatstring, " (%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?):(%d%d?%d?%d?%d?)%s?", ReURL_Link("%1.%2.%3.%4:%5")) - chatstring = gsub (chatstring, " (%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%s?", ReURL_Link("%1.%2.%3.%4")) - if (extraspace) then - chatstring = strsub(chatstring, 2); - end - end - return chatstring -end - -REURL_COLOR = "16FF5D" -ReURL_Brackets = false -ReUR_CustomColor = true - -function ReURL_Link(url) - if (ReUR_CustomColor) then - if (ReURL_Brackets) then - url = " |cff"..REURL_COLOR.."|Hurl:"..url.."|h["..url.."]|h|r " - else - url = " |cff"..REURL_COLOR.."|Hurl:"..url.."|h"..url.."|h|r " - end - else - if (ReURL_Brackets) then - url = " |Hurl:"..url.."|h["..url.."]|h " - else - url = " |Hurl:"..url.."|h"..url.."|h " - end - end - return url -end - ---Hook all the AddMessage funcs -for i=1, NUM_CHAT_WINDOWS do - local frame = getglobal("ChatFrame"..i) - local addmessage = frame.AddMessage - frame.AddMessage = function(self, text, ...) addmessage(self, ReURL_AddLinkSyntax(text), ...) end -end diff --git a/Tukui/modules/chat/mousescroll.lua b/Tukui/modules/chat/mousescroll.lua deleted file mode 100644 index 7688705..0000000 --- a/Tukui/modules/chat/mousescroll.lua +++ /dev/null @@ -1,27 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C["chat"].enable ~= true then return end - ------------------------------------------------------------------------- --- Enhance/rewrite a Blizzard feature, chatframe mousewheel. ------------------------------------------------------------------------- - -local numlines = 3 -function FloatingChatFrame_OnMouseScroll(self, delta) - if delta < 0 then - if IsShiftKeyDown() then - self:ScrollToBottom() - else - for i=1, numlines do - self:ScrollDown() - end - end - elseif delta > 0 then - if IsShiftKeyDown() then - self:ScrollToTop() - else - for i=1, numlines do - self:ScrollUp() - end - end - end -end diff --git a/Tukui/modules/chat/profanity.lua b/Tukui/modules/chat/profanity.lua deleted file mode 100644 index 72aa437..0000000 --- a/Tukui/modules/chat/profanity.lua +++ /dev/null @@ -1,10 +0,0 @@ --- Always enable profanity -local p = CreateFrame("Frame") -p:RegisterEvent("CVAR_UPDATE") -p:RegisterEvent("PLAYER_ENTERING_WORLD") -p:SetScript("OnEvent", function(self, event, cvar) - SetCVar("profanityFilter", 0) -end) - --- kill the option -InterfaceOptionsSocialPanelProfanityFilter:Kill() \ No newline at end of file diff --git a/Tukui/modules/chat/sounds.lua b/Tukui/modules/chat/sounds.lua deleted file mode 100644 index ee68f5c..0000000 --- a/Tukui/modules/chat/sounds.lua +++ /dev/null @@ -1,17 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C["chat"].enable ~= true then return end - ------------------------------------------------------------------------- --- Play sound files system ------------------------------------------------------------------------- - -if C.chat.whispersound then - local SoundSys = CreateFrame("Frame") - SoundSys:RegisterEvent("CHAT_MSG_WHISPER") - SoundSys:RegisterEvent("CHAT_MSG_BN_WHISPER") - SoundSys:HookScript("OnEvent", function(self, event, ...) - if event == "CHAT_MSG_WHISPER" or "CHAT_MSG_BN_WHISPER" then - PlaySoundFile(C["media"].whisper) - end - end) -end \ No newline at end of file diff --git a/Tukui/modules/chat/spam.lua b/Tukui/modules/chat/spam.lua deleted file mode 100644 index 6294af9..0000000 --- a/Tukui/modules/chat/spam.lua +++ /dev/null @@ -1,47 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C["chat"].enable ~= true then return end - --- This file is used for enGB or enUS client only. --- translate or do anything you want if you want to --- use this feature on others clients. - -if T.client ~= "enUS" and T.client ~= "enGB" then return end - ----------------------------------------------------------------------------------- --- Hide annoying chat text when talent switch. ----------------------------------------------------------------------------------- - -function T.SPELL_FILTER(self, event, arg1) - if strfind(arg1,"You have unlearned") or strfind(arg1,"You have learned a new spell:") or strfind(arg1,"You have learned a new ability:") or strfind(arg1,"Your pet has unlearned") then - return true - end -end -ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", T.SPELL_FILTER) - ----------------------------------------------------------------------------------- --- Hide annoying /sleep commands from goldspammer --- with their hacks for multiple chars. ----------------------------------------------------------------------------------- - -local function GOLDSPAM_FILTER() - if GetMinimapZoneText() == "Valley of Strength" or GetMinimapZoneText() == "Trade District" then - ChatFrame_AddMessageEventFilter("CHAT_MSG_TEXT_EMOTE", T.FUCKYOU_GOLDSPAMMERS) - else - ChatFrame_RemoveMessageEventFilter("CHAT_MSG_TEXT_EMOTE", T.FUCKYOU_GOLDSPAMMERS) - end -end - -function T.FUCKYOU_GOLDSPAMMERS(self, event, arg1) - if strfind(arg1, "falls asleep. Zzzzzzz.") then - return true - end -end - -local GOLDSPAM = CreateFrame("Frame") -GOLDSPAM:RegisterEvent("PLAYER_ENTERING_WORLD") -GOLDSPAM:RegisterEvent("ZONE_CHANGED_INDOORS") -GOLDSPAM:RegisterEvent("ZONE_CHANGED_NEW_AREA") -GOLDSPAM:SetScript("OnEvent", GOLDSPAM_FILTER) - - - diff --git a/Tukui/modules/chat/telltarget.lua b/Tukui/modules/chat/telltarget.lua deleted file mode 100644 index b8d06dd..0000000 --- a/Tukui/modules/chat/telltarget.lua +++ /dev/null @@ -1,36 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C["chat"].enable ~= true then return end - --- /tt - tell your current target. -for i=1, NUM_CHAT_WINDOWS do - local editbox = _G["ChatFrame"..i.."EditBox"] - editbox:HookScript("OnTextChanged", function(self) - local text = self:GetText() - if text:len() < 5 then - if text:sub(1, 4) == "/tt " then - local unitname, realm - unitname, realm = UnitName("target") - if unitname then unitname = gsub(unitname, " ", "") end - if unitname and not UnitIsSameServer("player", "target") then - unitname = unitname .. "-" .. gsub(realm, " ", "") - end - ChatFrame_SendTell((unitname or L.chat_invalidtarget), ChatFrame1) - end - end - end) -end - --- slash command for macro's - -SLASH_TELLTARGET1 = "/tt" -SLASH_TELLTARGET2 = "/telltarget" -SlashCmdList.TELLTARGET = function(msg) - local unitname, realm - unitname, realm = UnitName("target") - if not unitname then return end - if unitname then unitname = gsub(unitname, " ", "") end - if unitname and not UnitIsSameServer("player", "target") then - unitname = unitname .. "-" .. gsub(realm, " ", "") - end - SendChatMessage(msg, "WHISPER", nil, unitname) -end diff --git a/Tukui/modules/datatext/armor.lua b/Tukui/modules/datatext/armor.lua deleted file mode 100644 index 35adc01..0000000 --- a/Tukui/modules/datatext/armor.lua +++ /dev/null @@ -1,59 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- --- player Armor --------------------------------------------------------------------- - -if C["datatext"].armor and C["datatext"].armor > 0 then - local effectiveArmor - - local Stat = CreateFrame("Frame", "TukuiStatArmor") - Stat:EnableMouse(true) - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.armor - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatArmorText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].armor, Text) - - local function Update(self) - effectiveArmor = select(2, UnitArmor("player")) - Text:SetText(Stat.Color2..(effectiveArmor).."|r "..Stat.Color1..L.datatext_armor.."|r") - --Setup Armor Tooltip - self:SetAllPoints(Text) - end - - Stat:RegisterEvent("UNIT_INVENTORY_CHANGED") - Stat:RegisterEvent("UNIT_AURA") - Stat:RegisterEvent("PLAYER_ENTERING_WORLD") - Stat:SetScript("OnMouseDown", function() ToggleCharacter("PaperDollFrame") end) - Stat:SetScript("OnEvent", Update) - Stat:SetScript("OnEnter", function(self) - if not InCombatLockdown() then - local anchor, panel, xoff, yoff = T.DataTextTooltipAnchor(Text) - GameTooltip:SetOwner(panel, anchor, xoff, yoff) - GameTooltip:ClearLines() - GameTooltip:AddLine(L.datatext_mitigation) - local lv = 83 - local mitigation = (effectiveArmor/(effectiveArmor+(467.5*lv-22167.5))) - for i = 1, 4 do - local format = string.format - if mitigation > .75 then - mitigation = .75 - end - GameTooltip:AddDoubleLine(lv,format("%.2f", mitigation*100) .. "%",1,1,1) - lv = lv - 1 - end - if UnitLevel("target") > 0 and UnitLevel("target") < UnitLevel("player") then - if mitigation > .75 then - mitigation = .75 - end - GameTooltip:AddDoubleLine(UnitLevel("target"),format("%.2f", mitigation*100) .. "%",1,1,1) - end - GameTooltip:Show() - end - end) - Stat:SetScript("OnLeave", function() GameTooltip:Hide() end) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/avoidance.lua b/Tukui/modules/datatext/avoidance.lua deleted file mode 100644 index 926e49c..0000000 --- a/Tukui/modules/datatext/avoidance.lua +++ /dev/null @@ -1,89 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- --- Player Avoidance --------------------------------------------------------------------- - -if C["datatext"].avd and C["datatext"].avd > 0 then - local dodge, parry, block, MissChance, avoidance, targetlv, playerlv, basemisschance, leveldifference - local Stat = CreateFrame("Frame", "TukuiStatAvoidance") - Stat:EnableMouse(true) - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.avd - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatAvoidanceText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].avd, Text) - - local targetlv - local playerlv - - local function Update(self) - local format = string.format - targetlv, playerlv = UnitLevel("target"), UnitLevel("player") - - if targetlv == -1 then - basemisschance = (5 - (3*.2)) --Boss Value - leveldifference = 3 - elseif targetlv > playerlv then - basemisschance = (5 - ((targetlv - playerlv)*.2)) --Mobs above player level - leveldifference = (targetlv - playerlv) - elseif targetlv < playerlv and targetlv > 0 then - basemisschance = (5 + ((playerlv - targetlv)*.2)) --Mobs below player level - leveldifference = (targetlv - playerlv) - else - basemisschance = 5 --Sets miss chance of attacker level if no target exists, lv80=5, 81=4.2, 82=3.4, 83=2.6 - leveldifference = 0 - end - - if leveldifference >= 0 then - dodge = (GetDodgeChance()-leveldifference*.2) - parry = (GetParryChance()-leveldifference*.2) - block = (GetBlockChance()-leveldifference*.2) - MissChance = (basemisschance + 1/(0.0625 + 0.956/(GetCombatRating(CR_DEFENSE_SKILL)/4.91850*0.04))) - avoidance = (dodge+parry+block+MissChance) - Text:SetText(Stat.Color1..L.datatext_playeravd.."|r"..Stat.Color2..format("%.2f", avoidance).."|r") - else - dodge = (GetDodgeChance()+abs(leveldifference*.2)) - parry = (GetParryChance()+abs(leveldifference*.2)) - block = (GetBlockChance()+abs(leveldifference*.2)) - MissChance = (basemisschance + 1/(0.0625 + 0.956/(GetCombatRating(CR_DEFENSE_SKILL)/4.91850*0.04))) - avoidance = (dodge+parry+block+MissChance) - Text:SetText(Stat.Color1..L.datatext_playeravd.."|r"..Stat.Color2..format("%.2f", avoidance).."|r") - end - - --Setup Avoidance Tooltip - self:SetAllPoints(Text) - end - - - Stat:RegisterEvent("UNIT_AURA") - Stat:RegisterEvent("UNIT_INVENTORY_CHANGED") - Stat:RegisterEvent("PLAYER_TARGET_CHANGED") - Stat:RegisterEvent("PLAYER_ENTERING_WORLD") - Stat:SetScript("OnEvent", Update) - Stat:SetScript("OnEnter", function(self) - if not InCombatLockdown() then - local anchor, yoff = T.DataTextTooltipAnchor(Text) - GameTooltip:SetOwner(self, anchor, 0, yoff) - GameTooltip:ClearAllPoints() - GameTooltip:SetPoint("BOTTOM", self, "TOP", 0, T.mult) - GameTooltip:ClearLines() - if targetlv > 1 then - GameTooltip:AddDoubleLine(L.datatext_avoidancebreakdown.." ("..L.datatext_lvl.." "..targetlv..")") - elseif targetlv == -1 then - GameTooltip:AddDoubleLine(L.datatext_avoidancebreakdown.." ("..L.datatext_boss..")") - else - GameTooltip:AddDoubleLine(L.datatext_avoidancebreakdown.." ("..L.datatext_lvl.." "..targetlv..")") - end - GameTooltip:AddDoubleLine(L.datatext_miss,format("%.2f",MissChance) .. "%",1,1,1, 1,1,1) - GameTooltip:AddDoubleLine(L.datatext_dodge,format("%.2f",dodge) .. "%",1,1,1, 1,1,1) - GameTooltip:AddDoubleLine(L.datatext_parry,format("%.2f",parry) .. "%",1,1,1, 1,1,1) - GameTooltip:AddDoubleLine(L.datatext_block,format("%.2f",block) .. "%",1,1,1, 1,1,1) - GameTooltip:Show() - end - end) - Stat:SetScript("OnLeave", function() GameTooltip:Hide() end) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/bags.lua b/Tukui/modules/datatext/bags.lua deleted file mode 100644 index 3925d84..0000000 --- a/Tukui/modules/datatext/bags.lua +++ /dev/null @@ -1,33 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- - -- BAGS --------------------------------------------------------------------- - -if C["datatext"].bags and C["datatext"].bags > 0 then - local Stat = CreateFrame("Frame", "TukuiStatBags") - Stat:EnableMouse(true) - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.bags - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatBagsText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].bags, Text) - - local function OnEvent(self, event, ...) - local free, total,used = 0, 0, 0 - for i = 0, NUM_BAG_SLOTS do - free, total = free + GetContainerNumFreeSlots(i), total + GetContainerNumSlots(i) - end - used = total - free - Text:SetText(Stat.Color1..L.datatext_bags.."|r"..Stat.Color2..used.."/"..total.."|r") - self:SetAllPoints(Text) - end - - Stat:RegisterEvent("PLAYER_LOGIN") - Stat:RegisterEvent("BAG_UPDATE") - Stat:SetScript("OnEvent", OnEvent) - Stat:SetScript("OnMouseDown", function() OpenAllBags() end) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/battleground.lua b/Tukui/modules/datatext/battleground.lua deleted file mode 100644 index 215ae7c..0000000 --- a/Tukui/modules/datatext/battleground.lua +++ /dev/null @@ -1,128 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -if not C["datatext"].battleground then return end - ---Map IDs -local WSG = 443 -local TP = 626 -local AV = 401 -local SOTA = 512 -local IOC = 540 -local EOTS = 482 -local TBFG = 736 -local AB = 461 - -local bgframe = TukuiInfoLeftBattleGround -bgframe:SetScript("OnEnter", function(self) - local numScores = GetNumBattlefieldScores() - for i=1, numScores do - local name, killingBlows, honorableKills, deaths, honorGained, faction, race, class, classToken, damageDone, healingDone, bgRating, ratingChange = GetBattlefieldScore(i) - if ( name ) then - if ( name == UnitName("player") ) then - local curmapid = GetCurrentMapAreaID() - local color = RAID_CLASS_COLORS[select(2, UnitClass("player"))] - local classcolor = ("|cff%.2x%.2x%.2x"):format(color.r * 255, color.g * 255, color.b * 255) - SetMapToCurrentZone() - GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, T.Scale(4)) - GameTooltip:ClearLines() - GameTooltip:Point("BOTTOM", self, "TOP", 0, 1) - GameTooltip:ClearLines() - GameTooltip:AddDoubleLine(L.datatext_ttstatsfor, classcolor..name.."|r") - GameTooltip:AddLine' ' - GameTooltip:AddDoubleLine(L.datatext_ttkillingblows, killingBlows,1,1,1) - GameTooltip:AddDoubleLine(L.datatext_tthonorkills, honorableKills,1,1,1) - GameTooltip:AddDoubleLine(L.datatext_ttdeaths, deaths,1,1,1) - GameTooltip:AddDoubleLine(L.datatext_tthonorgain, format('%d', honorGained),1,1,1) - GameTooltip:AddDoubleLine(L.datatext_ttdmgdone, damageDone,1,1,1) - GameTooltip:AddDoubleLine(L.datatext_tthealdone, healingDone,1,1,1) - --Add extra statistics to watch based on what BG you are in. - if curmapid == WSG or curmapid == TP then - GameTooltip:AddDoubleLine(L.datatext_flagscaptured,GetBattlefieldStatData(i, 1),1,1,1) - GameTooltip:AddDoubleLine(L.datatext_flagsreturned,GetBattlefieldStatData(i, 2),1,1,1) - elseif curmapid == EOTS then - GameTooltip:AddDoubleLine(L.datatext_flagscaptured,GetBattlefieldStatData(i, 1),1,1,1) - elseif curmapid == AV then - GameTooltip:AddDoubleLine(L.datatext_graveyardsassaulted,GetBattlefieldStatData(i, 1),1,1,1) - GameTooltip:AddDoubleLine(L.datatext_graveyardsdefended,GetBattlefieldStatData(i, 2),1,1,1) - GameTooltip:AddDoubleLine(L.datatext_towersassaulted,GetBattlefieldStatData(i, 3),1,1,1) - GameTooltip:AddDoubleLine(L.datatext_towersdefended,GetBattlefieldStatData(i, 4),1,1,1) - elseif curmapid == SOTA then - GameTooltip:AddDoubleLine(L.datatext_demolishersdestroyed,GetBattlefieldStatData(i, 1),1,1,1) - GameTooltip:AddDoubleLine(L.datatext_gatesdestroyed,GetBattlefieldStatData(i, 2),1,1,1) - elseif curmapid == IOC or curmapid == TBFG or curmapid == AB then - GameTooltip:AddDoubleLine(L.datatext_basesassaulted,GetBattlefieldStatData(i, 1),1,1,1) - GameTooltip:AddDoubleLine(L.datatext_basesdefended,GetBattlefieldStatData(i, 2),1,1,1) - end - GameTooltip:Show() - end - end - end -end) -bgframe:SetScript("OnLeave", function(self) GameTooltip:Hide() end) - -local Stat = CreateFrame("Frame", "TukuiStatBattleGround", UIParent) -Stat:EnableMouse(true) -Stat.Option = C.datatext.battleground -Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) -Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - -local Text1 = TukuiInfoLeftBattleGround:CreateFontString("TukuiStatBattleGroundText1", "OVERLAY") -Text1:SetFont(C.media.font, C["datatext"].fontsize) -Text1:SetPoint("LEFT", 30, 0.5) -Text1:SetHeight(TukuiInfoLeft:GetHeight()) - -local Text2 = TukuiInfoLeftBattleGround:CreateFontString("TukuiStatBattleGroundText2", "OVERLAY") -Text2:SetFont(C.media.font, C["datatext"].fontsize) -Text2:SetPoint("CENTER", 0, 0.5) -Text2:SetHeight(TukuiInfoLeft:GetHeight()) - -local Text3 = TukuiInfoLeftBattleGround:CreateFontString("TukuiStatBattleGroundText3", "OVERLAY") -Text3:SetFont(C.media.font, C["datatext"].fontsize) -Text3:SetPoint("RIGHT", -30, 0.5) -Text3:SetHeight(TukuiInfoLeft:GetHeight()) - -local int = 2 -local function Update(self, t) - int = int - t - if int < 0 then - local dmgtxt - RequestBattlefieldScoreData() - local numScores = GetNumBattlefieldScores() - for i=1, numScores do - local name, killingBlows, honorableKills, deaths, honorGained, faction, race, class, classToken, damageDone, healingDone, bgRating, ratingChange = GetBattlefieldScore(i) - if healingDone > damageDone then - dmgtxt = (Stat.Color1..L.datatext_healing.."|r"..Stat.Color2..healingDone.."|r") - else - dmgtxt = (Stat.Color1..L.datatext_damage.."|r"..Stat.Color2..damageDone.."|r") - end - if ( name ) then - if ( name == T.myname ) then - Text2:SetText(Stat.Color1..L.datatext_honor.."|r"..Stat.Color2..format('%d', honorGained).."|r") - Text1:SetText(dmgtxt) - Text3:SetText(Stat.Color1..L.datatext_killingblows.."|r"..Stat.Color2..killingBlows.."|r") - end - end - end - int = 2 - end -end - ---hide text when not in an bg -local function OnEvent(self, event) - if event == "PLAYER_ENTERING_WORLD" then - local inInstance, instanceType = IsInInstance() - if inInstance and (instanceType == "pvp") then - bgframe:Show() - else - Text1:SetText("") - Text2:SetText("") - Text3:SetText("") - bgframe:Hide() - end - end -end - -Stat:RegisterEvent("PLAYER_ENTERING_WORLD") -Stat:SetScript("OnEvent", OnEvent) -Stat:SetScript("OnUpdate", Update) -Update(Stat, 2) \ No newline at end of file diff --git a/Tukui/modules/datatext/calltoarms.lua b/Tukui/modules/datatext/calltoarms.lua deleted file mode 100644 index 8a4415d..0000000 --- a/Tukui/modules/datatext/calltoarms.lua +++ /dev/null @@ -1,129 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - --------------------------------------------------------------------- - -- Call To Arms -- Elv22 --------------------------------------------------------------------- - -if C["datatext"].calltoarms and C["datatext"].calltoarms > 0 then - local Stat = CreateFrame("Frame", "TukuiStatCallToArms") - Stat:EnableMouse(true) - Stat:SetFrameStrata("MEDIUM") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.calltoarms - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatCallToArmsText", "OVERLAY") - Text:SetFont(C["media"].font, C["datatext"].fontsize) - Text:SetShadowOffset(T.mult, -T.mult) - Text:SetShadowColor(0, 0, 0, 0.4) - T.PP(C["datatext"].calltoarms, Text) - Stat:SetParent(Text:GetParent()) - - local TANK_STRING = TANK - local HEALER_STRING = HEALER - local DPS_STING = DAMAGE - - local function MakeString(tank, healer, damage, letter) - local str = "" - if tank then - if letter then - str = " T" - else - str = TANK_STRING - end - end - if healer then - if letter then - str = " H" - else - str = HEALER_STRING - end - end - if damage then - if letter then - str = " D" - else - str = DPS_STRING - end - end - - return str - end - - local function OnEvent(self, event, ...) - local tankReward = false - local healerReward = false - local dpsReward = false - local unavailable = true - for i=1, GetNumRandomDungeons() do - local id, name = GetLFGRandomDungeonInfo(i) - for x = 1,LFG_ROLE_NUM_SHORTAGE_TYPES do - local eligible, forTank, forHealer, forDamage, itemCount = GetLFGRoleShortageRewards(id, x) - if eligible then unavailable = false end - if eligible and forTank and itemCount > 0 then tankReward = true end - if eligible and forHealer and itemCount > 0 then healerReward = true end - if eligible and forDamage and itemCount > 0 then dpsReward = true end - end - end - - if unavailable then - Text:SetText(Stat.Color1..QUEUE_TIME_UNAVAILABLE.."|r") - else - if tankReward or healerReward or dpsReward then - Text:SetText(Stat.Color1..BATTLEGROUND_HOLIDAY..":|r"..Stat.Color2..MakeString(tankReward, healerReward, dpsReward, true).."|r") - else - Text:SetText(Stat.Color1..LOOKING_FOR_DUNGEON.."|r") - end - end - - self:SetAllPoints(Text) - end - - local function OnEnter(self) - local anchor, panel, xoff, yoff = T.DataTextTooltipAnchor(Text) - GameTooltip:SetOwner(panel, anchor, xoff, yoff) - GameTooltip:ClearLines() - GameTooltip:AddLine(BATTLEGROUND_HOLIDAY) - GameTooltip:AddLine(' ') - - local allUnavailable = true - local numCTA = 0 - for i=1, GetNumRandomDungeons() do - local id, name = GetLFGRandomDungeonInfo(i) - local tankReward = false - local healerReward = false - local dpsReward = false - local unavailable = true - for x=1, LFG_ROLE_NUM_SHORTAGE_TYPES do - local eligible, forTank, forHealer, forDamage, itemCount = GetLFGRoleShortageRewards(id, x) - if eligible then unavailable = false end - if eligible and forTank and itemCount > 0 then tankReward = true end - if eligible and forHealer and itemCount > 0 then healerReward = true end - if eligible and forDamage and itemCount > 0 then dpsReward = true end - end - if not unavailable then - allUnavailable = false - local rolesString = MakeString(tankReward, healerReward, dpsReward) - if rolesString ~= "" then - GameTooltip:AddDoubleLine(name..":", rolesString, 1, 1, 1) - end - if tankReward or healerReward or dpsReward then numCTA = numCTA + 1 end - end - end - - if allUnavailable then - GameTooltip:AddLine(L.datatext_cta_allunavailable) - elseif numCTA == 0 then - GameTooltip:AddLine(L.datatext_cta_nodungeons) - end - GameTooltip:Show() - end - - Stat:RegisterEvent("LFG_UPDATE_RANDOM_INFO") - Stat:RegisterEvent("PLAYER_LOGIN") - Stat:SetScript("OnEvent", OnEvent) - Stat:SetScript("OnMouseDown", function() ToggleFrame(LFDParentFrame) end) - Stat:SetScript("OnEnter", OnEnter) - Stat:SetScript("OnLeave", function() GameTooltip:Hide() end) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/crit.lua b/Tukui/modules/datatext/crit.lua deleted file mode 100644 index e2760de..0000000 --- a/Tukui/modules/datatext/crit.lua +++ /dev/null @@ -1,41 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- --- Crit (Spell or Melee.. or ranged) --------------------------------------------------------------------- - -if C["datatext"].crit and C["datatext"].crit > 0 then - local Stat = CreateFrame("Frame", "TukuiStatCrit") - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.crit - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatCritText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].crit, Text) - - local int = 1 - - local function Update(self, t) - int = int - t - local meleecrit = GetCritChance() - local spellcrit = GetSpellCritChance(1) - local rangedcrit = GetRangedCritChance() - local CritChance - if spellcrit > meleecrit then - CritChance = spellcrit - elseif select(2, UnitClass("Player")) == "HUNTER" then - CritChance = rangedcrit - else - CritChance = meleecrit - end - if int < 0 then - Text:SetText(Stat.Color2..format("%.2f", CritChance) .. "%|r"..Stat.Color1..L.datatext_playercrit.."|r") - int = 1 - end - end - - Stat:SetScript("OnUpdate", Update) - Update(Stat, 10) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/currency.lua b/Tukui/modules/datatext/currency.lua deleted file mode 100644 index eff78a7..0000000 --- a/Tukui/modules/datatext/currency.lua +++ /dev/null @@ -1,46 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- - -- CURRENCY --------------------------------------------------------------------- - -if C["datatext"].currency and C["datatext"].currency > 0 then - local Stat = CreateFrame("Frame", "TukuiStatCurrency") - Stat:EnableMouse(true) - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.currency - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatCurrencyText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].currency, Text) - - local function update() - local _text = Stat.Color2.."---".."|r" - for i = 1, MAX_WATCHED_TOKENS do - local name, count, _, _, _ = GetBackpackCurrencyInfo(i) - if name and count then - if(i ~= 1) then _text = _text .. " " else _text = "" end - local words = { strsplit(" ", name) } - for _, word in ipairs(words) do - _text = _text .. Stat.Color1..string.sub(word,1,1).."|r" - end - _text = _text .. Stat.Color1..": |r" .. Stat.Color2..count.."|r" - end - end - - Text:SetText(_text) - end - - local function OnEvent(self, event, ...) - update() - self:SetAllPoints(Text) - Stat:UnregisterEvent("PLAYER_LOGIN") - end - - Stat:RegisterEvent("PLAYER_LOGIN") - hooksecurefunc("BackpackTokenFrame_Update", update) - Stat:SetScript("OnEvent", OnEvent) - Stat:SetScript("OnMouseDown", function() ToggleCharacter("TokenFrame") end) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/dps.lua b/Tukui/modules/datatext/dps.lua deleted file mode 100644 index 091815c..0000000 --- a/Tukui/modules/datatext/dps.lua +++ /dev/null @@ -1,111 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- --- SUPPORT FOR DPS Feed... --------------------------------------------------------------------- - -if C["datatext"].dps_text and C["datatext"].dps_text > 0 then - local events = {SWING_DAMAGE = true, RANGE_DAMAGE = true, SPELL_DAMAGE = true, SPELL_PERIODIC_DAMAGE = true, DAMAGE_SHIELD = true, DAMAGE_SPLIT = true, SPELL_EXTRA_ATTACKS = true} - local DPS_FEED = CreateFrame("Frame", "TukuiStatDamage") - DPS_FEED.Option = C.datatext.dps_text - local player_id = UnitGUID("player") - local dmg_total, last_dmg_amount = 0, 0 - local cmbt_time = 0 - DPS_FEED.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - DPS_FEED.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local pet_id = UnitGUID("pet") - - local dText = DPS_FEED:CreateFontString("TukuiStatDamageText", "OVERLAY") - dText:SetFont(C.media.font, C["datatext"].fontsize) - dText:SetText("0.0 ",L.datatext_dps) - - T.PP(C["datatext"].dps_text, dText) - - DPS_FEED:EnableMouse(true) - DPS_FEED:SetFrameStrata("BACKGROUND") - DPS_FEED:SetFrameLevel(3) - DPS_FEED:Height(20) - DPS_FEED:Width(100) - DPS_FEED:SetAllPoints(dText) - - DPS_FEED:SetScript("OnEvent", function(self, event, ...) self[event](self, ...) end) - DPS_FEED:RegisterEvent("PLAYER_LOGIN") - - local elapsed = 1 - DPS_FEED:SetScript("OnUpdate", function(self, elap) - if UnitAffectingCombat("player") then - cmbt_time = cmbt_time + elap - end - - elapsed = elapsed + elap - if elapsed >= 1 then - elapsed = 0 - dText:SetText(getDPS()) - end - end) - - function DPS_FEED:PLAYER_LOGIN() - DPS_FEED:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") - DPS_FEED:RegisterEvent("PLAYER_REGEN_ENABLED") - DPS_FEED:RegisterEvent("PLAYER_REGEN_DISABLED") - DPS_FEED:RegisterEvent("UNIT_PET") - player_id = UnitGUID("player") - DPS_FEED:UnregisterEvent("PLAYER_LOGIN") - end - - function DPS_FEED:UNIT_PET(unit) - if unit == "player" then - pet_id = UnitGUID("pet") - end - end - - -- handler for the combat log. used http://www.wowwiki.com/API_COMBAT_LOG_EVENT for api - function DPS_FEED:COMBAT_LOG_EVENT_UNFILTERED(...) - -- filter for events we only care about. i.e heals - if not events[select(2, ...)] then return end - - -- only use events from the player - local id = select(4, ...) - - if id == player_id or id == pet_id then - if select(2, ...) == "SWING_DAMAGE" then - if T.toc < 40200 then - last_dmg_amount = select(10, ...) - else - last_dmg_amount = select(12, ...) - end - else - if T.toc < 40200 then - last_dmg_amount = select(13, ...) - else - last_dmg_amount = select(15, ...) - end - end - dmg_total = dmg_total + last_dmg_amount - end - end - - function getDPS() - if (dmg_total == 0) then - return (DPS_FEED.Color2.."0.0 |r" .. DPS_FEED.Color1..L.datatext_dps.."|r") - else - return string.format(DPS_FEED.Color2.."%.1fk |r" .. DPS_FEED.Color1 .. L.datatext_dps .. "|r", ((dmg_total or 0) / (cmbt_time or 1)) / 1000) - end - end - - function DPS_FEED:PLAYER_REGEN_ENABLED() - dText:SetText(getDPS()) - end - - function DPS_FEED:PLAYER_REGEN_DISABLED() - cmbt_time = 0 - dmg_total = 0 - last_dmg_amount = 0 - end - - DPS_FEED:SetScript("OnMouseDown", function (self, button, down) - cmbt_time = 0 - dmg_total = 0 - last_dmg_amount = 0 - end) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/durability.lua b/Tukui/modules/datatext/durability.lua deleted file mode 100644 index ad9a425..0000000 --- a/Tukui/modules/datatext/durability.lua +++ /dev/null @@ -1,66 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- --- DURABILITY --------------------------------------------------------------------- - -if C["datatext"].dur and C["datatext"].dur > 0 then - local Stat = CreateFrame("Frame", "TukuiStatDurability") - Stat:EnableMouse(true) - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.dur - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatDurabilityText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].dur, Text) - - local function OnEvent(self) - local Total = 0 - local current, max - - for i = 1, 11 do - if GetInventoryItemLink("player", L.Slots[i][1]) ~= nil then - current, max = GetInventoryItemDurability(L.Slots[i][1]) - if current then - L.Slots[i][3] = current/max - Total = Total + 1 - end - end - end - table.sort(L.Slots, function(a, b) return a[3] < b[3] end) - - if Total > 0 then - Text:SetText(Stat.Color2..floor(L.Slots[1][3]*100).."% |r"..Stat.Color1..L.datatext_armor.."|r") - else - Text:SetText(Stat.Color2.."100% |r"..Stat.Color1..L.datatext_armor.."|r") - end - -- Setup Durability Tooltip - self:SetAllPoints(Text) - Total = 0 - end - - Stat:RegisterEvent("UPDATE_INVENTORY_DURABILITY") - Stat:RegisterEvent("MERCHANT_SHOW") - Stat:RegisterEvent("PLAYER_ENTERING_WORLD") - Stat:SetScript("OnMouseDown", function() ToggleCharacter("PaperDollFrame") end) - Stat:SetScript("OnEvent", OnEvent) - Stat:SetScript("OnEnter", function(self) - if not InCombatLockdown() then - local anchor, panel, xoff, yoff = T.DataTextTooltipAnchor(Text) - GameTooltip:SetOwner(panel, anchor, xoff, yoff) - GameTooltip:ClearLines() - for i = 1, 11 do - if L.Slots[i][3] ~= 1000 then - local green, red - green = L.Slots[i][3]*2 - red = 1 - green - GameTooltip:AddDoubleLine(L.Slots[i][2], floor(L.Slots[i][3]*100).."%",1 ,1 , 1, red + 1, green, 0) - end - end - GameTooltip:Show() - end - end) - Stat:SetScript("OnLeave", function() GameTooltip:Hide() end) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/fps.lua b/Tukui/modules/datatext/fps.lua deleted file mode 100644 index cce985a..0000000 --- a/Tukui/modules/datatext/fps.lua +++ /dev/null @@ -1,46 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - --------------------------------------------------------------------- --- FPS --------------------------------------------------------------------- - -if C["datatext"].fps_ms and C["datatext"].fps_ms > 0 then - local Stat = CreateFrame("Frame", "TukuiStatFPS") - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat:EnableMouse(true) - Stat.Option = C.datatext.fps_ms - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatFPSText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].fps_ms, Text) - - local int = 1 - local function Update(self, t) - int = int - t - if int < 0 then - local ms = select(3, GetNetStats()) - if ms == 0 then ms = "???" end - Text:SetText(Stat.Color2..floor(GetFramerate()).."|r"..Stat.Color1..L.datatext_fps.."|r"..Stat.Color2..ms.."|r"..Stat.Color1..L.datatext_ms.."|r") - self:SetAllPoints(Text) - int = 1 - end - end - - Stat:SetScript("OnUpdate", Update) - Stat:SetScript("OnEnter", function(self) - if not InCombatLockdown() then - local anchor, panel, xoff, yoff = T.DataTextTooltipAnchor(Text) - local _, _, latencyHome, latencyWorld = GetNetStats() - local latency = format(MAINMENUBAR_LATENCY_LABEL, latencyHome, latencyWorld) - GameTooltip:SetOwner(panel, anchor, xoff, yoff) - GameTooltip:ClearLines() - GameTooltip:AddLine(latency) - GameTooltip:Show() - end - end) - Stat:SetScript("OnLeave", function() GameTooltip:Hide() end) - Update(Stat, 10) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/friend.lua b/Tukui/modules/datatext/friend.lua deleted file mode 100644 index 0a15f9f..0000000 --- a/Tukui/modules/datatext/friend.lua +++ /dev/null @@ -1,347 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - --------------------------------------------------------------------- --- FRIEND --------------------------------------------------------------------- - -if not C["datatext"].friends or C["datatext"].friends == 0 then return end - --- create a popup -StaticPopupDialogs.TUKUI_SET_BN_BROADCAST = { - text = BN_BROADCAST_TOOLTIP, - button1 = ACCEPT, - button2 = CANCEL, - hasEditBox = 1, - editBoxWidth = 350, - maxLetters = 127, - OnAccept = function(self) BNSetCustomMessage(self.editBox:GetText()) end, - OnShow = function(self) self.editBox:SetText(select(3, BNGetInfo()) ) self.editBox:SetFocus() end, - OnHide = ChatEdit_FocusActiveWindow, - EditBoxOnEnterPressed = function(self) BNSetCustomMessage(self:GetText()) self:GetParent():Hide() end, - EditBoxOnEscapePressed = function(self) self:GetParent():Hide() end, - timeout = 0, - exclusive = 1, - whileDead = 1, - hideOnEscape = 1, - preferredIndex = 3, -} - -local Stat = CreateFrame("Frame", "TukuiStatFriends") -Stat:EnableMouse(true) -Stat:SetFrameStrata("BACKGROUND") -Stat:SetFrameLevel(3) -Stat.Option = C.datatext.friends -Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) -Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - -local Text = Stat:CreateFontString("TukuiStatFriendsText", "OVERLAY") -Text:SetFont(C.media.font, C["datatext"].fontsize) -Text:SetShadowOffset(T.mult, -T.mult) -T.PP(C["datatext"].friends, Text) - -local menuFrame = CreateFrame("Frame", "TukuiFriendRightClickMenu", UIParent, "UIDropDownMenuTemplate") -local menuList = { - { text = OPTIONS_MENU, isTitle = true,notCheckable=true}, - { text = INVITE, hasArrow = true,notCheckable=true, }, - { text = CHAT_MSG_WHISPER_INFORM, hasArrow = true,notCheckable=true, }, - { text = PLAYER_STATUS, hasArrow = true, notCheckable=true, - menuList = { - { text = "|cff2BC226"..AVAILABLE.."|r", notCheckable=true, func = function() if IsChatAFK() then SendChatMessage("", "AFK") elseif IsChatDND() then SendChatMessage("", "DND") end end }, - { text = "|cffE7E716"..DND.."|r", notCheckable=true, func = function() if not IsChatDND() then SendChatMessage("", "DND") end end }, - { text = "|cffFF0000"..AFK.."|r", notCheckable=true, func = function() if not IsChatAFK() then SendChatMessage("", "AFK") end end }, - }, - }, - { text = BN_BROADCAST_TOOLTIP, notCheckable=true, func = function() StaticPopup_Show("TUKUI_SET_BN_BROADCAST") end }, -} - -local function GetTableIndex(table, fieldIndex, value) - for k,v in ipairs(table) do - if v[fieldIndex] == value then return k end - end - return -1 -end - -local function inviteClick(self, arg1, arg2, checked) - menuFrame:Hide() - InviteUnit(arg1) -end - -local function whisperClick(self,arg1,arg2,checked) - menuFrame:Hide() - SetItemRef( "player:"..arg1, ("|Hplayer:%1$s|h[%1$s]|h"):format(arg1), "LeftButton" ) -end - -local levelNameString = "|cff%02x%02x%02x%d|r |cff%02x%02x%02x%s|r" -local clientLevelNameString = "%s (|cff%02x%02x%02x%d|r |cff%02x%02x%02x%s|r%s) |cff%02x%02x%02x%s|r" -local levelNameClassString = "|cff%02x%02x%02x%d|r %s%s%s" -local worldOfWarcraftString = "World of Warcraft" -local battleNetString = "Battle.NET" -local wowString = "WoW" -local totalOnlineString = L.datatext_online .. "%s/%s" -local tthead, ttsubh, ttoff = {r=0.4, g=0.78, b=1}, {r=0.75, g=0.9, b=1}, {r=.3,g=1,b=.3} -local activezone, inactivezone = {r=0.3, g=1.0, b=0.3}, {r=0.65, g=0.65, b=0.65} -local displayString = string.join("", Stat.Color1.."%s:|r ", Stat.Color2, "%d|r") -local statusTable = { "[AFK]", "[DND]", "" } -local groupedTable = { "|cffaaaaaa*|r", "" } -local friendTable, BNTable = {}, {} -local totalOnline, BNTotalOnline = 0, 0 - -local function BuildFriendTable(total) - totalOnline = 0 - wipe(friendTable) - local name, level, class, area, connected, status, note - for i = 1, total do - name, level, class, area, connected, status, note = GetFriendInfo(i) - for k,v in pairs(LOCALIZED_CLASS_NAMES_MALE) do if class == v then class = k end end - - friendTable[i] = { name, level, class, area, connected, status, note } - if connected then totalOnline = totalOnline + 1 end - end - table.sort(friendTable, function(a, b) - if a[1] and b[1] then - return a[1] < b[1] - end - end) -end - -local function UpdateFriendTable(total) - totalOnline = 0 - local name, level, class, area, connected, status, note - for i = 1, #friendTable do - name, level, class, area, connected, status, note = GetFriendInfo(i) - for k,v in pairs(LOCALIZED_CLASS_NAMES_MALE) do if class == v then class = k end end - - -- get the correct index in our table - local index = GetTableIndex(friendTable, 1, name) - -- we cannot find a friend in our table, so rebuild it - if index == -1 then - BuildFriendTable(total) - break - end - -- update on-line status for all members - friendTable[index][5] = connected - -- update information only for on-line members - if connected then - friendTable[index][2] = level - friendTable[index][3] = class - friendTable[index][4] = area - friendTable[index][6] = status - friendTable[index][7] = note - totalOnline = totalOnline + 1 - end - end -end - -local function BuildBNTable(total) - BNTotalOnline = 0 - wipe(BNTable) - local _, presenceID, givenName, surname, toonName, toonID, client, isOnline, isAFK, isDND, noteText, realmName, faction, race, class, zoneName, level - for i = 1, total do - presenceID, givenName, surname, toonName, toonID, client, isOnline, _, isAFK, isDND, _, noteText = BNGetFriendInfo(i) - if T.toc < 40200 then - _, _, _, realmName, faction, race, class, _, zoneName, level = BNGetToonInfo(presenceID) - else - _, _, _, realmName, _, faction, race, class, _, zoneName, level = BNGetToonInfo(presenceID) - end - for k,v in pairs(LOCALIZED_CLASS_NAMES_MALE) do if class == v then class = k end end - - BNTable[i] = { presenceID, givenName, surname, toonName, toonID, client, isOnline, isAFK, isDND, noteText, realmName, faction, race, class, zoneName, level } - if isOnline then BNTotalOnline = BNTotalOnline + 1 end - end - table.sort(BNTable, function(a, b) - if a[2] and b[2] then - if a[2] == b[2] then return a[3] < b[3] end - return a[2] < b[2] - end - end) -end - -local function UpdateBNTable(total) - BNTotalOnline = 0 - local presenceID, givenName, surname, toonName, toonID, client, isOnline, isAFK, isDND, noteText - local _, realmName, faction, race, class, zoneName, level - for i = 1, #BNTable do - -- get guild roster information - presenceID, givenName, surname, toonName, toonID, client, isOnline, _, isAFK, isDND, _, noteText = BNGetFriendInfo(i) - if T.toc < 40200 then - _, _, _, realmName, faction, race, class, _, zoneName, level = BNGetToonInfo(presenceID) - else - _, _, _, realmName, _, faction, race, class, _, zoneName, level = BNGetToonInfo(presenceID) - end - for k,v in pairs(LOCALIZED_CLASS_NAMES_MALE) do if class == v then class = k end end - - -- get the correct index in our table - local index = GetTableIndex(BNTable, 1, presenceID) - -- we cannot find a BN member in our table, so rebuild it - if index == -1 then - BuildBNTable(total) - return - end - -- update on-line status for all members - BNTable[index][7] = isOnline - -- update information only for on-line members - if isOnline then - BNTable[index][2] = givenName - BNTable[index][3] = surname - BNTable[index][4] = toonName - BNTable[index][5] = toonID - BNTable[index][6] = client - BNTable[index][8] = isAFK - BNTable[index][9] = isDND - BNTable[index][10] = noteText - BNTable[index][11] = realmName - BNTable[index][12] = faction - BNTable[index][13] = race - BNTable[index][14] = class - BNTable[index][15] = zoneName - BNTable[index][16] = level - - BNTotalOnline = BNTotalOnline + 1 - end - end -end - -Stat:SetScript("OnMouseUp", function(self, btn) - if btn ~= "RightButton" then return end - - GameTooltip:Hide() - - local menuCountWhispers = 0 - local menuCountInvites = 0 - local classc, levelc - - menuList[2].menuList = {} - menuList[3].menuList = {} - - if totalOnline > 0 then - for i = 1, #friendTable do - if (friendTable[i][5]) then - menuCountInvites = menuCountInvites + 1 - menuCountWhispers = menuCountWhispers + 1 - - classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[friendTable[i][3]], GetQuestDifficultyColor(friendTable[i][2]) - if classc == nil then classc = GetQuestDifficultyColor(friendTable[i][2]) end - - menuList[2].menuList[menuCountInvites] = {text = format(levelNameString,levelc.r*255,levelc.g*255,levelc.b*255,friendTable[i][2],classc.r*255,classc.g*255,classc.b*255,friendTable[i][1]), arg1 = friendTable[i][1],notCheckable=true, func = inviteClick} - menuList[3].menuList[menuCountWhispers] = {text = format(levelNameString,levelc.r*255,levelc.g*255,levelc.b*255,friendTable[i][2],classc.r*255,classc.g*255,classc.b*255,friendTable[i][1]), arg1 = friendTable[i][1],notCheckable=true, func = whisperClick} - end - end - end - - if BNTotalOnline > 0 then - local realID, playerFaction, grouped - for i = 1, #BNTable do - if (BNTable[i][7]) then - realID = (BATTLENET_NAME_FORMAT):format(BNTable[i][2], BNTable[i][3]) - menuCountWhispers = menuCountWhispers + 1 - menuList[3].menuList[menuCountWhispers] = {text = realID, arg1 = realID,notCheckable=true, func = whisperClick} - - if select(1, UnitFactionGroup("player")) == "Horde" then playerFaction = 0 else playerFaction = 1 end - if BNTable[i][6] == wowString and BNTable[i][11] == T.myrealm and playerFaction == BNTable[i][12] then - classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[BNTable[i][14]], GetQuestDifficultyColor(BNTable[i][16]) - if classc == nil then classc = GetQuestDifficultyColor(BNTable[i][16]) end - - if UnitInParty(BNTable[i][4]) or UnitInRaid(BNTable[i][4]) then grouped = 1 else grouped = 2 end - menuCountInvites = menuCountInvites + 1 - menuList[2].menuList[menuCountInvites] = {text = format(levelNameString,levelc.r*255,levelc.g*255,levelc.b*255,BNTable[i][16],classc.r*255,classc.g*255,classc.b*255,BNTable[i][4]), arg1 = BNTable[i][4],notCheckable=true, func = inviteClick} - end - end - end - end - - EasyMenu(menuList, menuFrame, "cursor", 0, 0, "MENU", 2) -end) - -local function Update(self, event) - if event == "BN_FRIEND_INFO_CHANGED" or "BN_FRIEND_ACCOUNT_ONLINE" or "BN_FRIEND_ACCOUNT_OFFLINE" or "BN_TOON_NAME_UPDATED" - or "BN_FRIEND_TOON_ONLINE" or "BN_FRIEND_TOON_OFFLINE" or "PLAYER_ENTERING_WORLD" then - local BNTotal = BNGetNumFriends() - if BNTotal == #BNTable then - UpdateBNTable(BNTotal) - else - BuildBNTable(BNTotal) - end - end - - if event == "FRIENDLIST_UPDATE" or "PLAYER_ENTERING_WORLD" then - local total = GetNumFriends() - if total == #friendTable then - UpdateFriendTable(total) - else - BuildFriendTable(total) - end - end - - Text:SetFormattedText(displayString, L.datatext_friends, totalOnline + BNTotalOnline) - self:SetAllPoints(Text) -end - -Stat:SetScript("OnMouseDown", function(self, btn) if btn == "LeftButton" then ToggleFriendsFrame(1) end end) -Stat:SetScript("OnEnter", function(self) - if InCombatLockdown() then return end - - local totalonline = totalOnline + BNTotalOnline - local totalfriends = #friendTable + #BNTable - local zonec, classc, levelc, realmc, grouped - if totalonline > 0 then - local anchor, panel, xoff, yoff = T.DataTextTooltipAnchor(Text) - GameTooltip:SetOwner(panel, anchor, xoff, yoff) - GameTooltip:ClearLines() - GameTooltip:AddDoubleLine(L.datatext_friendlist, format(totalOnlineString, totalonline, totalfriends),tthead.r,tthead.g,tthead.b,tthead.r,tthead.g,tthead.b) - if totalOnline > 0 then - GameTooltip:AddLine(' ') - GameTooltip:AddLine(worldOfWarcraftString) - for i = 1, #friendTable do - if friendTable[i][5] then - if GetRealZoneText() == friendTable[i][4] then zonec = activezone else zonec = inactivezone end - classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[friendTable[i][3]], GetQuestDifficultyColor(friendTable[i][2]) - if classc == nil then classc = GetQuestDifficultyColor(friendTable[i][2]) end - - if UnitInParty(friendTable[i][1]) or UnitInRaid(friendTable[i][1]) then grouped = 1 else grouped = 2 end - GameTooltip:AddDoubleLine(format(levelNameClassString,levelc.r*255,levelc.g*255,levelc.b*255,friendTable[i][2],friendTable[i][1],groupedTable[grouped]," "..friendTable[i][6]),friendTable[i][4],classc.r,classc.g,classc.b,zonec.r,zonec.g,zonec.b) - end - end - end - if BNTotalOnline > 0 then - GameTooltip:AddLine(' ') - GameTooltip:AddLine(battleNetString) - - local status = 0 - for i = 1, #BNTable do - if BNTable[i][7] then - if BNTable[i][6] == wowString then - if (BNTable[i][8] == true) then status = 1 elseif (BNTable[i][9] == true) then status = 2 else status = 3 end - - classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[BNTable[i][14]], GetQuestDifficultyColor(BNTable[i][16]) - if classc == nil then classc = GetQuestDifficultyColor(BNTable[i][16]) end - - if UnitInParty(BNTable[i][4]) or UnitInRaid(BNTable[i][4]) then grouped = 1 else grouped = 2 end - GameTooltip:AddDoubleLine(format(clientLevelNameString, BNTable[i][6],levelc.r*255,levelc.g*255,levelc.b*255,BNTable[i][16],classc.r*255,classc.g*255,classc.b*255,BNTable[i][4],groupedTable[grouped], 255, 0, 0, statusTable[status]),BNTable[i][2].." "..BNTable[i][3],238,238,238,238,238,238) - if IsShiftKeyDown() then - if GetRealZoneText() == BNTable[i][15] then zonec = activezone else zonec = inactivezone end - if GetRealmName() == BNTable[i][11] then realmc = activezone else realmc = inactivezone end - GameTooltip:AddDoubleLine(" "..BNTable[i][15], BNTable[i][11], zonec.r, zonec.g, zonec.b, realmc.r, realmc.g, realmc.b) - end - else - GameTooltip:AddDoubleLine("|cffeeeeee"..BNTable[i][6].." ("..BNTable[i][4]..")|r", "|cffeeeeee"..BNTable[i][2].." "..BNTable[i][3].."|r") - end - end - end - end - GameTooltip:Show() - else - GameTooltip:Hide() - end -end) - -Stat:RegisterEvent("BN_FRIEND_ACCOUNT_ONLINE") -Stat:RegisterEvent("BN_FRIEND_ACCOUNT_OFFLINE") -Stat:RegisterEvent("BN_FRIEND_INFO_CHANGED") -Stat:RegisterEvent("BN_FRIEND_TOON_ONLINE") -Stat:RegisterEvent("BN_FRIEND_TOON_OFFLINE") -Stat:RegisterEvent("BN_TOON_NAME_UPDATED") -Stat:RegisterEvent("FRIENDLIST_UPDATE") -Stat:RegisterEvent("PLAYER_ENTERING_WORLD") - -Stat:SetScript("OnLeave", function() GameTooltip:Hide() end) -Stat:SetScript("OnEvent", Update) \ No newline at end of file diff --git a/Tukui/modules/datatext/gold.lua b/Tukui/modules/datatext/gold.lua deleted file mode 100644 index 9b08025..0000000 --- a/Tukui/modules/datatext/gold.lua +++ /dev/null @@ -1,130 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- --- GOLD --------------------------------------------------------------------- - -if C["datatext"].gold and C["datatext"].gold > 0 then - local Stat = CreateFrame("Frame", "TukuiStatGold") - Stat:EnableMouse(true) - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.gold - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatGoldText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].gold, Text) - - local Profit = 0 - local Spent = 0 - local OldMoney = 0 - local myPlayerRealm = GetCVar("realmName"); - - local function formatMoney(money) - local gold = floor(math.abs(money) / 10000) - local silver = mod(floor(math.abs(money) / 100), 100) - local copper = mod(floor(math.abs(money)), 100) - if gold ~= 0 then - return format(Stat.Color2.."%s|r"..L.goldabbrev..Stat.Color2.." %s|r"..L.silverabbrev..Stat.Color2.." %s|r"..L.copperabbrev, gold, silver, copper) - elseif silver ~= 0 then - return format(Stat.Color2.."%s|r"..L.silverabbrev..Stat.Color2.." %s|r"..L.copperabbrev, silver, copper) - else - return format(Stat.Color2.."%s|r"..L.copperabbrev, copper) - end - end - - local function FormatTooltipMoney(money) - local gold, silver, copper = abs(money / 10000), abs(mod(money / 100, 100)), abs(mod(money, 100)) - local cash = "" - cash = format("%.2d"..L.goldabbrev.." %.2d"..L.silverabbrev.." %.2d"..L.copperabbrev, gold, silver, copper) - return cash - end - - local function OnEvent(self, event) - if event == "PLAYER_ENTERING_WORLD" then - OldMoney = GetMoney() - end - - local NewMoney = GetMoney() - local Change = NewMoney-OldMoney -- Positive if we gain money - - if OldMoney>NewMoney then -- Lost Money - Spent = Spent - Change - else -- Gained Moeny - Profit = Profit + Change - end - - Text:SetText(formatMoney(NewMoney)) - -- Setup Money Tooltip - self:SetAllPoints(Text) - - local myPlayerName = UnitName("player"); - if (TukuiData == nil) then TukuiData = {}; end - if (TukuiData.gold == nil) then TukuiData.gold = {}; end - if (TukuiData.gold[myPlayerRealm]==nil) then TukuiData.gold[myPlayerRealm]={}; end - TukuiData.gold[myPlayerRealm][myPlayerName] = GetMoney(); - - OldMoney = NewMoney - end - - Stat:RegisterEvent("PLAYER_MONEY") - Stat:RegisterEvent("SEND_MAIL_MONEY_CHANGED") - Stat:RegisterEvent("SEND_MAIL_COD_CHANGED") - Stat:RegisterEvent("PLAYER_TRADE_MONEY") - Stat:RegisterEvent("TRADE_MONEY_CHANGED") - Stat:RegisterEvent("PLAYER_ENTERING_WORLD") - Stat:SetScript("OnMouseDown", function() ToggleAllBags() end) - Stat:SetScript("OnEvent", OnEvent) - Stat:SetScript("OnEnter", function(self) - if not InCombatLockdown() then - local anchor, panel, xoff, yoff = T.DataTextTooltipAnchor(Text) - GameTooltip:SetOwner(panel, anchor, xoff, yoff) - GameTooltip:ClearLines() - GameTooltip:AddLine(L.datatext_session) - GameTooltip:AddDoubleLine(L.datatext_earned, formatMoney(Profit), 1, 1, 1, 1, 1, 1) - GameTooltip:AddDoubleLine(L.datatext_spent, formatMoney(Spent), 1, 1, 1, 1, 1, 1) - if Profit < Spent then - GameTooltip:AddDoubleLine(L.datatext_deficit, formatMoney(Profit-Spent), 1, 0, 0, 1, 1, 1) - elseif (Profit-Spent)>0 then - GameTooltip:AddDoubleLine(L.datatext_profit, formatMoney(Profit-Spent), 0, 1, 0, 1, 1, 1) - end - GameTooltip:AddLine' ' - - local totalGold = 0 - GameTooltip:AddLine(L.datatext_character) - local thisRealmList = TukuiData.gold[myPlayerRealm]; - for k,v in pairs(thisRealmList) do - GameTooltip:AddDoubleLine(k, FormatTooltipMoney(v), 1, 1, 1, 1, 1, 1) - totalGold=totalGold+v; - end - GameTooltip:AddLine' ' - GameTooltip:AddLine(L.datatext_server) - GameTooltip:AddDoubleLine(L.datatext_totalgold, FormatTooltipMoney(totalGold), 1, 1, 1, 1, 1, 1) - - for i = 1, GetNumWatchedTokens() do - local name, count, extraCurrencyType, icon, itemID = GetBackpackCurrencyInfo(i) - if name and i == 1 then - GameTooltip:AddLine(" ") - GameTooltip:AddLine(CURRENCY) - end - local r, g, b = 1,1,1 - if itemID then r, g, b = GetItemQualityColor(select(3, GetItemInfo(itemID))) end - if name and count then GameTooltip:AddDoubleLine(name, count, r, g, b, 1, 1, 1) end - end - GameTooltip:Show() - end - end) - Stat:SetScript("OnLeave", function() GameTooltip:Hide() end) - -- reset gold data - local function RESETGOLD() - local myPlayerRealm = GetCVar("realmName"); - local myPlayerName = UnitName("player"); - - TukuiData.gold = {} - TukuiData.gold[myPlayerRealm]={} - TukuiData.gold[myPlayerRealm][myPlayerName] = GetMoney(); - end - SLASH_RESETGOLD1 = "/resetgold" - SlashCmdList["RESETGOLD"] = RESETGOLD -end \ No newline at end of file diff --git a/Tukui/modules/datatext/guild.lua b/Tukui/modules/datatext/guild.lua deleted file mode 100644 index ec6ec69..0000000 --- a/Tukui/modules/datatext/guild.lua +++ /dev/null @@ -1,226 +0,0 @@ --------------------------------------------------------------------- --- GUILD ROSTER --------------------------------------------------------------------- -local T, C, L = unpack(select(2, ...)) -- Import Functions/Constants, Config, Locales - -if not C["datatext"].guild or C["datatext"].guild == 0 then return end - -local Stat = CreateFrame("Frame", "TukuiStatGuild") -Stat:EnableMouse(true) -Stat:SetFrameStrata("BACKGROUND") -Stat:SetFrameLevel(3) -Stat.Option = C.datatext.guild -Stat.update = false -Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) -Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - -local tthead, ttsubh, ttoff = {r=0.4, g=0.78, b=1}, {r=0.75, g=0.9, b=1}, {r=.3,g=1,b=.3} -local activezone, inactivezone = {r=0.3, g=1.0, b=0.3}, {r=0.65, g=0.65, b=0.65} -local displayString = string.join("", Stat.Color1.."%s: |r", Stat.Color2, "%d|r") -local guildInfoString = "%s [%d]" -local guildInfoString2 = "%s: %d/%d" -local guildMotDString = " %s |cffaaaaaa- |cffffffff%s" -local levelNameString = "|cff%02x%02x%02x%d|r |cff%02x%02x%02x%s|r %s" -local levelNameStatusString = "|cff%02x%02x%02x%d|r %s %s" -local nameRankString = "%s |cff999999-|cffffffff %s" -local noteString = " '%s'" -local officerNoteString = " o: '%s'" - -local guildTable, guildXP, guildMotD = {}, {}, "" -local totalOnline = 0 - -local Text = Stat:CreateFontString("TukuiStatGuildText", "OVERLAY") -Text:SetFont(C.media.font, C["datatext"].fontsize) -T.PP(C["datatext"].guild, Text) - -local function BuildGuildTable() - totalOnline = 0 - wipe(guildTable) - local name, rank, level, zone, note, officernote, connected, status, class - for i = 1, GetNumGuildMembers() do - name, rank, _, level, _, zone, note, officernote, connected, status, class = GetGuildRosterInfo(i) - guildTable[i] = { name, rank, level, zone, note, officernote, connected, status, class } - if connected then totalOnline = totalOnline + 1 end - end - table.sort(guildTable, function(a, b) - if a and b then - return a[1] < b[1] - end - end) -end - -local function UpdateGuildXP() - local currentXP, remainingXP, dailyXP, maxDailyXP = UnitGetGuildXP("player") - local nextLevelXP = currentXP + remainingXP - - -- prevent 4.3 division / 0 - if nextLevelXP == 0 or maxDailyXP == 0 then return end - - local percentTotal = tostring(math.ceil((currentXP / nextLevelXP) * 100)) - local percentDaily = tostring(math.ceil((dailyXP / maxDailyXP) * 100)) - - guildXP[0] = { currentXP, nextLevelXP, percentTotal } - guildXP[1] = { dailyXP, maxDailyXP, percentDaily } -end - -local function UpdateGuildMessage() - guildMotD = GetGuildRosterMOTD() -end - -local function Update(self, event, ...) - if event == "PLAYER_ENTERING_WORLD" then - self:UnregisterEvent("PLAYER_ENTERING_WORLD") - if IsInGuild() and not GuildFrame then LoadAddOn("Blizzard_GuildUI") end - end - - if IsInGuild() then - totalOnline = 0 - local name, rank, level, zone, note, officernote, connected, status, class - for i = 1, GetNumGuildMembers() do - local connected = select(9, GetGuildRosterInfo(i)) - if connected then totalOnline = totalOnline + 1 end - end - Text:SetFormattedText(displayString, L.datatext_guild, totalOnline) - else - Text:SetText(L.datatext_noguild) - end - - self:SetAllPoints(Text) -end - -local menuFrame = CreateFrame("Frame", "TukuiGuildRightClickMenu", UIParent, "UIDropDownMenuTemplate") -local menuList = { - { text = OPTIONS_MENU, isTitle = true,notCheckable=true}, - { text = INVITE, hasArrow = true,notCheckable=true,}, - { text = CHAT_MSG_WHISPER_INFORM, hasArrow = true,notCheckable=true,} -} - -local function inviteClick(self, arg1, arg2, checked) - menuFrame:Hide() - InviteUnit(arg1) -end - -local function whisperClick(self,arg1,arg2,checked) - menuFrame:Hide() - SetItemRef( "player:"..arg1, ("|Hplayer:%1$s|h[%1$s]|h"):format(arg1), "LeftButton" ) -end - -local function ToggleGuildFrame() - if IsInGuild() then - if not GuildFrame then LoadAddOn("Blizzard_GuildUI") end - GuildFrame_Toggle() - GuildFrame_TabClicked(GuildFrameTab2) - else - if not LookingForGuildFrame then LoadAddOn("Blizzard_LookingForGuildUI") end - LookingForGuildFrame_Toggle() - end -end - -Stat:SetScript("OnMouseUp", function(self, btn) - if btn ~= "RightButton" or not IsInGuild() then return end - - GameTooltip:Hide() - - local classc, levelc, grouped - local menuCountWhispers = 0 - local menuCountInvites = 0 - - menuList[2].menuList = {} - menuList[3].menuList = {} - - for i = 1, #guildTable do - if guildTable[i][7] and guildTable[i][1] ~= T.myname then - local classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[guildTable[i][9]], GetQuestDifficultyColor(guildTable[i][3]) - - if UnitInParty(guildTable[i][1]) or UnitInRaid(guildTable[i][1]) then - grouped = "|cffaaaaaa*|r" - else - menuCountInvites = menuCountInvites +1 - grouped = "" - menuList[2].menuList[menuCountInvites] = {text = string.format(levelNameString, levelc.r*255,levelc.g*255,levelc.b*255, guildTable[i][3], classc.r*255,classc.g*255,classc.b*255, guildTable[i][1], ""), arg1 = guildTable[i][1],notCheckable=true, func = inviteClick} - end - menuCountWhispers = menuCountWhispers + 1 - menuList[3].menuList[menuCountWhispers] = {text = string.format(levelNameString, levelc.r*255,levelc.g*255,levelc.b*255, guildTable[i][3], classc.r*255,classc.g*255,classc.b*255, guildTable[i][1], grouped), arg1 = guildTable[i][1],notCheckable=true, func = whisperClick} - end - end - - EasyMenu(menuList, menuFrame, "cursor", 0, 0, "MENU", 2) -end) - -Stat:SetScript("OnEnter", function(self) - if InCombatLockdown() or not IsInGuild() then return end - - GuildRoster() - UpdateGuildMessage() - BuildGuildTable() - - local name, rank, level, zone, note, officernote, connected, status, class - local zonec, classc, levelc - local online = totalOnline - - local anchor, panel, xoff, yoff = T.DataTextTooltipAnchor(Text) - GameTooltip:SetOwner(panel, anchor, xoff, yoff) - GameTooltip:ClearLines() - GameTooltip:AddDoubleLine(string.format(guildInfoString, GetGuildInfo('player'), GetGuildLevel()), string.format(guildInfoString2, L.datatext_guild, online, #guildTable),tthead.r,tthead.g,tthead.b,tthead.r,tthead.g,tthead.b) - - if guildMotD ~= "" then GameTooltip:AddLine(' ') GameTooltip:AddLine(string.format(guildMotDString, GUILD_MOTD, guildMotD), ttsubh.r, ttsubh.g, ttsubh.b, 1) end - - local col = T.RGBToHex(ttsubh.r, ttsubh.g, ttsubh.b) - GameTooltip:AddLine' ' - if GetGuildLevel() ~= 25 then - UpdateGuildXP() - - if guildXP[0] and guildXP[1] then - local currentXP, nextLevelXP, percentTotal = unpack(guildXP[0]) - local dailyXP, maxDailyXP, percentDaily = unpack(guildXP[1]) - - GameTooltip:AddLine(string.format(col..GUILD_EXPERIENCE_CURRENT, "|r |cFFFFFFFF"..T.ShortValue(currentXP), T.ShortValue(nextLevelXP), percentTotal)) - GameTooltip:AddLine(string.format(col..GUILD_EXPERIENCE_DAILY, "|r |cFFFFFFFF"..T.ShortValue(dailyXP), T.ShortValue(maxDailyXP), percentDaily)) - end - end - - local _, _, standingID, barMin, barMax, barValue = GetGuildFactionInfo() - if standingID ~= 8 then -- Not Max Rep - barMax = barMax - barMin - barValue = barValue - barMin - barMin = 0 - GameTooltip:AddLine(string.format("%s:|r |cFFFFFFFF%s/%s (%s%%)",col..COMBAT_FACTION_CHANGE, T.ShortValue(barValue), T.ShortValue(barMax), math.ceil((barValue / barMax) * 100))) - end - - if online > 1 then - GameTooltip:AddLine(' ') - for i = 1, #guildTable do - if online <= 1 then - if online > 1 then GameTooltip:AddLine(format("+ %d More...", online - modules.Guild.maxguild),ttsubh.r,ttsubh.g,ttsubh.b) end - break - end - - name, rank, level, zone, note, officernote, connected, status, class = unpack(guildTable[i]) - if connected and name ~= T.myname then - if GetRealZoneText() == zone then zonec = activezone else zonec = inactivezone end - classc, levelc = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class], GetQuestDifficultyColor(level) - - if IsShiftKeyDown() then - GameTooltip:AddDoubleLine(string.format(nameRankString, name, rank), zone, classc.r, classc.g, classc.b, zonec.r, zonec.g, zonec.b) - if note ~= "" then GameTooltip:AddLine(string.format(noteString, note), ttsubh.r, ttsubh.g, ttsubh.b, 1) end - if officernote ~= "" then GameTooltip:AddLine(string.format(officerNoteString, officernote), ttoff.r, ttoff.g, ttoff.b ,1) end - else - GameTooltip:AddDoubleLine(string.format(levelNameStatusString, levelc.r*255, levelc.g*255, levelc.b*255, level, name, status), zone, classc.r,classc.g,classc.b, zonec.r,zonec.g,zonec.b) - end - end - end - end - GameTooltip:Show() -end) - -Stat:SetScript("OnLeave", function() GameTooltip:Hide() end) -Stat:SetScript("OnMouseDown", function(self, btn) - if btn ~= "LeftButton" then return end - ToggleGuildFrame() -end) - -Stat:RegisterEvent("GUILD_ROSTER_SHOW") -Stat:RegisterEvent("PLAYER_ENTERING_WORLD") -Stat:RegisterEvent("GUILD_ROSTER_UPDATE") -Stat:RegisterEvent("PLAYER_GUILD_UPDATE") -Stat:SetScript("OnEvent", Update) \ No newline at end of file diff --git a/Tukui/modules/datatext/haste.lua b/Tukui/modules/datatext/haste.lua deleted file mode 100644 index 39a4b4a..0000000 --- a/Tukui/modules/datatext/haste.lua +++ /dev/null @@ -1,42 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- --- player haste --------------------------------------------------------------------- - -if C["datatext"].haste and C["datatext"].haste > 0 then - local Stat = CreateFrame("Frame", "TukuiStatHaste") - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.haste - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatHasteText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].haste, Text) - - local int = 1 - - local function Update(self, t) - spellhaste = GetCombatRating(20) - rangedhaste = GetCombatRating(19) - attackhaste = GetCombatRating(18) - - if attackhaste > spellhaste and select(2, UnitClass("Player")) ~= "HUNTER" then - haste = attackhaste - elseif select(2, UnitClass("Player")) == "HUNTER" then - haste = rangedhaste - else - haste = spellhaste - end - - int = int - t - if int < 0 then - Text:SetText(Stat.Color2..haste.."|r "..Stat.Color1..L.datatext_playerhaste.."|r") - int = 1 - end - end - - Stat:SetScript("OnUpdate", Update) - Update(Stat, 10) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/hit.lua b/Tukui/modules/datatext/hit.lua deleted file mode 100644 index 68344d4..0000000 --- a/Tukui/modules/datatext/hit.lua +++ /dev/null @@ -1,49 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - --------------------------------------------------------------------- --- Player Hit --------------------------------------------------------------------- - --- Hit Rating -if not C["datatext"].hit == nil or C["datatext"].hit > 0 then - local Stat = CreateFrame("Frame", "TukuiStatHit") - Stat.Option = C.datatext.hit - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatHitText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].hit, Text) - - local int = 1 - - local function Update(self, t) - int = int - t - if int < 0 then - local base, posBuff, negBuff = UnitAttackPower("player") - local effective = base + posBuff + negBuff - local Rbase, RposBuff, RnegBuff = UnitRangedAttackPower("player") - local Reffective = Rbase + RposBuff + RnegBuff - - local Rattackpwr = Reffective - local spellpwr = GetSpellBonusDamage(7) - local attackpwr = effective - - local cac = GetHitModifier() or 0 - local cast = GetSpellHitModifier() or 0 - - if attackpwr > spellpwr and select(2, UnitClass("Player")) ~= "HUNTER" then - Text:SetText(format(Stat.Color2.."%.2f%%|r ", GetCombatRatingBonus(6)+cac)..Stat.Color1..HIT.."|r") - elseif select(2, UnitClass("Player")) == "HUNTER" then - Text:SetText(format(Stat.Color2.."%.2f%%|r ", GetCombatRatingBonus(7)+cac)..Stat.Color1..HIT.."|r") - else - Text:SetText(format(Stat.Color2.."%.2f%%|r ", GetCombatRatingBonus(8)+cast)..Stat.Color1..HIT.."|r") - end - - int = 1 - end - end - - Stat:SetScript("OnUpdate", Update) - Update(Stat, 10) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/hps.lua b/Tukui/modules/datatext/hps.lua deleted file mode 100644 index cfae9a8..0000000 --- a/Tukui/modules/datatext/hps.lua +++ /dev/null @@ -1,101 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- --- SUPPORT FOR HPS Feed... --------------------------------------------------------------------- - -if C["datatext"].hps_text and C["datatext"].hps_text > 0 then - local events = {SPELL_HEAL = true, SPELL_PERIODIC_HEAL = true} - local HPS_FEED = CreateFrame("Frame", "TukuiStatHeal") - HPS_FEED.Option = C.datatext.hps_text - HPS_FEED.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - HPS_FEED.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local player_id = UnitGUID("player") - local actual_heals_total, cmbt_time = 0 - local amount_healed, amount_over_healed = 0 - - local hText = HPS_FEED:CreateFontString("TukuiStatHealText", "OVERLAY") - hText:SetFont(C.media.font, C["datatext"].fontsize) - hText:SetText("0.0 ",L.datatext_hps) - - T.PP(C["datatext"].hps_text, hText) - - HPS_FEED:EnableMouse(true) - HPS_FEED:SetFrameStrata("BACKGROUND") - HPS_FEED:SetFrameLevel(3) - HPS_FEED:Height(20) - HPS_FEED:Width(100) - HPS_FEED:SetAllPoints(hText) - - HPS_FEED:SetScript("OnEvent", function(self, event, ...) self[event](self, ...) end) - HPS_FEED:RegisterEvent("PLAYER_LOGIN") - - local elapsed = 1 - HPS_FEED:SetScript("OnUpdate", function(self, elap) - if UnitAffectingCombat("player") then - HPS_FEED:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") - cmbt_time = cmbt_time + elap - else - HPS_FEED:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") - end - - elapsed = elapsed + elap - if elapsed >= 1 then - elapsed = 0 - hText:SetText(get_hps()) - end - end) - - function HPS_FEED:PLAYER_LOGIN() - HPS_FEED:RegisterEvent("PLAYER_REGEN_ENABLED") - HPS_FEED:RegisterEvent("PLAYER_REGEN_DISABLED") - - player_id = UnitGUID("player") - - HPS_FEED:UnregisterEvent("PLAYER_LOGIN") - end - - -- handler for the combat log. used http://www.wowwiki.com/API_COMBAT_LOG_EVENT for api - function HPS_FEED:COMBAT_LOG_EVENT_UNFILTERED(...) - -- filter for events we only care about. i.e heals - if not events[select(2, ...)] then return end - if event == "PLAYER_REGEN_DISABLED" then return end - - -- only use events from the player - local id = select(4, ...) - if id == player_id then - if T.toc < 40200 then - amount_healed = select(13, ...) - amount_over_healed = select(14, ...) - else - amount_healed = select(15, ...) - amount_over_healed = select(16, ...) - end - -- add to the total the healed amount subtracting the overhealed amount - actual_heals_total = actual_heals_total + math.max(0, amount_healed - amount_over_healed) - end - end - - function HPS_FEED:PLAYER_REGEN_ENABLED() - hText:SetText(get_hps) - end - - function HPS_FEED:PLAYER_REGEN_DISABLED() - cmbt_time = 0 - actual_heals_total = 0 - end - - HPS_FEED:SetScript("OnMouseDown", function (self, button, down) - cmbt_time = 0 - actual_heals_total = 0 - end) - - function get_hps() - if (actual_heals_total == 0) then - return (HPS_FEED.Color2.."0.0 |r" .. HPS_FEED.Color1 .. L.datatext_hps .. "|r") - else - return string.format(HPS_FEED.Color2.."%.1fk |r" .. HPS_FEED.Color1..L.datatext_hps.."|r", ((actual_heals_total or 0) / (cmbt_time or 1)) / 1000) - end - end - -end \ No newline at end of file diff --git a/Tukui/modules/datatext/mastery.lua b/Tukui/modules/datatext/mastery.lua deleted file mode 100644 index 2235bc4..0000000 --- a/Tukui/modules/datatext/mastery.lua +++ /dev/null @@ -1,28 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- --- Mastery ----------------------------------------------------------------- - -if not C["datatext"].mastery == nil or C["datatext"].mastery > 0 then - local Stat = CreateFrame("Frame", "TukuiStatMastery") - Stat.Option = C.datatext.mastery - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatMasteryText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].mastery, Text) - - local int = 1 - - local function Update(self, t) - int = int - t - if int < 0 then - Text:SetText(Stat.Color1..STAT_MASTERY..":|r "..Stat.Color2..GetCombatRating(26).."|r") - int = 1 - end - end - - Stat:SetScript("OnUpdate", Update) - Update(Stat, 10) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/micromenu.lua b/Tukui/modules/datatext/micromenu.lua deleted file mode 100644 index 62bdcf8..0000000 --- a/Tukui/modules/datatext/micromenu.lua +++ /dev/null @@ -1,41 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales ------------------------------------------ --- Tukui Micro Menu --- --- By: Rian Quinn --- Date: 12-17-2010 --- --- Notes: This datatext is designed to --- show the same micromenu that --- is shown when you use the --- middle mouse key on the mini --- map. ------------------------------------------ - -if C["datatext"].micromenu and C["datatext"].micromenu > 0 then - local Stat = CreateFrame("Frame", "TukuiStatMicroMenu") - Stat:EnableMouse(true) - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.micromenu - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatMicroMenuText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].micromenu, Text) - - local function OnEvent(self, event, ...) - Text:SetText(Stat.Color2..MAINMENU_BUTTON.."|r") - self:SetAllPoints(Text) - end - - local function OpenMenu() - if not TukuiMicroButtonsDropDown then return end - EasyMenu(T.MicroMenu, TukuiMicroButtonsDropDown, "cursor", 0, 0, "MENU", 2) - end - - Stat:RegisterEvent("PLAYER_LOGIN") - Stat:SetScript("OnEvent", OnEvent) - Stat:SetScript("OnMouseDown", function() OpenMenu() end) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/power.lua b/Tukui/modules/datatext/power.lua deleted file mode 100644 index 05c6e62..0000000 --- a/Tukui/modules/datatext/power.lua +++ /dev/null @@ -1,59 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - --------------------------------------------------------------------- --- player power (attackpower or power depending on what you have more of) --------------------------------------------------------------------- - -if C["datatext"].power and C["datatext"].power > 0 then - local Stat = CreateFrame("Frame", "TukuiStatPower") - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.power - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatPowerText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C["datatext"].power, Text) - - local int = 1 - - local function Update(self, t) - int = int - t - local base, posBuff, negBuff = UnitAttackPower("player") - local effective = base + posBuff + negBuff - local Rbase, RposBuff, RnegBuff = UnitRangedAttackPower("player") - local Reffective = Rbase + RposBuff + RnegBuff - - - healpwr = GetSpellBonusHealing() - - Rattackpwr = Reffective - spellpwr2 = GetSpellBonusDamage(7) - attackpwr = effective - - if healpwr > spellpwr2 then - spellpwr = healpwr - else - spellpwr = spellpwr2 - end - - if attackpwr > spellpwr and select(2, UnitClass("Player")) ~= "HUNTER" then - pwr = attackpwr - tp_pwr = L.datatext_playerap - elseif select(2, UnitClass("Player")) == "HUNTER" then - pwr = Reffective - tp_pwr = L.datatext_playerap - else - pwr = spellpwr - tp_pwr = L.datatext_playersp - end - if int < 0 then - Text:SetText(Stat.Color2..pwr.." |r".. Stat.Color1..tp_pwr.."|r") - int = 1 - end - end - - Stat:SetScript("OnUpdate", Update) - Update(Stat, 10) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/regen.lua b/Tukui/modules/datatext/regen.lua deleted file mode 100644 index 54d5abd..0000000 --- a/Tukui/modules/datatext/regen.lua +++ /dev/null @@ -1,34 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -if not C["datatext"].regen and not C["datatext"].regen > 0 then return end - -local regen - -local Stat = CreateFrame("Frame", "TukuiStatRegen") -Stat:SetFrameStrata("BACKGROUND") -Stat:SetFrameLevel(3) -Stat.Option = C.datatext.regen -Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) -Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - -local Text = Stat:CreateFontString("TukuiStatRegenText", "OVERLAY") -Text:SetFont(C["media"].font, C["datatext"].fontsize) -Text:SetShadowColor(0, 0, 0) -Text:SetShadowOffset(1.25, -1.25) -T.PP(C["datatext"].regen, Text) - -Stat:RegisterEvent("PLAYER_ENTERING_WORLD") -Stat:RegisterEvent("PLAYER_REGEN_DISABLED") -Stat:RegisterEvent("PLAYER_REGEN_ENABLED") -Stat:RegisterEvent("UNIT_STATS") -Stat:RegisterEvent("UNIT_AURA") -Stat:SetScript("OnEvent", function(self) - local base, casting = GetManaRegen() - - if InCombatLockdown() then - regen = floor(casting*5) - else - regen = floor(base*5) - end - - Text:SetText(Stat.Color2..regen.." "..MANA_REGEN_ABBR.."|r") -end) \ No newline at end of file diff --git a/Tukui/modules/datatext/system.lua b/Tukui/modules/datatext/system.lua deleted file mode 100644 index f051f4a..0000000 --- a/Tukui/modules/datatext/system.lua +++ /dev/null @@ -1,117 +0,0 @@ --------------------------------------------------------------------- --- System Stats --------------------------------------------------------------------- -local T, C, L = unpack(select(2, ...)) -- Import Functions/Constants, Config, Locales - -if not C["datatext"].system or C["datatext"].system == 0 then return end - -local Stat = CreateFrame("Frame", "TukuiStatSystem") -Stat:RegisterEvent("PLAYER_ENTERING_WORLD") -Stat:SetFrameStrata("BACKGROUND") -Stat:SetFrameLevel(3) -Stat:EnableMouse(true) -Stat.Option = C.datatext.system -Stat.tooltip = false -Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) -Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - -local Text = Stat:CreateFontString("TukuiStatSystemText", "OVERLAY") -Text:SetFont(C.media.font, C["datatext"].fontsize) -T.PP(C["datatext"].system, Text) - -local bandwidthString = "%.2f Mbps" -local percentageString = "%.2f%%" - -local kiloByteString = "%d "..Stat.Color1.."kb".."|r" -local megaByteString = "%.2f "..Stat.Color1.."mb".."|r" - -local function formatMem(memory) - local mult = 10^1 - if memory > 999 then - local mem = ((memory/1024) * mult) / mult - return string.format(megaByteString, mem) - else - local mem = (memory * mult) / mult - return string.format(kiloByteString, mem) - end -end - -local memoryTable = {} - -local function RebuildAddonList(self) - local addOnCount = GetNumAddOns() - if (addOnCount == #memoryTable) or self.tooltip == true then return end - - -- Number of loaded addons changed, create new memoryTable for all addons - memoryTable = {} - for i = 1, addOnCount do - memoryTable[i] = { i, select(2, GetAddOnInfo(i)), 0, IsAddOnLoaded(i) } - end - self:SetAllPoints(Text) -end - -local function UpdateMemory() - -- Update the memory usages of the addons - UpdateAddOnMemoryUsage() - -- Load memory usage in table - local addOnMem = 0 - local totalMemory = 0 - for i = 1, #memoryTable do - addOnMem = GetAddOnMemoryUsage(memoryTable[i][1]) - memoryTable[i][3] = addOnMem - totalMemory = totalMemory + addOnMem - end - -- Sort the table to put the largest addon on top - table.sort(memoryTable, function(a, b) - if a and b then - return a[3] > b[3] - end - end) - - return totalMemory -end - -local int = 10 - -local function Update(self, t) - int = int - t - - if int < 0 then - RebuildAddonList(self) - local total = UpdateMemory() - Text:SetText(Stat.Color2..formatMem(total).."|r") - int = 10 - end -end - -Stat:SetScript("OnMouseDown", function () collectgarbage("collect") Update(Stat, 10) end) -Stat:SetScript("OnEnter", function(self) - if not InCombatLockdown() then - self.tooltip = true - local bandwidth = GetAvailableBandwidth() - local anchor, panel, xoff, yoff = T.DataTextTooltipAnchor(Text) - GameTooltip:SetOwner(panel, anchor, xoff, yoff) - GameTooltip:ClearLines() - if bandwidth ~= 0 then - -- GetAvailableBandwidth() func is bugged as always, commenting for now - -- GameTooltip:AddDoubleLine(L.datatext_bandwidth , string.format(bandwidthString, bandwidth),0.69, 0.31, 0.31,0.84, 0.75, 0.65) - GameTooltip:AddDoubleLine(L.datatext_download , string.format(percentageString, GetDownloadedPercentage() *100),0.69, 0.31, 0.31, 0.84, 0.75, 0.65) - GameTooltip:AddLine(" ") - end - local totalMemory = UpdateMemory() - GameTooltip:AddDoubleLine(L.datatext_totalmemusage, formatMem(totalMemory), 0.69, 0.31, 0.31,0.84, 0.75, 0.65) - GameTooltip:AddLine(" ") - for i = 1, #memoryTable do - if (memoryTable[i][4]) then - local red = memoryTable[i][3] / totalMemory - local green = 1 - red - GameTooltip:AddDoubleLine(memoryTable[i][2], formatMem(memoryTable[i][3]), 1, 1, 1, red, green + .5, 0) - end - end - GameTooltip:Show() - end -end) -Stat:SetScript("OnLeave", function(self) self.tooltip = false GameTooltip:Hide() end) -Stat:SetScript("OnUpdate", Update) -Stat:SetScript("OnEvent", function(self, event) collectgarbage("collect") end) -Update(Stat, 10) \ No newline at end of file diff --git a/Tukui/modules/datatext/talent.lua b/Tukui/modules/datatext/talent.lua deleted file mode 100644 index 8e8996a..0000000 --- a/Tukui/modules/datatext/talent.lua +++ /dev/null @@ -1,71 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -if C.datatext.talent and C.datatext.talent > 0 then - local Stat = CreateFrame("Frame", "TukuiStatTalent") - Stat:EnableMouse(true) - Stat:SetFrameStrata("BACKGROUND") - Stat:SetFrameLevel(3) - Stat.Option = C.datatext.talent - Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) - Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - - local Text = Stat:CreateFontString("TukuiStatTalentText", "OVERLAY") - Text:SetFont(C.media.font, C["datatext"].fontsize) - T.PP(C.datatext.talent, Text) - - local function Update(self) - if not GetPrimaryTalentTree() then - Text:SetText(L.datatext_notalents) - else - local majorTree = GetPrimaryTalentTree() - local tree1num = select(5,GetTalentTabInfo(1)) - local tree2num = select(5,GetTalentTabInfo(2)) - local tree3num = select(5,GetTalentTabInfo(3)) - local tree = select(2,GetTalentTabInfo(majorTree)) or "" - Text:SetText(Stat.Color1..tree..":|r "..Stat.Color2..tree1num.."/"..tree2num.."/"..tree3num.."|r") - end - self:SetAllPoints(Text) - end - - Stat:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") - Stat:RegisterEvent("CONFIRM_TALENT_WIPE") - Stat:RegisterEvent("PLAYER_TALENT_UPDATE") - Stat:SetScript("OnEvent", Update) - Stat:SetScript("OnEnter", function(self) - if not InCombatLockdown() then - local anchor, panel, xoff, yoff = T.DataTextTooltipAnchor(Text) - GameTooltip:SetOwner(panel, anchor, xoff, yoff) - GameTooltip:ClearLines() - - local c = GetActiveTalentGroup(false,false) - local group1tree1 = select(5,GetTalentTabInfo(1,false,false,1)) - local group1tree2 = select(5,GetTalentTabInfo(2,false,false,1)) - local group1tree3 = select(5,GetTalentTabInfo(3,false,false,1)) - local majorTree1 = GetPrimaryTalentTree(false,false,1) - local hs = (GetNumTalentGroups() == 2 and GetPrimaryTalentTree(false,false,2)) - local group2tree1 = hs and select(5,GetTalentTabInfo(1,false,false,2)) - local group2tree2 = hs and select(5,GetTalentTabInfo(2,false,false,2)) - local group2tree3 = hs and select(5,GetTalentTabInfo(3,false,false,2)) - local majorTree2 = 0 - if hs then - majorTree2 = GetPrimaryTalentTree(false,false,2) - end - - local green = "|cff00ff00("..ACTIVE_PETS..")" - local red = "|cffff0000 " - if majorTree1 and group1tree1 and group1tree2 and group1tree3 then - GameTooltip:AddDoubleLine("|cffffff00"..COMPACT_UNIT_FRAME_PROFILE_AUTOACTIVATESPEC1 ..":|r " .. select(2,GetTalentTabInfo(majorTree1)).." ("..group1tree1.."/"..group1tree2.."/"..group1tree3..")",(c == 1 and green or red) .. "|r",1,1,1) - end - if majorTree2 and group2tree1 and group2tree2 and group2tree3 then - GameTooltip:AddDoubleLine("|cffffff00"..COMPACT_UNIT_FRAME_PROFILE_AUTOACTIVATESPEC2 ..":|r ".. select(2,GetTalentTabInfo(majorTree2)).." ("..group2tree1.."/"..group2tree2.."/"..group2tree3..")",(c == 2 and green or red) .. "|r",1,1,1) - end - - GameTooltip:Show() - end - end) - Stat:SetScript("OnLeave", function() GameTooltip:Hide() end) - Stat:SetScript("OnMouseDown", function() - c = GetActiveTalentGroup(false,false) - SetActiveTalentGroup(c == 1 and 2 or 1) - end) -end \ No newline at end of file diff --git a/Tukui/modules/datatext/time.lua b/Tukui/modules/datatext/time.lua deleted file mode 100644 index 26f1439..0000000 --- a/Tukui/modules/datatext/time.lua +++ /dev/null @@ -1,200 +0,0 @@ --------------------------------------------------------------------- --- TIME --------------------------------------------------------------------- -local T, C, L = unpack(select(2, ...)) -- Import Functions/Constants, Config, Locales - -if not C["datatext"].wowtime or C["datatext"].wowtime == 0 then return end - -local Stat = CreateFrame("Frame", "TukuiStatTime") -Stat:EnableMouse(true) -Stat:SetFrameStrata("MEDIUM") -Stat:SetFrameLevel(3) -Stat.Option = C.datatext.wowtime -Stat.Color1 = T.RGBToHex(unpack(C.media.datatextcolor1)) -Stat.Color2 = T.RGBToHex(unpack(C.media.datatextcolor2)) - -local Text = Stat:CreateFontString("TukuiStatTimeText", "OVERLAY") -Text:SetFont(C.media.font, C["datatext"].fontsize) -T.PP(C["datatext"].wowtime, Text) - -local europeDisplayFormat = string.join("", Stat.Color2.."%02d", ":%02d|r") -local ukDisplayFormat = string.join("", "", Stat.Color2.."%d", ":%02d", " %s|r") -local timerLongFormat = "%d:%02d:%02d" -local timerShortFormat = "%d:%02d" -local lockoutInfoFormat = "%s |cffaaaaaa(%s%s, %s/%s)" -local formatBattleGroundInfo = "%s: " -local lockoutColorExtended, lockoutColorNormal = { r=0.3,g=1,b=0.3 }, { r=1,g=1,b=1 } -local difficultyInfo = { "N", "N", "H", "H" } -local curHr, curMin, curAmPm -local APM = { TIMEMANAGER_PM, TIMEMANAGER_AM } - -local function CalculateTimeValues(tt) - if tt == nil then tt = false end - local Hr, Min, AmPm - if tt == true then - if C["datatext"].localtime == true then - Hr, Min = GetGameTime() - if C["datatext"].time24 == true then - return Hr, Min, -1 - else - if Hr>=12 then - if Hr>12 then Hr = Hr - 12 end - AmPm = 1 - else - if Hr == 0 then Hr = 12 end - AmPm = 2 - end - return Hr, Min, AmPm - end - else - local Hr24 = tonumber(date("%H")) - Hr = tonumber(date("%I")) - Min = tonumber(date("%M")) - if C["datatext"].time24 == true then - return Hr24, Min, -1 - else - if Hr24>=12 then AmPm = 1 else AmPm = 2 end - return Hr, Min, AmPm - end - end - else - if C["datatext"].localtime == true then - local Hr24 = tonumber(date("%H")) - Hr = tonumber(date("%I")) - Min = tonumber(date("%M")) - if C["datatext"].time24 == true then - return Hr24, Min, -1 - else - if Hr24>=12 then AmPm = 1 else AmPm = 2 end - return Hr, Min, AmPm - end - else - Hr, Min = GetGameTime() - if C["datatext"].time24 == true then - return Hr, Min, -1 - else - if Hr>=12 then - if Hr>12 then Hr = Hr - 12 end - AmPm = 1 - else - if Hr == 0 then Hr = 12 end - AmPm = 2 - end - return Hr, Min, AmPm - end - end - end -end - -local function CalculateTimeLeft(time) - local hour = floor(time / 3600) - local min = floor(time / 60 - (hour*60)) - local sec = time - (hour * 3600) - (min * 60) - - return hour, min, sec -end - -local function formatResetTime(sec,table) - local table = table or {} - local d,h,m,s = ChatFrame_TimeBreakDown(floor(sec)) - local string = gsub(gsub(format(" %dd %dh %dm "..((d==0 and h==0) and "%ds" or ""),d,h,m,s)," 0[dhms]"," "),"%s+"," ") - local string = strtrim(gsub(string, "([dhms])", {d=table.days or "d",h=table.hours or "h",m=table.minutes or "m",s=table.seconds or "s"})," ") - return strmatch(string,"^%s*$") and "0"..(table.seconds or L"s") or string -end - -local int = 1 -local function Update(self, t) - int = int - t - if int > 0 then return end - - local Hr, Min, AmPm = CalculateTimeValues() - - -- no update quick exit - if (Hr == curHr and Min == curMin and AmPm == curAmPm) then - int = 2 - return - end - - curHr = Hr - curMin = Min - curAmPm = AmPm - - if AmPm == -1 then - Text:SetFormattedText(europeDisplayFormat, Hr, Min) - else - Text:SetFormattedText(ukDisplayFormat, Hr, Min, APM[AmPm]) - end - - self:SetAllPoints(Text) - int = 2 -end - -Stat:SetScript("OnEnter", function(self) - OnLoad = function(self) RequestRaidInfo() end - local anchor, panel, xoff, yoff = T.DataTextTooltipAnchor(Text) - GameTooltip:SetOwner(panel, anchor, xoff, yoff) - GameTooltip:ClearLines() - - local localizedName, isActive, canQueue, startTime, canEnter - for i = 1, GetNumWorldPVPAreas() do - _, localizedName, isActive, canQueue, startTime, canEnter = GetWorldPVPAreaInfo(i) - if canEnter then - if isActive then - startTime = WINTERGRASP_IN_PROGRESS - elseif startTime == nil then - startTime = QUEUE_TIME_UNAVAILABLE - else - local hour, min, sec = CalculateTimeLeft(startTime) - if hour > 0 then - startTime = string.format(timerLongFormat, hour, min, sec) - else - startTime = string.format(timerShortFormat, min, sec) - end - end - GameTooltip:AddDoubleLine(format(formatBattleGroundInfo, localizedName), startTime) - end - end - - local timeText - local Hr, Min, AmPm = CalculateTimeValues(true) - - if C["datatext"].localtime == true then - timeText = L.datatext_servertime - else - timeText = L.datatext_localtime - end - - if AmPm == -1 then - GameTooltip:AddDoubleLine(timeText, string.format(europeDisplayFormat, Hr, Min)) - else - GameTooltip:AddDoubleLine(timeText, string.format(ukDisplayFormat, Hr, Min, APM[AmPm])) - end - - local oneraid, lockoutColor - for i = 1, GetNumSavedInstances() do - local name, _, reset, difficulty, locked, extended, _, isRaid, maxPlayers, _, numEncounters, encounterProgress = GetSavedInstanceInfo(i) - if isRaid and (locked or extended) then - local tr,tg,tb,diff - if not oneraid then - GameTooltip:AddLine(" ") - GameTooltip:AddLine(L.datatext_savedraid) - oneraid = true - end - if extended then lockoutColor = lockoutColorExtended else lockoutColor = lockoutColorNormal end - GameTooltip:AddDoubleLine(format(lockoutInfoFormat, name, maxPlayers, difficultyInfo[difficulty],encounterProgress,numEncounters), formatResetTime(reset), 1,1,1, lockoutColor.r,lockoutColor.g,lockoutColor.b) - end - end - GameTooltip:Show() -end) - -Stat:SetScript("OnLeave", function() GameTooltip:Hide() end) -Stat:SetScript("OnUpdate", Update) -Stat:RegisterEvent("UPDATE_INSTANCE_INFO") -Stat:SetScript("OnMouseDown", function(self, btn) - if btn == 'RightButton' then - ToggleTimeManager() - else - GameTimeFrame:Click() - end -end) -Update(Stat, 10) \ No newline at end of file diff --git a/Tukui/modules/loot/autodez.lua b/Tukui/modules/loot/autodez.lua deleted file mode 100644 index 2e04371..0000000 --- a/Tukui/modules/loot/autodez.lua +++ /dev/null @@ -1,25 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------------- --- auto-dez (priority) or auto-greed green item at max level --- yes... you are right... i'm totally lazy --- auto-greed Frozen Orbs --------------------------------------------------------------------------- - -if C["loot"].autogreed == true then - local autogreed = CreateFrame("frame") - autogreed:RegisterEvent("START_LOOT_ROLL") - autogreed:SetScript("OnEvent", function(self, event, id) - local name = select(2, GetLootRollItemInfo(id)) - if (name == select(1, GetItemInfo(43102))) then - RollOnLoot(id, 2) - end - if T.level ~= MAX_PLAYER_LEVEL then return end - if(id and select(4, GetLootRollItemInfo(id))==2 and not (select(5, GetLootRollItemInfo(id)))) then - if RollOnLoot(id, 3) then - RollOnLoot(id, 3) - else - RollOnLoot(id, 2) - end - end - end) -end \ No newline at end of file diff --git a/Tukui/modules/loot/lootframe.lua b/Tukui/modules/loot/lootframe.lua deleted file mode 100644 index fb59149..0000000 --- a/Tukui/modules/loot/lootframe.lua +++ /dev/null @@ -1,330 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --- credits : Haste - -if not C["loot"].lootframe == true then return end - -local addon = CreateFrame("Button", "TukuiLootFrame") -local title = addon:CreateFontString(nil, "OVERLAY") - -local iconSize = 30 -local frameScale = 1 - -local sq, ss, sn - -local OnEnter = function(self) - local slot = self:GetID() - if(LootSlotIsItem(slot)) then - GameTooltip:SetOwner(self, "ANCHOR_RIGHT") - GameTooltip:SetLootItem(slot) - CursorUpdate(self) - end - - LootFrame.selectedSlot = self:GetID() - self.drop:Show() - self.drop:SetVertexColor(1, 1, 0) -end - -local OnLeave = function(self) - if self.quality then - if(self.quality > 1) then - local color = ITEM_QUALITY_COLORS[self.quality] - self.drop:SetVertexColor(color.r, color.g, color.b) - else - self.drop:Hide() - end - end - - GameTooltip:Hide() - ResetCursor() -end - -local OnClick = function(self) - if(IsModifiedClick()) then - HandleModifiedItemClick(GetLootSlotLink(self:GetID())) - else - StaticPopup_Hide"CONFIRM_LOOT_DISTRIBUTION" - ss = self:GetID() - sq = self.quality - sn = self.name:GetText() - LootSlot(ss) - end -end - -local OnUpdate = function(self) - if(GameTooltip:IsOwned(self)) then - GameTooltip:SetOwner(self, "ANCHOR_RIGHT") - GameTooltip:SetLootItem(self:GetID()) - CursorOnUpdate(self) - end -end - -local createSlot = function(id) - local iconsize = iconSize-2 - local frame = CreateFrame("Button", 'TukuiLootFrameSlot'..id, addon) - frame:Point("LEFT", 8, 0) - frame:Point("RIGHT", -8, 0) - frame:Height(iconsize) - frame:SetID(id) - - frame:RegisterForClicks("LeftButtonUp", "RightButtonUp") - - frame:SetScript("OnEnter", OnEnter) - frame:SetScript("OnLeave", OnLeave) - frame:SetScript("OnClick", OnClick) - frame:SetScript("OnUpdate", OnUpdate) - - local iconFrame = CreateFrame("Frame", nil, frame) - iconFrame:Height(iconsize) - iconFrame:Width(iconsize) - iconFrame:ClearAllPoints() - iconFrame:SetPoint("RIGHT", frame) - - iconFrame:SetTemplate("Default") - - local icon = iconFrame:CreateTexture(nil, "ARTWORK") - icon:SetAlpha(.8) - icon:SetTexCoord(.07, .93, .07, .93) - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - frame.icon = icon - - local count = iconFrame:CreateFontString(nil, "OVERLAY") - count:ClearAllPoints() - count:SetJustifyH"RIGHT" - count:Point("BOTTOMRIGHT", iconFrame, -1, 2) - count:SetFont(C["media"].font, 12, "OUTLINE") - count:SetShadowOffset(.8, -.8) - count:SetShadowColor(0, 0, 0, 1) - count:SetText(1) - frame.count = count - - local name = frame:CreateFontString(nil, "OVERLAY") - name:SetJustifyH"LEFT" - name:ClearAllPoints() - name:SetPoint("LEFT", frame) - name:SetPoint("RIGHT", icon, "LEFT") - name:SetNonSpaceWrap(true) - name:SetFont(C["media"].font, 13, "OUTLINE") - name:SetShadowOffset(.8, -.8) - name:SetShadowColor(0, 0, 0, 1) - frame.name = name - - local drop = frame:CreateTexture(nil, "ARTWORK") - drop:SetTexture"Interface\\QuestFrame\\UI-QuestLogTitleHighlight" - - drop:SetPoint("LEFT", icon, "RIGHT", 0, 0) - drop:SetPoint("RIGHT", frame) - drop:SetAllPoints(frame) - drop:SetAlpha(.3) - frame.drop = drop - - addon.slots[id] = frame - return frame -end - -local anchorSlots = function(self) - local iconsize = iconSize - local shownSlots = 0 - for i=1, #self.slots do - local frame = self.slots[i] - if(frame:IsShown()) then - shownSlots = shownSlots + 1 - - -- We don't have to worry about the previous slots as they're already hidden. - frame:Point("TOP", addon, 4, (-8 + iconsize) - (shownSlots * iconsize)) - end - end - - self:Height(math.max(shownSlots * iconsize + 16, 20)) -end - -title:SetFont(C["media"].font, 13, "OUTLINE") -title:Point("BOTTOMLEFT", addon, "TOPLEFT", 4, 4) - -addon:SetScript("OnMouseDown", function(self) if(IsAltKeyDown()) then self:StartMoving() end end) -addon:SetScript("OnMouseUp", function(self) self:StopMovingOrSizing() end) -addon:SetScript("OnHide", function(self) - StaticPopup_Hide"CONFIRM_LOOT_DISTRIBUTION" - CloseLoot() -end) -addon:SetMovable(true) -addon:RegisterForClicks"anyup" - -addon:SetParent(UIParent) ---addon:SetUserPlaced(true) -addon:Point("TOPLEFT", 0, -104) -addon:SetTemplate("Default") -addon:Width(256) -addon:Height(64) -addon:SetBackdropColor(0.1, 0.1, 0.1, 1) - -addon:SetClampedToScreen(true) -addon:SetClampRectInsets(0, 0, T.Scale(14), 0) -addon:SetHitRectInsets(0, 0, T.Scale(-14), 0) -addon:SetFrameStrata"HIGH" -addon:SetToplevel(true) - -addon.slots = {} -addon.LOOT_OPENED = function(self, event, autoloot) - self:Show() - - if(not self:IsShown()) then - CloseLoot(not autoLoot) - end - - local items = GetNumLootItems() - - if(IsFishingLoot()) then - title:SetText(L.loot_fish) - elseif(not UnitIsFriend("player", "target") and UnitIsDead"target") then - title:SetText(UnitName"target") - else - title:SetText(LOOT) - end - - -- Blizzard uses strings here - if(GetCVar("lootUnderMouse") == "1") then - local x, y = GetCursorPosition() - x = x / self:GetEffectiveScale() - y = y / self:GetEffectiveScale() - - self:ClearAllPoints() - self:Point("TOPLEFT", nil, "BOTTOMLEFT", x - 40, y + 20) - self:GetCenter() - self:Raise() - else - self:ClearAllPoints() - self:SetUserPlaced(false) - self:Point("TOPLEFT", 0, -104) - end - - local m, w, t = 0, 0, title:GetStringWidth() - if(items > 0) then - for i=1, items do - local slot = addon.slots[i] or createSlot(i) - local texture, item, quantity, quality, locked = GetLootSlotInfo(i) - - if texture then - local color = ITEM_QUALITY_COLORS[quality] - - if(LootSlotIsCoin(i)) then - item = item:gsub("\n", ", ") - end - - if(quantity > 1) then - slot.count:SetText(quantity) - slot.count:Show() - else - slot.count:Hide() - end - - if(quality > 1) then - slot.drop:SetVertexColor(color.r, color.g, color.b) - slot.drop:Show() - else - slot.drop:Hide() - end - - slot.quality = quality - slot.name:SetText(item) - slot.name:SetTextColor(color.r, color.g, color.b) - slot.icon:SetTexture(texture) - - m = math.max(m, quality) - w = math.max(w, slot.name:GetStringWidth()) - - slot:Enable() - slot:Show() - end - end - else - local slot = addon.slots[1] or createSlot(1) - local color = ITEM_QUALITY_COLORS[0] - - slot.name:SetText(L.loot_empty) - slot.name:SetTextColor(color.r, color.g, color.b) - slot.icon:SetTexture[[Interface\Icons\INV_Misc_Herb_AncientLichen]] - - items = 1 - w = math.max(w, slot.name:GetStringWidth()) - - slot.count:Hide() - slot.drop:Hide() - slot:Disable() - slot:Show() - end - anchorSlots(self) - - w = w + 60 - t = t + 5 - - local color = ITEM_QUALITY_COLORS[m] - self:SetBackdropBorderColor(color.r, color.g, color.b, .8) - self:Width(math.max(w, t)) -end - -addon.LOOT_SLOT_CLEARED = function(self, event, slot) - if(not self:IsShown()) then return end - - addon.slots[slot]:Hide() - anchorSlots(self) -end - -addon.LOOT_CLOSED = function(self) - StaticPopup_Hide"LOOT_BIND" - self:Hide() - - for _, v in pairs(self.slots) do - v:Hide() - end -end - -addon.OPEN_MASTER_LOOT_LIST = function(self) - ToggleDropDownMenu(1, nil, GroupLootDropDown, addon.slots[ss], 0, 0) -end - -addon.UPDATE_MASTER_LOOT_LIST = function(self) - UIDropDownMenu_Refresh(GroupLootDropDown) -end - -addon.ADDON_LOADED = function(self, event, addon) - if(addon == "Tukui") then - self:SetScale(frameScale) - - -- clean up. - self[event] = nil - self:UnregisterEvent(event) - end -end - -addon:SetScript("OnEvent", function(self, event, ...) - self[event](self, event, ...) -end) - -addon:RegisterEvent"LOOT_OPENED" -addon:RegisterEvent"LOOT_SLOT_CLEARED" -addon:RegisterEvent"LOOT_CLOSED" -addon:RegisterEvent"OPEN_MASTER_LOOT_LIST" -addon:RegisterEvent"UPDATE_MASTER_LOOT_LIST" -addon:RegisterEvent"ADDON_LOADED" -addon:Hide() - --- Fuzz -LootFrame:UnregisterAllEvents() -table.insert(UISpecialFrames, "TukuiLootFrame") - -function _G.GroupLootDropDown_GiveLoot(self) - if ( sq >= MASTER_LOOT_THREHOLD ) then - local dialog = StaticPopup_Show("CONFIRM_LOOT_DISTRIBUTION", ITEM_QUALITY_COLORS[sq].hex..sn..FONT_COLOR_CODE_CLOSE, self:GetText()) - if (dialog) then - dialog.data = self.value - end - else - GiveMasterLoot(ss, self.value) - end - CloseDropDownMenus() -end - -StaticPopupDialogs["CONFIRM_LOOT_DISTRIBUTION"].OnAccept = function(self, data) - GiveMasterLoot(ss, data) -end \ No newline at end of file diff --git a/Tukui/modules/loot/merchant.lua b/Tukui/modules/loot/merchant.lua deleted file mode 100644 index 5a50162..0000000 --- a/Tukui/modules/loot/merchant.lua +++ /dev/null @@ -1,73 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -local filter = { - [6289] = true, -- Raw Longjaw Mud Snapper - [6291] = true, -- Raw Brilliant Smallfish - [6308] = true, -- Raw Bristle Whisker Catfish - [6309] = true, -- 17 Pound Catfish - [6310] = true, -- 19 Pound Catfish - [41808] = true, -- Bonescale Snapper - [42336] = true, -- Bloodstone Band - [42337] = true, -- Sun Rock Ring - [43244] = true, -- Crystal Citrine Necklace - [43571] = true, -- Sewer Carp - [43572] = true, -- Magic Eater -} - -local f = CreateFrame("Frame", "TukuiMerchant") -f:SetScript("OnEvent", function() - if C["merchant"].sellgrays or C["merchant"].sellmisc then - local c = 0 - for b=0,4 do - for s=1,GetContainerNumSlots(b) do - local l,lid = GetContainerItemLink(b, s), GetContainerItemID(b, s) - if l and lid then - local p = select(11, GetItemInfo(l))*select(2, GetContainerItemInfo(b, s)) - if C["merchant"].sellgrays and select(3, GetItemInfo(l))==0 and p > 0 then - UseContainerItem(b, s) - PickupMerchantItem() - c = c+p - end - if C["merchant"].sellmisc and filter[ lid ] then - UseContainerItem(b, s) - PickupMerchantItem() - c = c+p - end - end - end - end - if c>0 then - local g, s, c = math.floor(c/10000) or 0, math.floor((c%10000)/100) or 0, c%100 - DEFAULT_CHAT_FRAME:AddMessage(L.merchant_trashsell.." |cffffffff"..g..L.goldabbrev.." |cffffffff"..s..L.silverabbrev.." |cffffffff"..c..L.copperabbrev..".",255,255,0) - end - end - if not IsShiftKeyDown() then - if CanMerchantRepair() and C["merchant"].autorepair then - local cost, possible = GetRepairAllCost() - if cost>0 then - if possible then - RepairAllItems() - local c = cost%100 - local s = math.floor((cost%10000)/100) - local g = math.floor(cost/10000) - DEFAULT_CHAT_FRAME:AddMessage(L.merchant_repaircost.." |cffffffff"..g..L.goldabbrev.." |cffffffff"..s..L.silverabbrev.." |cffffffff"..c..L.copperabbrev..".",255,255,0) - else - DEFAULT_CHAT_FRAME:AddMessage(L.merchant_repairnomoney,255,0,0) - end - end - end - end -end) -f:RegisterEvent("MERCHANT_SHOW") - --- buy max number value with alt -local savedMerchantItemButton_OnModifiedClick = MerchantItemButton_OnModifiedClick -function MerchantItemButton_OnModifiedClick(self, ...) - if ( IsAltKeyDown() ) then - local maxStack = select(8, GetItemInfo(GetMerchantItemLink(self:GetID()))) - if ( maxStack and maxStack > 1 ) then - BuyMerchantItem(self:GetID(), GetMerchantItemMaxStack(self:GetID())) - end - end - savedMerchantItemButton_OnModifiedClick(self, ...) -end diff --git a/Tukui/modules/loot/rollframe.lua b/Tukui/modules/loot/rollframe.lua deleted file mode 100644 index e0ee1c0..0000000 --- a/Tukui/modules/loot/rollframe.lua +++ /dev/null @@ -1,348 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales ---[[ - this is an edited version of teksloot - all credits of this mod goes to tekhub ---]] - -if C["loot"].rolllootframe ~= true then return end - -local backdrop = { - bgFile = C["media"].blank, tile = true, tileSize = 0, - edgeFile = C["media"].blank, edgeSize = T.mult, - insets = {left = -T.mult, right = -T.mult, top = -T.mult, bottom = -T.mult}, -} - -local function ClickRoll(frame) - RollOnLoot(frame.parent.rollid, frame.rolltype) -end - - -local function HideTip() GameTooltip:Hide() end -local function HideTip2() GameTooltip:Hide(); ResetCursor() end - - -local rolltypes = {"need", "greed", "disenchant", [0] = "pass"} -local function SetTip(frame) - GameTooltip:SetOwner(frame, "ANCHOR_RIGHT") - GameTooltip:SetText(frame.tiptext) - if frame:IsEnabled() == 0 then GameTooltip:AddLine("|cffff3333Cannot roll") end - for name,roll in pairs(frame.parent.rolls) do if roll == rolltypes[frame.rolltype] then GameTooltip:AddLine(name, 1, 1, 1) end end - GameTooltip:Show() -end - - -local function SetItemTip(frame) - if not frame.link then return end - GameTooltip:SetOwner(frame, "ANCHOR_TOPLEFT") - GameTooltip:SetHyperlink(frame.link) - if IsShiftKeyDown() then GameTooltip_ShowCompareItem() end - if IsModifiedClick("DRESSUP") then ShowInspectCursor() else ResetCursor() end -end - - -local function ItemOnUpdate(self) - if IsShiftKeyDown() then GameTooltip_ShowCompareItem() end - CursorOnUpdate(self) -end - - -local function LootClick(frame) - if IsControlKeyDown() then DressUpItemLink(frame.link) - elseif IsShiftKeyDown() then ChatEdit_InsertLink(frame.link) end -end - - -local cancelled_rolls = {} -local function OnEvent(frame, event, rollid) - cancelled_rolls[rollid] = true - if frame.rollid ~= rollid then return end - - frame.rollid = nil - frame.time = nil - frame:Hide() -end - - -local function StatusUpdate(frame) - local t = GetLootRollTimeLeft(frame.parent.rollid) - local perc = t / frame.parent.time - frame.spark:Point("CENTER", frame, "LEFT", perc * frame:GetWidth(), 0) - frame:SetValue(t) -end - - -local function CreateRollButton(parent, ntex, ptex, htex, rolltype, tiptext, ...) - local f = CreateFrame("Button", nil, parent) - f:SetPoint(...) - f:Width(28) - f:Height(28) - f:SetNormalTexture(ntex) - if ptex then f:SetPushedTexture(ptex) end - f:SetHighlightTexture(htex) - f.rolltype = rolltype - f.parent = parent - f.tiptext = tiptext - f:SetScript("OnEnter", SetTip) - f:SetScript("OnLeave", HideTip) - f:SetScript("OnClick", ClickRoll) - f:SetMotionScriptsWhileDisabled(true) - local txt = f:CreateFontString(nil, nil) - txt:SetFont(C["media"].uffont, 12, "OUTLINE") - txt:SetPoint("CENTER", 0, rolltype == 2 and 1 or rolltype == 0 and -1.2 or 0) - return f, txt -end - - -local function CreateRollFrame() - local frame = CreateFrame("Frame", nil, UIParent) - frame:Width(328) - frame:Height(22) - frame:SetBackdrop(backdrop) - frame:SetBackdropColor(0.1, 0.1, 0.1, 1) - frame:SetScript("OnEvent", OnEvent) - frame:RegisterEvent("CANCEL_LOOT_ROLL") - frame:Hide() - - local button = CreateFrame("Button", nil, frame) - button:SetPoint("LEFT", -24, 0) - button:Width(22) - button:Height(22) - button:SetScript("OnEnter", SetItemTip) - button:SetScript("OnLeave", HideTip2) - button:SetScript("OnUpdate", ItemOnUpdate) - button:SetScript("OnClick", LootClick) - - frame.button = button - - local buttonborder = CreateFrame("Frame", nil, button) - buttonborder:Width(22) - buttonborder:Height(22) - buttonborder:SetPoint("CENTER", button, "CENTER") - buttonborder:SetBackdrop(backdrop) - buttonborder:SetBackdropColor(1, 1, 1, 0) - - local buttonborder2 = CreateFrame("Frame", nil, button) - buttonborder2:Width(24) - buttonborder2:Height(24) - buttonborder2:SetFrameLevel(buttonborder:GetFrameLevel()+1) - buttonborder2:SetPoint("CENTER", button, "CENTER") - buttonborder2:SetBackdrop(backdrop) - buttonborder2:SetBackdropColor(0, 0, 0, 0) - buttonborder2:SetBackdropBorderColor(0,0,0,1) - - - frame.buttonborder = buttonborder - - local tfade = frame:CreateTexture(nil, "BORDER") - tfade:Point("TOPLEFT", frame, "TOPLEFT", 4, 0) - tfade:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -4, 0) - tfade:SetTexture("Interface\\ChatFrame\\ChatFrameBackground") - tfade:SetBlendMode("ADD") - tfade:SetGradientAlpha("VERTICAL", .1, .1, .1, 0, .1, .1, .1, 0) - - local status = CreateFrame("StatusBar", nil, frame) - status:Width(326) - status:Height(20) - status:SetPoint("CENTER", frame, "CENTER", 0, 0) - status:SetScript("OnUpdate", StatusUpdate) - status:SetFrameLevel(status:GetFrameLevel()-1) - status:SetStatusBarTexture(C["media"].normTex) - status:SetStatusBarColor(.8, .8, .8, .9) - status.parent = frame - frame.status = status - - local spark = frame:CreateTexture(nil, "OVERLAY") - spark:Width(14) - spark:Height(25) - spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark") - spark:SetBlendMode("ADD") - status.spark = spark - - local need, needtext = CreateRollButton(frame, "Interface\\Buttons\\UI-GroupLoot-Dice-Up", "Interface\\Buttons\\UI-GroupLoot-Dice-Highlight", "Interface\\Buttons\\UI-GroupLoot-Dice-Down", 1, NEED, "LEFT", frame.button, "RIGHT", T.Scale(5), T.Scale(-1)) - local greed, greedtext = CreateRollButton(frame, "Interface\\Buttons\\UI-GroupLoot-Coin-Up", "Interface\\Buttons\\UI-GroupLoot-Coin-Highlight", "Interface\\Buttons\\UI-GroupLoot-Coin-Down", 2, GREED, "LEFT", need, "RIGHT", 0, T.Scale(-1)) - local de, detext - de, detext = CreateRollButton(frame, "Interface\\Buttons\\UI-GroupLoot-DE-Up", "Interface\\Buttons\\UI-GroupLoot-DE-Highlight", "Interface\\Buttons\\UI-GroupLoot-DE-Down", 3, ROLL_DISENCHANT, "LEFT", greed, "RIGHT", 0, T.Scale(-1)) - local pass, passtext = CreateRollButton(frame, "Interface\\Buttons\\UI-GroupLoot-Pass-Up", nil, "Interface\\Buttons\\UI-GroupLoot-Pass-Down", 0, PASS, "LEFT", de or greed, "RIGHT", 0, T.Scale(2.2)) - frame.needbutt, frame.greedbutt, frame.disenchantbutt = need, greed, de - frame.need, frame.greed, frame.pass, frame.disenchant = needtext, greedtext, passtext, detext - - local bind = frame:CreateFontString() - bind:Point("LEFT", pass, "RIGHT", 3, 1) - bind:SetFont(C["media"].uffont, 12, "OUTLINE") - frame.fsbind = bind - - local loot = frame:CreateFontString(nil, "ARTWORK") - loot:SetFont(C["media"].uffont, 12, "OUTLINE") - loot:Point("LEFT", bind, "RIGHT", 0, 0) - loot:Point("RIGHT", frame, "RIGHT", -5, 0) - loot:Height(10) - loot:Width(200) - loot:SetJustifyH("LEFT") - frame.fsloot = loot - - frame.rolls = {} - - return frame -end - - -local anchor = CreateFrame("Button", "TukuiRollAnchor", UIParent) -anchor:Width(300) -anchor:Height(22) -anchor:SetBackdrop(backdrop) -anchor:SetBackdropColor(0.25, 0.25, 0.25, 1) -local label = anchor:CreateFontString(nil, "ARTWORK") -label:SetFont(C["media"].uffont, 12, "OUTLINE") -label:SetAllPoints(anchor) -label:SetText(L.move_roll) -anchor:SetMovable(true) -anchor:EnableMouse(false) -anchor:SetTemplate("Default") -anchor:SetAlpha(0) -anchor:SetBackdropBorderColor(1, 0, 0, 1) - -local frames = {} - -local f = CreateRollFrame() -- Create one for good measure -f:Point("BOTTOMLEFT", next(frames) and frames[#frames] or anchor, "TOPLEFT", 0, 4) -table.insert(frames, f) - -local function GetFrame() - for i,f in ipairs(frames) do - if not f.rollid then return f end - end - - local f = CreateRollFrame() - f:Point("BOTTOMLEFT", next(frames) and frames[#frames] or anchor, "TOPLEFT", 0, 4) - table.insert(frames, f) - return f -end - - -local function START_LOOT_ROLL(rollid, time) - if cancelled_rolls[rollid] then return end - - local f = GetFrame() - f.rollid = rollid - f.time = time - for i in pairs(f.rolls) do f.rolls[i] = nil end - f.need:SetText(0) - f.greed:SetText(0) - f.pass:SetText(0) - f.disenchant:SetText(0) - - local texture, name, count, quality, bop, canNeed, canGreed, canDisenchant = GetLootRollItemInfo(rollid) - f.button:SetNormalTexture(texture) - f.button.link = GetLootRollItemLink(rollid) - - if canNeed then f.needbutt:Enable() else f.needbutt:Disable() end - if canGreed then f.greedbutt:Enable() else f.greedbutt:Disable() end - if canDisenchant then f.disenchantbutt:Enable() else f.disenchantbutt:Disable() end - SetDesaturation(f.needbutt:GetNormalTexture(), not canNeed) - SetDesaturation(f.greedbutt:GetNormalTexture(), not canGreed) - SetDesaturation(f.disenchantbutt:GetNormalTexture(), not canDisenchant) - - - f.fsbind:SetText(bop and "BoP" or "BoE") - f.fsbind:SetVertexColor(bop and 1 or .3, bop and .3 or 1, bop and .1 or .3) - - local color = ITEM_QUALITY_COLORS[quality] - f.fsloot:SetVertexColor(color.r, color.g, color.b) - f.fsloot:SetText(name) - - f:SetBackdropBorderColor(color.r, color.g, color.b, 1) - f.buttonborder:SetBackdropBorderColor(color.r, color.g, color.b, 1) - f.status:SetStatusBarColor(color.r, color.g, color.b, .7) - - f.status:SetMinMaxValues(0, time) - f.status:SetValue(time) - - f:SetPoint("CENTER", WorldFrame, "CENTER") - f:Show() -end - - -local locale = GetLocale() -local rollpairs = locale == "deDE" and { - ["(.*) passt automatisch bei (.+), weil [ersi]+ den Gegenstand nicht benutzen kann.$"] = "pass", - ["(.*) würfelt nicht für: (.+|r)$"] = "pass", - ["(.*) hat für (.+) 'Gier' ausgewählt"] = "greed", - ["(.*) hat für (.+) 'Bedarf' ausgewählt"] = "need", - ["(.*) hat für '(.+)' Entzauberung gewählt."] = "disenchant", -} or locale == "frFR" and { - ["(.*) a passé pour : (.+) parce qu'((il)|(elle)) ne peut pas ramasser cette objet.$"] = "pass", - ["(.*) a passé pour : (.+)"] = "pass", - ["(.*) a choisi Cupidité pour : (.+)"] = "greed", - ["(.*) a choisi Besoin pour : (.+)"] = "need", - ["(.*) a choisi Désenchantement pour : (.+)"] = "disenchant", -} or locale == "zhTW" and { - ["(.*)自動放棄:(.+),因為"] = "pass", - ["(.*)放棄了:(.+)"] = "pass", - ["(.*)選擇了貪婪優先:(.+)"] = "greed", - ["(.*)選擇了需求優先:(.+)"] = "need", - ["(.*)選擇分解:(.+)"] = "disenchant", -} or locale == "zhCN" and { - ["(.*)自动放弃了(.+),因为他无法拾取该物品。$"] = "pass", - ["(.*)放弃了:(.+)"] = "pass", - ["(.*)选择了贪婪取向:(.+)"] = "greed", - ["(.*)选择了需求取向:(.+)"] = "need", - ["(.*)选择了分解取向:(.+)"] = "disenchant", -} or locale == "ruRU" and { - ["(.*) автоматически передает предмет (.+), поскольку не может его забрать"] = "pass", - ["(.*) пропускает розыгрыш предмета \"(.+)\", поскольку не может его забрать"] = "pass", - ["(.*) отказывается от предмета (.+)%."] = "pass", - ["Разыгрывается: (.+)%. (.*): \"Не откажусь\""] = "greed", - ["Разыгрывается: (.+)%. (.*): \"Мне это нужно\""] = "need", - ["Разыгрывается: (.+)%. (.*): \"Распылить\""] = "disenchant", -} or locale == "koKR" and { - ["(.+)님이 획득할 수 없는 아이템이어서 자동으로 주사위 굴리기를 포기했습니다: (.+)"] = "pass", - ["(.+)님이 주사위 굴리기를 포기했습니다: (.+)"] = "pass", - ["(.+)님이 차비를 선택했습니다: (.+)"] = "greed", - ["(.+)님이 입찰을 선택했습니다: (.+)"] = "need", - ["(.+)님이 마력 추출을 선택했습니다: (.+)"] = "disenchant", -} or { - ["^(.*) automatically passed on: (.+) because s?he cannot loot that item.$"] = "pass", - ["^(.*) passed on: (.+|r)$"] = "pass", - ["(.*) has selected Greed for: (.+)"] = "greed", - ["(.*) has selected Need for: (.+)"] = "need", - ["(.*) has selected Disenchant for: (.+)"] = "disenchant", -} -local function ParseRollChoice(msg) - for i,v in pairs(rollpairs) do - local _, _, playername, itemname = string.find(msg, i) - if locale == "ruRU" and (v == "greed" or v == "need" or v == "disenchant") then - local temp = playername - playername = itemname - itemname = temp - end - if playername and itemname and playername ~= "Everyone" then return playername, itemname, v end - end -end - -local function CHAT_MSG_LOOT(msg) - local playername, itemname, rolltype = ParseRollChoice(msg) - if playername and itemname and rolltype then - for _,f in ipairs(frames) do - if f.rollid and f.button.link == itemname and not f.rolls[playername] then - f.rolls[playername] = rolltype - f[rolltype]:SetText(tonumber(f[rolltype]:GetText()) + 1) - return - end - end - end -end - -anchor:RegisterEvent("ADDON_LOADED") -anchor:SetScript("OnEvent", function(frame, event, addon) - if addon ~= "Tukui" then return end - - anchor:UnregisterEvent("ADDON_LOADED") - anchor:RegisterEvent("START_LOOT_ROLL") - anchor:RegisterEvent("CHAT_MSG_LOOT") - UIParent:UnregisterEvent("START_LOOT_ROLL") - UIParent:UnregisterEvent("CANCEL_LOOT_ROLL") - - anchor:SetScript("OnEvent", function(frame, event, ...) if event == "CHAT_MSG_LOOT" then return CHAT_MSG_LOOT(...) else return START_LOOT_ROLL(...) end end) - - anchor:Point("BOTTOM", UIParent, "BOTTOM", 0, 350) -end) diff --git a/Tukui/modules/maps/minimap.lua b/Tukui/modules/maps/minimap.lua deleted file mode 100644 index ac3302a..0000000 --- a/Tukui/modules/maps/minimap.lua +++ /dev/null @@ -1,265 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --------------------------------------------------------------------- --- Tukui Minimap Script --------------------------------------------------------------------- - -local TukuiMinimap = CreateFrame("Frame", "TukuiMinimap", UIParent) -TukuiMinimap:CreatePanel("Default", 1, 1, "CENTER", UIParent, "CENTER", 0, 0) -TukuiMinimap:RegisterEvent("ADDON_LOADED") -TukuiMinimap:Point("TOPRIGHT", UIParent, "TOPRIGHT", -24, -22) -TukuiMinimap:Size(144) -TukuiMinimap:SetClampedToScreen(true) -TukuiMinimap:SetMovable(true) -TukuiMinimap.text = T.SetFontString(TukuiMinimap, C.media.uffont, 12) -TukuiMinimap.text:SetPoint("CENTER") -TukuiMinimap.text:SetText(L.move_minimap) - --- kill the minimap cluster -MinimapCluster:Kill() - --- Parent Minimap into our Map frame. -Minimap:SetParent(TukuiMinimap) -Minimap:ClearAllPoints() -Minimap:Point("TOPLEFT", 2, -2) -Minimap:Point("BOTTOMRIGHT", -2, 2) - --- Hide Border -MinimapBorder:Hide() -MinimapBorderTop:Hide() - --- Hide Zoom Buttons -MinimapZoomIn:Hide() -MinimapZoomOut:Hide() - --- Hide Voice Chat Frame -MiniMapVoiceChatFrame:Hide() - --- Hide North texture at top -MinimapNorthTag:SetTexture(nil) - --- Hide Zone Frame -MinimapZoneTextButton:Hide() - --- Hide Tracking Button -MiniMapTracking:Hide() - --- Hide Calendar Button -GameTimeFrame:Hide() - --- Hide Mail Button -MiniMapMailFrame:ClearAllPoints() -MiniMapMailFrame:Point("TOPRIGHT", Minimap, 3, 3) -MiniMapMailBorder:Hide() -MiniMapMailIcon:SetTexture("Interface\\AddOns\\Tukui\\medias\\textures\\mail") - --- Move battleground icon -MiniMapBattlefieldFrame:ClearAllPoints() -MiniMapBattlefieldFrame:Point("BOTTOMRIGHT", Minimap, 3, 0) -MiniMapBattlefieldBorder:Hide() - --- Ticket Frame -local TukuiTicket = CreateFrame("Frame", "TukuiTicket", TukuiMinimap) -TukuiTicket:CreatePanel("Default", 1, 1, "CENTER", TukuiMinimap, "CENTER", 0, 0) -TukuiTicket:Size(TukuiMinimap:GetWidth() - 4, 24) -TukuiTicket:SetFrameStrata("MEDIUM") -TukuiTicket:SetFrameLevel(20) -TukuiTicket:Point("TOP", 0, -2) -TukuiTicket:FontString("Text", C.media.font, 12) -TukuiTicket.Text:SetPoint("CENTER") -TukuiTicket.Text:SetText(HELP_TICKET_EDIT) -TukuiTicket:SetBackdropBorderColor(255/255, 243/255, 82/255) -TukuiTicket.Text:SetTextColor(255/255, 243/255, 82/255) -TukuiTicket:SetAlpha(0) - -HelpOpenTicketButton:SetParent(TukuiTicket) -HelpOpenTicketButton:SetFrameLevel(TukuiTicket:GetFrameLevel() + 1) -HelpOpenTicketButton:SetFrameStrata(TukuiTicket:GetFrameStrata()) -HelpOpenTicketButton:ClearAllPoints() -HelpOpenTicketButton:SetAllPoints() -HelpOpenTicketButton:SetHighlightTexture(nil) -HelpOpenTicketButton:SetAlpha(0) -HelpOpenTicketButton:HookScript("OnShow", function(self) TukuiTicket:SetAlpha(1) end) -HelpOpenTicketButton:HookScript("OnHide", function(self) TukuiTicket:SetAlpha(0) end) - --- Hide world map button -MiniMapWorldMapButton:Hide() - --- shitty 3.3 flag to move -MiniMapInstanceDifficulty:ClearAllPoints() -MiniMapInstanceDifficulty:SetParent(Minimap) -MiniMapInstanceDifficulty:SetPoint("TOPLEFT", Minimap, "TOPLEFT", 0, 0) - --- 4.0.6 Guild instance difficulty -GuildInstanceDifficulty:ClearAllPoints() -GuildInstanceDifficulty:SetParent(Minimap) -GuildInstanceDifficulty:SetPoint("TOPLEFT", Minimap, "TOPLEFT", 0, 0) - --- Reposition lfg icon at bottom-left -local function UpdateLFG() - MiniMapLFGFrame:ClearAllPoints() - MiniMapLFGFrame:Point("BOTTOMRIGHT", Minimap, "BOTTOMRIGHT", 2, 1) - MiniMapLFGFrameBorder:Hide() -end -if T.toc < 40300 then - hooksecurefunc("MiniMapLFG_UpdateIsShown", UpdateLFG) -else - hooksecurefunc("MiniMapLFG_Update", UpdateLFG) -end - --- reskin LFG dropdown -local status -if T.toc >= 40300 then status = LFGSearchStatus else status = LFDSearchStatus end -status:SetTemplate("Default") - --- for t13+, if we move map we need to point status according to our Minimap position. -local function UpdateLFGTooltip() - local position = TukuiMinimap:GetPoint() - status:ClearAllPoints() - if position:match("BOTTOMRIGHT") then - status:SetPoint("BOTTOMRIGHT", MiniMapLFGFrame, "BOTTOMLEFT", 0, 0) - elseif position:match("BOTTOM") then - status:SetPoint("BOTTOMLEFT", MiniMapLFGFrame, "BOTTOMRIGHT", 4, 0) - elseif position:match("LEFT") then - status:SetPoint("TOPLEFT", MiniMapLFGFrame, "TOPRIGHT", 4, 0) - else - status:SetPoint("TOPRIGHT", MiniMapLFGFrame, "TOPLEFT", 0, 0) - end -end -status:HookScript("OnShow", UpdateLFGTooltip) - --- Enable mouse scrolling -Minimap:EnableMouseWheel(true) -Minimap:SetScript("OnMouseWheel", function(self, d) - if d > 0 then - _G.MinimapZoomIn:Click() - elseif d < 0 then - _G.MinimapZoomOut:Click() - end -end) - --- Set Square Map Mask -Minimap:SetMaskTexture(C.media.blank) - --- For others mods with a minimap button, set minimap buttons position in square mode. -function GetMinimapShape() return "SQUARE" end - --- do some stuff on addon loaded or player login event -TukuiMinimap:SetScript("OnEvent", function(self, event, addon) - if addon == "Blizzard_TimeManager" then - -- Hide Game Time - TimeManagerClockButton:Kill() - end -end) - ----------------------------------------------------------------------------------------- --- Map menus, right/middle click ----------------------------------------------------------------------------------------- - -Minimap:SetScript("OnMouseUp", function(self, btn) - local xoff = 0 - local position = TukuiMinimap:GetPoint() - - if btn == "RightButton" then - if position:match("RIGHT") then xoff = T.Scale(-8) end - ToggleDropDownMenu(1, nil, MiniMapTrackingDropDown, TukuiMinimap, xoff, T.Scale(-2)) - elseif btn == "MiddleButton" then - if not TukuiMicroButtonsDropDown then return end - if position:match("RIGHT") then xoff = T.Scale(-160) end - EasyMenu(T.MicroMenu, TukuiMicroButtonsDropDown, "cursor", xoff, 0, "MENU", 2) - else - Minimap_OnClick(self) - end -end) - ----------------------------------------------------------------------------------------- --- Mouseover map, displaying zone and coords ----------------------------------------------------------------------------------------- - -local m_zone = CreateFrame("Frame","TukuiMinimapZone",TukuiMinimap) -m_zone:CreatePanel("Default", 0, 20, "TOPLEFT", TukuiMinimap, "TOPLEFT", 2,-2) -m_zone:SetFrameLevel(5) -m_zone:SetFrameStrata("LOW") -m_zone:Point("TOPRIGHT",TukuiMinimap,-2,-2) -m_zone:SetAlpha(0) - -local m_zone_text = m_zone:CreateFontString("TukuiMinimapZoneText","Overlay") -m_zone_text:SetFont(C["media"].font,12) -m_zone_text:Point("TOP", 0, -1) -m_zone_text:SetPoint("BOTTOM") -m_zone_text:Height(12) -m_zone_text:Width(m_zone:GetWidth()-6) -m_zone_text:SetAlpha(0) - -local m_coord = CreateFrame("Frame","TukuiMinimapCoord",TukuiMinimap) -m_coord:CreatePanel("Default", 40, 20, "BOTTOMLEFT", TukuiMinimap, "BOTTOMLEFT", 2,2) -m_coord:SetFrameStrata("LOW") -m_coord:SetAlpha(0) - -local m_coord_text = m_coord:CreateFontString("TukuiMinimapCoordText","Overlay") -m_coord_text:SetFont(C["media"].font,12) -m_coord_text:Point("Center",-1,0) -m_coord_text:SetAlpha(0) -m_coord_text:SetText("00,00") - -Minimap:SetScript("OnEnter",function() - m_zone:SetAlpha(1) - m_zone_text:SetAlpha(1) - m_coord:SetAlpha(1) - m_coord_text:SetAlpha(1) -end) - -Minimap:SetScript("OnLeave",function() - m_zone:SetAlpha(0) - m_zone_text:SetAlpha(0) - m_coord:SetAlpha(0) - m_coord_text:SetAlpha(0) -end) - -local ela = 0 -local coord_Update = function(self,t) - ela = ela - t - if ela > 0 then return end - local x,y = GetPlayerMapPosition("player") - local xt,yt - x = math.floor(100 * x) - y = math.floor(100 * y) - if x == 0 and y == 0 then - m_coord_text:SetText("X _ X") - else - if x < 10 then - xt = "0"..x - else - xt = x - end - if y < 10 then - yt = "0"..y - else - yt = y - end - m_coord_text:SetText(xt..","..yt) - end - ela = .2 -end -m_coord:SetScript("OnUpdate",coord_Update) - -local zone_Update = function() - local pvp = GetZonePVPInfo() - m_zone_text:SetText(GetMinimapZoneText()) - if pvp == "friendly" then - m_zone_text:SetTextColor(0.1, 1.0, 0.1) - elseif pvp == "sanctuary" then - m_zone_text:SetTextColor(0.41, 0.8, 0.94) - elseif pvp == "arena" or pvp == "hostile" then - m_zone_text:SetTextColor(1.0, 0.1, 0.1) - elseif pvp == "contested" then - m_zone_text:SetTextColor(1.0, 0.7, 0.0) - else - m_zone_text:SetTextColor(1.0, 1.0, 1.0) - end -end - -m_zone:RegisterEvent("PLAYER_ENTERING_WORLD") -m_zone:RegisterEvent("ZONE_CHANGED_NEW_AREA") -m_zone:RegisterEvent("ZONE_CHANGED") -m_zone:RegisterEvent("ZONE_CHANGED_INDOORS") -m_zone:SetScript("OnEvent",zone_Update) \ No newline at end of file diff --git a/Tukui/modules/maps/zonemap.lua b/Tukui/modules/maps/zonemap.lua deleted file mode 100644 index 6415642..0000000 --- a/Tukui/modules/maps/zonemap.lua +++ /dev/null @@ -1,71 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - --- don't use our zonemap script if capping is used. -if IsAddOnLoaded("Capping") then return end - --- BG TINY MAP (BG, mining, etc) -local tinymap = CreateFrame("Frame", "TukuiZoneMap", UIParent) -tinymap:SetPoint("CENTER") -tinymap:SetSize(223, 150) -tinymap:EnableMouse(true) -tinymap:SetMovable(true) -tinymap:RegisterEvent("ADDON_LOADED") -tinymap:SetPoint("CENTER", UIParent, 0, 0) -tinymap:SetFrameLevel(7) -tinymap:Hide() - --- create minimap background -local tinymapbg = CreateFrame("Frame", nil, tinymap) -tinymapbg:SetAllPoints() -tinymapbg:SetFrameLevel(0) -tinymapbg:SetTemplate("Default") - -tinymap:SetScript("OnEvent", function(self, event, addon) - if addon ~= "Blizzard_BattlefieldMinimap" then return end - - BattlefieldMinimap:SetScript("OnShow", function(self) - tinymap:Show() - BattlefieldMinimapCorner:Kill() - BattlefieldMinimapBackground:Kill() - BattlefieldMinimapTab:Kill() - BattlefieldMinimapTabLeft:Kill() - BattlefieldMinimapTabMiddle:Kill() - BattlefieldMinimapTabRight:Kill() - self:SetParent(tinymap) - self:SetPoint("TOPLEFT", tinymap, "TOPLEFT", 2, -2) - self:SetFrameStrata(tinymap:GetFrameStrata()) - BattlefieldMinimapCloseButton:ClearAllPoints() - BattlefieldMinimapCloseButton:SetPoint("TOPRIGHT", -4, 0) - BattlefieldMinimap:SetFrameLevel(6) - BattlefieldMinimapCloseButton:SetFrameLevel(8) - tinymap:SetScale(1) - tinymap:SetAlpha(1) - - BattlefieldMinimap_Update() --BugFix map not update on initial show - end) - - BattlefieldMinimap:SetScript("OnHide", function(self) - tinymap:SetScale(0.00001) - tinymap:SetAlpha(0) - end) - - tinymap:SetScript("OnMouseUp", function(self, btn) - if btn == "LeftButton" then - self:StopMovingOrSizing() - if OpacityFrame:IsShown() then OpacityFrame:Hide() end -- seem to be a bug with default ui in 4.0, we hide it on next click - elseif btn == "RightButton" then - ToggleDropDownMenu(1, nil, BattlefieldMinimapTabDropDown, self:GetName(), 0, -4) - if OpacityFrame:IsShown() then OpacityFrame:Hide() end -- seem to be a bug with default ui in 4.0, we hide it on next click - end - end) - - tinymap:SetScript("OnMouseDown", function(self, btn) - if btn == "LeftButton" then - if BattlefieldMinimapOptions and BattlefieldMinimapOptions.locked then - return - else - self:StartMoving() - end - end - end) -end) \ No newline at end of file diff --git a/Tukui/modules/misc/altpowerbar.lua b/Tukui/modules/misc/altpowerbar.lua deleted file mode 100644 index 097db54..0000000 --- a/Tukui/modules/misc/altpowerbar.lua +++ /dev/null @@ -1,56 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -if IsAddOnLoaded("SmellyPowerBar") then return end - -PlayerPowerBarAlt:UnregisterEvent("UNIT_POWER_BAR_SHOW") -PlayerPowerBarAlt:UnregisterEvent("UNIT_POWER_BAR_HIDE") -PlayerPowerBarAlt:UnregisterEvent("PLAYER_ENTERING_WORLD") - -local AltPowerBar = CreateFrame("Frame", "TukuiAltPowerBar", TukuiInfoLeft) -AltPowerBar:SetAllPoints() -AltPowerBar:SetFrameStrata("MEDIUM") -AltPowerBar:SetFrameLevel(0) -AltPowerBar:EnableMouse(true) -AltPowerBar:SetTemplate("Default") - -local AltPowerBarStatus = CreateFrame("StatusBar", "TukuiAltPowerBarStatus", AltPowerBar) -AltPowerBarStatus:SetFrameLevel(AltPowerBar:GetFrameLevel() + 1) -AltPowerBarStatus:SetStatusBarTexture(C.media.normTex) -AltPowerBarStatus:SetMinMaxValues(0, 100) -AltPowerBarStatus:Point("TOPLEFT", TukuiInfoLeft, "TOPLEFT", 2, -2) -AltPowerBarStatus:Point("BOTTOMRIGHT", TukuiInfoLeft, "BOTTOMRIGHT", -2, 2) - -local AltPowerText = AltPowerBarStatus:CreateFontString("TukuiAltPowerBarText", "OVERLAY") -AltPowerText:SetFont(C.media.font, 12) -AltPowerText:Point("CENTER", AltPowerBar, "CENTER", 0, 0) -AltPowerText:SetShadowColor(0, 0, 0) -AltPowerText:SetShadowOffset(1.25, -1.25) - -AltPowerBar:RegisterEvent("UNIT_POWER") -AltPowerBar:RegisterEvent("UNIT_POWER_BAR_SHOW") -AltPowerBar:RegisterEvent("UNIT_POWER_BAR_HIDE") -AltPowerBar:RegisterEvent("PLAYER_ENTERING_WORLD") -AltPowerBar:SetScript("OnEvent", function(self) - self:UnregisterEvent("PLAYER_ENTERING_WORLD") - if UnitAlternatePowerInfo("player") then - self:Show() - else - self:Hide() - end -end) - -local TimeSinceLastUpdate = 1 -AltPowerBarStatus:SetScript("OnUpdate", function(self, elapsed) - if not AltPowerBar:IsShown() then return end - TimeSinceLastUpdate = TimeSinceLastUpdate + elapsed - - if (TimeSinceLastUpdate >= 1) then - self:SetMinMaxValues(0, UnitPowerMax("player", ALTERNATE_POWER_INDEX)) - local power = UnitPower("player", ALTERNATE_POWER_INDEX) - local mpower = UnitPowerMax("player", ALTERNATE_POWER_INDEX) - self:SetValue(power) - AltPowerText:SetText(power.." / "..mpower) - local r, g, b = oUFTukui.ColorGradient(power/mpower, 0,.8,0,.8,.8,0,.8,0,0) - AltPowerBarStatus:SetStatusBarColor(r, g, b) - self.TimeSinceLastUpdate = 0 - end -end) \ No newline at end of file diff --git a/Tukui/modules/misc/combo.lua b/Tukui/modules/misc/combo.lua deleted file mode 100644 index db4f29c..0000000 --- a/Tukui/modules/misc/combo.lua +++ /dev/null @@ -1,114 +0,0 @@ --- Combo Points for Tukui 14+ - -local T, C, L = unpack(select(2, ...)) -local parent = TukuiTarget -local stick - -if T.myclass == "ROGUE" and C.unitframes.movecombobar then - parent = TukuiPlayer - stick = true -end - -if not parent or C.unitframes.classiccombo then return end - -local shadow = parent.shadow -local buffs = parent.Buffs -local MAX_COMBO_POINTS = MAX_COMBO_POINTS - -local Colors = { - [1] = {.69, .31, .31, 1}, - [2] = {.65, .42, .31, 1}, - [3] = {.65, .63, .35, 1}, - [4] = {.46, .63, .35, 1}, - [5] = {.33, .63, .33, 1}, -} - -local function UpdateBuffs(self, points) - if stick then return end - - if points and points > 0 then - self:Show() - - -- update player frame shadow - if shadow then - shadow:Point("TOPLEFT", -4, 12) - end - - -- update Y position of buffs - if buffs then - buffs:ClearAllPoints() - buffs:SetPoint("BOTTOMLEFT", parent, "TOPLEFT", 0, 14) - end - else - self:Hide() - - -- update player frame shadow - if shadow then - shadow:Point("TOPLEFT", -4, 4) - end - - -- update Y position of buffs - if buffs then - buffs:ClearAllPoints() - buffs:SetPoint("BOTTOMLEFT", parent, "TOPLEFT", 0, 4) - end - end -end - -local function OnUpdate(self) - local points - - if UnitHasVehicleUI("player") then - points = GetComboPoints("vehicle", "target") - else - points = GetComboPoints("player", "target") - end - - if points then - -- update combos display - for i = 1, MAX_COMBO_POINTS do - if i <= points then - self[i]:SetAlpha(1) - else - self[i]:SetAlpha(.2) - end - end - end - - UpdateBuffs(self, points) -end - --- create the bar -local TukuiCombo = CreateFrame("Frame", "TukuiCombo", parent) -TukuiCombo:Point("BOTTOMLEFT", parent, "TOPLEFT", 0, 1) -TukuiCombo:SetWidth(parent:GetWidth()) -TukuiCombo:SetHeight(8) -TukuiCombo:SetTemplate("Default") -TukuiCombo:SetBackdropBorderColor(unpack(C.media.backdropcolor)) -TukuiCombo:RegisterEvent("PLAYER_ENTERING_WORLD") -TukuiCombo:RegisterEvent("UNIT_COMBO_POINTS") -TukuiCombo:RegisterEvent("PLAYER_TARGET_CHANGED") -TukuiCombo:SetScript("OnEvent", OnUpdate) -TukuiCombo:Show() - --- create combos -for i = 1, 5 do - TukuiCombo[i] = CreateFrame("StatusBar", "TukuiComboBar"..i, TukuiCombo) - TukuiCombo[i]:Height(8) - TukuiCombo[i]:SetStatusBarTexture(C.media.normTex) - TukuiCombo[i]:GetStatusBarTexture():SetHorizTile(false) - TukuiCombo[i]:SetFrameLevel(TukuiCombo:GetFrameLevel() + 1) - TukuiCombo[i]:SetStatusBarColor(unpack(Colors[i])) - - if i == 1 then - TukuiCombo[i]:Point("LEFT", TukuiCombo, "LEFT", 0, 0) - TukuiCombo[i]:Width(parent:GetWidth() / 5) - else - TukuiCombo[i]:Point("LEFT", TukuiCombo[i-1], "RIGHT", 1, 0) - TukuiCombo[i]:Width(parent:GetWidth() / 5 - 1) - end - - if stick then - shadow:Point("TOPLEFT", -4, 12) - end -end \ No newline at end of file diff --git a/Tukui/modules/misc/commands.lua b/Tukui/modules/misc/commands.lua deleted file mode 100644 index 8dd7aaf..0000000 --- a/Tukui/modules/misc/commands.lua +++ /dev/null @@ -1,44 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - --- enable or disable an addon via command -SlashCmdList.DISABLE_ADDON = function(addon) local _, _, _, _, _, reason, _ = GetAddOnInfo(addon) if reason ~= "MISSING" then DisableAddOn(addon) ReloadUI() else print("|cffff0000Error, Addon not found.|r") end end -SLASH_DISABLE_ADDON1 = "/disable" -SlashCmdList.ENABLE_ADDON = function(addon) local _, _, _, _, _, reason, _ = GetAddOnInfo(addon) if reason ~= "MISSING" then EnableAddOn(addon) LoadAddOn(addon) ReloadUI() else print("|cffff0000Error, Addon not found.|r") end end -SLASH_ENABLE_ADDON1 = "/enable" - --- switch to heal layout via a command -SLASH_TUKUIHEAL1 = "/heal" -SlashCmdList.TUKUIHEAL = function() - DisableAddOn("Tukui_Raid") - EnableAddOn("Tukui_Raid_Healing") - ReloadUI() -end - --- switch to dps layout via a command -SLASH_TUKUIDPS1 = "/dps" -SlashCmdList.TUKUIDPS = function() - DisableAddOn("Tukui_Raid_Healing") - EnableAddOn("Tukui_Raid") - ReloadUI() -end - --- fix combatlog manually when it broke -SLASH_CLFIX1 = "/clfix" -SlashCmdList.CLFIX = CombatLogClearEntries - --- ready check shortcut -SlashCmdList.RCSLASH = DoReadyCheck -SLASH_RCSLASH1 = "/rc" - -SlashCmdList["GROUPDISBAND"] = function() - if UnitIsRaidOfficer("player") then - StaticPopup_Show("TUKUIDISBAND_RAID") - end -end -SLASH_GROUPDISBAND1 = '/rd' - --- Leave party chat command -SlashCmdList["LEAVEPARTY"] = function() - LeaveParty() -end -SLASH_LEAVEPARTY1 = '/leaveparty' \ No newline at end of file diff --git a/Tukui/modules/misc/damage.lua b/Tukui/modules/misc/damage.lua deleted file mode 100644 index 8103e48..0000000 --- a/Tukui/modules/misc/damage.lua +++ /dev/null @@ -1,132 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -------------------------------------------------------------- --- DAMAGE / HEAL DISPLAY REPLACEMENT FOR EYEFINITY --- BECAUSE REGULAR 3D WORLD DAMAGE ISN'T COMPATIBLE -------------------------------------------------------------- - -if not T.eyefinity then return end - -local displaydamage = GetCVar("CombatDamage") -local displayheal = GetCVar("CombatHealing") -local displaydot = GetCVar("CombatLogPeriodicSpells") - -local gflags = bit.bor(COMBATLOG_OBJECT_AFFILIATION_MINE, COMBATLOG_OBJECT_REACTION_FRIENDLY, COMBATLOG_OBJECT_CONTROL_PLAYER, COMBATLOG_OBJECT_TYPE_GUARDIAN) - -local function OnEvent(self, event, ...) - local timestamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags - - if T.toc < 40200 then - timestamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1,...) - else - timestamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = select(1,...) - end - - if sourceGUID == UnitGUID("player") or sourceGUID == UnitGUID("pet") or sourceFlags == gflags then - -- dmg - if displaydamage then - if eventType == "SWING_DAMAGE" then - local _, amount, critical - if T.toc < 40200 then - _, amount, _, _, _, _, critical = select(9, ...) - else - _, _, _, amount, _, _, _, _, critical = select(9, ...) - end - self:AddMessage(amount, 1, 1, 1) - elseif eventType == "SPELL_DAMAGE" or eventType == "SPELL_PERIODIC_DAMAGE" then - local _, spellId, spellSchool, amount, critical - if T.toc < 40200 then - _, spellId, _, spellSchool, amount, _, _, _, _, _, critical = select(9, ...) - else - _, _, _, spellId, _, spellSchool, amount, _, _, _, _, _, critical = select(9, ...) - end - if eventType == "SPELL_PERIODIC_DAMAGE" then - if displaydot then self:AddMessage(amount, 151/255, 70/255, 194/255) end - else - self:AddMessage(amount, 1, 1, 0) - end - elseif eventType == "RANGE_DAMAGE" then - local _, spellId, amount, critical - if T.toc < 40200 then - _, spellId, _, _, amount, _, _, _, _, _, critical = select(9, ...) - else - _, _, _, spellId, _, _, amount, _, _, _, _, _, critical = select(9, ...) - end - self:AddMessage(amount, 1, 1, 1) - elseif eventType == "SWING_MISSED" then - local _, missType - if T.toc < 40200 then - _, missType, _ = select(9, ...) - else - _, _, _, missType, _ = select(9, ...) - end - self:AddMessage(missType, 1, 1, 1) - elseif eventType == "SPELL_MISSED" or eventType == "RANGE_MISSED" then - local _, spellId, missType - if T.toc < 40200 then - _, spellId, _, _, missType, _ = select(9,...) - else - _, _, _, spellId, _, _, missType, _ = select(9,...) - end - self:AddMessage(missType, 1, 1, 1) - end - end - - -- heal - if displayheal then - if eventType == "SPELL_HEAL" or eventType== "SPELL_PERIODIC_HEAL" then - local _, amount - if T.toc < 40200 then - _, _, _, _, amount, _, _, _ = select(9,...) - else - _, _, _, _, _, _, amount, _, _, _ = select(9,...) - end - self:AddMessage(amount, 0, 1, 0) - end - end - end -end - -local f = CreateFrame("ScrollingMessageFrame", "TukuiEyefinityDamage", UIParent) -f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") -f:SetScript("OnEvent",OnEvent) -f:SetSize(200, 200) -f:SetPoint("TOP", 0, -50) -f:SetFont(C.media.dmgfont,36,"OUTLINE") -f:SetShadowColor(0,0,0,0) -f:SetFading(true) -f:SetFadeDuration(0.5) -f:SetTimeVisible(1) -f:SetMaxLines(64) -f:SetSpacing(2) - -local o = CreateFrame("Frame") -o:RegisterEvent("CVAR_UPDATE") -o:SetScript("OnEvent", function(self, event, cvar, value) - if cvar == "SHOW_DAMAGE_TEXT" then - if value == 1 then - displaydamage = true - else - displaydamage = false - end - end - - if cvar == "LOG_PERIODIC_EFFECTS" then - if value == 1 then - displaydot = true - else - displaydot = false - end - end - - if cvar == "SHOW_COMBAT_HEALING" then - if value == 1 then - displayheal = true - else - displayheal = false - end - end -end) - --- kill -InterfaceOptionsCombatTextPanelPetDamage:Kill() \ No newline at end of file diff --git a/Tukui/modules/misc/dropdownlist.lua b/Tukui/modules/misc/dropdownlist.lua deleted file mode 100644 index 551bdba..0000000 --- a/Tukui/modules/misc/dropdownlist.lua +++ /dev/null @@ -1,15 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - --- Skin all DropDownList[i] -local function SkinDropDownList(level, index) - for i = 1, UIDROPDOWNMENU_MAXLEVELS do - local menubackdrop = _G["DropDownList"..i.."MenuBackdrop"] - local backdrop = _G["DropDownList"..i.."Backdrop"] - if not backdrop.isSkinned then - menubackdrop:SetTemplate("Default") - backdrop:SetTemplate("Default") - backdrop.isSkinned = true - end - end -end -hooksecurefunc("UIDropDownMenu_CreateFrames", SkinDropDownList) \ No newline at end of file diff --git a/Tukui/modules/misc/invite.lua b/Tukui/modules/misc/invite.lua deleted file mode 100644 index ae73d4c..0000000 --- a/Tukui/modules/misc/invite.lua +++ /dev/null @@ -1,108 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - ------------------------------------------------------------------------- --- Auto accept invite ------------------------------------------------------------------------- - -if C["invite"].autoaccept then - local holder = CreateFrame("Frame") - holder:RegisterEvent("PARTY_INVITE_REQUEST") - holder:RegisterEvent("PARTY_MEMBERS_CHANGED") - - local hidestatic -- used to hide static popup when auto-accepting - holder:SetScript("OnEvent", function(self, event, leader) - local ingroup = false - - if event == "PARTY_INVITE_REQUEST" then - if MiniMapLFGFrame:IsShown() then return end -- Prevent losing que inside LFD if someone invites you to group - if GetNumPartyMembers() > 0 or GetNumRaidMembers() > 0 then return end - hidestatic = true - - -- Update Guild and Friendlist - if GetNumFriends() > 0 then ShowFriends() end - if IsInGuild() then GuildRoster() end - - for friendindex = 1, GetNumFriends() do - local friendname = GetFriendInfo(friendindex) - if friendname == leader then - AcceptGroup() - ingroup = true - break - end - end - - ------------------------------------------------------------------- - -- friend not found in friend index, so we look now into battle.net - ------------------------------------------------------------------- - - local playerFaction - - -- find which faction we play - if select(1, UnitFactionGroup("player")) == "Horde" then playerFaction = 0 else playerFaction = 1 end - - if not ingroup then - for i = 1, select(2, BNGetNumFriends()) do - local presenceID, givenName, surname, toonName, toonID, client, isOnline = BNGetFriendInfo(i) - local _, _, _, realmName, faction, race, class, _, zoneName, level = BNGetToonInfo(presenceID) - - if client == "WoW" and realmName == T.myrealm and faction == playerFaction then - if toonName == leader then - AcceptGroup() - ingroup = true - break - end - end - end - end - - ----------------------------------------------------------------------------- - -- friend not found in battle.net friend index, so we look now into our guild - ----------------------------------------------------------------------------- - - if not ingroup then - for guildindex = 1, GetNumGuildMembers(true) do - local guildmembername = GetGuildRosterInfo(guildindex) - if guildmembername == leader then - AcceptGroup() - break - end - end - end - - elseif event == "PARTY_MEMBERS_CHANGED" and hidestatic == true then - StaticPopup_Hide("PARTY_INVITE") - hidestatic = false - end - end) -end - ------------------------------------------------------------------------- --- Auto invite by whisper ------------------------------------------------------------------------- - -local ainvenabled = false -local ainvkeyword = "invite" - -local autoinvite = CreateFrame("frame") -autoinvite:RegisterEvent("CHAT_MSG_WHISPER") -autoinvite:SetScript("OnEvent", function(self,event,arg1,arg2) - if ((not UnitExists("party1") or IsPartyLeader("player") or IsRaidOfficer("player") or IsRaidLeader("player")) and arg1:lower():match(ainvkeyword)) and ainvenabled == true then - InviteUnit(arg2) - end -end) - -function SlashCmdList.AUTOINVITE(msg, editbox) - if msg == "off" then - ainvenabled = false - print(L.core_autoinv_disable) - elseif msg == "" then - ainvenabled = true - print(L.core_autoinv_enable) - ainvkeyword = "invite" - else - ainvenabled = true - print(L.core_autoinv_enable_c .. msg) - ainvkeyword = msg - end -end -SLASH_AUTOINVITE1 = "/ainv" diff --git a/Tukui/modules/misc/micromenu.lua b/Tukui/modules/misc/micromenu.lua deleted file mode 100644 index 1479001..0000000 --- a/Tukui/modules/misc/micromenu.lua +++ /dev/null @@ -1,59 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local menuFrame = CreateFrame("Frame", "TukuiMicroButtonsDropDown", UIParent, "UIDropDownMenuTemplate") -T.MicroMenu = { - {text = CHARACTER_BUTTON, - func = function() ToggleCharacter("PaperDollFrame") end}, - {text = SPELLBOOK_ABILITIES_BUTTON, - func = function() ToggleFrame(SpellBookFrame) end}, - {text = TALENTS_BUTTON, - func = function() - if not PlayerTalentFrame then - LoadAddOn("Blizzard_TalentUI") - end - - if not GlyphFrame then - LoadAddOn("Blizzard_GlyphUI") - end - PlayerTalentFrame_Toggle() - end}, - {text = ACHIEVEMENT_BUTTON, - func = function() ToggleAchievementFrame() end}, - {text = QUESTLOG_BUTTON, - func = function() ToggleFrame(QuestLogFrame) end}, - {text = SOCIAL_BUTTON, - func = function() ToggleFriendsFrame(1) end}, - {text = PLAYER_V_PLAYER, - func = function() ToggleFrame(PVPFrame) end}, - {text = ACHIEVEMENTS_GUILD_TAB, - func = function() - if IsInGuild() then - if not GuildFrame then LoadAddOn("Blizzard_GuildUI") end - GuildFrame_Toggle() - else - if not LookingForGuildFrame then LoadAddOn("Blizzard_LookingForGuildUI") end - LookingForGuildFrame_Toggle() - end - end}, - {text = LFG_TITLE, - func = function() ToggleFrame(LFDParentFrame) end}, - {text = RAID, - func = function() if T.toc >= 40300 then ToggleFrame(RaidParentFrame) else ToggleFriendsFrame(4) end end}, - {text = HELP_BUTTON, - func = function() ToggleHelpFrame() end}, - {text = CALENDAR_VIEW_EVENT, - func = function() - if(not CalendarFrame) then LoadAddOn("Blizzard_Calendar") end - Calendar_Toggle() - end}, - {text = ENCOUNTER_JOURNAL, - func = function() if T.toc >= 40200 then if T.toc >= 40300 then ToggleEncounterJournal() else ToggleFrame(EncounterJournal) end end end}, -} - --- spellbook need at least 1 opening else it taint in combat -local taint = CreateFrame("Frame") -taint:RegisterEvent("PLAYER_ENTERING_WORLD") -taint:SetScript("OnEvent", function(self) - ToggleFrame(SpellBookFrame) - ToggleFrame(SpellBookFrame) -end) \ No newline at end of file diff --git a/Tukui/modules/misc/raidutilities.lua b/Tukui/modules/misc/raidutilities.lua deleted file mode 100644 index bdfc41f..0000000 --- a/Tukui/modules/misc/raidutilities.lua +++ /dev/null @@ -1,186 +0,0 @@ ---[[ - Raid utilities are loaded only if you are using Tukui raid frames - All others raid frames mods or default Blizzard should have already this feature ---]] - -local T, C, L = unpack(select(2, ...)) -local panel_height = ((T.Scale(5)*4) + (T.Scale(22)*4)) -local r,g,b = C["media"].backdropcolor - -local function CreateUtilities(self, event, addon) - if addon == "Tukui_Raid_Healing" or addon == "Tukui_Raid" then - -- it need the Tukui minimap - if not TukuiMinimap then return end - - --Create main frame - local TukuiRaidUtility = CreateFrame("Frame", "TukuiRaidUtility", UIParent) - TukuiRaidUtility:CreatePanel("Default", TukuiMinimap:GetWidth(), panel_height, "TOPRIGHT", TukuiMinimapStatsRight, "BOTTOMRIGHT", 0, -2) - TukuiRaidUtility:Hide() - TukuiRaidUtility:SetFrameLevel(10) - TukuiRaidUtility:SetFrameStrata("Medium") - - --Check if We are Raid Leader or Raid Officer - local function CheckRaidStatus() - local inInstance, instanceType = IsInInstance() - if (UnitIsRaidOfficer("player")) and not (inInstance and (instanceType == "pvp" or instanceType == "arena")) then - return true - else - return false - end - end - - --Change border when mouse is inside the button - local function ButtonEnter(self) - local color = RAID_CLASS_COLORS[T.myclass] - self:SetBackdropBorderColor(color.r, color.g, color.b) - end - - --Change border back to normal when mouse leaves button - local function ButtonLeave(self) - self:SetBackdropBorderColor(unpack(C["media"].bordercolor)) - end - - -- Function to create buttons in this module - local function CreateButton(name, parent, template, width, height, point, relativeto, point2, xOfs, yOfs, text, texture) - local b = CreateFrame("Button", name, parent, template) - b:SetWidth(width) - b:SetHeight(height) - b:SetPoint(point, relativeto, point2, xOfs, yOfs) - b:HookScript("OnEnter", ButtonEnter) - b:HookScript("OnLeave", ButtonLeave) - b:EnableMouse(true) - b:SetTemplate("Default") - if text then - local t = b:CreateFontString(nil,"OVERLAY",b) - t:SetFont(C["media"].font,12) - t:SetPoint("CENTER") - t:SetJustifyH("CENTER") - t:SetText(text) - b:SetFontString(t) - elseif texture then - local t = b:CreateTexture(nil,"OVERLAY",nil) - t:SetTexture(normTex) - t:SetPoint("TOPLEFT", b, "TOPLEFT", T.mult, -T.mult) - t:SetPoint("BOTTOMRIGHT", b, "BOTTOMRIGHT", -T.mult, T.mult) - end - end - - --Show Button - CreateButton("TukuiRaidUtilityShowButton", UIParent, "UIMenuButtonStretchTemplate, SecureHandlerClickTemplate", TukuiMinimap:GetWidth(), 21, "TOPRIGHT", TukuiMinimapStatsRight, "BOTTOMRIGHT", 0, -2, RAID_ASSISTANT, nil) - TukuiRaidUtilityShowButton:SetFrameRef("TukuiRaidUtility", TukuiRaidUtility) - TukuiRaidUtilityShowButton:SetAttribute("_onclick", [=[self:Hide(); self:GetFrameRef("TukuiRaidUtility"):Show();]=]) - TukuiRaidUtilityShowButton:SetScript("OnMouseUp", function(self) TukuiRaidUtility.toggled = true end) - TukuiRaidUtilityShowButton:Hide() - - --Close Button - CreateButton("TukuiRaidUtilityCloseButton", TukuiRaidUtility, "UIMenuButtonStretchTemplate, SecureHandlerClickTemplate", TukuiMinimap:GetWidth(), 21, "TOP", TukuiRaidUtility, "BOTTOM", 0, -2, CLOSE, nil) - TukuiRaidUtilityCloseButton:SetFrameRef("TukuiRaidUtilityShowButton", TukuiRaidUtilityShowButton) - TukuiRaidUtilityCloseButton:SetAttribute("_onclick", [=[self:GetParent():Hide(); self:GetFrameRef("TukuiRaidUtilityShowButton"):Show();]=]) - TukuiRaidUtilityCloseButton:SetScript("OnMouseUp", function(self) TukuiRaidUtility.toggled = false end) - - --Disband Raid button - CreateButton("TukuiRaidUtilityDisbandRaidButton", TukuiRaidUtility, "UIMenuButtonStretchTemplate", TukuiRaidUtility:GetWidth() * 0.95, T.Scale(21), "TOP", TukuiRaidUtility, "TOP", 0, T.Scale(-5), "Disband Group", nil) - TukuiRaidUtilityDisbandRaidButton:SetScript("OnMouseUp", function(self) - if CheckRaidStatus() then - StaticPopup_Show("TUKUIDISBAND_RAID") - end - end) - - --Role Check button - CreateButton("TukuiRaidUtilityRoleCheckButton", TukuiRaidUtility, "UIMenuButtonStretchTemplate", TukuiRaidUtility:GetWidth() * 0.95, T.Scale(21), "TOP", TukuiRaidUtilityDisbandRaidButton, "BOTTOM", 0, T.Scale(-5), ROLE_POLL, nil) - TukuiRaidUtilityRoleCheckButton:SetScript("OnMouseUp", function(self) - if CheckRaidStatus() then - InitiateRolePoll() - end - end) - - --MainTank Button - CreateButton("TukuiRaidUtilityMainTankButton", TukuiRaidUtility, "SecureActionButtonTemplate, UIMenuButtonStretchTemplate", (TukuiRaidUtilityDisbandRaidButton:GetWidth() / 2) - T.Scale(2), T.Scale(21), "TOPLEFT", TukuiRaidUtilityRoleCheckButton, "BOTTOMLEFT", 0, T.Scale(-5), MAINTANK, nil) - TukuiRaidUtilityMainTankButton:SetAttribute("type", "maintank") - TukuiRaidUtilityMainTankButton:SetAttribute("unit", "target") - TukuiRaidUtilityMainTankButton:SetAttribute("action", "set") - - --MainAssist Button - CreateButton("TukuiRaidUtilityMainAssistButton", TukuiRaidUtility, "SecureActionButtonTemplate, UIMenuButtonStretchTemplate", (TukuiRaidUtilityDisbandRaidButton:GetWidth() / 2) - T.Scale(2), T.Scale(21), "TOPRIGHT", TukuiRaidUtilityRoleCheckButton, "BOTTOMRIGHT", 0, T.Scale(-5), MAINASSIST, nil) - TukuiRaidUtilityMainAssistButton:SetAttribute("type", "mainassist") - TukuiRaidUtilityMainAssistButton:SetAttribute("unit", "target") - TukuiRaidUtilityMainAssistButton:SetAttribute("action", "set") - - --Ready Check button - CreateButton("TukuiRaidUtilityReadyCheckButton", TukuiRaidUtility, "UIMenuButtonStretchTemplate", TukuiRaidUtilityRoleCheckButton:GetWidth() * 0.75, T.Scale(21), "TOPLEFT", TukuiRaidUtilityMainTankButton, "BOTTOMLEFT", 0, T.Scale(-5), READY_CHECK, nil) - TukuiRaidUtilityReadyCheckButton:SetScript("OnMouseUp", function(self) - if CheckRaidStatus() then - DoReadyCheck() - end - end) - - --Reposition/Resize and Reuse the World Marker Button - CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:ClearAllPoints() - CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:SetPoint("TOPRIGHT", TukuiRaidUtilityMainAssistButton, "BOTTOMRIGHT", 0, T.Scale(-5)) - CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:SetParent(TukuiRaidUtility) - CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:SetHeight(T.Scale(21)) - CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:SetWidth(TukuiRaidUtilityRoleCheckButton:GetWidth() * 0.22) - - --Put other stuff back - CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck:ClearAllPoints() - CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck:SetPoint("BOTTOMLEFT", CompactRaidFrameManagerDisplayFrameLockedModeToggle, "TOPLEFT", 0, 1) - CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck:SetPoint("BOTTOMRIGHT", CompactRaidFrameManagerDisplayFrameHiddenModeToggle, "TOPRIGHT", 0, 1) - - CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateRolePoll:ClearAllPoints() - CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateRolePoll:SetPoint("BOTTOMLEFT", CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck, "TOPLEFT", 0, 1) - CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateRolePoll:SetPoint("BOTTOMRIGHT", CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck, "TOPRIGHT", 0, 1) - - --Reskin Stuff - do - local buttons = { - "CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton", - "TukuiRaidUtilityDisbandRaidButton", - "TukuiRaidUtilityMainTankButton", - "TukuiRaidUtilityMainAssistButton", - "TukuiRaidUtilityRoleCheckButton", - "TukuiRaidUtilityReadyCheckButton", - "TukuiRaidUtilityShowButton", - "TukuiRaidUtilityCloseButton" - } - - for i, button in pairs(buttons) do - local f = _G[button] - _G[button.."Left"]:SetAlpha(0) - _G[button.."Middle"]:SetAlpha(0) - _G[button.."Right"]:SetAlpha(0) - f:SetHighlightTexture("") - f:SetDisabledTexture("") - f:HookScript("OnEnter", ButtonEnter) - f:HookScript("OnLeave", ButtonLeave) - f:SetTemplate("Default", true) - end - end - - local function ToggleRaidUtil(self, event) - if InCombatLockdown() then - self:RegisterEvent("PLAYER_REGEN_ENABLED") - return - end - - if CheckRaidStatus() then - if not TukuiRaidUtility.toggled then TukuiRaidUtilityShowButton:Show() end - else - TukuiRaidUtilityShowButton:Hide() - if TukuiRaidUtility:IsShown() then TukuiRaidUtility:Hide() end - end - - if event == "PLAYER_REGEN_ENABLED" then - self:UnregisterEvent("PLAYER_REGEN_ENABLED") - end - end - - --Automatically show/hide the frame if we have RaidLeader or RaidOfficer - local LeadershipCheck = CreateFrame("Frame") - LeadershipCheck:RegisterEvent("RAID_ROSTER_UPDATE") - LeadershipCheck:SetScript("OnEvent", ToggleRaidUtil) - end -end - -local AddonLoaded = CreateFrame("Frame") -AddonLoaded:RegisterEvent("ADDON_LOADED") -AddonLoaded:SetScript("OnEvent", CreateUtilities) \ No newline at end of file diff --git a/Tukui/modules/misc/threatbar.lua b/Tukui/modules/misc/threatbar.lua deleted file mode 100644 index 67bb4b5..0000000 --- a/Tukui/modules/misc/threatbar.lua +++ /dev/null @@ -1,82 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -if not TukuiInfoRight then return end - ---[[local aggroColors = { - [1] = {12/255, 151/255, 15/255}, - [2] = {166/255, 171/255, 26/255}, - [3] = {163/255, 24/255, 24/255}, -}]] - -local TukuiThreatBar = CreateFrame("StatusBar", "TukuiThreatBar", TukuiInfoRight) -TukuiThreatBar:Point("TOPLEFT", 2, -2) -TukuiThreatBar:Point("BOTTOMRIGHT", -2, 2) - -TukuiThreatBar:SetStatusBarTexture(C.media.normTex) -TukuiThreatBar:GetStatusBarTexture():SetHorizTile(false) -TukuiThreatBar:SetBackdrop({bgFile = C.media.blank}) -TukuiThreatBar:SetBackdropColor(0, 0, 0, 0) -TukuiThreatBar:SetMinMaxValues(0, 100) - -TukuiThreatBar.text = T.SetFontString(TukuiThreatBar, C.media.font, 12) -TukuiThreatBar.text:Point("RIGHT", TukuiThreatBar, "RIGHT", -30, 0) - -TukuiThreatBar.Title = T.SetFontString(TukuiThreatBar, C.media.font, 12) -TukuiThreatBar.Title:SetText(L.unitframes_ouf_threattext) -TukuiThreatBar.Title:SetPoint("LEFT", TukuiThreatBar, "LEFT", T.Scale(30), 0) - -TukuiThreatBar.bg = TukuiThreatBar:CreateTexture(nil, 'BORDER') -TukuiThreatBar.bg:SetAllPoints(TukuiThreatBar) -TukuiThreatBar.bg:SetTexture(0.1,0.1,0.1) - -local function OnEvent(self, event, ...) - local party = GetNumPartyMembers() - local raid = GetNumRaidMembers() - local pet = select(1, HasPetUI()) - if event == "PLAYER_ENTERING_WORLD" then - self:Hide() - self:UnregisterEvent("PLAYER_ENTERING_WORLD") - elseif event == "PLAYER_REGEN_ENABLED" then - self:Hide() - elseif event == "PLAYER_REGEN_DISABLED" then - if party > 0 or raid > 0 or pet == 1 then - self:Show() - else - self:Hide() - end - else - if (InCombatLockdown()) and (party > 0 or raid > 0 or pet == 1) then - self:Show() - else - self:Hide() - end - end -end - -local function OnUpdate(self, event, unit) - if UnitAffectingCombat(self.unit) then - local _, _, threatpct, rawthreatpct, _ = UnitDetailedThreatSituation(self.unit, self.tar) - local threatval = threatpct or 0 - - self:SetValue(threatval) - self.text:SetFormattedText("%3.1f", threatval) - - local r, g, b = oUFTukui.ColorGradient(threatval/100, 0,.8,0,.8,.8,0,.8,0,0) - self:SetStatusBarColor(r, g, b) - - if threatval > 0 then - self:SetAlpha(1) - else - self:SetAlpha(0) - end - end -end - -TukuiThreatBar:RegisterEvent("PLAYER_ENTERING_WORLD") -TukuiThreatBar:RegisterEvent("PLAYER_REGEN_ENABLED") -TukuiThreatBar:RegisterEvent("PLAYER_REGEN_DISABLED") -TukuiThreatBar:SetScript("OnEvent", OnEvent) -TukuiThreatBar:SetScript("OnUpdate", OnUpdate) -TukuiThreatBar.unit = "player" -TukuiThreatBar.tar = TukuiThreatBar.unit.."target" -TukuiThreatBar.Colors = aggroColors -TukuiThreatBar:SetAlpha(0) \ No newline at end of file diff --git a/Tukui/modules/nameplates/nameplates.lua b/Tukui/modules/nameplates/nameplates.lua deleted file mode 100644 index d20e428..0000000 --- a/Tukui/modules/nameplates/nameplates.lua +++ /dev/null @@ -1,584 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import Functions/Constants, Config, Locales - ---Base code by Dawn (dNameplates), rewritten by Elv22 -if not C["nameplate"].enable == true then return end - -local TEXTURE = C["media"].normTex -local FONT = C["media"].font -local FONTSIZE = 10 -local FONTFLAG = "THINOUTLINE" -local hpHeight = 12 -local hpWidth = 110 -local iconSize = 25 --Size of all Icons, RaidIcon/ClassIcon/Castbar Icon -local cbHeight = 5 -local cbWidth = 110 -local blankTex = C["media"].blank -local OVERLAY = [=[Interface\TargetingFrame\UI-TargetingFrame-Flash]=] -local numChildren = -1 -local frames = {} -local noscalemult = T.mult * C["general"].uiscale -local Role - ---Change defaults if we are showing health text or not -if C["nameplate"].showhealth ~= true then - hpHeight = 7 - iconSize = 20 -end - -local NamePlates = CreateFrame("Frame", "TukuiNameplates", UIParent) -NamePlates:SetScript("OnEvent", function(self, event, ...) self[event](self, ...) end) - -SetCVar("bloatthreat", 0) -SetCVar("bloattest", 0) -SetCVar("bloatnameplates", 0) - -if T.eyefinity then - SetCVar("nameplateMotion", "0") - InterfaceOptionsNamesPanelUnitNameplatesMotionDropDown:Kill() -end - ---Nameplates we do NOT want to see -local PlateBlacklist = { - --Shaman Totems (Ones that don't matter) - ["Earth Elemental Totem"] = true, - ["Fire Elemental Totem"] = true, - ["Fire Resistance Totem"] = true, - ["Flametongue Totem"] = true, - ["Frost Resistance Totem"] = true, - ["Healing Stream Totem"] = true, - ["Magma Totem"] = true, - ["Mana Spring Totem"] = true, - ["Nature Resistance Totem"] = true, - ["Searing Totem"] = true, - ["Stoneclaw Totem"] = true, - ["Stoneskin Totem"] = true, - ["Strength of Earth Totem"] = true, - ["Windfury Totem"] = true, - ["Totem of Wrath"] = true, - ["Wrath of Air Totem"] = true, - - --Army of the Dead - ["Army of the Dead Ghoul"] = true, -} - --- Check Player's Role -local RoleUpdater = CreateFrame("Frame") -RoleUpdater:RegisterEvent("PLAYER_ENTERING_WORLD") -RoleUpdater:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") -RoleUpdater:RegisterEvent("PLAYER_TALENT_UPDATE") -RoleUpdater:RegisterEvent("CHARACTER_POINTS_CHANGED") -RoleUpdater:RegisterEvent("UNIT_INVENTORY_CHANGED") -RoleUpdater:RegisterEvent("UPDATE_BONUS_ACTIONBAR") -RoleUpdater:SetScript("OnEvent", function() Role = T.CheckRole() end) - -local function QueueObject(parent, object) - parent.queue = parent.queue or {} - parent.queue[object] = true -end - -local function HideObjects(parent) - for object in pairs(parent.queue) do - if(object:GetObjectType() == 'Texture') then - object:SetTexture(nil) - object.SetTexture = T.dummy - elseif (object:GetObjectType() == 'FontString') then - object.ClearAllPoints = T.dummy - object.SetFont = T.dummy - object.SetPoint = T.dummy - object:Hide() - object.Show = T.dummy - object.SetText = T.dummy - object.SetShadowOffset = T.dummy - else - object:Hide() - object.Show = T.dummy - end - end -end - ---Create a fake backdrop frame using textures -local function CreateVirtualFrame(parent, point) - if point == nil then point = parent end - - if point.backdrop then return end - parent.backdrop = parent:CreateTexture(nil, "BORDER") - parent.backdrop:SetDrawLayer("BORDER", -8) - parent.backdrop:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult*3, noscalemult*3) - parent.backdrop:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", noscalemult*3, -noscalemult*3) - parent.backdrop:SetTexture(unpack(C["media"].backdropcolor)) - - parent.bordertop = parent:CreateTexture(nil, "BORDER") - parent.bordertop:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult*2, noscalemult*2) - parent.bordertop:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult*2, noscalemult*2) - parent.bordertop:SetHeight(noscalemult) - parent.bordertop:SetTexture(unpack(C["media"].bordercolor)) - parent.bordertop:SetDrawLayer("BORDER", -7) - - parent.borderbottom = parent:CreateTexture(nil, "BORDER") - parent.borderbottom:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", -noscalemult*2, -noscalemult*2) - parent.borderbottom:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", noscalemult*2, -noscalemult*2) - parent.borderbottom:SetHeight(noscalemult) - parent.borderbottom:SetTexture(unpack(C["media"].bordercolor)) - parent.borderbottom:SetDrawLayer("BORDER", -7) - - parent.borderleft = parent:CreateTexture(nil, "BORDER") - parent.borderleft:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult*2, noscalemult*2) - parent.borderleft:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", noscalemult*2, -noscalemult*2) - parent.borderleft:SetWidth(noscalemult) - parent.borderleft:SetTexture(unpack(C["media"].bordercolor)) - parent.borderleft:SetDrawLayer("BORDER", -7) - - parent.borderright = parent:CreateTexture(nil, "BORDER") - parent.borderright:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult*2, noscalemult*2) - parent.borderright:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", -noscalemult*2, -noscalemult*2) - parent.borderright:SetWidth(noscalemult) - parent.borderright:SetTexture(unpack(C["media"].bordercolor)) - parent.borderright:SetDrawLayer("BORDER", -7) -end - -local function SetVirtualBorder(parent, r, g, b, a) - parent.bordertop:SetTexture(r, g, b) - parent.borderbottom:SetTexture(r, g, b) - parent.borderleft:SetTexture(r, g, b) - parent.borderright:SetTexture(r, g, b) -end - ---Color the castbar depending on if we can interrupt or not, ---also resize it as nameplates somehow manage to resize some frames when they reappear after being hidden -local function UpdateCastbar(frame) - frame:ClearAllPoints() - frame:SetSize(cbWidth, cbHeight) - frame:SetPoint('TOP', frame:GetParent().hp, 'BOTTOM', 0, -8) - frame:GetStatusBarTexture():SetHorizTile(true) - if(frame.shield:IsShown()) then - frame:SetStatusBarColor(0.78, 0.25, 0.25, 1) - end -end - ---Determine whether or not the cast is Channelled or a Regular cast so we can grab the proper Cast Name -local function UpdateCastText(frame, curValue) - local minValue, maxValue = frame:GetMinMaxValues() - - if UnitChannelInfo("target") then - frame.time:SetFormattedText("%.1f ", curValue) - frame.name:SetText(select(1, (UnitChannelInfo("target")))) - end - - if UnitCastingInfo("target") then - frame.time:SetFormattedText("%.1f ", maxValue - curValue) - frame.name:SetText(select(1, (UnitCastingInfo("target")))) - end -end - ---Sometimes castbar likes to randomly resize -local OnValueChanged = function(self, curValue) - UpdateCastText(self, curValue) - if self.needFix then - UpdateCastbar(self) - self.needFix = nil - end -end - ---Sometimes castbar likes to randomly resize -local OnSizeChanged = function(self) - self.needFix = true -end - ---We need to reset everything when a nameplate it hidden, this is so theres no left over data when a nameplate gets reshown for a differant mob. -local function OnHide(frame) - frame.hp:SetStatusBarColor(frame.hp.rcolor, frame.hp.gcolor, frame.hp.bcolor) - frame.overlay:Hide() - frame.cb:Hide() - frame.hasClass = nil - frame.isFriendly = nil - frame.hp.rcolor = nil - frame.hp.gcolor = nil - frame.hp.bcolor = nil - - frame:SetScript("OnUpdate",nil) -end - ---Color Nameplate -local function Colorize(frame) - local r,g,b = frame.hp:GetStatusBarColor() - - for class, color in pairs(RAID_CLASS_COLORS) do - local r, g, b = floor(r*100+.5)/100, floor(g*100+.5)/100, floor(b*100+.5)/100 - if RAID_CLASS_COLORS[class].r == r and RAID_CLASS_COLORS[class].g == g and RAID_CLASS_COLORS[class].b == b then - frame.hasClass = true - frame.isFriendly = false - return - end - end - - if g+b == 0 then -- hostile - r,g,b = 222/255, 95/255, 95/255 - frame.isFriendly = false - elseif r+b == 0 then -- friendly npc - r,g,b = 0.31, 0.45, 0.63 - frame.isFriendly = true - elseif r+g > 1.95 then -- neutral - r,g,b = 218/255, 197/255, 92/255 - frame.isFriendly = false - elseif r+g == 0 then -- friendly player - r,g,b = 75/255, 175/255, 76/255 - frame.isFriendly = true - else -- enemy player - frame.isFriendly = false - end - frame.hasClass = false - - frame.hp:SetStatusBarColor(r,g,b) -end - ---HealthBar OnShow, use this to set variables for the nameplate, also size the healthbar here because it likes to lose it's ---size settings when it gets reshown -local function UpdateObjects(frame) - local frame = frame:GetParent() - - local r, g, b = frame.hp:GetStatusBarColor() - - --Have to reposition this here so it doesnt resize after being hidden - frame.hp:ClearAllPoints() - frame.hp:SetSize(hpWidth, hpHeight) - frame.hp:SetPoint('TOP', frame, 'TOP', 0, -15) - frame.hp:GetStatusBarTexture():SetHorizTile(true) - - --Colorize Plate - Colorize(frame) - frame.hp.rcolor, frame.hp.gcolor, frame.hp.bcolor = frame.hp:GetStatusBarColor() - frame.hp.hpbg:SetTexture(frame.hp.rcolor, frame.hp.gcolor, frame.hp.bcolor, 0.25) - SetVirtualBorder(frame.hp, unpack(C["media"].bordercolor)) - - if C["nameplate"].enhancethreat == true then - frame.hp.name:SetTextColor(frame.hp.rcolor, frame.hp.gcolor, frame.hp.bcolor) - end - - --Set the name text - frame.hp.name:SetText(frame.hp.oldname:GetText()) - - --Setup level text - local level, elite, mylevel = tonumber(frame.hp.oldlevel:GetText()), frame.hp.elite:IsShown(), UnitLevel("player") - frame.hp.level:ClearAllPoints() - if C["nameplate"].showhealth == true then - frame.hp.level:SetPoint("RIGHT", frame.hp, "RIGHT", 2, 0) - else - frame.hp.level:SetPoint("RIGHT", frame.hp, "LEFT", -1, 0) - end - - frame.hp.level:SetTextColor(frame.hp.oldlevel:GetTextColor()) - if frame.hp.boss:IsShown() then - frame.hp.level:SetText("??") - frame.hp.level:SetTextColor(0.8, 0.05, 0) - frame.hp.level:Show() - elseif not elite and level == mylevel then - frame.hp.level:Hide() - else - frame.hp.level:SetText(level..(elite and "+" or "")) - frame.hp.level:Show() - end - - frame.overlay:ClearAllPoints() - frame.overlay:SetAllPoints(frame.hp) - - HideObjects(frame) -end - ---This is where we create most 'Static' objects for the nameplate, it gets fired when a nameplate is first seen. -local function SkinObjects(frame) - local hp, cb = frame:GetChildren() - local threat, hpborder, overlay, oldname, oldlevel, bossicon, raidicon, elite = frame:GetRegions() - local _, cbborder, cbshield, cbicon = cb:GetRegions() - - --Health Bar - frame.healthOriginal = hp - hp:SetFrameLevel(1) - hp:SetStatusBarTexture(TEXTURE) - CreateVirtualFrame(hp) - - --Create Level - hp.level = hp:CreateFontString(nil, "OVERLAY") - hp.level:SetFont(FONT, FONTSIZE, FONTFLAG) - hp.level:SetShadowColor(0, 0, 0, 0.4) - hp.level:SetTextColor(1, 1, 1) - hp.level:SetShadowOffset(T.mult, -T.mult) - hp.oldlevel = oldlevel - hp.boss = bossicon - hp.elite = elite - - --Create Health Text - if C["nameplate"].showhealth == true then - hp.value = hp:CreateFontString(nil, "OVERLAY") - hp.value:SetFont(FONT, FONTSIZE, FONTFLAG) - hp.value:SetShadowColor(0, 0, 0, 0.4) - hp.value:SetPoint("CENTER", hp) - hp.value:SetTextColor(1,1,1) - hp.value:SetShadowOffset(T.mult, -T.mult) - end - - --Create Name Text - hp.name = hp:CreateFontString(nil, 'OVERLAY') - hp.name:SetPoint('BOTTOMLEFT', hp, 'TOPLEFT', -10, 3) - hp.name:SetPoint('BOTTOMRIGHT', hp, 'TOPRIGHT', 10, 3) - hp.name:SetFont(FONT, FONTSIZE, FONTFLAG) - hp.name:SetShadowColor(0, 0, 0, 0.4) - hp.name:SetShadowOffset(T.mult, -T.mult) - hp.oldname = oldname - - hp.hpbg = hp:CreateTexture(nil, 'BORDER') - hp.hpbg:SetAllPoints(hp) - hp.hpbg:SetTexture(1,1,1,0.25) - - hp:HookScript('OnShow', UpdateObjects) - frame.hp = hp - - --Cast Bar - cb:SetFrameLevel(1) - cb:SetStatusBarTexture(TEXTURE) - CreateVirtualFrame(cb) - - --Create Cast Time Text - cb.time = cb:CreateFontString(nil, "ARTWORK") - cb.time:SetPoint("RIGHT", cb, "LEFT", -1, 0) - cb.time:SetFont(FONT, FONTSIZE, FONTFLAG) - cb.time:SetShadowColor(0, 0, 0, 0.4) - cb.time:SetTextColor(1, 1, 1) - cb.time:SetShadowOffset(T.mult, -T.mult) - - --Create Cast Name Text - cb.name = cb:CreateFontString(nil, "ARTWORK") - cb.name:SetPoint("TOP", cb, "BOTTOM", 0, -3) - cb.name:SetFont(FONT, FONTSIZE, FONTFLAG) - cb.name:SetTextColor(1, 1, 1) - cb.name:SetShadowColor(0, 0, 0, 0.4) - cb.name:SetShadowOffset(T.mult, -T.mult) - - --Setup CastBar Icon - cbicon:ClearAllPoints() - cbicon:SetPoint("TOPLEFT", hp, "TOPRIGHT", 8, 0) - cbicon:SetSize(iconSize, iconSize) - cbicon:SetTexCoord(.07, .93, .07, .93) - cbicon:SetDrawLayer("OVERLAY") - cb.icon = cbicon - CreateVirtualFrame(cb, cb.icon) - - cb.shield = cbshield - cbshield:ClearAllPoints() - cbshield:SetPoint("TOP", cb, "BOTTOM") - cb:HookScript('OnShow', UpdateCastbar) - cb:HookScript('OnSizeChanged', OnSizeChanged) - cb:HookScript('OnValueChanged', OnValueChanged) - frame.cb = cb - - --Highlight - overlay:SetTexture(1,1,1,0.15) - overlay:SetAllPoints(hp) - frame.overlay = overlay - - --Reposition and Resize RaidIcon - raidicon:ClearAllPoints() - raidicon:SetPoint("BOTTOM", hp, "TOP", 0, 16) - raidicon:SetSize(iconSize*1.4, iconSize*1.4) - raidicon:SetTexture([[Interface\AddOns\Tukui\medias\textures\raidicons.blp]]) - frame.raidicon = raidicon - - --Hide Old Stuff - QueueObject(frame, oldlevel) - QueueObject(frame, threat) - QueueObject(frame, hpborder) - QueueObject(frame, cbshield) - QueueObject(frame, cbborder) - QueueObject(frame, oldname) - QueueObject(frame, bossicon) - QueueObject(frame, elite) - - UpdateObjects(hp) - UpdateCastbar(cb) - - frame:HookScript('OnHide', OnHide) - frames[frame] = true -end - -local goodR, goodG, goodB = unpack(C["nameplate"].goodcolor) -local badR, badG, badB = unpack(C["nameplate"].badcolor) -local transitionR, transitionG, transitionB = unpack(C["nameplate"].transitioncolor) -local function UpdateThreat(frame, elapsed) - frame.hp:Show() - if frame.hasClass == true then return end - - if C["nameplate"].enhancethreat ~= true then - if(frame.region:IsShown()) then - local _, val = frame.region:GetVertexColor() - if(val > 0.7) then - SetVirtualBorder(frame.hp, transitionR, transitionG, transitionB) - else - SetVirtualBorder(frame.hp, badR, badG, badB) - end - else - SetVirtualBorder(frame.hp, unpack(C["media"].bordercolor)) - end - frame.hp:SetStatusBarColor(frame.hp.rcolor, frame.hp.gcolor, frame.hp.bcolor) - else - if not frame.region:IsShown() then - if InCombatLockdown() and frame.isFriendly ~= true then - --No Threat - if Role == "Tank" then - frame.hp:SetStatusBarColor(badR, badG, badB) - frame.hp.hpbg:SetTexture(badR, badG, badB, 0.25) - else - frame.hp:SetStatusBarColor(goodR, goodG, goodB) - frame.hp.hpbg:SetTexture(goodR, goodG, goodB, 0.25) - end - else - --Set colors to their original, not in combat - frame.hp:SetStatusBarColor(frame.hp.rcolor, frame.hp.gcolor, frame.hp.bcolor) - frame.hp.hpbg:SetTexture(frame.hp.rcolor, frame.hp.gcolor, frame.hp.bcolor, 0.25) - end - else - --Ok we either have threat or we're losing/gaining it - local r, g, b = frame.region:GetVertexColor() - if g + b == 0 then - --Have Threat - if Role == "Tank" then - frame.hp:SetStatusBarColor(goodR, goodG, goodB) - frame.hp.hpbg:SetTexture(goodR, goodG, goodB, 0.25) - else - frame.hp:SetStatusBarColor(badR, badG, badB) - frame.hp.hpbg:SetTexture(badR, badG, badB, 0.25) - end - else - --Losing/Gaining Threat - frame.hp:SetStatusBarColor(transitionR, transitionG, transitionB) - frame.hp.hpbg:SetTexture(transitionR, transitionG, transitionB, 0.25) - end - end - end -end - ---Create our blacklist for nameplates, so prevent a certain nameplate from ever showing -local function CheckBlacklist(frame, ...) - if PlateBlacklist[frame.hp.name:GetText()] then - frame:SetScript("OnUpdate", function() end) - frame.hp:Hide() - frame.cb:Hide() - frame.overlay:Hide() - frame.hp.oldlevel:Hide() - end -end - ---When becoming intoxicated blizzard likes to re-show the old level text, this should fix that -local function HideDrunkenText(frame, ...) - if frame and frame.hp.oldlevel and frame.hp.oldlevel:IsShown() then - frame.hp.oldlevel:Hide() - end -end - ---Force the name text of a nameplate to be behind other nameplates unless it is our target -local function AdjustNameLevel(frame, ...) - if UnitName("target") == frame.hp.name:GetText() and frame:GetAlpha() == 1 then - frame.hp.name:SetDrawLayer("OVERLAY") - else - frame.hp.name:SetDrawLayer("BORDER") - end -end - ---Health Text, also border coloring for certain plates depending on health -local function ShowHealth(frame, ...) - -- show current health value - local minHealth, maxHealth = frame.healthOriginal:GetMinMaxValues() - local valueHealth = frame.healthOriginal:GetValue() - local d =(valueHealth/maxHealth)*100 - - -- Match values - frame.hp:SetValue(valueHealth - 1) --Bug Fix 4.1 - frame.hp:SetValue(valueHealth) - - if C["nameplate"].showhealth == true then - frame.hp.value:SetText(T.ShortValue(valueHealth).." - "..(string.format("%d%%", math.floor((valueHealth/maxHealth)*100)))) - end - - --Setup frame shadow to change depending on enemy players health, also setup targetted unit to have white shadow - if frame.hasClass == true or frame.isFriendly == true then - if(d <= 50 and d >= 20) then - SetVirtualBorder(frame.hp, 1, 1, 0) - elseif(d < 20) then - SetVirtualBorder(frame.hp, 1, 0, 0) - else - SetVirtualBorder(frame.hp, unpack(C["media"].bordercolor)) - end - elseif (frame.hasClass ~= true and frame.isFriendly ~= true) and C["nameplate"].enhancethreat == true then - SetVirtualBorder(frame.hp, unpack(C["media"].bordercolor)) - end -end - ---Run a function for all visible nameplates -local function ForEachPlate(functionToRun, ...) - for frame in pairs(frames) do - if frame:IsShown() then - functionToRun(frame, ...) - end - end -end - ---Check if the frames default overlay texture matches blizzards nameplates default overlay texture -local select = select -local function HookFrames(...) - for index = 1, select('#', ...) do - local frame = select(index, ...) - local region = frame:GetRegions() - - if(not frames[frame] and (frame:GetName() and frame:GetName():find("NamePlate%d")) and region and region:GetObjectType() == 'Texture' and region:GetTexture() == OVERLAY) then - SkinObjects(frame) - frame.region = region - end - end -end - ---Core right here, scan for any possible nameplate frames that are Children of the WorldFrame -NamePlates:SetScript('OnUpdate', function(self, elapsed) - if(WorldFrame:GetNumChildren() ~= numChildren) then - numChildren = WorldFrame:GetNumChildren() - HookFrames(WorldFrame:GetChildren()) - end - - if(self.elapsed and self.elapsed > 0.2) then - ForEachPlate(UpdateThreat, self.elapsed) - ForEachPlate(AdjustNameLevel) - self.elapsed = 0 - else - self.elapsed = (self.elapsed or 0) + elapsed - end - - ForEachPlate(ShowHealth) - ForEachPlate(CheckBlacklist) - ForEachPlate(HideDrunkenText) -end) - ---Only show nameplates when in combat -if C["nameplate"].combat == true then - NamePlates:RegisterEvent("PLAYER_REGEN_ENABLED") - NamePlates:RegisterEvent("PLAYER_REGEN_DISABLED") - - function NamePlates:PLAYER_REGEN_ENABLED() - SetCVar("nameplateShowEnemies", 0) - end - - function NamePlates:PLAYER_REGEN_DISABLED() - SetCVar("nameplateShowEnemies", 1) - end -end - -NamePlates:RegisterEvent("PLAYER_ENTERING_WORLD") -function NamePlates:PLAYER_ENTERING_WORLD() - if C["nameplate"].combat == true then - if InCombatLockdown() then - SetCVar("nameplateShowEnemies", 1) - else - SetCVar("nameplateShowEnemies", 0) - end - end - - if C["nameplate"].enable == true and C["nameplate"].enhancethreat == true then - SetCVar("threatWarning", 3) - end -end \ No newline at end of file diff --git a/Tukui/modules/panels/panels.lua b/Tukui/modules/panels/panels.lua deleted file mode 100644 index 1313597..0000000 --- a/Tukui/modules/panels/panels.lua +++ /dev/null @@ -1,218 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -local TukuiBar1 = CreateFrame("Frame", "TukuiBar1", UIParent, "SecureHandlerStateTemplate") -TukuiBar1:CreatePanel("Default", 1, 1, "BOTTOM", UIParent, "BOTTOM", 0, 14) -TukuiBar1:SetWidth((T.buttonsize * 12) + (T.buttonspacing * 13)) -TukuiBar1:SetHeight((T.buttonsize * 2) + (T.buttonspacing * 3)) -TukuiBar1:SetFrameStrata("BACKGROUND") -TukuiBar1:SetFrameLevel(1) - -local TukuiBar2 = CreateFrame("Frame", "TukuiBar2", UIParent) -TukuiBar2:CreatePanel("Default", 1, 1, "BOTTOMRIGHT", TukuiBar1, "BOTTOMLEFT", -6, 0) -TukuiBar2:SetWidth((T.buttonsize * 6) + (T.buttonspacing * 7)) -TukuiBar2:SetHeight((T.buttonsize * 2) + (T.buttonspacing * 3)) -TukuiBar2:SetFrameStrata("BACKGROUND") -TukuiBar2:SetFrameLevel(2) -TukuiBar2:SetAlpha(0) -if T.lowversion then - TukuiBar2:SetAlpha(0) -else - TukuiBar2:SetAlpha(1) -end - -local TukuiBar3 = CreateFrame("Frame", "TukuiBar3", UIParent) -TukuiBar3:CreatePanel("Default", 1, 1, "BOTTOMLEFT", TukuiBar1, "BOTTOMRIGHT", 6, 0) -TukuiBar3:SetWidth((T.buttonsize * 6) + (T.buttonspacing * 7)) -TukuiBar3:SetHeight((T.buttonsize * 2) + (T.buttonspacing * 3)) -TukuiBar3:SetFrameStrata("BACKGROUND") -TukuiBar3:SetFrameLevel(2) -if T.lowversion then - TukuiBar3:SetAlpha(0) -else - TukuiBar3:SetAlpha(1) -end - -local TukuiBar4 = CreateFrame("Frame", "TukuiBar4", UIParent) -TukuiBar4:CreatePanel("Default", 1, 1, "BOTTOM", UIParent, "BOTTOM", 0, 14) -TukuiBar4:SetWidth((T.buttonsize * 12) + (T.buttonspacing * 13)) -TukuiBar4:SetHeight((T.buttonsize * 2) + (T.buttonspacing * 3)) -TukuiBar4:SetFrameStrata("BACKGROUND") -TukuiBar4:SetFrameLevel(2) -TukuiBar4:SetAlpha(0) - -local TukuiBar5 = CreateFrame("Frame", "TukuiBar5", UIParent) -TukuiBar5:CreatePanel("Default", 1, (T.buttonsize * 12) + (T.buttonspacing * 13), "RIGHT", UIParent, "RIGHT", -23, -14) -TukuiBar5:SetWidth((T.buttonsize * 1) + (T.buttonspacing * 2)) -TukuiBar5:SetFrameStrata("BACKGROUND") -TukuiBar5:SetFrameLevel(2) -TukuiBar5:SetAlpha(0) - -local TukuiBar6 = CreateFrame("Frame", "TukuiBar6", UIParent) -TukuiBar6:SetWidth((T.buttonsize * 1) + (T.buttonspacing * 2)) -TukuiBar6:SetHeight((T.buttonsize * 12) + (T.buttonspacing * 13)) -TukuiBar6:SetPoint("LEFT", TukuiBar5, "LEFT", 0, 0) -TukuiBar6:SetFrameStrata("BACKGROUND") -TukuiBar6:SetFrameLevel(2) -TukuiBar6:SetAlpha(0) - -local TukuiBar7 = CreateFrame("Frame", "TukuiBar7", UIParent) -TukuiBar7:SetWidth((T.buttonsize * 1) + (T.buttonspacing * 2)) -TukuiBar7:SetHeight((T.buttonsize * 12) + (T.buttonspacing * 13)) -TukuiBar7:SetPoint("TOP", TukuiBar5, "TOP", 0 , 0) -TukuiBar7:SetFrameStrata("BACKGROUND") -TukuiBar7:SetFrameLevel(2) -TukuiBar7:SetAlpha(0) - -local petbg = CreateFrame("Frame", "TukuiPetBar", UIParent, "SecureHandlerStateTemplate") -petbg:CreatePanel("Default", T.petbuttonsize + (T.petbuttonspacing * 2), (T.petbuttonsize * 10) + (T.petbuttonspacing * 11), "RIGHT", TukuiBar5, "LEFT", -6, 0) - -local ltpetbg1 = CreateFrame("Frame", "TukuiLineToPetActionBarBackground", petbg) -ltpetbg1:CreatePanel("Default", 24, 265, "LEFT", petbg, "RIGHT", 0, 0) -ltpetbg1:SetParent(petbg) -ltpetbg1:SetFrameStrata("BACKGROUND") -ltpetbg1:SetFrameLevel(0) - --- INVISIBLE FRAME COVERING BOTTOM ACTIONBARS JUST TO PARENT UF CORRECTLY -local invbarbg = CreateFrame("Frame", "InvTukuiActionBarBackground", UIParent) -if T.lowversion then - invbarbg:SetPoint("TOPLEFT", TukuiBar1) - invbarbg:SetPoint("BOTTOMRIGHT", TukuiBar1) - TukuiBar2:Hide() - TukuiBar3:Hide() -else - invbarbg:SetPoint("TOPLEFT", TukuiBar2) - invbarbg:SetPoint("BOTTOMRIGHT", TukuiBar3) -end - --- LEFT VERTICAL LINE -local ileftlv = CreateFrame("Frame", "TukuiInfoLeftLineVertical", TukuiBar1) -ileftlv:CreatePanel("Default", 2, 130, "BOTTOMLEFT", UIParent, "BOTTOMLEFT", 22, 30) - --- RIGHT VERTICAL LINE -local irightlv = CreateFrame("Frame", "TukuiInfoRightLineVertical", TukuiBar1) -irightlv:CreatePanel("Default", 2, 130, "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -22, 30) - -if not C.chat.background then - -- CUBE AT LEFT, ACT AS A BUTTON (CHAT MENU) - local cubeleft = CreateFrame("Frame", "TukuiCubeLeft", TukuiBar1) - cubeleft:CreatePanel("Default", 10, 10, "BOTTOM", ileftlv, "TOP", 0, 0) - cubeleft:EnableMouse(true) - cubeleft:SetScript("OnMouseDown", function(self, btn) - if TukuiInfoLeftBattleGround and UnitInBattleground("player") then - if btn == "RightButton" then - if TukuiInfoLeftBattleGround:IsShown() then - TukuiInfoLeftBattleGround:Hide() - else - TukuiInfoLeftBattleGround:Show() - end - end - end - - if btn == "LeftButton" then - ToggleFrame(ChatMenu) - end - end) - - -- CUBE AT RIGHT, ACT AS A BUTTON (CONFIGUI or BG'S) - local cuberight = CreateFrame("Frame", "TukuiCubeRight", TukuiBar1) - cuberight:CreatePanel("Default", 10, 10, "BOTTOM", irightlv, "TOP", 0, 0) - if C["bags"].enable then - cuberight:EnableMouse(true) - cuberight:SetScript("OnMouseDown", function(self) - if T.toc < 40200 then ToggleKeyRing() else ToggleAllBags() end - end) - end -end - --- HORIZONTAL LINE LEFT -local ltoabl = CreateFrame("Frame", "TukuiLineToABLeft", TukuiBar1) -ltoabl:CreatePanel("Default", 5, 2, "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0) -ltoabl:ClearAllPoints() -ltoabl:Point("BOTTOMLEFT", ileftlv, "BOTTOMLEFT", 0, 0) -ltoabl:Point("RIGHT", TukuiBar1, "BOTTOMLEFT", -1, 17) -ltoabl:SetFrameStrata("BACKGROUND") -ltoabl:SetFrameLevel(1) - --- HORIZONTAL LINE RIGHT -local ltoabr = CreateFrame("Frame", "TukuiLineToABRight", TukuiBar1) -ltoabr:CreatePanel("Default", 5, 2, "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0) -ltoabr:ClearAllPoints() -ltoabr:Point("LEFT", TukuiBar1, "BOTTOMRIGHT", 1, 17) -ltoabr:Point("BOTTOMRIGHT", irightlv, "BOTTOMRIGHT", 0, 0) -ltoabr:SetFrameStrata("BACKGROUND") -ltoabr:SetFrameLevel(1) - --- MOVE/HIDE SOME ELEMENTS IF CHAT BACKGROUND IS ENABLED -local movechat = 0 -if C.chat.background then movechat = 10 ileftlv:SetAlpha(0) irightlv:SetAlpha(0) end - --- INFO LEFT (FOR STATS) -local ileft = CreateFrame("Frame", "TukuiInfoLeft", TukuiBar1) -ileft:CreatePanel("Default", T.InfoLeftRightWidth, 23, "LEFT", ltoabl, "LEFT", 14 - movechat, 0) -ileft:SetFrameLevel(2) -ileft:SetFrameStrata("BACKGROUND") - --- INFO RIGHT (FOR STATS) -local iright = CreateFrame("Frame", "TukuiInfoRight", TukuiBar1) -iright:CreatePanel("Default", T.InfoLeftRightWidth, 23, "RIGHT", ltoabr, "RIGHT", -14 + movechat, 0) -iright:SetFrameLevel(2) -iright:SetFrameStrata("BACKGROUND") - -if C.chat.background then - -- Alpha horizontal lines because all panels is dependent on this frame. - ltoabl:SetAlpha(0) - ltoabr:SetAlpha(0) - - -- CHAT BG LEFT - local chatleftbg = CreateFrame("Frame", "TukuiChatBackgroundLeft", TukuiInfoLeft) - chatleftbg:CreatePanel("Transparent", T.InfoLeftRightWidth + 12, 177, "BOTTOM", TukuiInfoLeft, "BOTTOM", 0, -6) - - -- CHAT BG RIGHT - local chatrightbg = CreateFrame("Frame", "TukuiChatBackgroundRight", TukuiInfoRight) - chatrightbg:CreatePanel("Transparent", T.InfoLeftRightWidth + 12, 177, "BOTTOM", TukuiInfoRight, "BOTTOM", 0, -6) - - -- LEFT TAB PANEL - local tabsbgleft = CreateFrame("Frame", "TukuiTabsLeftBackground", TukuiBar1) - tabsbgleft:CreatePanel("Default", T.InfoLeftRightWidth, 23, "TOP", chatleftbg, "TOP", 0, -6) - tabsbgleft:SetFrameLevel(2) - tabsbgleft:SetFrameStrata("BACKGROUND") - - -- RIGHT TAB PANEL - local tabsbgright = CreateFrame("Frame", "TukuiTabsRightBackground", TukuiBar1) - tabsbgright:CreatePanel("Default", T.InfoLeftRightWidth, 23, "TOP", chatrightbg, "TOP", 0, -6) - tabsbgright:SetFrameLevel(2) - tabsbgright:SetFrameStrata("BACKGROUND") - - -- [[ Create new horizontal line for chat background ]] -- - -- HORIZONTAL LINE LEFT - local ltoabl2 = CreateFrame("Frame", "TukuiLineToABLeftAlt", TukuiBar1) - ltoabl2:CreatePanel("Default", 5, 2, "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0) - ltoabl2:ClearAllPoints() - ltoabl2:Point("RIGHT", TukuiBar1, "LEFT", 0, 16) - ltoabl2:Point("BOTTOMLEFT", chatleftbg, "BOTTOMRIGHT", 0, 16) - - -- HORIZONTAL LINE RIGHT - local ltoabr2 = CreateFrame("Frame", "TukuiLineToABRightAlt", TukuiBar1) - ltoabr2:CreatePanel("Default", 5, 2, "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0) - ltoabr2:ClearAllPoints() - ltoabr2:Point("LEFT", TukuiBar1, "RIGHT", 0, 16) - ltoabr2:Point("BOTTOMRIGHT", chatrightbg, "BOTTOMLEFT", 0, 16) -end - -if TukuiMinimap then - local minimapstatsleft = CreateFrame("Frame", "TukuiMinimapStatsLeft", TukuiMinimap) - minimapstatsleft:CreatePanel("Default", ((TukuiMinimap:GetWidth() + 4) / 2) -3, 19, "TOPLEFT", TukuiMinimap, "BOTTOMLEFT", 0, -2) - - local minimapstatsright = CreateFrame("Frame", "TukuiMinimapStatsRight", TukuiMinimap) - minimapstatsright:CreatePanel("Default", ((TukuiMinimap:GetWidth() + 4) / 2) -3, 19, "TOPRIGHT", TukuiMinimap, "BOTTOMRIGHT", 0, -2) -end - ---BATTLEGROUND STATS FRAME -if C["datatext"].battleground == true then - local bgframe = CreateFrame("Frame", "TukuiInfoLeftBattleGround", UIParent) - bgframe:CreatePanel("Default", 1, 1, "TOPLEFT", UIParent, "BOTTOMLEFT", 0, 0) - bgframe:SetAllPoints(ileft) - bgframe:SetFrameStrata("LOW") - bgframe:SetFrameLevel(0) - bgframe:EnableMouse(true) -end diff --git a/Tukui/modules/skins/addons/bigwigs.lua b/Tukui/modules/skins/addons/bigwigs.lua deleted file mode 100644 index c88d755..0000000 --- a/Tukui/modules/skins/addons/bigwigs.lua +++ /dev/null @@ -1,156 +0,0 @@ ---[[ - Author: Affli@RU-Howling Fjord, - All rights reserved. ---]] - -local T, C, L = unpack(select(2, ...)) - -if not IsAddOnLoaded("BigWigs") then return end - -local buttonsize = 19 - --- init some tables to store backgrounds -local freebg = {} - --- styling functions -local createbg = function() - local bg = CreateFrame("Frame") - bg:SetTemplate("Transparent") - return bg -end - -local function freestyle(bar) - -- reparent and hide bar background - local bg = bar:Get("bigwigs:Tukui:bg") - if bg then - bg:ClearAllPoints() - bg:SetParent(UIParent) - bg:Hide() - freebg[#freebg + 1] = bg - end - - -- reparent and hide icon background - local ibg = bar:Get("bigwigs:Tukui:bg") - if ibg then - ibg:ClearAllPoints() - ibg:SetParent(UIParent) - ibg:Hide() - freebg[#freebg + 1] = ibg - end - - -- replace dummies with original method functions - bar.candyBarBar.SetPoint=bar.candyBarBar.OldSetPoint - bar.candyBarIconFrame.SetWidth=bar.candyBarIconFrame.OldSetWidth - bar.SetScale=bar.OldSetScale -end - -local applystyle = function(bar) - -- general bar settings - bar:SetHeight(buttonsize) - bar:SetScale(1) - bar.OldSetScale=bar.SetScale - bar.SetScale=T.dummy - - -- create or reparent and use bar background - local bg = nil - if #freebg > 0 then - bg = table.remove(freebg) - else - bg = createbg() - end - - bg:SetParent(bar) - bg:ClearAllPoints() - bg:Point("TOPLEFT", bar, "TOPLEFT", -2, 2) - bg:Point("BOTTOMRIGHT", bar, "BOTTOMRIGHT", 2, -2) - bg:SetFrameStrata("BACKGROUND") - bg:Show() - bar:Set("bigwigs:Tukui:bg", bg) - - -- create or reparent and use icon background - local ibg = nil - if bar.candyBarIconFrame:GetTexture() then - if #freebg > 0 then - ibg = table.remove(freebg) - else - ibg = createbg() - end - ibg:SetParent(bar) - ibg:ClearAllPoints() - ibg:Point("TOPLEFT", bar.candyBarIconFrame, "TOPLEFT", -2, 2) - ibg:Point("BOTTOMRIGHT", bar.candyBarIconFrame, "BOTTOMRIGHT", 2, -2) - ibg:SetFrameStrata("BACKGROUND") - ibg:Show() - bar:Set("bigwigs:Tukui:bg", ibg) - end - - -- setup timer and bar name fonts and positions - bar.candyBarLabel:SetFont(C.media.font, C["datatext"].fontsize, "OUTLINE") - bar.candyBarLabel:SetShadowColor(0, 0, 0, 0) - bar.candyBarLabel:SetJustifyH("LEFT") - bar.candyBarLabel:ClearAllPoints() - bar.candyBarLabel:Point("LEFT", bar, "LEFT", 4, 0) - - bar.candyBarDuration:SetFont(C.media.font, C["datatext"].fontsize, "OUTLINE") - bar.candyBarDuration:SetShadowColor(0, 0, 0, 0) - bar.candyBarDuration:SetJustifyH("RIGHT") - bar.candyBarDuration:ClearAllPoints() - bar.candyBarDuration:Point("RIGHT", bar, "RIGHT", -4, 0) - - -- setup bar positions and look - bar.candyBarBar:ClearAllPoints() - bar.candyBarBar:SetAllPoints(bar) - bar.candyBarBar.OldSetPoint = bar.candyBarBar.SetPoint - bar.candyBarBar.SetPoint=T.dummy - bar.candyBarBar:SetStatusBarTexture(C["media"].normTex) - bar.candyBarBackground:SetTexture(unpack(C.media.backdropcolor)) - - -- setup icon positions and other things - bar.candyBarIconFrame:ClearAllPoints() - bar.candyBarIconFrame:Point("BOTTOMRIGHT", bar, "BOTTOMLEFT", -7, 0) - bar.candyBarIconFrame:SetSize(buttonsize, buttonsize) - bar.candyBarIconFrame.OldSetWidth = bar.candyBarIconFrame.SetWidth - bar.candyBarIconFrame.SetWidth=T.dummy - bar.candyBarIconFrame:SetTexCoord(0.08, 0.92, 0.08, 0.92) -end - - -local f = CreateFrame("Frame") - -local function RegisterStyle() - if not BigWigs then return end - local bars = BigWigs:GetPlugin("Bars", true) - local prox = BigWigs:GetPlugin("Proximity", true) - if bars then - bars:RegisterBarStyle("Tukui", { - apiVersion = 1, - version = 1, - GetSpacing = function(bar) return 7 end, - ApplyStyle = applystyle, - BarStopped = freestyle, - GetStyleName = function() return "Tukui" end, - }) - end - if prox and BigWigs.pluginCore.modules.Bars.db.profile.barStyle == "Tukui" then - hooksecurefunc(BigWigs.pluginCore.modules.Proximity, "RestyleWindow", function() - BigWigsProximityAnchor:SetTemplate("Transparent") - end) - end -end - -f:RegisterEvent("ADDON_LOADED") -f:SetScript("OnEvent", function(self, event, addon) - if event == "ADDON_LOADED" and addon == "BigWigs_Plugins" then - RegisterStyle() - local profile = BigWigs3DB["profileKeys"][T.myname.." - "..T.myrealm] - local path = BigWigs3DB["namespaces"]["BigWigs_Plugins_Bars"]["profiles"][profile] - path.texture = C.media.normTex - path.barStyle = "Tukui" - path.font = C.media.font - - path = BigWigs3DB["namespaces"]["BigWigs_Plugins_Proximity"]["profiles"][profile] - path.font = C.media.font - - f:UnregisterEvent("ADDON_LOADED") - end -end) \ No newline at end of file diff --git a/Tukui/modules/skins/addons/dbm.lua b/Tukui/modules/skins/addons/dbm.lua deleted file mode 100644 index 81f3996..0000000 --- a/Tukui/modules/skins/addons/dbm.lua +++ /dev/null @@ -1,250 +0,0 @@ ---[[ - Author: Affli@RU-Howling Fjord, - Modified: Elv - All rights reserved. -]]-- - -local T, C, L = unpack(select(2, ...)) - -if not IsAddOnLoaded("DBM-Core") then return end - -local croprwicons = true -- crops blizz shitty borders from icons in RaidWarning messages -local rwiconsize = 18 -- RaidWarning icon size, because 12 is small for me. Works only if croprwicons=true -local buttonsize = 22 - -local function SkinBars(self) - for bar in self:GetBarIterator() do - if not bar.injected then - bar.ApplyStyle=function() - local frame = bar.frame - local tbar = _G[frame:GetName().."Bar"] - local spark = _G[frame:GetName().."BarSpark"] - local texture = _G[frame:GetName().."BarTexture"] - local icon1 = _G[frame:GetName().."BarIcon1"] - local icon2 = _G[frame:GetName().."BarIcon2"] - local name = _G[frame:GetName().."BarName"] - local timer = _G[frame:GetName().."BarTimer"] - - if not (icon1.overlay) then - icon1.overlay = CreateFrame("Frame", "$parentIcon1Overlay", tbar) - icon1.overlay:CreatePanel(template, buttonsize, buttonsize, "BOTTOMRIGHT", tbar, "BOTTOMLEFT", -buttonsize/4, -2) - - local backdroptex = icon1.overlay:CreateTexture(nil, "BORDER") - backdroptex:SetTexture([=[Interface\Icons\Spell_Nature_WispSplode]=]) - backdroptex:Point("TOPLEFT", icon1.overlay, "TOPLEFT", 2, -2) - backdroptex:Point("BOTTOMRIGHT", icon1.overlay, "BOTTOMRIGHT", -2, 2) - backdroptex:SetTexCoord(0.08, 0.92, 0.08, 0.92) - end - - if not (icon2.overlay) then - icon2.overlay = CreateFrame("Frame", "$parentIcon2Overlay", tbar) - icon2.overlay:CreatePanel(template, buttonsize, buttonsize, "BOTTOMLEFT", tbar, "BOTTOMRIGHT", buttonsize/4, -2) - - local backdroptex = icon2.overlay:CreateTexture(nil, "BORDER") - backdroptex:SetTexture([=[Interface\Icons\Spell_Nature_WispSplode]=]) - backdroptex:Point("TOPLEFT", icon2.overlay, "TOPLEFT", 2, -2) - backdroptex:Point("BOTTOMRIGHT", icon2.overlay, "BOTTOMRIGHT", -2, 2) - backdroptex:SetTexCoord(0.08, 0.92, 0.08, 0.92) - end - - if bar.color then - tbar:SetStatusBarColor(bar.color.r, bar.color.g, bar.color.b) - else - tbar:SetStatusBarColor(bar.owner.options.StartColorR, bar.owner.options.StartColorG, bar.owner.options.StartColorB) - end - - if bar.enlarged then frame:Width(bar.owner.options.HugeWidth) else frame:SetWidth(bar.owner.options.Width) end - if bar.enlarged then tbar:Width(bar.owner.options.HugeWidth) else tbar:SetWidth(bar.owner.options.Width) end - - if not frame.styled then - frame:SetScale(1) - frame.SetScale=T.dummy - frame:SetHeight(buttonsize) - frame:SetTemplate("Transparent") - frame.styled=true - end - - if not spark.killed then - spark:SetAlpha(0) - spark:SetTexture(nil) - spark.killed=true - end - - if not icon1.styled then - icon1:SetTexCoord(0.08, 0.92, 0.08, 0.92) - icon1:ClearAllPoints() - icon1:Point("TOPLEFT", icon1.overlay, 2, -2) - icon1:Point("BOTTOMRIGHT", icon1.overlay, -2, 2) - icon1.styled=true - end - - if not icon2.styled then - icon2:SetTexCoord(0.08, 0.92, 0.08, 0.92) - icon2:ClearAllPoints() - icon2:Point("TOPLEFT", icon2.overlay, 2, -2) - icon2:Point("BOTTOMRIGHT", icon2.overlay, -2, 2) - icon2.styled=true - end - - if not texture.styled then - texture:SetTexture(C["media"].normTex) - texture.styled=true - end - - tbar:SetStatusBarTexture(C["media"].normTex) - if not tbar.styled then - tbar:Point("TOPLEFT", frame, "TOPLEFT", 2, -2) - tbar:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 2) - - tbar.styled=true - end - - if not name.styled then - name:ClearAllPoints() - name:Point("LEFT", frame, "LEFT", 4, 0) - name:SetWidth(165) - name:SetHeight(8) - name:SetFont(C["media"].font, 12, "OUTLINE") - name:SetJustifyH("LEFT") - name:SetShadowColor(0, 0, 0, 0) - name.SetFont = T.dummy - name.styled=true - end - - if not timer.styled then - timer:ClearAllPoints() - timer:Point("RIGHT", frame, "RIGHT", -4, 0) - timer:SetFont(C["media"].font, 12, "OUTLINE") - timer:SetJustifyH("RIGHT") - timer:SetShadowColor(0, 0, 0, 0) - timer.SetFont = T.dummy - timer.styled=true - end - - if bar.owner.options.IconLeft then icon1:Show() icon1.overlay:Show() else icon1:Hide() icon1.overlay:Hide() end - if bar.owner.options.IconRight then icon2:Show() icon2.overlay:Show() else icon2:Hide() icon2.overlay:Hide() end - tbar:SetAlpha(1) - frame:SetAlpha(1) - texture:SetAlpha(1) - frame:Show() - bar:Update(0) - bar.injected=true - end - bar:ApplyStyle() - end - - end -end - -local SkinBossTitle=function() - local anchor=DBMBossHealthDropdown:GetParent() - if not anchor.styled then - local header={anchor:GetRegions()} - if header[1]:IsObjectType("FontString") then - header[1]:SetFont(C["media"].font, 12, "OUTLINE") - header[1]:SetTextColor(1,1,1,1) - header[1]:SetShadowColor(0, 0, 0, 0) - anchor.styled=true - end - header=nil - end - anchor=nil -end - -local SkinBoss=function() - local count = 1 - while (_G[format("DBM_BossHealth_Bar_%d", count)]) do - local bar = _G[format("DBM_BossHealth_Bar_%d", count)] - local background = _G[bar:GetName().."BarBorder"] - local progress = _G[bar:GetName().."Bar"] - local name = _G[bar:GetName().."BarName"] - local timer = _G[bar:GetName().."BarTimer"] - local prev = _G[format("DBM_BossHealth_Bar_%d", count-1)] - - if (count == 1) then - local _, anch, _ ,_, _ = bar:GetPoint() - bar:ClearAllPoints() - if DBM_SavedOptions.HealthFrameGrowUp then - bar:Point("BOTTOM", anch, "TOP" , 0 , 12) - else - bar:Point("TOP", anch, "BOTTOM" , 0, -buttonsize) - end - else - bar:ClearAllPoints() - if DBM_SavedOptions.HealthFrameGrowUp then - bar:Point("TOPLEFT", prev, "TOPLEFT", 0, buttonsize+4) - else - bar:Point("TOPLEFT", prev, "TOPLEFT", 0, -(buttonsize+4)) - end - end - - if not bar.styled then - bar:SetHeight(buttonsize) - bar:SetTemplate("Transparent") - background:SetNormalTexture(nil) - bar.styled=true - end - - if not progress.styled then - progress:SetStatusBarTexture(C["media"].normTex) - progress.styled=true - end - progress:ClearAllPoints() - progress:Point("TOPLEFT", bar, "TOPLEFT", 2, -2) - progress:Point("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -2, 2) - - if not name.styled then - name:ClearAllPoints() - name:Point("LEFT", bar, "LEFT", 4, 0) - name:SetFont(C["media"].font, 12, "OUTLINE") - name:SetJustifyH("LEFT") - name:SetShadowColor(0, 0, 0, 0) - name.styled=true - end - - if not timer.styled then - timer:ClearAllPoints() - timer:Point("RIGHT", bar, "RIGHT", -4, 0) - timer:SetFont(C["media"].font, 12, "OUTLINE") - timer:SetJustifyH("RIGHT") - timer:SetShadowColor(0, 0, 0, 0) - timer.styled=true - end - count = count + 1 - end -end - --- mwahahahah, eat this ugly DBM. -hooksecurefunc(DBT,"CreateBar",SkinBars) -hooksecurefunc(DBM.BossHealth,"Show",SkinBossTitle) -hooksecurefunc(DBM.BossHealth,"AddBoss",SkinBoss) -hooksecurefunc(DBM.BossHealth,"UpdateSettings",SkinBoss) -DBM.RangeCheck:Show() -DBM.RangeCheck:Hide() -DBMRangeCheck:HookScript("OnShow",function(self) - self:SetTemplate("Transparent") -end) - - -local RaidNotice_AddMessage_=RaidNotice_AddMessage -RaidNotice_AddMessage=function(noticeFrame, textString, colorInfo) - if textString:find(" |T") then - textString = string.gsub(textString,"(:12:12)",":18:18:0:0:64:64:5:59:5:59") - end - return RaidNotice_AddMessage_(noticeFrame, textString, colorInfo) -end - -local ForceOptions = function() - DBM_SavedOptions.Enabled=true - - DBT_SavedOptions["DBM"].Scale = 1 - DBT_SavedOptions["DBM"].HugeScale = 1 - DBT_SavedOptions["DBM"].BarXOffset = 0 - DBT_SavedOptions["DBM"].BarYOffset = 2 - DBT_SavedOptions["DBM"].Texture = C.media.normTex - DBT_SavedOptions["DBM"].Font = C.media.font -end - -local loadOptions = CreateFrame("Frame") -loadOptions:RegisterEvent("PLAYER_LOGIN") -loadOptions:SetScript("OnEvent", ForceOptions) \ No newline at end of file diff --git a/Tukui/modules/skins/addons/dxe.lua b/Tukui/modules/skins/addons/dxe.lua deleted file mode 100644 index f259530..0000000 --- a/Tukui/modules/skins/addons/dxe.lua +++ /dev/null @@ -1,97 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - --- NOTE TO ME, MORE WORK TO DO ON THIS FILE - -local skin = CreateFrame("Frame") -skin:RegisterEvent("ADDON_LOADED") -skin:SetScript("OnEvent", function(self, event, addon) - if addon ~= "DXE" then return end - - local DXE = DXE - local _G = getfenv(0) - local barSpacing = T.Scale(2, 2) - local borderWidth = T.Scale(2, 2) - local buttonZoom = {.09,.91,.09,.91} - - local function SkinDXEBar(bar) - -- The main bar - bar:SetTemplate("Transparent") - bar.bg:SetTexture(nil) - bar.border:Kill() - bar.statusbar:SetStatusBarTexture(C["media"].normTex) - bar.statusbar:ClearAllPoints() - bar.statusbar:SetPoint("TOPLEFT",borderWidth, -borderWidth) - bar.statusbar:SetPoint("BOTTOMRIGHT",-borderWidth, borderWidth) - - -- Right Icon - bar.righticon:SetTemplate("Default") - bar.righticon.border:Kill() - bar.righticon:ClearAllPoints() - bar.righticon:SetPoint("LEFT", bar, "RIGHT", 2, 0) - bar.righticon.t:SetTexCoord(unpack(buttonZoom)) - bar.righticon.t:ClearAllPoints() - bar.righticon.t:SetPoint("TOPLEFT", borderWidth, -borderWidth) - bar.righticon.t:SetPoint("BOTTOMRIGHT", -borderWidth, borderWidth) - bar.righticon.t:SetDrawLayer("ARTWORK") - - -- Left Icon - bar.lefticon:SetTemplate("Default") - bar.lefticon.border:Kill() - bar.lefticon:ClearAllPoints() - bar.lefticon:SetPoint("RIGHT", bar, "LEFT", -2, 0) - bar.lefticon.t:SetTexCoord(unpack(buttonZoom)) - bar.lefticon.t:ClearAllPoints() - bar.lefticon.t:SetPoint("TOPLEFT",borderWidth, -borderWidth) - bar.lefticon.t:SetPoint("BOTTOMRIGHT",-borderWidth, borderWidth) - bar.lefticon.t:SetDrawLayer("ARTWORK") - end - - -- Hook Health frames (Skin & spacing) - DXE.LayoutHealthWatchers_ = DXE.LayoutHealthWatchers - DXE.LayoutHealthWatchers = function(self) - for i,hw in ipairs(self.HW) do - if hw:IsShown() then - hw:SetTemplate("Transparent") - hw.border:Kill() - hw.healthbar:SetStatusBarTexture(C["media"].normTex) - end - end - end - - DXE.Alerts.RefreshBars_ = DXE.Alerts.RefreshBars - DXE.Alerts.RefreshBars = function(self) - if self.refreshing then return end - self.refreshing = true - self:RefreshBars_() - local i = 1 - while _G["DXEAlertBar"..i] do - local bar = _G["DXEAlertBar"..i] - bar:SetScale(1) - bar.SetScale = T.dummy - SkinDXEBar(bar) - i = i + 1 - end - self.refreshing = false - end - - DXE.Alerts.Simple_ = DXE.Alerts.Simple - DXE.Alerts.Simple = function(self,...) - self:Simple_(...) - self:RefreshBars() - end - - -- Force some updates - DXE:LayoutHealthWatchers() - DXE.Alerts:RefreshBars() - - --Force some default profile options - if not DXEDB then DXEDB = {} end - if not DXEDB["profiles"] then DXEDB["profiles"] = {} end - if not DXEDB["profiles"][T.myname.." - "..GetRealmName()] then DXEDB["profiles"][T.myname.." - "..T.myrealm] = {} end - if not DXEDB["profiles"][T.myname.." - "..GetRealmName()]["Globals"] then DXEDB["profiles"][T.myname.." - "..T.myrealm]["Globals"] = {} end - DXEDB["profiles"][T.myname.." - "..T.myrealm]["Globals"]["BackgroundTexture"] = C.media.blank - DXEDB["profiles"][T.myname.." - "..T.myrealm]["Globals"]["BarTexture"] = C.media.normTex - DXEDB["profiles"][T.myname.." - "..T.myrealm]["Globals"]["Border"] = "None" - DXEDB["profiles"][T.myname.." - "..T.myrealm]["Globals"]["Font"] = C.media.font - DXEDB["profiles"][T.myname.." - "..T.myrealm]["Globals"]["TimerFont"] = C.media.font -end) \ No newline at end of file diff --git a/Tukui/modules/skins/addons/omen.lua b/Tukui/modules/skins/addons/omen.lua deleted file mode 100644 index a35356f..0000000 --- a/Tukui/modules/skins/addons/omen.lua +++ /dev/null @@ -1,75 +0,0 @@ -if not IsAddOnLoaded("Omen") then return end -local T, C, L = unpack(select(2, ...)) - --- kill the tukui threat bar -if TukuiThreatBar then TukuiThreatBar:Kill() end - -local Omen = LibStub("AceAddon-3.0"):GetAddon("Omen") -local borderWidth = T.Scale(2, 2) - --- Skin Bar Texture -Omen.UpdateBarTextureSettings_ = Omen.UpdateBarTextureSettings -Omen.UpdateBarTextureSettings = function(self) - for i, v in ipairs(self.Bars) do - v.texture:SetTexture(C["media"].normTex) - end -end - --- Skin Bar fonts -Omen.UpdateBarLabelSettings_ = Omen.UpdateBarLabelSettings -Omen.UpdateBarLabelSettings = function(self) - self:UpdateBarLabelSettings_() - for i, v in ipairs(self.Bars) do - v.Text1:SetFont(C.media.font, 12, "OUTLINE") - v.Text2:SetFont(C.media.font, 12, "OUTLINE") - v.Text3:SetFont(C.media.font, 12, "OUTLINE") - end -end - --- Skin Title Bar -Omen.UpdateTitleBar_ = Omen.UpdateTitleBar -Omen.UpdateTitleBar = function(self) - Omen.db.profile.Scale = 1 - Omen.db.profile.Background.EdgeSize = 1 - Omen.db.profile.Background.BarInset = borderWidth - Omen.db.profile.TitleBar.UseSameBG = true - self:UpdateTitleBar_() - self.Title:SetHeight(23) - self.TitleText:SetFont(C.media.font, 11, "OUTLINE") - self.TitleText:ClearAllPoints() - self.TitleText:SetPoint("CENTER") - self.BarList:SetPoint("TOPLEFT", self.Title, "BOTTOMLEFT",0,-1) -end - ---Skin Title/Bars backgrounds -Omen.UpdateBackdrop_ = Omen.UpdateBackdrop -Omen.UpdateBackdrop = function(self) - Omen.db.profile.Scale = 1 - Omen.db.profile.Background.EdgeSize = 1 - Omen.db.profile.Background.BarInset = borderWidth - self:UpdateBackdrop_() - self.BarList:SetTemplate("Transparent") - self.Title:SetTemplate("Default") - self.BarList:SetPoint("TOPLEFT", self.Title, "BOTTOMLEFT", 0, -1) -end - --- Hook bar creation to apply settings -local omen_mt = getmetatable(Omen.Bars) -local oldidx = omen_mt.__index -omen_mt.__index = function(self, barID) - local bar = oldidx(self, barID) - Omen:UpdateBarTextureSettings() - Omen:UpdateBarLabelSettings() - return bar -end - --- Option Overrides -Omen.db.profile.Bar.Spacing = 2 - --- Force updates -Omen:UpdateBarTextureSettings() -Omen:UpdateBarLabelSettings() -Omen:UpdateTitleBar() -Omen:UpdateBackdrop() -Omen:ReAnchorBars() -Omen:ResizeBars() \ No newline at end of file diff --git a/Tukui/modules/skins/addons/recount.lua b/Tukui/modules/skins/addons/recount.lua deleted file mode 100644 index 182ed31..0000000 --- a/Tukui/modules/skins/addons/recount.lua +++ /dev/null @@ -1,140 +0,0 @@ -if not IsAddOnLoaded("Recount") then return end - -local T, C, L = unpack(select(2, ...)) -local Recount = _G.Recount - -local function SkinFrame(frame) - frame.bgMain = CreateFrame("Frame", nil, frame) - frame.bgMain:SetTemplate("Transparent") - frame.bgMain:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT") - frame.bgMain:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT") - frame.bgMain:SetPoint("TOP", frame, "TOP", 0, -7) - frame.bgMain:SetFrameLevel(frame:GetFrameLevel()) - frame.CloseButton:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -1, -9) - frame:SetBackdrop(nil) - frame.TitleBackground = CreateFrame("Frame", nil, frame.bgMain) - frame.TitleBackground:SetPoint("TOP", 0) - frame.TitleBackground:SetPoint("LEFT", 0) - frame.TitleBackground:SetPoint("RIGHT", 0) - frame.TitleBackground:SetHeight(24) - frame.TitleBackground:SetTemplate("Default") - frame.Title:SetFont(C.media.font, 11) - frame.Title:SetParent(frame.TitleBackground) - frame.Title:ClearAllPoints() - frame.Title:SetPoint("LEFT", 4, 0) - frame.CloseButton:SetNormalTexture("") - frame.CloseButton:SetPushedTexture("") - frame.CloseButton:SetHighlightTexture("") - frame.CloseButton.t = frame.CloseButton:CreateFontString(nil, "OVERLAY") - frame.CloseButton.t:SetFont(C.media.pixelfont, 12, "MONOCHROME") - frame.CloseButton.t:SetPoint("CENTER", 0, 1) - frame.CloseButton.t:SetText("X") -end - -Recount.UpdateBarTextures = function(self) - for k, v in pairs(Recount.MainWindow.Rows) do - v.StatusBar:SetStatusBarTexture(C["media"].normTex) - v.StatusBar:GetStatusBarTexture():SetHorizTile(false) - v.StatusBar:GetStatusBarTexture():SetVertTile(false) - v.LeftText:SetPoint("LEFT", 4, 1) - v.LeftText:SetFont(C.media.font, 12) - v.RightText:SetPoint("RIGHT", -4, 1) - v.RightText:SetFont(C.media.font, 12) - end -end -Recount.SetBarTextures = Recount.UpdateBarTextures - --- Fix bar textures as they're created -Recount.SetupBar_ = Recount.SetupBar -Recount.SetupBar = function(self, bar) - self:SetupBar_(bar) - bar.StatusBar:SetStatusBarTexture(C["media"].normTex) -end - --- Skin frames when they're created -Recount.CreateFrame_ = Recount.CreateFrame -Recount.CreateFrame = function(self, Name, Title, Height, Width, ShowFunc, HideFunc) - local frame = self:CreateFrame_(Name, Title, Height, Width, ShowFunc, HideFunc) - SkinFrame(frame) - return frame -end - --- Skin some others frame, not available outside Recount -Recount.AddWindow_ = Recount.AddWindow -Recount.AddWindow = function(self, frame) - Recount:AddWindow_(frame) - - -- try to find the reset window and skin it - if frame.YesButton then - frame:SetTemplate("Default") - T.SkinButton(frame.YesButton) - T.SkinButton(frame.NoButton) - end - - -- try to find the report button - if frame.ReportButton then - T.SkinButton(frame.ReportButton) - end -end - --- frame we want to skins -local elements = { - Recount.MainWindow, - Recount.ConfigWindow, - Recount.GraphWindow, - Recount.DetailWindow, - Recount.ResetFrame, -} - --- skin them -for i = 1, getn(elements) do - local frame = elements[i] - if frame then - SkinFrame(frame) - end -end - ---Update Textures -Recount:UpdateBarTextures() - --- skin dropdown -Recount.MainWindow.FileButton:HookScript("OnClick", function(self) - if LibDropdownFrame0 then - LibDropdownFrame0:SetTemplate() - end -end) - --- skin the buttons o main window -local PB = Recount.MainWindow.CloseButton -local MWbuttons = { - Recount.MainWindow.RightButton, - Recount.MainWindow.LeftButton, - Recount.MainWindow.ResetButton, - Recount.MainWindow.FileButton, - Recount.MainWindow.ConfigButton, - Recount.MainWindow.ReportButton, -} - -for i = 1, getn(MWbuttons) do - local button = MWbuttons[i] - if button then - button:SetTemplate("Default") - button:SetNormalTexture("") - button:SetPushedTexture("") - button:SetHighlightTexture("") - button:SetSize(16, 16) - button:FontString("text", C.media.pixelfont, 12, "MONOCHROME") - button.text:SetPoint("CENTER", 1, 1) - button:ClearAllPoints() - button:SetPoint("RIGHT", PB, "LEFT", -2, 0) - PB = button - end -end - --- set our custom text inside main window buttons -Recount.MainWindow.RightButton.text:SetText(">") -Recount.MainWindow.LeftButton.text:SetText("<") -Recount.MainWindow.ResetButton.text:SetText("R") -Recount.MainWindow.FileButton.text:SetText("F") -Recount.MainWindow.ConfigButton.text:SetText("C") -Recount.MainWindow.ReportButton.text:SetText("S") \ No newline at end of file diff --git a/Tukui/modules/skins/addons/skada.lua b/Tukui/modules/skins/addons/skada.lua deleted file mode 100644 index a822d9b..0000000 --- a/Tukui/modules/skins/addons/skada.lua +++ /dev/null @@ -1,87 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import Functions/Constants, Config, Locales - -if not IsAddOnLoaded("Skada") then return end -local Skada = Skada - -local Skada = Skada -local barSpacing = T.Scale(1, 1) -local borderWidth = T.Scale(2, 2) - -local barmod = Skada.displays["bar"] - --- Used to strip unecessary options from the in-game config -local function StripOptions(options) - options.baroptions.args.barspacing = nil - options.titleoptions.args.texture = nil - options.titleoptions.args.bordertexture = nil - options.titleoptions.args.thickness = nil - options.titleoptions.args.margin = nil - options.titleoptions.args.color = nil - options.windowoptions = nil - options.baroptions.args.barfont = nil - options.titleoptions.args.font = nil -end - -local barmod = Skada.displays["bar"] -barmod.AddDisplayOptions_ = barmod.AddDisplayOptions -barmod.AddDisplayOptions = function(self, win, options) - self:AddDisplayOptions_(win, options) - StripOptions(options) -end - -for k, options in pairs(Skada.options.args.windows.args) do - if options.type == "group" then - StripOptions(options.args) - end -end - -local titleBG = { - bgFile = C["media"].normTex, - tile = false, - tileSize = 0 -} - -barmod.ApplySettings_ = barmod.ApplySettings -barmod.ApplySettings = function(self, win) - barmod.ApplySettings_(self, win) - - local skada = win.bargroup - - if win.db.enabletitle then - skada.button:SetBackdrop(titleBG) - end - - skada:SetTexture(C["media"].normTex) - skada:SetSpacing(barSpacing) - skada:SetFont(C.media.font, 12) - skada:SetFrameLevel(5) - - if not skada.TitleBackGround then - skada.TitleBackGround = CreateFrame("Frame", nil, skada.button) - skada.TitleBackGround:SetPoint("TOP") - skada.TitleBackGround:SetPoint("LEFT") - skada.TitleBackGround:SetPoint("RIGHT") - skada.TitleBackGround:SetPoint("BOTTOM", 0, 1) - skada.TitleBackGround:SetTemplate("Default") - skada.TitleBackGround:SetFrameLevel(skada.button:GetFrameLevel() -1) - end - - local titlefont = CreateFont("TitleFont"..win.db.name) - titlefont:SetFont(C.media.font, 11, "OUTLINE") - skada.button:SetNormalFontObject(titlefont) - - local color = win.db.title.color - skada.button:SetBackdropColor(0, 0, 0, 0) - - skada:SetBackdrop(nil) - if not skada.backdrop then - skada:CreateBackdrop("Transparent") - end - skada.backdrop:ClearAllPoints() - if win.db.enabletitle then - skada.backdrop:Point('TOPLEFT', skada.button, 'TOPLEFT', -2, 2) - else - skada.backdrop:Point('TOPLEFT', skada, 'TOPLEFT', -2, 2) - end - skada.backdrop:Point('BOTTOMRIGHT', skada, 'BOTTOMRIGHT', 2, -2) -end \ No newline at end of file diff --git a/Tukui/modules/skins/addons/tinydps.lua b/Tukui/modules/skins/addons/tinydps.lua deleted file mode 100644 index 1cdacf2..0000000 --- a/Tukui/modules/skins/addons/tinydps.lua +++ /dev/null @@ -1,55 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -if not IsAddOnLoaded("TinyDPS") then return end - -local frame = CreateFrame("Frame") -frame:RegisterEvent("PLAYER_LOGIN") -frame:SetScript("OnEvent", function(self, event) - -- define our locals - local frame = tdpsFrame - local anchor = tdpsAnchor - local status = tdpsStatusBar - local tdps = tdps - local font = tdpsFont - local position = tdpsPosition - local button = TukuiRaidUtilityShowButton - - -- set our default configuration - if tdps then - tdps.width = TukuiMinimap:GetWidth() - tdps.spacing = 2 - tdps.barHeight = 15 - font.name = C["media"].font - font.size = 11 - font.outline = "OUTLINE" - end - - -- set default position, under minimap - anchor:Point('BOTTOMLEFT', TukuiMinimap, 'BOTTOMLEFT', 0, -26) - - -- make sure width is applied, even if it was a first install - frame:SetWidth(TukuiMinimap:GetWidth()) - - -- needed, idk why - position = {x = 0, y = 0} - - -- skin it - frame:SetTemplate("Transparent", true) - frame:CreateShadow("Default") - - if status then - tdpsStatusBar:SetBackdrop({bgFile = C["media"].normTex, edgeFile = C["media"].blank, tile = false, tileSize = 0, edgeSize = 1, insets = { left = 0, right = 0, top = 0, bottom = 0}}) - tdpsStatusBar:SetStatusBarTexture(C["media"].normTex) - end - - -- move it a little bit if you are a raid leader because of TukuiRaidUtility button. - if button then - button:HookScript("OnShow", function(self) - anchor:ClearAllPoints() - anchor:Point('BOTTOMLEFT', TukuiMinimap, 'BOTTOMLEFT', 0, -49) - end) - button:HookScript("OnHide", function(self) - anchor:ClearAllPoints() - anchor:Point('BOTTOMLEFT', TukuiMinimap, 'BOTTOMLEFT', 0, -26) - end) - end -end) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/achievement.lua b/Tukui/modules/skins/blizzard/achievement.lua deleted file mode 100644 index 448a56a..0000000 --- a/Tukui/modules/skins/blizzard/achievement.lua +++ /dev/null @@ -1,385 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local frames = { - "AchievementFrame", - "AchievementFrameCategories", - "AchievementFrameSummary", - "AchievementFrameHeader", - "AchievementFrameSummaryCategoriesHeader", - "AchievementFrameSummaryAchievementsHeader", - "AchievementFrameStatsBG", - "AchievementFrameAchievements", - "AchievementFrameComparison", - "AchievementFrameComparisonHeader", - "AchievementFrameComparisonSummaryPlayer", - "AchievementFrameComparisonSummaryFriend", - } - - for _, frame in pairs(frames) do - _G[frame]:StripTextures(true) - end - - local noname_frames = { - "AchievementFrameStats", - "AchievementFrameSummary", - "AchievementFrameAchievements", - "AchievementFrameComparison" - } - - for _, frame in pairs(noname_frames) do - for i=1, _G[frame]:GetNumChildren() do - local child = select(i, _G[frame]:GetChildren()) - if child and not child:GetName() then - child:SetBackdrop(nil) - end - end - end - - AchievementFrame:CreateBackdrop("Default") - AchievementFrame.backdrop:Point("TOPLEFT", 0, 6) - AchievementFrame.backdrop:SetPoint("BOTTOMRIGHT") - AchievementFrameHeaderTitle:ClearAllPoints() - AchievementFrameHeaderTitle:Point("TOPLEFT", AchievementFrame.backdrop, "TOPLEFT", -30, -8) - AchievementFrameHeaderPoints:ClearAllPoints() - AchievementFrameHeaderPoints:Point("LEFT", AchievementFrameHeaderTitle, "RIGHT", 2, 0) - - --Backdrops - AchievementFrameCategoriesContainer:CreateBackdrop("Default") - AchievementFrameCategoriesContainer.backdrop:Point("TOPLEFT", 0, 4) - AchievementFrameCategoriesContainer.backdrop:Point("BOTTOMRIGHT", -2, -3) - AchievementFrameAchievementsContainer:CreateBackdrop("Default") - AchievementFrameAchievementsContainer.backdrop:Point("TOPLEFT", 0, 2) - AchievementFrameAchievementsContainer.backdrop:Point("BOTTOMRIGHT", -3, -3) - - T.SkinCloseButton(AchievementFrameCloseButton, AchievementFrame.backdrop) - T.SkinDropDownBox(AchievementFrameFilterDropDown) - AchievementFrameFilterDropDown:Point("TOPRIGHT", AchievementFrame, "TOPRIGHT", -44, 5) - - -- ScrollBars - T.SkinScrollBar(AchievementFrameCategoriesContainerScrollBar) - T.SkinScrollBar(AchievementFrameAchievementsContainerScrollBar) - T.SkinScrollBar(AchievementFrameStatsContainerScrollBar) - T.SkinScrollBar(AchievementFrameComparisonContainerScrollBar) - T.SkinScrollBar(AchievementFrameComparisonStatsContainerScrollBar) - - --Tabs - for i = 1, 3 do - T.SkinTab(_G["AchievementFrameTab"..i]) - _G["AchievementFrameTab"..i]:SetFrameLevel(_G["AchievementFrameTab"..i]:GetFrameLevel() + 2) - end - - local function SkinStatusBar(bar) - bar:StripTextures() - bar:SetStatusBarTexture(C["media"].normTex) - bar:SetStatusBarColor(4/255, 179/255, 30/255) - bar:CreateBackdrop("Default") - - if _G[bar:GetName().."Title"] then - _G[bar:GetName().."Title"]:SetPoint("LEFT", 4, 0) - end - - if _G[bar:GetName().."Label"] then - _G[bar:GetName().."Label"]:SetPoint("LEFT", 4, 0) - end - - if _G[bar:GetName().."Text"] then - _G[bar:GetName().."Text"]:SetPoint("RIGHT", -4, 0) - end - end - - SkinStatusBar(AchievementFrameSummaryCategoriesStatusBar) - SkinStatusBar(AchievementFrameComparisonSummaryPlayerStatusBar) - SkinStatusBar(AchievementFrameComparisonSummaryFriendStatusBar) - AchievementFrameComparisonSummaryFriendStatusBar.text:ClearAllPoints() - AchievementFrameComparisonSummaryFriendStatusBar.text:SetPoint("CENTER") - AchievementFrameComparisonHeader:Point("BOTTOMRIGHT", AchievementFrameComparison, "TOPRIGHT", 45, -20) - - for i=1, 8 do - local frame = _G["AchievementFrameSummaryCategoriesCategory"..i] - local button = _G["AchievementFrameSummaryCategoriesCategory"..i.."Button"] - local highlight = _G["AchievementFrameSummaryCategoriesCategory"..i.."ButtonHighlight"] - SkinStatusBar(frame) - button:StripTextures() - highlight:StripTextures() - - _G[highlight:GetName().."Middle"]:SetTexture(1, 1, 1, 0.3) - _G[highlight:GetName().."Middle"]:SetAllPoints(frame) - end - - AchievementFrame:HookScript("OnShow", function() - for i=1, 20 do - local frame = _G["AchievementFrameCategoriesContainerButton"..i] - local lastframe = _G["AchievementFrameCategoriesContainerButton"..i-1] - - frame:StripTextures() - frame:StyleButton() - end - end) - - hooksecurefunc("AchievementFrameSummary_UpdateAchievements", function() - for i=1, ACHIEVEMENTUI_MAX_SUMMARY_ACHIEVEMENTS do - local frame = _G["AchievementFrameSummaryAchievement"..i] - _G["AchievementFrameSummaryAchievement"..i.."Highlight"]:Kill() - frame:StripTextures() - - - _G["AchievementFrameSummaryAchievement"..i.."Description"]:SetTextColor(0.6, 0.6, 0.6) - - if not frame.backdrop then - frame:CreateBackdrop("Default", true) - frame.backdrop:Point("TOPLEFT", 2, -2) - frame.backdrop:Point("BOTTOMRIGHT", -2, 2) - - _G["AchievementFrameSummaryAchievement"..i.."IconBling"]:Kill() - _G["AchievementFrameSummaryAchievement"..i.."IconOverlay"]:Kill() - _G["AchievementFrameSummaryAchievement"..i.."Icon"]:SetTemplate("Default") - _G["AchievementFrameSummaryAchievement"..i.."Icon"]:Height(_G["AchievementFrameSummaryAchievement"..i.."Icon"]:GetHeight() - 14) - _G["AchievementFrameSummaryAchievement"..i.."Icon"]:Width(_G["AchievementFrameSummaryAchievement"..i.."Icon"]:GetWidth() - 14) - _G["AchievementFrameSummaryAchievement"..i.."Icon"]:ClearAllPoints() - _G["AchievementFrameSummaryAchievement"..i.."Icon"]:Point("LEFT", 6, 0) - _G["AchievementFrameSummaryAchievement"..i.."IconTexture"]:SetTexCoord(.08, .92, .08, .92) - _G["AchievementFrameSummaryAchievement"..i.."IconTexture"]:ClearAllPoints() - _G["AchievementFrameSummaryAchievement"..i.."IconTexture"]:Point("TOPLEFT", 2, -2) - _G["AchievementFrameSummaryAchievement"..i.."IconTexture"]:Point("BOTTOMRIGHT", -2, 2) - end - end - end) - - for i=1, 7 do - local frame = _G["AchievementFrameAchievementsContainerButton"..i] - _G["AchievementFrameAchievementsContainerButton"..i.."Highlight"]:Kill() - frame:StripTextures(true) - frame.SetBackdropBorderColor = T.dummy - - --Initiate fucked up method of creating a backdrop - frame.bg1 = frame:CreateTexture(nil, "BACKGROUND") - frame.bg1:SetDrawLayer("BACKGROUND", 4) - frame.bg1:SetTexture(C["media"].normTex) --Default TukUI users this is normTex, glossTex doesn't exist - frame.bg1:SetVertexColor(unpack(C["media"].backdropcolor)) - frame.bg1:Point("TOPLEFT", T.mult*4, -T.mult*4) - frame.bg1:Point("BOTTOMRIGHT", -T.mult*4, T.mult*4) - - frame.bg2 = frame:CreateTexture(nil, "BACKGROUND") - frame.bg2:SetDrawLayer("BACKGROUND", 3) - frame.bg2:SetTexture(0,0,0) - frame.bg2:Point("TOPLEFT", T.mult*3, -T.mult*3) - frame.bg2:Point("BOTTOMRIGHT", -T.mult*3, T.mult*3) - - frame.bg3 = frame:CreateTexture(nil, "BACKGROUND") - frame.bg3:SetDrawLayer("BACKGROUND", 2) - frame.bg3:SetTexture(unpack(C["media"].bordercolor)) - frame.bg3:Point("TOPLEFT", T.mult*2, -T.mult*2) - frame.bg3:Point("BOTTOMRIGHT", -T.mult*2, T.mult*2) - - frame.bg4 = frame:CreateTexture(nil, "BACKGROUND") - frame.bg4:SetDrawLayer("BACKGROUND", 1) - frame.bg4:SetTexture(0,0,0) - frame.bg4:Point("TOPLEFT", T.mult, -T.mult) - frame.bg4:Point("BOTTOMRIGHT", -T.mult, T.mult) - - - - _G["AchievementFrameAchievementsContainerButton"..i.."Description"]:SetTextColor(0.6, 0.6, 0.6) - _G["AchievementFrameAchievementsContainerButton"..i.."Description"].SetTextColor = T.dummy - _G["AchievementFrameAchievementsContainerButton"..i.."HiddenDescription"]:SetTextColor(1, 1, 1) - _G["AchievementFrameAchievementsContainerButton"..i.."HiddenDescription"].SetTextColor = T.dummy - - _G["AchievementFrameAchievementsContainerButton"..i.."IconBling"]:Kill() - _G["AchievementFrameAchievementsContainerButton"..i.."IconOverlay"]:Kill() - _G["AchievementFrameAchievementsContainerButton"..i.."Icon"]:SetTemplate("Default") - _G["AchievementFrameAchievementsContainerButton"..i.."Icon"]:Height(_G["AchievementFrameAchievementsContainerButton"..i.."Icon"]:GetHeight() - 14) - _G["AchievementFrameAchievementsContainerButton"..i.."Icon"]:Width(_G["AchievementFrameAchievementsContainerButton"..i.."Icon"]:GetWidth() - 14) - _G["AchievementFrameAchievementsContainerButton"..i.."Icon"]:ClearAllPoints() - _G["AchievementFrameAchievementsContainerButton"..i.."Icon"]:Point("LEFT", 6, 0) - _G["AchievementFrameAchievementsContainerButton"..i.."IconTexture"]:SetTexCoord(.08, .92, .08, .92) - _G["AchievementFrameAchievementsContainerButton"..i.."IconTexture"]:ClearAllPoints() - _G["AchievementFrameAchievementsContainerButton"..i.."IconTexture"]:Point("TOPLEFT", 2, -2) - _G["AchievementFrameAchievementsContainerButton"..i.."IconTexture"]:Point("BOTTOMRIGHT", -2, 2) - - - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"].oborder = "Don't use sharp border" --Needed for ElvUI only - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"]:StripTextures() - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"]:SetTemplate("Default") - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"]:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check") - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"]:Size(12, 12) - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"]:GetCheckedTexture():Point("TOPLEFT", -4, 4) - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"]:GetCheckedTexture():Point("BOTTOMRIGHT", 4, -4) - - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"]:ClearAllPoints() - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"]:Point("BOTTOMLEFT", frame, "BOTTOMLEFT", 5, 5) - - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"].ClearAllPoints = T.dummy - _G["AchievementFrameAchievementsContainerButton"..i.."Tracked"].SetPoint = T.dummy - end - - - local compares = { - "Player", - "Friend" - } - - for _, compare in pairs(compares) do - for i=1, 9 do - local frame = "AchievementFrameComparisonContainerButton"..i..compare - - _G[frame]:StripTextures() - _G[frame.."Background"]:Kill() - - _G[frame].SetBackdropBorderColor = T.dummy - - if _G[frame.."Description"] then - _G[frame.."Description"]:SetTextColor(0.6, 0.6, 0.6) - _G[frame.."Description"].SetTextColor = T.dummy - end - - --Initiate fucked up method of creating a backdrop - _G[frame].bg1 = _G[frame]:CreateTexture(nil, "BACKGROUND") - _G[frame].bg1:SetDrawLayer("BACKGROUND", 4) - _G[frame].bg1:SetTexture(C["media"].glossTex) --Default TukUI users this is normTex, glossTex doesn't exist - _G[frame].bg1:SetVertexColor(unpack(C["media"].backdropcolor)) - _G[frame].bg1:Point("TOPLEFT", T.mult*4, -T.mult*4) - _G[frame].bg1:Point("BOTTOMRIGHT", -T.mult*4, T.mult*4) - - _G[frame].bg2 = _G[frame]:CreateTexture(nil, "BACKGROUND") - _G[frame].bg2:SetDrawLayer("BACKGROUND", 3) - _G[frame].bg2:SetTexture(0,0,0) - _G[frame].bg2:Point("TOPLEFT", T.mult*3, -T.mult*3) - _G[frame].bg2:Point("BOTTOMRIGHT", -T.mult*3, T.mult*3) - - _G[frame].bg3 = _G[frame]:CreateTexture(nil, "BACKGROUND") - _G[frame].bg3:SetDrawLayer("BACKGROUND", 2) - _G[frame].bg3:SetTexture(unpack(C["media"].bordercolor)) - _G[frame].bg3:Point("TOPLEFT", T.mult*2, -T.mult*2) - _G[frame].bg3:Point("BOTTOMRIGHT", -T.mult*2, T.mult*2) - - _G[frame].bg4 = _G[frame]:CreateTexture(nil, "BACKGROUND") - _G[frame].bg4:SetDrawLayer("BACKGROUND", 1) - _G[frame].bg4:SetTexture(0,0,0) - _G[frame].bg4:Point("TOPLEFT", T.mult, -T.mult) - _G[frame].bg4:Point("BOTTOMRIGHT", -T.mult, T.mult) - - - if compare == "Friend" then - _G[frame.."Shield"]:Point("TOPRIGHT", _G["AchievementFrameComparisonContainerButton"..i.."Friend"], "TOPRIGHT", -20, -3) - end - - _G[frame.."IconBling"]:Kill() - _G[frame.."IconOverlay"]:Kill() - _G[frame.."Icon"]:SetTemplate("Default") - _G[frame.."Icon"]:Height(_G[frame.."Icon"]:GetHeight() - 14) - _G[frame.."Icon"]:Width(_G[frame.."Icon"]:GetWidth() - 14) - _G[frame.."Icon"]:ClearAllPoints() - _G[frame.."Icon"]:Point("LEFT", 6, 0) - _G[frame.."IconTexture"]:SetTexCoord(.08, .92, .08, .92) - _G[frame.."IconTexture"]:ClearAllPoints() - _G[frame.."IconTexture"]:Point("TOPLEFT", 2, -2) - _G[frame.."IconTexture"]:Point("BOTTOMRIGHT", -2, 2) - end - end - - for i=1, 20 do - local frame = _G["AchievementFrameStatsContainerButton"..i] - frame:StyleButton() - - _G["AchievementFrameStatsContainerButton"..i.."BG"]:SetTexture(1, 1, 1, 0.2) - _G["AchievementFrameStatsContainerButton"..i.."HeaderLeft"]:Kill() - _G["AchievementFrameStatsContainerButton"..i.."HeaderRight"]:Kill() - _G["AchievementFrameStatsContainerButton"..i.."HeaderMiddle"]:Kill() - - local frame = "AchievementFrameComparisonStatsContainerButton"..i - _G[frame]:StripTextures() - _G[frame]:StyleButton() - - _G[frame.."BG"]:SetTexture(1, 1, 1, 0.2) - _G[frame.."HeaderLeft"]:Kill() - _G[frame.."HeaderRight"]:Kill() - _G[frame.."HeaderMiddle"]:Kill() - end - - - hooksecurefunc("AchievementButton_GetProgressBar", function(index) - local frame = _G["AchievementFrameProgressBar"..index] - if frame then - if not frame.skinned then - frame:StripTextures() - frame:SetStatusBarTexture(C["media"].normTex) - frame:SetStatusBarColor(4/255, 179/255, 30/255) - frame:SetFrameLevel(frame:GetFrameLevel() + 3) - - frame:Height(frame:GetHeight() - 2) - - --Initiate fucked up method of creating a backdrop - frame.bg1 = frame:CreateTexture(nil, "BACKGROUND") - frame.bg1:SetDrawLayer("BACKGROUND", -7) - frame.bg1:SetTexture(unpack(C["media"].backdropcolor)) - frame.bg1:Point("TOPLEFT", -T.mult*3, T.mult*3) - frame.bg1:Point("BOTTOMRIGHT", T.mult*3, -T.mult*3) - - frame.bg2 = frame:CreateTexture(nil, "BACKGROUND") - frame.bg2:SetDrawLayer("BACKGROUND", -6) - frame.bg2:SetTexture(unpack(C["media"].bordercolor)) - frame.bg2:Point("TOPLEFT", -T.mult*2, T.mult*2) - frame.bg2:Point("BOTTOMRIGHT", T.mult*2, -T.mult*2) - - frame.bg3 = frame:CreateTexture(nil, "BACKGROUND") - frame.bg3:SetDrawLayer("BACKGROUND", -5) - frame.bg3:SetTexture(unpack(C["media"].backdropcolor)) - frame.bg3:Point("TOPLEFT", -T.mult, T.mult) - frame.bg3:Point("BOTTOMRIGHT", T.mult, -T.mult) - - frame.text:ClearAllPoints() - frame.text:SetPoint("CENTER", frame, "CENTER", 0, -1) - frame.text:SetJustifyH("CENTER") - - if index > 1 then - frame:ClearAllPoints() - frame:Point("TOP", _G["AchievementFrameProgressBar"..index-1], "BOTTOM", 0, -5) - frame.SetPoint = T.dummy - frame.ClearAllPoints = T.dummy - end - - frame.skinned = true - end - - end - end) - - hooksecurefunc("AchievementObjectives_DisplayCriteria", function(objectivesFrame, id) - local numCriteria = GetAchievementNumCriteria(id) - local textStrings, metas = 0, 0 - for i = 1, numCriteria do - local criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString = GetAchievementCriteriaInfo(id, i) - - if ( criteriaType == CRITERIA_TYPE_ACHIEVEMENT and assetID ) then - metas = metas + 1; - local metaCriteria = AchievementButton_GetMeta(metas); - if ( objectivesFrame.completed and completed ) then - metaCriteria.label:SetShadowOffset(0, 0) - metaCriteria.label:SetTextColor(1, 1, 1, 1); - elseif ( completed ) then - metaCriteria.label:SetShadowOffset(1, -1) - metaCriteria.label:SetTextColor(0, 1, 0, 1); - else - metaCriteria.label:SetShadowOffset(1, -1) - metaCriteria.label:SetTextColor(.6, .6, .6, 1); - end - elseif criteriaType ~= 1 then - textStrings = textStrings + 1; - local criteria = AchievementButton_GetCriteria(textStrings); - if ( objectivesFrame.completed and completed ) then - criteria.name:SetTextColor(1, 1, 1, 1); - criteria.name:SetShadowOffset(0, 0); - elseif ( completed ) then - criteria.name:SetTextColor(0, 1, 0, 1); - criteria.name:SetShadowOffset(1, -1); - else - criteria.name:SetTextColor(.6, .6, .6, 1); - criteria.name:SetShadowOffset(1, -1); - end - end - end - end) -end - -T.SkinFuncs["Blizzard_AchievementUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/achievementpopup.lua b/Tukui/modules/skins/blizzard/achievementpopup.lua deleted file mode 100644 index b96fc64..0000000 --- a/Tukui/modules/skins/blizzard/achievementpopup.lua +++ /dev/null @@ -1,94 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local function SkinAchievePopUp() - for i = 1, MAX_ACHIEVEMENT_ALERTS do - local frame = _G["AchievementAlertFrame"..i] - - if frame then - frame:SetAlpha(1) - frame.SetAlpha = T.dummy - if not frame.backdrop then - frame:CreateBackdrop("Default") - frame.backdrop:Point("TOPLEFT", _G[frame:GetName().."Background"], "TOPLEFT", -2, -6) - frame.backdrop:Point("BOTTOMRIGHT", _G[frame:GetName().."Background"], "BOTTOMRIGHT", -2, 6) - end - - -- Background - _G["AchievementAlertFrame"..i.."Background"]:SetTexture(nil) - - _G["AchievementAlertFrame"..i.."Glow"]:Kill() - _G["AchievementAlertFrame"..i.."Shine"]:Kill() - - -- Text - _G["AchievementAlertFrame"..i.."Unlocked"]:SetFont(C.media.font, 12) - _G["AchievementAlertFrame"..i.."Unlocked"]:SetTextColor(1, 1, 1) - _G["AchievementAlertFrame"..i.."Name"]:SetFont(C.media.font, 14) - - -- Icon - _G["AchievementAlertFrame"..i.."IconTexture"]:SetTexCoord(0.08, 0.92, 0.08, 0.92) - _G["AchievementAlertFrame"..i.."IconOverlay"]:Kill() - - _G["AchievementAlertFrame"..i.."IconTexture"]:ClearAllPoints() - _G["AchievementAlertFrame"..i.."IconTexture"]:Point("LEFT", frame, 7, 0) - - if not _G["AchievementAlertFrame"..i.."IconTexture"].b then - _G["AchievementAlertFrame"..i.."IconTexture"].b = CreateFrame("Frame", nil, _G["AchievementAlertFrame"..i]) - _G["AchievementAlertFrame"..i.."IconTexture"].b:SetFrameLevel(0) - _G["AchievementAlertFrame"..i.."IconTexture"].b:SetTemplate("Default") - _G["AchievementAlertFrame"..i.."IconTexture"].b:Point("TOPLEFT", _G["AchievementAlertFrame"..i.."IconTexture"], "TOPLEFT", -2, 2) - _G["AchievementAlertFrame"..i.."IconTexture"].b:Point("BOTTOMRIGHT", _G["AchievementAlertFrame"..i.."IconTexture"], "BOTTOMRIGHT", 2, -2) - end - end - end - end - hooksecurefunc("AchievementAlertFrame_FixAnchors", SkinAchievePopUp) - - function SkinDungeonPopUP() - for i = 1, DUNGEON_COMPLETION_MAX_REWARDS do - local frame = _G["DungeonCompletionAlertFrame"..i] - if frame then - frame:SetAlpha(1) - frame.SetAlpha = T.dummy - if not frame.backdrop then - frame:CreateBackdrop("Default") - frame.backdrop:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) - frame.backdrop:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) - end - - -- Background - for i=1, frame:GetNumRegions() do - local region = select(i, frame:GetRegions()) - if region:GetObjectType() == "Texture" then - if region:GetTexture() == "Interface\\LFGFrame\\UI-LFG-DUNGEONTOAST" then - region:Kill() - end - end - end - - _G["DungeonCompletionAlertFrame"..i.."Shine"]:Kill() - - _G["DungeonCompletionAlertFrame"..i.."GlowFrame"]:Kill() - _G["DungeonCompletionAlertFrame"..i.."GlowFrame"].glow:Kill() - - -- Icon - _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"]:SetTexCoord(0.08, 0.92, 0.08, 0.92) - - _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"]:ClearAllPoints() - _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"]:Point("LEFT", frame, 7, 0) - - if not _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"].b then - _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"].b = CreateFrame("Frame", nil, _G["DungeonCompletionAlertFrame"..i]) - _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"].b:SetFrameLevel(0) - _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"].b:SetTemplate("Default") - _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"].b:Point("TOPLEFT", _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"], "TOPLEFT", -2, 2) - _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"].b:Point("BOTTOMRIGHT", _G["DungeonCompletionAlertFrame"..i.."DungeonTexture"], "BOTTOMRIGHT", 2, -2) - end - end - end - end - - hooksecurefunc("DungeonCompletionAlertFrame_FixAnchors", SkinDungeonPopUP) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/archeology.lua b/Tukui/modules/skins/blizzard/archeology.lua deleted file mode 100644 index f234348..0000000 --- a/Tukui/modules/skins/blizzard/archeology.lua +++ /dev/null @@ -1,80 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - ArchaeologyFrame:StripTextures(true) - ArchaeologyFrameInset:StripTextures(true) - ArchaeologyFrame:SetTemplate("Default") - ArchaeologyFrame:CreateShadow("Default") - - T.SkinButton(ArchaeologyFrameArtifactPageSolveFrameSolveButton, true) - T.SkinDropDownBox(ArchaeologyFrameRaceFilter, 125) - - ArchaeologyFrameRankBar:StripTextures() - ArchaeologyFrameRankBar:SetStatusBarTexture(C["media"].normTex) - ArchaeologyFrameRankBar:CreateBackdrop("Default") - - ArchaeologyFrameArtifactPageSolveFrameStatusBar:StripTextures() - ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetStatusBarTexture(C["media"].normTex) - ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetStatusBarColor(0.7, 0.2, 0) - ArchaeologyFrameArtifactPageSolveFrameStatusBar:CreateBackdrop("Default") - - for i=1, ARCHAEOLOGY_MAX_COMPLETED_SHOWN do - local artifact = _G["ArchaeologyFrameCompletedPageArtifact"..i] - - if artifact then - _G["ArchaeologyFrameCompletedPageArtifact"..i.."Border"]:Kill() - _G["ArchaeologyFrameCompletedPageArtifact"..i.."Bg"]:Kill() - _G["ArchaeologyFrameCompletedPageArtifact"..i.."Icon"]:SetTexCoord(.08, .92, .08, .92) - _G["ArchaeologyFrameCompletedPageArtifact"..i.."Icon"].backdrop = CreateFrame("Frame", nil, artifact) - _G["ArchaeologyFrameCompletedPageArtifact"..i.."Icon"].backdrop:SetTemplate("Default") - _G["ArchaeologyFrameCompletedPageArtifact"..i.."Icon"].backdrop:Point("TOPLEFT", _G["ArchaeologyFrameCompletedPageArtifact"..i.."Icon"], "TOPLEFT", -2, 2) - _G["ArchaeologyFrameCompletedPageArtifact"..i.."Icon"].backdrop:Point("BOTTOMRIGHT", _G["ArchaeologyFrameCompletedPageArtifact"..i.."Icon"], "BOTTOMRIGHT", 2, -2) - _G["ArchaeologyFrameCompletedPageArtifact"..i.."Icon"].backdrop:SetFrameLevel(artifact:GetFrameLevel() - 2) - _G["ArchaeologyFrameCompletedPageArtifact"..i.."Icon"]:SetDrawLayer("OVERLAY") - _G["ArchaeologyFrameCompletedPageArtifact"..i.."ArtifactName"]:SetTextColor(1, 1, 0) - _G["ArchaeologyFrameCompletedPageArtifact"..i.."ArtifactSubText"]:SetTextColor(0.6, 0.6, 0.6) - end - end - - for i=1, ARCHAEOLOGY_MAX_RACES do - local frame = _G["ArchaeologyFrameSummaryPageRace"..i] - - if frame then - frame.raceName:SetTextColor(1, 1, 1) - end - end - - for i=1, ArchaeologyFrameCompletedPage:GetNumRegions() do - local region = select(i, ArchaeologyFrameCompletedPage:GetRegions()) - if region:GetObjectType() == "FontString" then - region:SetTextColor(1, 1, 0) - end - end - - for i=1, ArchaeologyFrameSummaryPage:GetNumRegions() do - local region = select(i, ArchaeologyFrameSummaryPage:GetRegions()) - if region:GetObjectType() == "FontString" then - region:SetTextColor(1, 1, 0) - end - end - - ArchaeologyFrameCompletedPage.infoText:SetTextColor(1, 1, 1) - ArchaeologyFrameHelpPageTitle:SetTextColor(1, 1, 0) - ArchaeologyFrameHelpPageDigTitle:SetTextColor(1, 1, 0) - ArchaeologyFrameHelpPageHelpScrollHelpText:SetTextColor(1, 1, 1) - - ArchaeologyFrameArtifactPageHistoryTitle:SetTextColor(1, 1, 0) - ArchaeologyFrameArtifactPageIcon:SetTexCoord(.08, .92, .08, .92) - ArchaeologyFrameArtifactPageIcon.backdrop = CreateFrame("Frame", nil, ArchaeologyFrameArtifactPage) - ArchaeologyFrameArtifactPageIcon.backdrop:SetTemplate("Default") - ArchaeologyFrameArtifactPageIcon.backdrop:Point("TOPLEFT", ArchaeologyFrameArtifactPageIcon, "TOPLEFT", -2, 2) - ArchaeologyFrameArtifactPageIcon.backdrop:Point("BOTTOMRIGHT", ArchaeologyFrameArtifactPageIcon, "BOTTOMRIGHT", 2, -2) - ArchaeologyFrameArtifactPageIcon.backdrop:SetFrameLevel(ArchaeologyFrameArtifactPage:GetFrameLevel()) - ArchaeologyFrameArtifactPageIcon:SetParent(ArchaeologyFrameArtifactPageIcon.backdrop) - ArchaeologyFrameArtifactPageIcon:SetDrawLayer("OVERLAY") - - ArchaeologyFrameArtifactPageHistoryScrollChildText:SetTextColor(1, 1, 1) - T.SkinCloseButton(ArchaeologyFrameCloseButton) -end - -T.SkinFuncs["Blizzard_ArchaeologyUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/auction.lua b/Tukui/modules/skins/blizzard/auction.lua deleted file mode 100644 index 4bfc2e2..0000000 --- a/Tukui/modules/skins/blizzard/auction.lua +++ /dev/null @@ -1,319 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - T.SkinCloseButton(AuctionFrameCloseButton) - AuctionFrame:StripTextures(true) - AuctionFrame:SetTemplate("Default") - AuctionFrame:CreateShadow("Default") - - BrowseFilterScrollFrame:StripTextures() - BrowseScrollFrame:StripTextures() - AuctionsScrollFrame:StripTextures() - BidScrollFrame:StripTextures() - - T.SkinDropDownBox(BrowseDropDown) - T.SkinDropDownBox(PriceDropDown) - T.SkinDropDownBox(DurationDropDown) - - T.SkinCheckBox(IsUsableCheckButton) - T.SkinCheckBox(ShowOnPlayerCheckButton) - - -- Dress Frame - do - local f - if T.toc < 40300 then - f1 = "Auction" - f2 = "Frame" - else - f1 = "Side" - f2 = "Model" - end - - local frame = _G[f1.."DressUpFrame"] - local reset = _G[f1.."DressUp"..f2.."ResetButton"] - local close = _G[f1.."DressUp"..f2.."CloseButton"] - local left = _G[f1.."DressUpFrameModelRotateLeftButton"] - local right = _G[f1.."DressUpFrameModelRotateRightButton"] - - frame:StripTextures() - frame:SetTemplate("Default") - frame:Point("TOPLEFT", AuctionFrame, "TOPRIGHT", 2, 0) - T.SkinButton(reset) - close:StripTextures() - close:SetNormalTexture(close:GetNormalTexture():GetTexture()) - close:SetPushedTexture(close:GetPushedTexture():GetTexture()) - close:SetHighlightTexture(close:GetHighlightTexture():GetTexture()) - close:SetDisabledTexture(close:GetDisabledTexture():GetTexture()) - if left and right then - T.SkinRotateButton(left) - T.SkinRotateButton(right) - right:Point("TOPLEFT", left, "TOPRIGHT", 4, 0) - end - end - - if T.toc < 40300 then - --Dress Up Frame - AuctionDressUpFrame:StripTextures() - AuctionDressUpFrame:SetTemplate("Default") - AuctionDressUpFrame:Point("TOPLEFT", AuctionFrame, "TOPRIGHT", 2, 0) - T.SkinButton(AuctionDressUpFrameResetButton) - AuctionDressUpFrameCloseButton:StripTextures() - AuctionDressUpFrameCloseButton:SetNormalTexture(AuctionFrameCloseButton:GetNormalTexture():GetTexture()) - AuctionDressUpFrameCloseButton:SetPushedTexture(AuctionFrameCloseButton:GetPushedTexture():GetTexture()) - AuctionDressUpFrameCloseButton:SetHighlightTexture(AuctionFrameCloseButton:GetHighlightTexture():GetTexture()) - AuctionDressUpFrameCloseButton:SetDisabledTexture(AuctionFrameCloseButton:GetDisabledTexture():GetTexture()) - T.SkinRotateButton(AuctionDressUpModelRotateLeftButton) - T.SkinRotateButton(AuctionDressUpModelRotateRightButton) - AuctionDressUpModelRotateRightButton:Point("TOPLEFT", AuctionDressUpModelRotateLeftButton, "TOPRIGHT", 4, 0) - end - - --Progress Frame - AuctionProgressFrame:StripTextures() - AuctionProgressFrame:SetTemplate("Default") - AuctionProgressFrame:CreateShadow("Default") - AuctionProgressFrameCancelButton:StyleButton() - AuctionProgressFrameCancelButton:SetTemplate("Default") - AuctionProgressFrameCancelButton:SetHitRectInsets(0, 0, 0, 0) - AuctionProgressFrameCancelButton:GetNormalTexture():ClearAllPoints() - AuctionProgressFrameCancelButton:GetNormalTexture():Point("TOPLEFT", 2, -2) - AuctionProgressFrameCancelButton:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - AuctionProgressFrameCancelButton:GetNormalTexture():SetTexCoord(0.67, 0.37, 0.61, 0.26) - AuctionProgressFrameCancelButton:Size(28, 28) - AuctionProgressFrameCancelButton:Point("LEFT", AuctionProgressBar, "RIGHT", 8, 0) - - AuctionProgressBarIcon:SetTexCoord(0.67, 0.37, 0.61, 0.26) - - local backdrop = CreateFrame("Frame", nil, AuctionProgressBarIcon:GetParent()) - backdrop:Point("TOPLEFT", AuctionProgressBarIcon, "TOPLEFT", -2, 2) - backdrop:Point("BOTTOMRIGHT", AuctionProgressBarIcon, "BOTTOMRIGHT", 2, -2) - backdrop:SetTemplate("Default") - AuctionProgressBarIcon:SetParent(backdrop) - - AuctionProgressBarText:ClearAllPoints() - AuctionProgressBarText:SetPoint("CENTER") - - AuctionProgressBar:StripTextures() - AuctionProgressBar:CreateBackdrop("Default") - AuctionProgressBar:SetStatusBarTexture(C["media"].normTex) - AuctionProgressBar:SetStatusBarColor(1, 1, 0) - - T.SkinNextPrevButton(BrowseNextPageButton) - T.SkinNextPrevButton(BrowsePrevPageButton) - - local buttons = { - "BrowseBidButton", - "BidBidButton", - "BrowseBuyoutButton", - "BidBuyoutButton", - "BrowseCloseButton", - "BidCloseButton", - "BrowseSearchButton", - "AuctionsCreateAuctionButton", - "AuctionsCancelAuctionButton", - "AuctionsCloseButton", - "BrowseResetButton", - "AuctionsStackSizeMaxButton", - "AuctionsNumStacksMaxButton", - } - - for _, button in pairs(buttons) do - T.SkinButton(_G[button]) - end - - --Fix Button Positions - AuctionsCloseButton:Point("BOTTOMRIGHT", AuctionFrameAuctions, "BOTTOMRIGHT", 66, 10) - AuctionsCancelAuctionButton:Point("RIGHT", AuctionsCloseButton, "LEFT", -4, 0) - BidBuyoutButton:Point("RIGHT", BidCloseButton, "LEFT", -4, 0) - BidBidButton:Point("RIGHT", BidBuyoutButton, "LEFT", -4, 0) - BrowseBuyoutButton:Point("RIGHT", BrowseCloseButton, "LEFT", -4, 0) - BrowseBidButton:Point("RIGHT", BrowseBuyoutButton, "LEFT", -4, 0) - AuctionsItemButton:StripTextures() - AuctionsItemButton:StyleButton() - AuctionsItemButton:SetTemplate("Default", true) - BrowseResetButton:Point("TOPLEFT", AuctionFrameBrowse, "TOPLEFT", 81, -74) - BrowseSearchButton:Point("TOPRIGHT", AuctionFrameBrowse, "TOPRIGHT", 25, -34) - - AuctionsItemButton:SetScript("OnUpdate", function() - if AuctionsItemButton:GetNormalTexture() then - AuctionsItemButton:GetNormalTexture():SetTexCoord(.08, .92, .08, .92) - AuctionsItemButton:GetNormalTexture():ClearAllPoints() - AuctionsItemButton:GetNormalTexture():Point("TOPLEFT", 2, -2) - AuctionsItemButton:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - end - end) - - local sorttabs = { - "BrowseQualitySort", - "BrowseLevelSort", - "BrowseDurationSort", - "BrowseHighBidderSort", - "BrowseCurrentBidSort", - "BidQualitySort", - "BidLevelSort", - "BidDurationSort", - "BidBuyoutSort", - "BidStatusSort", - "BidBidSort", - "AuctionsQualitySort", - "AuctionsDurationSort", - "AuctionsHighBidderSort", - "AuctionsBidSort", - } - - for _, sorttab in pairs(sorttabs) do - _G[sorttab.."Left"]:Kill() - _G[sorttab.."Middle"]:Kill() - _G[sorttab.."Right"]:Kill() - end - - for i=1, 3 do - T.SkinTab(_G["AuctionFrameTab"..i]) - end - - for i=1, NUM_FILTERS_TO_DISPLAY do - local tab = _G["AuctionFilterButton"..i] - tab:StripTextures() - tab:StyleButton() - end - - local editboxs = { - "BrowseName", - "BrowseMinLevel", - "BrowseMaxLevel", - "BrowseBidPriceGold", - "BrowseBidPriceSilver", - "BrowseBidPriceCopper", - "BidBidPriceGold", - "BidBidPriceSilver", - "BidBidPriceCopper", - "AuctionsStackSizeEntry", - "AuctionsNumStacksEntry", - "StartPriceGold", - "StartPriceSilver", - "StartPriceCopper", - "BuyoutPriceGold", - "BuyoutPriceSilver", - "BuyoutPriceCopper" - } - - for _, editbox in pairs(editboxs) do - T.SkinEditBox(_G[editbox]) - _G[editbox]:SetTextInsets(1, 1, -1, 1) - end - BrowseMaxLevel:Point("LEFT", BrowseMinLevel, "RIGHT", 8, 0) - AuctionsStackSizeEntry.backdrop:SetAllPoints() - AuctionsNumStacksEntry.backdrop:SetAllPoints() - - for i=1, NUM_BROWSE_TO_DISPLAY do - local button = _G["BrowseButton"..i] - local icon = _G["BrowseButton"..i.."Item"] - - _G["BrowseButton"..i.."ItemIconTexture"]:SetTexCoord(.08, .92, .08, .92) - _G["BrowseButton"..i.."ItemIconTexture"]:ClearAllPoints() - _G["BrowseButton"..i.."ItemIconTexture"]:Point("TOPLEFT", 2, -2) - _G["BrowseButton"..i.."ItemIconTexture"]:Point("BOTTOMRIGHT", -2, 2) - - icon:StyleButton() - --TODO: Find a better method to ensure that the icon:GetNormalTexture doesn't return after clicking - icon:HookScript("OnUpdate", function() icon:GetNormalTexture():Kill() end) - - icon:CreateBackdrop("Default") - icon.backdrop:SetAllPoints() - - button:StripTextures() - button:StyleButton() - _G["BrowseButton"..i.."Highlight"] = button:GetHighlightTexture() - button:GetHighlightTexture():ClearAllPoints() - button:GetHighlightTexture():Point("TOPLEFT", icon, "TOPRIGHT", 2, 0) - button:GetHighlightTexture():SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) - button:GetPushedTexture():SetAllPoints(button:GetHighlightTexture()) - end - - for i=1, NUM_AUCTIONS_TO_DISPLAY do - local button = _G["AuctionsButton"..i] - local icon = _G["AuctionsButton"..i.."Item"] - - _G["AuctionsButton"..i.."ItemIconTexture"]:SetTexCoord(.08, .92, .08, .92) - _G["AuctionsButton"..i.."ItemIconTexture"].SetTexCoord = T.dummy - _G["AuctionsButton"..i.."ItemIconTexture"]:ClearAllPoints() - _G["AuctionsButton"..i.."ItemIconTexture"]:Point("TOPLEFT", 2, -2) - _G["AuctionsButton"..i.."ItemIconTexture"]:Point("BOTTOMRIGHT", -2, 2) - - icon:StyleButton() - --TODO: Find a better method to ensure that the icon:GetNormalTexture doesn't return after clicking - icon:HookScript("OnUpdate", function() icon:GetNormalTexture():Kill() end) - - icon:CreateBackdrop("Default") - icon.backdrop:SetAllPoints() - - button:StripTextures() - button:StyleButton() - _G["AuctionsButton"..i.."Highlight"] = button:GetHighlightTexture() - button:GetHighlightTexture():ClearAllPoints() - button:GetHighlightTexture():Point("TOPLEFT", icon, "TOPRIGHT", 2, 0) - button:GetHighlightTexture():SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) - button:GetPushedTexture():SetAllPoints(button:GetHighlightTexture()) - end - - for i=1, NUM_BIDS_TO_DISPLAY do - local button = _G["BidButton"..i] - local icon = _G["BidButton"..i.."Item"] - - _G["BidButton"..i.."ItemIconTexture"]:SetTexCoord(.08, .92, .08, .92) - _G["BidButton"..i.."ItemIconTexture"]:ClearAllPoints() - _G["BidButton"..i.."ItemIconTexture"]:Point("TOPLEFT", 2, -2) - _G["BidButton"..i.."ItemIconTexture"]:Point("BOTTOMRIGHT", -2, 2) - - icon:StyleButton() - icon:HookScript("OnUpdate", function() icon:GetNormalTexture():Kill() end) - - icon:CreateBackdrop("Default") - icon.backdrop:SetAllPoints() - - button:StripTextures() - button:StyleButton() - _G["BidButton"..i.."Highlight"] = button:GetHighlightTexture() - button:GetHighlightTexture():ClearAllPoints() - button:GetHighlightTexture():Point("TOPLEFT", icon, "TOPRIGHT", 2, 0) - button:GetHighlightTexture():SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) - button:GetPushedTexture():SetAllPoints(button:GetHighlightTexture()) - end - - --Custom Backdrops - AuctionFrameBrowse.bg1 = CreateFrame("Frame", nil, AuctionFrameBrowse) - AuctionFrameBrowse.bg1:SetTemplate("Default") - AuctionFrameBrowse.bg1:Point("TOPLEFT", 20, -103) - AuctionFrameBrowse.bg1:Point("BOTTOMRIGHT", -575, 40) - BrowseFilterScrollFrame:Height(300) --Adjust scrollbar height a little off - - AuctionFrameBrowse.bg2 = CreateFrame("Frame", nil, AuctionFrameBrowse) - AuctionFrameBrowse.bg2:SetTemplate("Default") - AuctionFrameBrowse.bg2:Point("TOPLEFT", AuctionFrameBrowse.bg1, "TOPRIGHT", 4, 0) - AuctionFrameBrowse.bg2:Point("BOTTOMRIGHT", AuctionFrame, "BOTTOMRIGHT", -8, 40) - BrowseScrollFrame:Height(300) --Adjust scrollbar height a little off - - AuctionFrameBid.bg = CreateFrame("Frame", nil, AuctionFrameBid) - AuctionFrameBid.bg:SetTemplate("Default") - AuctionFrameBid.bg:Point("TOPLEFT", 22, -72) - AuctionFrameBid.bg:Point("BOTTOMRIGHT", 66, 39) - BidScrollFrame:Height(332) - - AuctionsScrollFrame:Height(336) - AuctionFrameAuctions.bg1 = CreateFrame("Frame", nil, AuctionFrameAuctions) - AuctionFrameAuctions.bg1:SetTemplate("Default") - AuctionFrameAuctions.bg1:Point("TOPLEFT", 15, -70) - AuctionFrameAuctions.bg1:Point("BOTTOMRIGHT", -545, 35) - AuctionFrameAuctions.bg1:SetFrameLevel(AuctionFrameAuctions.bg1:GetFrameLevel() - 2) - - AuctionFrameAuctions.bg2 = CreateFrame("Frame", nil, AuctionFrameAuctions) - AuctionFrameAuctions.bg2:SetTemplate("Default") - AuctionFrameAuctions.bg2:Point("TOPLEFT", AuctionFrameAuctions.bg1, "TOPRIGHT", 3, 0) - AuctionFrameAuctions.bg2:Point("BOTTOMRIGHT", AuctionFrame, -8, 35) - AuctionFrameAuctions.bg2:SetFrameLevel(AuctionFrameAuctions.bg2:GetFrameLevel() - 2) - - T.SkinScrollBar(BrowseFilterScrollFrameScrollBar) - T.SkinScrollBar(BrowseScrollFrameScrollBar) - T.SkinScrollBar(AuctionsScrollFrameScrollBar) -end - -T.SkinFuncs["Blizzard_AuctionUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/bags.lua b/Tukui/modules/skins/blizzard/bags.lua deleted file mode 100644 index 270afcc..0000000 --- a/Tukui/modules/skins/blizzard/bags.lua +++ /dev/null @@ -1,122 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - --- Bags & Bank -if C["bags"].enable == true then return end - -local function LoadSkin() - -- BAGS - for i = 1, 5 do - local bag = _G["ContainerFrame"..i] - if bag then - bag:StripTextures(true) - bag:CreateBackdrop("Default") - bag.backdrop:CreateShadow("Default") - bag.backdrop:Point("TOPLEFT", 4, -2) - bag.backdrop:Point("BOTTOMRIGHT", 1, 1) - T.SkinCloseButton(_G["ContainerFrame"..i.."CloseButton"], _G["ContainerFrame"..i.."CloseButton"].backdrop) - - --Slots - for j = 1, 36 do - local icon = _G["ContainerFrame"..i.."Item"..j.."IconTexture"] - local slots = _G["ContainerFrame"..i.."Item"..j] - - T.SkinButton(slots) - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:SetAllPoints() - icon:Point("TOPLEFT", slots, 2, -2) - icon:Point("BOTTOMRIGHT", slots, -2, 2) - end - end - - BackpackTokenFrame:StripTextures() - end - - if T.toc >= 40300 then - BagItemSearchBox:Size(159, 15) - BagItemSearchBox:ClearAllPoints() - BagItemSearchBox:Point("TOPLEFT", 19, -29) - BagItemSearchBox.ClearAllPoints = T.dummy - BagItemSearchBox.SetPoint = T.dummy - T.SkinEditBox(BagItemSearchBox) - end - - -- BANK - local bank = BankFrame - if bank then - bank:StripTextures(true) - bank:CreateBackdrop("Default") - bank.backdrop:CreateShadow("Default") - bank.backdrop:Point("TOPLEFT", 4, 0) - bank.backdrop:Point("BOTTOMRIGHT", -18, 90) - T.SkinCloseButton(BankCloseButton, BankCloseButton.backdrop) - - T.SkinButton(BankFramePurchaseButton) - BankFramePurchaseButton:Height(22) - - if T.toc >= 40300 then - BankItemSearchBox:Size(159, 15) - BankItemSearchBox:ClearAllPoints() - BankItemSearchBox:Point("TOPRIGHT", -56, -48) - BankItemSearchBox.ClearAllPoints = T.dummy - BankItemSearchBox.SetPoint = T.dummy - T.SkinEditBox(BankItemSearchBox) - end - - -- Bank Bags - for i = 1, 7 do - local bankbags = _G["BankFrameBag"..i] - local highlight = _G["BankFrameBag"..i.."HighlightFrameTexture"]; - local icon = _G["BankFrameBag"..i.."IconTexture"] - - T.SkinButton(bankbags) - bankbags:StyleButton() - highlight:Kill() - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:SetAllPoints() - icon:Point("TOPLEFT", bankbags, 2, -2) - icon:Point("BOTTOMRIGHT", bankbags, -2, 2) - end - - -- Bank Slots - for i = 1, 28 do - local slots = _G["BankFrameItem"..i] - local icon = _G["BankFrameItem"..i.."IconTexture"] - T.SkinButton(slots) - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:SetAllPoints() - icon:Point("TOPLEFT", slots, 2, -2) - icon:Point("BOTTOMRIGHT", slots, -2, 2) - end - - -- Bank Bags Frame - for i = 6, 12 do - local bag = _G["ContainerFrame"..i] - if bag then - bag:StripTextures(true) - bag:CreateBackdrop("Default") - bag.backdrop:CreateShadow("Default") - bag.backdrop:Point("TOPLEFT", 4, -2) - bag.backdrop:Point("BOTTOMRIGHT", 1, 1) - T.SkinCloseButton(_G["ContainerFrame"..i.."CloseButton"], _G["ContainerFrame"..i.."CloseButton"].backdrop) - - --Slots - for j = 1, 36 do - local icon = _G["ContainerFrame"..i.."Item"..j.."IconTexture"] - local slots = _G["ContainerFrame"..i.."Item"..j] - - T.SkinButton(slots) - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:SetAllPoints() - icon:Point("TOPLEFT", slots, 2, -2) - icon:Point("BOTTOMRIGHT", slots, -2, 2) - end - end - end - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/barbershop.lua b/Tukui/modules/skins/blizzard/barbershop.lua deleted file mode 100644 index c4f34e7..0000000 --- a/Tukui/modules/skins/blizzard/barbershop.lua +++ /dev/null @@ -1,56 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local buttons = { - "BarberShopFrameOkayButton", - "BarberShopFrameCancelButton", - "BarberShopFrameResetButton", - } - BarberShopFrameOkayButton:Point("RIGHT", BarberShopFrameSelector4, "BOTTOM", 2, -50) - - for i = 1, #buttons do - _G[buttons[i]]:StripTextures() - T.SkinButton(_G[buttons[i]]) - end - - - for i = 1, 4 do - local f = _G["BarberShopFrameSelector"..i] - local f2 = _G["BarberShopFrameSelector"..i-1] - T.SkinNextPrevButton(_G["BarberShopFrameSelector"..i.."Prev"]) - T.SkinNextPrevButton(_G["BarberShopFrameSelector"..i.."Next"]) - - if i ~= 1 then - f:ClearAllPoints() - f:Point("TOP", f2, "BOTTOM", 0, -3) - end - - if f then - f:StripTextures() - end - end - - BarberShopFrameSelector1:ClearAllPoints() - BarberShopFrameSelector1:Point("TOP", 0, -12) - - BarberShopFrameResetButton:ClearAllPoints() - BarberShopFrameResetButton:Point("BOTTOM", 0, 12) - - BarberShopFrame:StripTextures() - BarberShopFrame:SetTemplate("Default") - BarberShopFrame:Size(BarberShopFrame:GetWidth() - 30, BarberShopFrame:GetHeight() - 56) - - BarberShopFrameMoneyFrame:StripTextures() - BarberShopFrameMoneyFrame:CreateBackdrop() - BarberShopFrameBackground:Kill() - - BarberShopBannerFrameBGTexture:Kill() - BarberShopBannerFrame:Kill() - - BarberShopAltFormFrameBorder:StripTextures() - BarberShopAltFormFrame:Point( "BOTTOM", BarberShopFrame, "TOP", 0, 5 ) - BarberShopAltFormFrame:StripTextures() - BarberShopAltFormFrame:CreateBackdrop("Default") -end - -T.SkinFuncs["Blizzard_BarbershopUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/bgscore.lua b/Tukui/modules/skins/blizzard/bgscore.lua deleted file mode 100644 index 622c08d..0000000 --- a/Tukui/modules/skins/blizzard/bgscore.lua +++ /dev/null @@ -1,24 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - WorldStateScoreScrollFrame:StripTextures() - T.SkinScrollBar(WorldStateScoreScrollFrameScrollBar) - WorldStateScoreFrame:StripTextures() - WorldStateScoreFrame:SetTemplate("Default") - T.SkinCloseButton(WorldStateScoreFrameCloseButton) - WorldStateScoreFrameInset:Kill() - T.SkinButton(WorldStateScoreFrameLeaveButton) - - for i = 1, WorldStateScoreScrollFrameScrollChildFrame:GetNumChildren() do - local b = _G["WorldStateScoreButton"..i] - b:StripTextures() - b:StyleButton(false) - b:SetTemplate("Default", true) - end - - for i = 1, 3 do - T.SkinTab(_G["WorldStateScoreFrameTab"..i]) - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/binding.lua b/Tukui/modules/skins/blizzard/binding.lua deleted file mode 100644 index 024830b..0000000 --- a/Tukui/modules/skins/blizzard/binding.lua +++ /dev/null @@ -1,39 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local buttons = { - "KeyBindingFrameDefaultButton", - "KeyBindingFrameUnbindButton", - "KeyBindingFrameOkayButton", - "KeyBindingFrameCancelButton", - } - - for _, v in pairs(buttons) do - _G[v]:StripTextures() - _G[v]:SetTemplate("Default", true) - end - - T.SkinCheckBox(KeyBindingFrameCharacterButton) - KeyBindingFrameHeaderText:ClearAllPoints() - KeyBindingFrameHeaderText:Point("TOP", KeyBindingFrame, "TOP", 0, -4) - KeyBindingFrame:StripTextures() - KeyBindingFrame:SetTemplate("Default") - - for i = 1, KEY_BINDINGS_DISPLAYED do - local button1 = _G["KeyBindingFrameBinding"..i.."Key1Button"] - local button2 = _G["KeyBindingFrameBinding"..i.."Key2Button"] - button1:StripTextures(true) - button1:StyleButton(false) - button1:SetTemplate("Default", true) - button2:StripTextures(true) - button2:StyleButton(false) - button2:SetTemplate("Default", true) - end - - KeyBindingFrameUnbindButton:Point("RIGHT", KeyBindingFrameOkayButton, "LEFT", -3, 0) - KeyBindingFrameOkayButton:Point("RIGHT", KeyBindingFrameCancelButton, "LEFT", -3, 0) - - T.SkinScrollBar(KeyBindingFrameScrollFrameScrollBar) -end - -T.SkinFuncs["Blizzard_BindingUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/bubbles.lua b/Tukui/modules/skins/blizzard/bubbles.lua deleted file mode 100644 index 2378f05..0000000 --- a/Tukui/modules/skins/blizzard/bubbles.lua +++ /dev/null @@ -1,72 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if (IsAddOnLoaded("BossEncounter2")) then return end --> i don't know wtf this addon is doing but it broke my bubble script. - -local chatbubblehook = CreateFrame("Frame", nil, UIParent) -local noscalemult = T.mult * C["general"].uiscale -local tslu = 0 -local numkids = 0 -local bubbles = {} - -if T.eyefinity then - -- hide options, disable bubbles, not compatible eyefinity - InterfaceOptionsSocialPanelChatBubbles:SetScale(0.00001) - InterfaceOptionsSocialPanelPartyChat:SetScale(0.00001) - SetCVar("chatBubbles", 0) - SetCVar("chatBubblesParty", 0) -end - -local function skinbubble(frame) - for i=1, frame:GetNumRegions() do - local region = select(i, frame:GetRegions()) - if region:GetObjectType() == "Texture" then - region:SetTexture(nil) - elseif region:GetObjectType() == "FontString" then - frame.text = region - end - end - - frame:SetBackdrop({ - bgFile = C["media"].blank, - edgeFile = C["media"].blank, - tile = false, tileSize = 0, edgeSize = noscalemult, - insets = {left = -noscalemult, right = -noscalemult, top = -noscalemult, bottom = -noscalemult} - }) - frame:SetBackdropBorderColor(unpack(C["media"].bordercolor)) - frame:SetBackdropColor(.1, .1, .1, .8) - - tinsert(bubbles, frame) -end - -local function ischatbubble(frame) - if frame:GetName() then return end - if not frame:GetRegions() then return end - return frame:GetRegions():GetTexture() == [[Interface\Tooltips\ChatBubble-Background]] -end - -chatbubblehook:SetScript("OnUpdate", function(chatbubblehook, elapsed) - tslu = tslu + elapsed - - if tslu > .05 then - tslu = 0 - - local newnumkids = WorldFrame:GetNumChildren() - if newnumkids ~= numkids then - for i=numkids + 1, newnumkids do - local frame = select(i, WorldFrame:GetChildren()) - - if ischatbubble(frame) then - skinbubble(frame) - end - end - numkids = newnumkids - end - - for i, frame in next, bubbles do - local r, g, b = frame.text:GetTextColor() - frame:SetBackdropBorderColor(r, g, b, .8) - - -- bubbles is unfortunatly not compatible with eyefinity, we hide it event if they are enabled. :( - if T.eyefinity then frame:SetScale(0.00001) end - end - end -end) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/calendar.lua b/Tukui/modules/skins/blizzard/calendar.lua deleted file mode 100644 index c06dd56..0000000 --- a/Tukui/modules/skins/blizzard/calendar.lua +++ /dev/null @@ -1,196 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local frames = { - "CalendarFrame", - } - - for _, frame in pairs(frames) do - _G[frame]:StripTextures() - end - - CalendarFrame:SetTemplate("Default") - T.SkinCloseButton(CalendarCloseButton) - CalendarCloseButton:Point("TOPRIGHT", CalendarFrame, "TOPRIGHT", -4, -4) - - T.SkinNextPrevButton(CalendarPrevMonthButton) - T.SkinNextPrevButton(CalendarNextMonthButton) - - do --Handle drop down button, this one is differant than the others - local frame = CalendarFilterFrame - local button = CalendarFilterButton - - frame:StripTextures() - frame:Width(155) - - _G[frame:GetName().."Text"]:ClearAllPoints() - _G[frame:GetName().."Text"]:Point("RIGHT", button, "LEFT", -2, 0) - - - button:ClearAllPoints() - button:Point("RIGHT", frame, "RIGHT", -10, 3) - button.SetPoint = T.dummy - - T.SkinNextPrevButton(button, true) - - frame:CreateBackdrop("Default") - frame.backdrop:Point("TOPLEFT", 20, 2) - frame.backdrop:Point("BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) - end - - - --backdrop - local bg = CreateFrame("Frame", "CalendarFrameBackdrop", CalendarFrame) - bg:SetTemplate("Default") - bg:Point("TOPLEFT", 10, -72) - bg:Point("BOTTOMRIGHT", -8, 3) - - CalendarContextMenu:SetTemplate("Default") - CalendarContextMenu.SetBackdropColor = T.dummy - CalendarContextMenu.SetBackdropBorderColor = T.dummy - - CalendarInviteStatusContextMenu:SetTemplate("Default") - CalendarInviteStatusContextMenu.SetBackdropColor = T.dummy - CalendarInviteStatusContextMenu.SetBackdropBorderColor = T.dummy - - --Boost frame levels - for i=1, 42 do - _G["CalendarDayButton"..i]:SetFrameLevel(_G["CalendarDayButton"..i]:GetFrameLevel() + 1) - end - - --CreateEventFrame - CalendarCreateEventFrame:StripTextures() - CalendarCreateEventFrame:SetTemplate("Default") - CalendarCreateEventFrame:Point("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarCreateEventTitleFrame:StripTextures() - - T.SkinButton(CalendarCreateEventCreateButton, true) - T.SkinButton(CalendarCreateEventMassInviteButton, true) - T.SkinButton(CalendarCreateEventInviteButton, true) - CalendarCreateEventInviteButton:Point("TOPLEFT", CalendarCreateEventInviteEdit, "TOPRIGHT", 4, 1) - CalendarCreateEventInviteEdit:Width(CalendarCreateEventInviteEdit:GetWidth() - 2) - - CalendarCreateEventInviteList:StripTextures() - CalendarCreateEventInviteList:SetTemplate("Default") - - T.SkinEditBox(CalendarCreateEventInviteEdit) - T.SkinEditBox(CalendarCreateEventTitleEdit) - T.SkinDropDownBox(CalendarCreateEventTypeDropDown, 120) - - CalendarCreateEventDescriptionContainer:StripTextures() - CalendarCreateEventDescriptionContainer:SetTemplate("Default") - - T.SkinCloseButton(CalendarCreateEventCloseButton) - CalendarCreateEventCloseButton:StripTextures() - - T.SkinCheckBox(CalendarCreateEventLockEventCheck) - - T.SkinDropDownBox(CalendarCreateEventHourDropDown, 68) - T.SkinDropDownBox(CalendarCreateEventMinuteDropDown, 68) - T.SkinDropDownBox(CalendarCreateEventAMPMDropDown, 68) - T.SkinDropDownBox(CalendarCreateEventRepeatOptionDropDown, 120) - CalendarCreateEventIcon:SetTexCoord(.08, .92, .08, .92) - CalendarCreateEventIcon.SetTexCoord = T.dummy - - CalendarCreateEventInviteListSection:StripTextures() - - CalendarClassButtonContainer:HookScript("OnShow", function() - for i, class in ipairs(CLASS_SORT_ORDER) do - local button = _G["CalendarClassButton"..i] - button:StripTextures() - button:CreateBackdrop("Default") - - local tcoords = CLASS_ICON_TCOORDS[class] - local buttonIcon = button:GetNormalTexture() - buttonIcon:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes") - buttonIcon:SetTexCoord(tcoords[1] + 0.015, tcoords[2] - 0.02, tcoords[3] + 0.018, tcoords[4] - 0.02) --F U C K I N G H A X - end - - CalendarClassButton1:Point("TOPLEFT", CalendarClassButtonContainer, "TOPLEFT", 5, 0) - - CalendarClassTotalsButton:StripTextures() - CalendarClassTotalsButton:CreateBackdrop("Default") - end) - - --Texture Picker Frame - CalendarTexturePickerFrame:StripTextures() - CalendarTexturePickerTitleFrame:StripTextures() - - CalendarTexturePickerFrame:SetTemplate("Default") - - T.SkinScrollBar(CalendarTexturePickerScrollBar) - T.SkinButton(CalendarTexturePickerAcceptButton, true) - T.SkinButton(CalendarTexturePickerCancelButton, true) - T.SkinButton(CalendarCreateEventInviteButton, true) - T.SkinButton(CalendarCreateEventRaidInviteButton, true) - - --Mass Invite Frame - CalendarMassInviteFrame:StripTextures() - CalendarMassInviteFrame:SetTemplate("Default") - CalendarMassInviteTitleFrame:StripTextures() - - T.SkinCloseButton(CalendarMassInviteCloseButton) - T.SkinButton(CalendarMassInviteGuildAcceptButton) - T.SkinButton(CalendarMassInviteArenaButton2) - T.SkinButton(CalendarMassInviteArenaButton3) - T.SkinButton(CalendarMassInviteArenaButton5) - T.SkinDropDownBox(CalendarMassInviteGuildRankMenu, 130) - - T.SkinEditBox(CalendarMassInviteGuildMinLevelEdit) - T.SkinEditBox(CalendarMassInviteGuildMaxLevelEdit) - - --Raid View - CalendarViewRaidFrame:StripTextures() - CalendarViewRaidFrame:SetTemplate("Default") - CalendarViewRaidFrame:Point("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarViewRaidTitleFrame:StripTextures() - T.SkinCloseButton(CalendarViewRaidCloseButton) - CalendarViewRaidCloseButton:StripTextures() - - --Holiday View - CalendarViewHolidayFrame:StripTextures(true) - CalendarViewHolidayFrame:SetTemplate("Default") - CalendarViewHolidayFrame:Point("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarViewHolidayTitleFrame:StripTextures() - T.SkinCloseButton(CalendarViewHolidayCloseButton) - CalendarViewHolidayCloseButton:StripTextures() - - -- Event View - CalendarViewEventFrame:StripTextures() - CalendarViewEventFrame:SetTemplate("Default") - CalendarViewEventFrame:Point("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarViewEventTitleFrame:StripTextures() - CalendarViewEventDescriptionContainer:StripTextures() - CalendarViewEventDescriptionContainer:SetTemplate("Default") - CalendarViewEventInviteList:StripTextures() - CalendarViewEventInviteList:SetTemplate("Default") - CalendarViewEventInviteListSection:StripTextures() - T.SkinCloseButton(CalendarViewEventCloseButton) - CalendarViewEventCloseButton:StripTextures() - - T.SkinScrollBar(CalendarViewEventInviteListScrollFrameScrollBar) - - local buttons = { - "CalendarViewEventAcceptButton", - "CalendarViewEventTentativeButton", - "CalendarViewEventRemoveButton", - "CalendarViewEventDeclineButton", - } - - for _, button in pairs(buttons) do - T.SkinButton(_G[button]) - end - - -- too many event same day box - CalendarEventPickerFrame:StripTextures() - CalendarEventPickerFrame:SetTemplate("Default") - CalendarEventPickerTitleFrame:StripTextures() - - T.SkinScrollBar(CalendarEventPickerScrollBar) - - CalendarEventPickerCloseButton:StripTextures() - T.SkinButton(CalendarEventPickerCloseButton, true) - T.SkinScrollBar(CalendarCreateEventDescriptionScrollFrameScrollBar) -end - -T.SkinFuncs["Blizzard_Calendar"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/character.lua b/Tukui/modules/skins/blizzard/character.lua deleted file mode 100644 index 6daa5ba..0000000 --- a/Tukui/modules/skins/blizzard/character.lua +++ /dev/null @@ -1,345 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - T.SkinCloseButton(CharacterFrameCloseButton) - - local slots = { - "HeadSlot", - "NeckSlot", - "ShoulderSlot", - "BackSlot", - "ChestSlot", - "ShirtSlot", - "TabardSlot", - "WristSlot", - "HandsSlot", - "WaistSlot", - "LegsSlot", - "FeetSlot", - "Finger0Slot", - "Finger1Slot", - "Trinket0Slot", - "Trinket1Slot", - "MainHandSlot", - "SecondaryHandSlot", - "RangedSlot", - } - - for _, slot in pairs(slots) do - local icon = _G["Character"..slot.."IconTexture"] - local slot = _G["Character"..slot] - slot:StripTextures() - slot:StyleButton(false) - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - - slot:SetFrameLevel(slot:GetFrameLevel() + 2) - slot:CreateBackdrop("Default") - slot.backdrop:SetAllPoints() - end - - --Strip Textures - local charframe = { - "CharacterFrame", - "CharacterModelFrame", - "CharacterFrameInset", - "CharacterStatsPane", - "CharacterFrameInsetRight", - "PaperDollSidebarTabs", - "PaperDollEquipmentManagerPane", - "PaperDollFrameItemFlyout", - } - - CharacterFrameExpandButton:Size(CharacterFrameExpandButton:GetWidth() - 7, CharacterFrameExpandButton:GetHeight() - 7) - T.SkinNextPrevButton(CharacterFrameExpandButton) - - if T.toc < 40300 then - T.SkinRotateButton(CharacterModelFrameRotateLeftButton) - T.SkinRotateButton(CharacterModelFrameRotateRightButton) - CharacterModelFrameRotateLeftButton:Point("TOPLEFT", CharacterModelFrame, "TOPLEFT", 4, -4) - CharacterModelFrameRotateRightButton:Point("TOPLEFT", CharacterModelFrameRotateLeftButton, "TOPRIGHT", 4, 0) - - --Swap item flyout frame (shown when holding alt over a slot) - PaperDollFrameItemFlyout:HookScript("OnShow", function() - PaperDollFrameItemFlyoutButtons:StripTextures() - - for i=1, PDFITEMFLYOUT_MAXITEMS do - local button = _G["PaperDollFrameItemFlyoutButtons"..i] - local icon = _G["PaperDollFrameItemFlyoutButtons"..i.."IconTexture"] - if button then - button:StyleButton(false) - - icon:SetTexCoord(.08, .92, .08, .92) - button:GetNormalTexture():SetTexture(nil) - - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - button:SetFrameLevel(button:GetFrameLevel() + 2) - if not button.backdrop then - button:CreateBackdrop("Default") - button.backdrop:SetAllPoints() - end - end - end - end) - else - EquipmentFlyoutFrameHighlight:Kill() - local function SkinItemFlyouts() - EquipmentFlyoutFrameButtons:StripTextures() - - for i = 1, EQUIPMENTFLYOUT_MAXITEMS do - local button = _G["EquipmentFlyoutFrameButton"..i] - local icon = _G["EquipmentFlyoutFrameButton"..i.."IconTexture"] - if button then - button:StyleButton(false) - - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - button:GetNormalTexture():SetTexture(nil) - - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - button:SetFrameLevel(button:GetFrameLevel() + 2) - button:SetFrameStrata("DIALOG") - if not button.backdrop then - button:CreateBackdrop("Default") - button.backdrop:SetAllPoints() - end - end - end - end - - -- Swap item flyout frame (shown when holding alt over a slot) - EquipmentFlyoutFrame:HookScript("OnShow", SkinItemFlyouts) - hooksecurefunc("EquipmentFlyout_Show", SkinItemFlyouts) - end - - --Icon in upper right corner of character frame - CharacterFramePortrait:Kill() - CharacterModelFrame:CreateBackdrop("Default") - - local scrollbars = { - "PaperDollTitlesPaneScrollBar", - "PaperDollEquipmentManagerPaneScrollBar", - "CharacterStatsPaneScrollBar", - "ReputationListScrollFrameScrollBar", - } - - for _, scrollbar in pairs(scrollbars) do - T.SkinScrollBar(_G[scrollbar]) - end - - for _, object in pairs(charframe) do - if _G[object] then - _G[object]:StripTextures() - end - end - - --Titles - PaperDollTitlesPane:HookScript("OnShow", function(self) - for x, object in pairs(PaperDollTitlesPane.buttons) do - object.BgTop:SetTexture(nil) - object.BgBottom:SetTexture(nil) - object.BgMiddle:SetTexture(nil) - - object.Check:SetTexture(nil) - object.text:SetFont(C["media"].font,12) - object.text.SetFont = T.dummy - end - end) - - --Equipement Manager - T.SkinButton(PaperDollEquipmentManagerPaneEquipSet) - T.SkinButton(PaperDollEquipmentManagerPaneSaveSet) - T.SkinScrollBar(GearManagerDialogPopupScrollFrameScrollBar) - PaperDollEquipmentManagerPaneEquipSet:Width(PaperDollEquipmentManagerPaneEquipSet:GetWidth() - 8) - PaperDollEquipmentManagerPaneSaveSet:Width(PaperDollEquipmentManagerPaneSaveSet:GetWidth() - 8) - PaperDollEquipmentManagerPaneEquipSet:Point("TOPLEFT", PaperDollEquipmentManagerPane, "TOPLEFT", 8, 0) - PaperDollEquipmentManagerPaneSaveSet:Point("LEFT", PaperDollEquipmentManagerPaneEquipSet, "RIGHT", 4, 0) - PaperDollEquipmentManagerPaneEquipSet.ButtonBackground:SetTexture(nil) - PaperDollEquipmentManagerPane:HookScript("OnShow", function(self) - for x, object in pairs(PaperDollEquipmentManagerPane.buttons) do - object.BgTop:SetTexture(nil) - object.BgBottom:SetTexture(nil) - object.BgMiddle:SetTexture(nil) - - object.Check:SetTexture(nil) - object.icon:SetTexCoord(.08, .92, .08, .92) - object:SetTemplate("Default") - end - GearManagerDialogPopup:StripTextures() - GearManagerDialogPopup:SetTemplate("Default") - GearManagerDialogPopup:Point("LEFT", PaperDollFrame, "RIGHT", 4, 0) - GearManagerDialogPopupScrollFrame:StripTextures() - GearManagerDialogPopupEditBox:StripTextures() - GearManagerDialogPopupEditBox:SetTemplate("Default") - T.SkinButton(GearManagerDialogPopupOkay) - T.SkinButton(GearManagerDialogPopupCancel) - - for i=1, NUM_GEARSET_ICONS_SHOWN do - local button = _G["GearManagerDialogPopupButton"..i] - local icon = button.icon - - if button then - button:StripTextures() - button:StyleButton(true) - - icon:SetTexCoord(.08, .92, .08, .92) - _G["GearManagerDialogPopupButton"..i.."Icon"]:SetTexture(nil) - - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - button:SetFrameLevel(button:GetFrameLevel() + 2) - if not button.backdrop then - button:CreateBackdrop("Default") - button.backdrop:SetAllPoints() - end - end - end - end) - - --Handle Tabs at bottom of character frame - for i=1, 4 do - T.SkinTab(_G["CharacterFrameTab"..i]) - end - - --Buttons used to toggle between equipment manager, titles, and character stats - local function FixSidebarTabCoords() - for i=1, #PAPERDOLL_SIDEBARS do - local tab = _G["PaperDollSidebarTab"..i] - if tab then - tab.Highlight:SetTexture(1, 1, 1, 0.3) - tab.Highlight:Point("TOPLEFT", 3, -4) - tab.Highlight:Point("BOTTOMRIGHT", -1, 0) - tab.Hider:SetTexture(0.4,0.4,0.4,0.4) - tab.Hider:Point("TOPLEFT", 3, -4) - tab.Hider:Point("BOTTOMRIGHT", -1, 0) - tab.TabBg:Kill() - - if i == 1 then - for i=1, tab:GetNumRegions() do - local region = select(i, tab:GetRegions()) - region:SetTexCoord(0.16, 0.86, 0.16, 0.86) - region.SetTexCoord = T.dummy - end - end - tab:CreateBackdrop("Default") - tab.backdrop:Point("TOPLEFT", 1, -2) - tab.backdrop:Point("BOTTOMRIGHT", 1, -2) - end - end - end - hooksecurefunc("PaperDollFrame_UpdateSidebarTabs", FixSidebarTabCoords) - - --Stat panels, atm it looks like 7 is the max - for i=1, 7 do - _G["CharacterStatsPaneCategory"..i]:StripTextures() - end - - --Reputation - local function UpdateFactionSkins() - ReputationListScrollFrame:StripTextures() - ReputationFrame:StripTextures(true) - for i=1, GetNumFactions() do - local statusbar = _G["ReputationBar"..i.."ReputationBar"] - - if statusbar then - statusbar:SetStatusBarTexture(C["media"].normTex) - - if not statusbar.backdrop then - statusbar:CreateBackdrop("Default") - end - - _G["ReputationBar"..i.."Background"]:SetTexture(nil) - _G["ReputationBar"..i.."LeftLine"]:Kill() - _G["ReputationBar"..i.."BottomLine"]:Kill() - _G["ReputationBar"..i.."ReputationBarHighlight1"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarHighlight2"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarAtWarHighlight1"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarAtWarHighlight2"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarLeftTexture"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarRightTexture"]:SetTexture(nil) - - end - end - ReputationDetailFrame:StripTextures() - ReputationDetailFrame:SetTemplate("Default") - ReputationDetailFrame:Point("TOPLEFT", ReputationFrame, "TOPRIGHT", 4, -28) - end - ReputationFrame:HookScript("OnShow", UpdateFactionSkins) - hooksecurefunc("ReputationFrame_OnEvent", UpdateFactionSkins) - T.SkinCloseButton(ReputationDetailCloseButton) - T.SkinCheckBox(ReputationDetailAtWarCheckBox) - T.SkinCheckBox(ReputationDetailInactiveCheckBox) - T.SkinCheckBox(ReputationDetailMainScreenCheckBox) - - --Currency - TokenFrame:HookScript("OnShow", function() - for i=1, GetCurrencyListSize() do - local button = _G["TokenFrameContainerButton"..i] - - if button then - button.highlight:Kill() - button.categoryMiddle:Kill() - button.categoryLeft:Kill() - button.categoryRight:Kill() - - if button.icon then - button.icon:SetTexCoord(.08, .92, .08, .92) - end - end - end - TokenFramePopup:StripTextures() - TokenFramePopup:SetTemplate("Default") - TokenFramePopup:Point("TOPLEFT", TokenFrame, "TOPRIGHT", 4, -28) - end) - T.SkinScrollBar(TokenFrameContainerScrollBar) - - --Pet - PetModelFrame:CreateBackdrop("Default") - PetPaperDollFrameExpBar:StripTextures() - PetPaperDollFrameExpBar:SetStatusBarTexture(C["media"].normTex) - PetPaperDollFrameExpBar:CreateBackdrop("Default") - T.SkinRotateButton(PetModelFrameRotateRightButton) - T.SkinRotateButton(PetModelFrameRotateLeftButton) - PetModelFrameRotateRightButton:ClearAllPoints() - PetModelFrameRotateRightButton:Point("LEFT", PetModelFrameRotateLeftButton, "RIGHT", 4, 0) - - local xtex = PetPaperDollPetInfo:GetRegions() - xtex:SetTexCoord(.12, .63, .15, .55) - PetPaperDollPetInfo:CreateBackdrop("Default") - PetPaperDollPetInfo:Size(24, 24) - - -- a request to color item by rarity on character frame. - local function ColorItemBorder() - for _, slot in pairs(slots) do - -- Colour the equipment slots by rarity - local target = _G["Character"..slot] - local slotId, _, _ = GetInventorySlotInfo(slot) - local itemId = GetInventoryItemID("player", slotId) - - if itemId then - local _, _, rarity, _, _, _, _, _, _, _, _ = GetItemInfo(itemId) - if rarity then - target.backdrop:SetBackdropBorderColor(GetItemQualityColor(rarity)) - end - else - target.backdrop:SetBackdropBorderColor(unpack(C.media.bordercolor)) - end - end - end - - -- execute item coloring everytime we open character frame - CharacterFrame:HookScript("OnShow", ColorItemBorder) - - -- execute item coloring everytime an item is changed - local CheckItemBorderColor = CreateFrame("Frame") - CheckItemBorderColor:RegisterEvent("PLAYER_EQUIPMENT_CHANGED") - CheckItemBorderColor:SetScript("OnEvent", ColorItemBorder) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/chat.lua b/Tukui/modules/skins/blizzard/chat.lua deleted file mode 100644 index 0ac4448..0000000 --- a/Tukui/modules/skins/blizzard/chat.lua +++ /dev/null @@ -1,246 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local frames = { - "ChatConfigFrame", - "ChatConfigCategoryFrame", - "ChatConfigBackgroundFrame", - "ChatConfigChatSettingsClassColorLegend", - "ChatConfigChannelSettingsClassColorLegend", - "ChatConfigCombatSettingsFilters", - "ChatConfigCombatSettingsFiltersScrollFrame", - "CombatConfigColorsHighlighting", - "CombatConfigColorsColorizeUnitName", - "CombatConfigColorsColorizeSpellNames", - "CombatConfigColorsColorizeDamageNumber", - "CombatConfigColorsColorizeDamageSchool", - "CombatConfigColorsColorizeEntireLine", - "ChatConfigChatSettingsLeft", - "ChatConfigOtherSettingsCombat", - "ChatConfigOtherSettingsPVP", - "ChatConfigOtherSettingsSystem", - "ChatConfigOtherSettingsCreature", - "ChatConfigChannelSettingsLeft", - "CombatConfigMessageSourcesDoneBy", - "CombatConfigMessageSourcesDoneTo", - "CombatConfigColorsUnitColors", - } - - for i = 1, getn(frames) do - local SkinFrames = _G[frames[i]] - SkinFrames:StripTextures() - SkinFrames:SetTemplate("Default") - end - - local otherframe = { - "CombatConfigColorsColorizeSpellNames", - "CombatConfigColorsColorizeDamageNumber", - "CombatConfigColorsColorizeDamageSchool", - "CombatConfigColorsColorizeEntireLine", - } - - for i = 1, getn(otherframe) do - local SkinFrames = _G[otherframe[i]] - SkinFrames:ClearAllPoints() - if SkinFrames == CombatConfigColorsColorizeSpellNames then - SkinFrames:Point("TOP",CombatConfigColorsColorizeUnitName,"BOTTOM",0,-2) - else - SkinFrames:Point("TOP",_G[otherframe[i-1]],"BOTTOM",0,-2) - end - end - - ChatConfigChannelSettingsLeft:RegisterEvent("PLAYER_ENTERING_WORLD") - ChatConfigChannelSettingsLeft:SetScript("OnEvent", function(self, event) - ChatConfigChannelSettingsLeft:UnregisterEvent("PLAYER_ENTERING_WORLD") - for i = 1,#ChatConfigChannelSettingsLeft.checkBoxTable do - _G["ChatConfigChannelSettingsLeftCheckBox"..i]:StripTextures() - _G["ChatConfigChannelSettingsLeftCheckBox"..i]:CreateBackdrop() - _G["ChatConfigChannelSettingsLeftCheckBox"..i].backdrop:Point("TOPLEFT",3,-1) - _G["ChatConfigChannelSettingsLeftCheckBox"..i].backdrop:Point("BOTTOMRIGHT",-3,1) - _G["ChatConfigChannelSettingsLeftCheckBox"..i]:SetHeight(ChatConfigOtherSettingsCombatCheckBox1:GetHeight()) - T.SkinCheckBox(_G["ChatConfigChannelSettingsLeftCheckBox"..i.."Check"]) - T.SkinCheckBox(_G["ChatConfigChannelSettingsLeftCheckBox"..i.."ColorClasses"]) - _G["ChatConfigChannelSettingsLeftCheckBox"..i.."ColorClasses"]:SetHeight(ChatConfigChatSettingsLeftCheckBox1Check:GetHeight()) - end - end) - - --Makes the skin work, but only after /reload ui :o (found in chatconfingframe.xml) - CreateChatChannelList(self, GetChannelList()) - ChatConfig_CreateCheckboxes(ChatConfigChannelSettingsLeft, CHAT_CONFIG_CHANNEL_LIST, "ChatConfigCheckBoxWithSwatchAndClassColorTemplate", CHANNELS) - ChatConfig_UpdateCheckboxes(ChatConfigChannelSettingsLeft) - - - ChatConfigBackgroundFrame:SetScript("OnShow", function(self) - -- >> Chat >> Chat Settings - for i = 1,#CHAT_CONFIG_CHAT_LEFT do - _G["ChatConfigChatSettingsLeftCheckBox"..i]:StripTextures() - _G["ChatConfigChatSettingsLeftCheckBox"..i]:CreateBackdrop() - _G["ChatConfigChatSettingsLeftCheckBox"..i].backdrop:Point("TOPLEFT",3,-1) - _G["ChatConfigChatSettingsLeftCheckBox"..i].backdrop:Point("BOTTOMRIGHT",-3,1) - _G["ChatConfigChatSettingsLeftCheckBox"..i]:SetHeight(ChatConfigOtherSettingsCombatCheckBox1:GetHeight()) - T.SkinCheckBox(_G["ChatConfigChatSettingsLeftCheckBox"..i.."Check"]) - T.SkinCheckBox(_G["ChatConfigChatSettingsLeftCheckBox"..i.."ColorClasses"]) - _G["ChatConfigChatSettingsLeftCheckBox"..i.."ColorClasses"]:SetHeight(ChatConfigChatSettingsLeftCheckBox1Check:GetHeight()) - end - - -- >> Other >> Combat - for i = 1,#CHAT_CONFIG_OTHER_COMBAT do - _G["ChatConfigOtherSettingsCombatCheckBox"..i]:StripTextures() - _G["ChatConfigOtherSettingsCombatCheckBox"..i]:CreateBackdrop() - _G["ChatConfigOtherSettingsCombatCheckBox"..i].backdrop:Point("TOPLEFT",3,-1) - _G["ChatConfigOtherSettingsCombatCheckBox"..i].backdrop:Point("BOTTOMRIGHT",-3,1) - T.SkinCheckBox(_G["ChatConfigOtherSettingsCombatCheckBox"..i.."Check"]) - end - - -- >> Other >> PvP - for i = 1,#CHAT_CONFIG_OTHER_PVP do - _G["ChatConfigOtherSettingsPVPCheckBox"..i]:StripTextures() - _G["ChatConfigOtherSettingsPVPCheckBox"..i]:CreateBackdrop() - _G["ChatConfigOtherSettingsPVPCheckBox"..i].backdrop:Point("TOPLEFT",3,-1) - _G["ChatConfigOtherSettingsPVPCheckBox"..i].backdrop:Point("BOTTOMRIGHT",-3,1) - T.SkinCheckBox(_G["ChatConfigOtherSettingsPVPCheckBox"..i.."Check"]) - end - - -- >> Other >> System - for i = 1,#CHAT_CONFIG_OTHER_SYSTEM do - _G["ChatConfigOtherSettingsSystemCheckBox"..i]:StripTextures() - _G["ChatConfigOtherSettingsSystemCheckBox"..i]:CreateBackdrop() - _G["ChatConfigOtherSettingsSystemCheckBox"..i].backdrop:Point("TOPLEFT",3,-1) - _G["ChatConfigOtherSettingsSystemCheckBox"..i].backdrop:Point("BOTTOMRIGHT",-3,1) - T.SkinCheckBox(_G["ChatConfigOtherSettingsSystemCheckBox"..i.."Check"]) - end - - -- >> Other >> Creatures - for i = 1,#CHAT_CONFIG_CHAT_CREATURE_LEFT do - _G["ChatConfigOtherSettingsCreatureCheckBox"..i]:StripTextures() - _G["ChatConfigOtherSettingsCreatureCheckBox"..i]:CreateBackdrop() - _G["ChatConfigOtherSettingsCreatureCheckBox"..i].backdrop:Point("TOPLEFT",3,-1) - _G["ChatConfigOtherSettingsCreatureCheckBox"..i].backdrop:Point("BOTTOMRIGHT",-3,1) - T.SkinCheckBox(_G["ChatConfigOtherSettingsCreatureCheckBox"..i.."Check"]) - end - - -- >> Sources >> DoneBy - for i = 1,#COMBAT_CONFIG_MESSAGESOURCES_BY do - _G["CombatConfigMessageSourcesDoneByCheckBox"..i]:StripTextures() - _G["CombatConfigMessageSourcesDoneByCheckBox"..i]:CreateBackdrop() - _G["CombatConfigMessageSourcesDoneByCheckBox"..i].backdrop:Point("TOPLEFT",3,-1) - _G["CombatConfigMessageSourcesDoneByCheckBox"..i].backdrop:Point("BOTTOMRIGHT",-3,1) - T.SkinCheckBox(_G["CombatConfigMessageSourcesDoneByCheckBox"..i.."Check"]) - end - - -- >> Sources >> DoneTo - for i = 1,#COMBAT_CONFIG_MESSAGESOURCES_TO do - _G["CombatConfigMessageSourcesDoneToCheckBox"..i]:StripTextures() - _G["CombatConfigMessageSourcesDoneToCheckBox"..i]:CreateBackdrop() - _G["CombatConfigMessageSourcesDoneToCheckBox"..i].backdrop:Point("TOPLEFT",3,-1) - _G["CombatConfigMessageSourcesDoneToCheckBox"..i].backdrop:Point("BOTTOMRIGHT",-3,1) - T.SkinCheckBox(_G["CombatConfigMessageSourcesDoneToCheckBox"..i.."Check"]) - end - - -- >> Combat >> Colors >> Unit Colors - for i = 1,#COMBAT_CONFIG_UNIT_COLORS do - _G["CombatConfigColorsUnitColorsSwatch"..i]:StripTextures() - _G["CombatConfigColorsUnitColorsSwatch"..i]:CreateBackdrop() - _G["CombatConfigColorsUnitColorsSwatch"..i].backdrop:Point("TOPLEFT",3,-1) - _G["CombatConfigColorsUnitColorsSwatch"..i].backdrop:Point("BOTTOMRIGHT",-3,1) - end - - -- >> Combat >> Messages Types - for i=1,4 do - for j=1,4 do - if _G["CombatConfigMessageTypesLeftCheckBox"..i] and _G["CombatConfigMessageTypesLeftCheckBox"..i.."_"..j] then - T.SkinCheckBox(_G["CombatConfigMessageTypesLeftCheckBox"..i]) - T.SkinCheckBox(_G["CombatConfigMessageTypesLeftCheckBox"..i.."_"..j]) - end - end - for j=1,10 do - if _G["CombatConfigMessageTypesRightCheckBox"..i] and _G["CombatConfigMessageTypesRightCheckBox"..i.."_"..j] then - T.SkinCheckBox(_G["CombatConfigMessageTypesRightCheckBox"..i]) - T.SkinCheckBox(_G["CombatConfigMessageTypesRightCheckBox"..i.."_"..j]) - end - end - T.SkinCheckBox(_G["CombatConfigMessageTypesMiscCheckBox"..i]) - end - end) - - -- >> Combat >> Tabs - for i = 1,#COMBAT_CONFIG_TABS do - local cctab = _G["CombatConfigTab"..i] - if cctab then - T.SkinTab(cctab) - cctab:SetHeight(cctab:GetHeight()-2) - cctab:SetWidth(math.ceil(cctab:GetWidth()+1.6)) - _G["CombatConfigTab"..i.."Text"]:SetPoint("BOTTOM",0,10) - end - end - CombatConfigTab1:ClearAllPoints() - CombatConfigTab1:SetPoint("BOTTOMLEFT",ChatConfigBackgroundFrame,"TOPLEFT",6,-2) - - local ccbuttons = { - "ChatConfigFrameOkayButton", - "ChatConfigFrameDefaultButton", - "CombatLogDefaultButton", - "ChatConfigCombatSettingsFiltersDeleteButton", - "ChatConfigCombatSettingsFiltersAddFilterButton", - "ChatConfigCombatSettingsFiltersCopyFilterButton", - "CombatConfigSettingsSaveButton", - } - for i = 1, getn(ccbuttons) do - local ccbtn = _G[ccbuttons[i]] - if ccbtn then - T.SkinButton(ccbtn) - ccbtn:ClearAllPoints() - end - end - ChatConfigFrameOkayButton:SetPoint("TOPRIGHT",ChatConfigBackgroundFrame,"BOTTOMRIGHT",-3,-5) - ChatConfigFrameDefaultButton:SetPoint("TOPLEFT",ChatConfigCategoryFrame,"BOTTOMLEFT",1,-5) - CombatLogDefaultButton:SetPoint("TOPLEFT",ChatConfigCategoryFrame,"BOTTOMLEFT",1,-5) - ChatConfigCombatSettingsFiltersDeleteButton:SetPoint("TOPRIGHT",ChatConfigCombatSettingsFilters,"BOTTOMRIGHT",-3,-1) - ChatConfigCombatSettingsFiltersCopyFilterButton:SetPoint("RIGHT",ChatConfigCombatSettingsFiltersDeleteButton,"LEFT",-2,0) - ChatConfigCombatSettingsFiltersAddFilterButton:SetPoint("RIGHT",ChatConfigCombatSettingsFiltersCopyFilterButton,"LEFT",-2,0) - - local cccheckbox = { - "CombatConfigColorsHighlightingLine", - "CombatConfigColorsHighlightingAbility", - "CombatConfigColorsHighlightingDamage", - "CombatConfigColorsHighlightingSchool", - "CombatConfigColorsColorizeUnitNameCheck", - "CombatConfigColorsColorizeSpellNamesCheck", - "CombatConfigColorsColorizeSpellNamesSchoolColoring", - "CombatConfigColorsColorizeDamageNumberCheck", - "CombatConfigColorsColorizeDamageNumberSchoolColoring", - "CombatConfigColorsColorizeDamageSchoolCheck", - "CombatConfigColorsColorizeEntireLineCheck", - "CombatConfigFormattingShowTimeStamp", - "CombatConfigFormattingShowBraces", - "CombatConfigFormattingUnitNames", - "CombatConfigFormattingSpellNames", - "CombatConfigFormattingItemNames", - "CombatConfigFormattingFullText", - "CombatConfigSettingsShowQuickButton", - "CombatConfigSettingsSolo", - "CombatConfigSettingsParty", - "CombatConfigSettingsRaid", - } - for i = 1, getn(cccheckbox) do - local ccbtn = _G[cccheckbox[i]] - T.SkinCheckBox(_G[cccheckbox[i]]) - end - - T.SkinNextPrevButton(ChatConfigMoveFilterUpButton,true) - T.SkinNextPrevButton(ChatConfigMoveFilterDownButton,true) - ChatConfigMoveFilterUpButton:ClearAllPoints() - ChatConfigMoveFilterDownButton:ClearAllPoints() - ChatConfigMoveFilterUpButton:SetPoint("TOPLEFT",ChatConfigCombatSettingsFilters,"BOTTOMLEFT",3,0) - ChatConfigMoveFilterDownButton:SetPoint("LEFT",ChatConfigMoveFilterUpButton,24,0) - - T.SkinEditBox(CombatConfigSettingsNameEditBox) - - ChatConfigFrame:Size(680,596) - ChatConfigFrameHeader:ClearAllPoints() - ChatConfigFrameHeader:SetPoint("TOP", ChatConfigFrame, 0, -5) - - T.SkinScrollBar(ChannelRosterScrollFrameScrollBar) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/colorpicker.lua b/Tukui/modules/skins/blizzard/colorpicker.lua deleted file mode 100644 index 655b465..0000000 --- a/Tukui/modules/skins/blizzard/colorpicker.lua +++ /dev/null @@ -1,18 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - ColorPickerFrame:CreateBackdrop("Default") - T.SkinButton(ColorPickerOkayButton) - T.SkinButton(ColorPickerCancelButton) - ColorPickerOkayButton:ClearAllPoints() - ColorPickerOkayButton:Point("RIGHT", ColorPickerCancelButton,"LEFT", -2, 0) - -- we cant use StripTexture() here, doing it manually - for i=1, ColorPickerFrame:GetNumRegions() do - local region = select(i, ColorPickerFrame:GetRegions()) - if region:GetObjectType() == "Texture" and (region:GetTexture() == "Interface\\DialogFrame\\UI-DialogBox-Border" or region:GetTexture() == "Interface\\DialogFrame\\UI-DialogBox-Background" or region:GetTexture() == "Interface\\DialogFrame\\UI-DialogBox-Header") then - region:SetTexture(nil) - end - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/debugtools.lua b/Tukui/modules/skins/blizzard/debugtools.lua deleted file mode 100644 index a003881..0000000 --- a/Tukui/modules/skins/blizzard/debugtools.lua +++ /dev/null @@ -1,64 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - -- always scale it at the same value as UIParent - ScriptErrorsFrame:SetParent(UIParent) - - local noscalemult = T.mult * C["general"].uiscale - local bg = { - bgFile = C["media"].blank, - edgeFile = C["media"].blank, - tile = false, tileSize = 0, edgeSize = noscalemult, - insets = { left = -noscalemult, right = -noscalemult, top = -noscalemult, bottom = -noscalemult} - } - - ScriptErrorsFrame:SetBackdrop(bg) - ScriptErrorsFrame:SetBackdropColor(unpack(C.media.backdropcolor)) - ScriptErrorsFrame:SetBackdropBorderColor(unpack(C.media.bordercolor)) - - EventTraceFrame:SetTemplate("Default") - - local texs = { - "TopLeft", - "TopRight", - "Top", - "BottomLeft", - "BottomRight", - "Bottom", - "Left", - "Right", - "TitleBG", - "DialogBG", - } - - for i=1, #texs do - _G["ScriptErrorsFrame"..texs[i]]:SetTexture(nil) - _G["EventTraceFrame"..texs[i]]:SetTexture(nil) - end - - local bg = { - bgFile = C["media"].normTex, - edgeFile = C["media"].blank, - tile = false, tileSize = 0, edgeSize = noscalemult, - insets = { left = -noscalemult, right = -noscalemult, top = -noscalemult, bottom = -noscalemult} - } - - for i=1, ScriptErrorsFrame:GetNumChildren() do - local child = select(i, ScriptErrorsFrame:GetChildren()) - if child:GetObjectType() == "Button" and not child:GetName() then - - T.SkinButton(child) - child:SetBackdrop(bg) - child:SetBackdropColor(unpack(C.media.backdropcolor)) - child:SetBackdropBorderColor(unpack(C.media.bordercolor)) - end - end - - T.SkinCloseButton(ScriptErrorsFrameClose) - T.SkinScrollBar(ScriptErrorsFrameScrollFrameScrollBar) - ScriptErrorsFrameScrollFrameScrollBar:ClearAllPoints() - ScriptErrorsFrameScrollFrameScrollBar:SetPoint("TOPRIGHT", 50, 14) - ScriptErrorsFrameScrollFrameScrollBar:SetPoint("BOTTOMRIGHT", 50, -20) -end - -T.SkinFuncs["Blizzard_DebugTools"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/dressup.lua b/Tukui/modules/skins/blizzard/dressup.lua deleted file mode 100644 index b30ba75..0000000 --- a/Tukui/modules/skins/blizzard/dressup.lua +++ /dev/null @@ -1,21 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - DressUpFrame:StripTextures(true) - DressUpFrame:CreateBackdrop("Default") - DressUpFrame.backdrop:CreateShadow("Default") - DressUpFrame.backdrop:Point("TOPLEFT", 6, 0) - DressUpFrame.backdrop:Point("BOTTOMRIGHT", -32, 70) - - T.SkinButton(DressUpFrameResetButton) - T.SkinButton(DressUpFrameCancelButton) - T.SkinCloseButton(DressUpFrameCloseButton, DressUpFrame.backdrop) - if T.toc < 40300 then - T.SkinRotateButton(DressUpModelRotateLeftButton) - T.SkinRotateButton(DressUpModelRotateRightButton) - DressUpModelRotateRightButton:Point("TOPLEFT", DressUpModelRotateLeftButton, "TOPRIGHT", 2, 0) - end - DressUpFrameResetButton:Point("RIGHT", DressUpFrameCancelButton, "LEFT", -2, 0) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/friends.lua b/Tukui/modules/skins/blizzard/friends.lua deleted file mode 100644 index 7976e16..0000000 --- a/Tukui/modules/skins/blizzard/friends.lua +++ /dev/null @@ -1,258 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local tabs = { - "LeftDisabled", - "MiddleDisabled", - "RightDisabled", - "Left", - "Middle", - "Right", - } - - local function SkinSocialHeaderTab(tab) - if not tab then return end - for _, object in pairs(tabs) do - local tex = _G[tab:GetName()..object] - tex:SetTexture(nil) - end - tab:GetHighlightTexture():SetTexture(nil) - tab.backdrop = CreateFrame("Frame", nil, tab) - tab.backdrop:SetTemplate("Default") - tab.backdrop:SetFrameLevel(tab:GetFrameLevel() - 1) - tab.backdrop:Point("TOPLEFT", 3, -8) - tab.backdrop:Point("BOTTOMRIGHT", -6, 0) - end - - local StripAllTextures = { - "FriendsListFrame", - "FriendsTabHeader", - "FriendsFrameFriendsScrollFrame", - "WhoFrameColumnHeader1", - "WhoFrameColumnHeader2", - "WhoFrameColumnHeader3", - "WhoFrameColumnHeader4", - "ChannelListScrollFrame", - "ChannelRoster", - "FriendsFramePendingButton1", - "FriendsFramePendingButton2", - "FriendsFramePendingButton3", - "FriendsFramePendingButton4", - "ChannelFrameDaughterFrame", - "AddFriendFrame", - "AddFriendNoteFrame", - "FriendsFriendsFrame", - "FriendsFriendsList", - "FriendsFriendsNoteFrame", - "ChannelFrameLeftInset", - "ChannelFrameRightInset", - "LFRQueueFrameRoleInset", - "LFRQueueFrameListInset", - "LFRQueueFrameCommentInset", - "WhoFrameListInset", - "WhoFrameEditBoxInset", - } - - local KillTextures = { - "FriendsFrameInset", - "FriendsFrameTopLeft", - "FriendsFrameTopRight", - "FriendsFrameBottomLeft", - "FriendsFrameBottomRight", - "ChannelFrameVerticalBar", - "FriendsFrameBroadcastInputLeft", - "FriendsFrameBroadcastInputRight", - "FriendsFrameBroadcastInputMiddle", - "ChannelFrameDaughterFrameChannelNameLeft", - "ChannelFrameDaughterFrameChannelNameRight", - "ChannelFrameDaughterFrameChannelNameMiddle", - "ChannelFrameDaughterFrameChannelPasswordLeft", - "ChannelFrameDaughterFrameChannelPasswordRight", - "ChannelFrameDaughterFrameChannelPasswordMiddle", - } - - local buttons = { - "FriendsFrameAddFriendButton", - "FriendsFrameSendMessageButton", - "WhoFrameWhoButton", - "WhoFrameAddFriendButton", - "WhoFrameGroupInviteButton", - "ChannelFrameNewButton", - "FriendsFrameIgnorePlayerButton", - "FriendsFrameUnsquelchButton", - "FriendsFramePendingButton1AcceptButton", - "FriendsFramePendingButton1DeclineButton", - "FriendsFramePendingButton2AcceptButton", - "FriendsFramePendingButton2DeclineButton", - "FriendsFramePendingButton3AcceptButton", - "FriendsFramePendingButton3DeclineButton", - "FriendsFramePendingButton4AcceptButton", - "FriendsFramePendingButton4DeclineButton", - "ChannelFrameDaughterFrameOkayButton", - "ChannelFrameDaughterFrameCancelButton", - "AddFriendEntryFrameAcceptButton", - "AddFriendEntryFrameCancelButton", - "AddFriendInfoFrameContinueButton", - "FriendsFriendsSendRequestButton", - "FriendsFriendsCloseButton", - } - - for _, button in pairs(buttons) do - T.SkinButton(_G[button]) - end - --Reposition buttons - WhoFrameWhoButton:Point("RIGHT", WhoFrameAddFriendButton, "LEFT", -2, 0) - WhoFrameAddFriendButton:Point("RIGHT", WhoFrameGroupInviteButton, "LEFT", -2, 0) - WhoFrameGroupInviteButton:Point("BOTTOMRIGHT", WhoFrame, "BOTTOMRIGHT", -44, 82) - --Resize Buttons - WhoFrameWhoButton:Size(WhoFrameWhoButton:GetWidth() - 4, WhoFrameWhoButton:GetHeight()) - WhoFrameAddFriendButton:Size(WhoFrameAddFriendButton:GetWidth() - 4, WhoFrameAddFriendButton:GetHeight()) - WhoFrameGroupInviteButton:Size(WhoFrameGroupInviteButton:GetWidth() - 4, WhoFrameGroupInviteButton:GetHeight()) - T.SkinEditBox(WhoFrameEditBox) - WhoFrameEditBox:Height(WhoFrameEditBox:GetHeight() - 15) - WhoFrameEditBox:Point("BOTTOM", WhoFrame, "BOTTOM", -10, 108) - WhoFrameEditBox:Width(WhoFrameEditBox:GetWidth() + 17) - T.SkinScrollBar(FriendsFrameFriendsScrollFrameScrollBar) - T.SkinScrollBar(WhoListScrollFrameScrollBar) - T.SkinScrollBar(FriendsFriendsScrollFrameScrollBar) - - for _, texture in pairs(KillTextures) do - if _G[texture] then - _G[texture]:Kill() - end - end - - for _, object in pairs(StripAllTextures) do - if _G[object] then - _G[object]:StripTextures() - end - end - FriendsFrame:StripTextures(true) - - T.SkinEditBox(AddFriendNameEditBox) - AddFriendFrame:SetTemplate("Default") - - --Who Frame - local function UpdateWhoSkins() - WhoListScrollFrame:StripTextures() - end - --Channel Frame - local function UpdateChannel() - ChannelRosterScrollFrame:StripTextures() - end - --BNet Frame - FriendsFrameBroadcastInput:CreateBackdrop("Default") - ChannelFrameDaughterFrameChannelName:CreateBackdrop("Default") - ChannelFrameDaughterFrameChannelPassword:CreateBackdrop("Default") - - ChannelFrame:HookScript("OnShow", UpdateChannel) - hooksecurefunc("FriendsFrame_OnEvent", UpdateChannel) - - WhoFrame:HookScript("OnShow", UpdateWhoSkins) - hooksecurefunc("FriendsFrame_OnEvent", UpdateWhoSkins) - - ChannelFrameDaughterFrame:CreateBackdrop("Default") - - T.SkinCloseButton(ChannelFrameDaughterFrameDetailCloseButton,ChannelFrameDaughterFrame) - T.SkinCloseButton(FriendsFrameCloseButton,FriendsFrame.backdrop) - if T.toc >= 40300 then - FriendsFrameCloseButton:ClearAllPoints() - FriendsFrameCloseButton:SetPoint("TOPRIGHT", 0, 0) - end - T.SkinDropDownBox(WhoFrameDropDown,150) - T.SkinDropDownBox(FriendsFrameStatusDropDown,70) - if T.toc >= 40300 then - T.SkinButton(FriendsTabHeaderSoRButton) - FriendsTabHeaderSoRButton:StyleButton() - FriendsTabHeaderSoRButton.icon:SetTexCoord(.08, .92, .08, .92) - FriendsTabHeaderSoRButton.icon:ClearAllPoints() - FriendsTabHeaderSoRButton.icon:Point("TOPLEFT", 2, -2) - FriendsTabHeaderSoRButton.icon:Point("BOTTOMRIGHT", -2, 2) - - ScrollOfResurrectionFrame:StripTextures() - ScrollOfResurrectionFrameNoteFrame:StripTextures() - ScrollOfResurrectionFrame:SetTemplate("Transparent") - ScrollOfResurrectionFrameNoteFrame:SetTemplate("Overlay") - T.SkinButton(ScrollOfResurrectionFrameAcceptButton) - T.SkinButton(ScrollOfResurrectionFrameCancelButton) - T.SkinEditBox(ScrollOfResurrectionFrameTargetEditBox) - ScrollOfResurrectionFrameTargetEditBox:Height(ScrollOfResurrectionFrameTargetEditBox:GetHeight() - 5) - end - - --Bottom Tabs - for i=1, 4 do - T.SkinTab(_G["FriendsFrameTab"..i]) - end - - for i=1, 3 do - SkinSocialHeaderTab(_G["FriendsTabHeaderTab"..i]) - end - - local function Channel() - for i=1, MAX_DISPLAY_CHANNEL_BUTTONS do - local button = _G["ChannelButton"..i] - if button then - button:StripTextures() - button:SetHighlightTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight") - - _G["ChannelButton"..i.."Text"]:SetFont(C.media.font, 12) - end - end - end - hooksecurefunc("ChannelList_Update", Channel) - - --View Friends BN Frame - FriendsFriendsFrame:CreateBackdrop("Default") - - T.SkinEditBox(FriendsFriendsList) - T.SkinEditBox(FriendsFriendsNoteFrame) - T.SkinDropDownBox(FriendsFriendsFrameDropDown,150) - - --Raid Browser Tab - for i=1, 2 do - local tab = _G["LFRParentFrameSideTab"..i] - if tab then - local icon = tab:GetNormalTexture():GetTexture() - - tab:StripTextures() - tab:SetNormalTexture(icon) - tab:GetNormalTexture():SetTexCoord(.08, .92, .08, .92) - tab:GetNormalTexture():ClearAllPoints() - - tab:GetNormalTexture():Point("TOPLEFT", 2, -2) - tab:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - - tab:CreateBackdrop("Default") - tab.backdrop:SetAllPoints() - tab:StyleButton(true) - - local point, relatedTo, point2, x, y = tab:GetPoint() - tab:Point(point, relatedTo, point2, 1, y) - end - end - - -- 4.3+ only stuff - if T.toc >= 40300 then - -- bug on PTR with WhoFrame, fixing them - WhoFrameEditBox:ClearAllPoints() - WhoFrameWhoButton:ClearAllPoints() - WhoFrameAddFriendButton:ClearAllPoints() - WhoFrameGroupInviteButton:ClearAllPoints() - WhoFrameWhoButton:Point("BOTTOMLEFT", 4, 4) - WhoFrameGroupInviteButton:Point("BOTTOMRIGHT", -4, 4) - WhoFrameAddFriendButton:Point("LEFT", WhoFrameWhoButton, "RIGHT", 4, 0) - WhoFrameAddFriendButton:Width(125) - WhoListScrollFrame:ClearAllPoints() - WhoListScrollFrame:SetPoint("TOPRIGHT", WhoFrameListInset, -25, 0) - WhoFrameEditBox:Point("BOTTOM", 0, 32) - WhoFrameEditBox:Point("LEFT", 6, 0) - WhoFrameEditBox:Point("RIGHT", -6, 0) - FriendsFrame:SetTemplate("Default") - else - FriendsFrame:CreateBackdrop("Default") - FriendsFrame.backdrop:Point( "TOPLEFT", FriendsFrame, "TOPLEFT", 11,-12) - FriendsFrame.backdrop:Point( "BOTTOMRIGHT", FriendsFrame, "BOTTOMRIGHT", -35, 76) - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/glyph.lua b/Tukui/modules/skins/blizzard/glyph.lua deleted file mode 100644 index 4b2636e..0000000 --- a/Tukui/modules/skins/blizzard/glyph.lua +++ /dev/null @@ -1,69 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - --GLYPHS TAB - GlyphFrameSparkleFrame:CreateBackdrop("Default") - GlyphFrameSparkleFrame.backdrop:Point( "TOPLEFT", GlyphFrameSparkleFrame, "TOPLEFT", 3, -3 ) - GlyphFrameSparkleFrame.backdrop:Point( "BOTTOMRIGHT", GlyphFrameSparkleFrame, "BOTTOMRIGHT", -3, 3 ) - T.SkinEditBox(GlyphFrameSearchBox) - T.SkinDropDownBox(GlyphFrameFilterDropDown, 212) - - GlyphFrameBackground:SetParent(GlyphFrameSparkleFrame) - GlyphFrameBackground:SetPoint("TOPLEFT", 4, -4) - GlyphFrameBackground:SetPoint("BOTTOMRIGHT", -4, 4) - - for i=1, 9 do - _G["GlyphFrameGlyph"..i]:SetFrameLevel(_G["GlyphFrameGlyph"..i]:GetFrameLevel() + 5) - end - - for i=1, 3 do - _G["GlyphFrameHeader"..i]:StripTextures() - end - - local function Glyphs(self, first, i) - local button = _G["GlyphFrameScrollFrameButton"..i] - local icon = _G["GlyphFrameScrollFrameButton"..i.."Icon"] - - if first then - button:StripTextures() - end - - if icon then - icon:SetTexCoord(.08, .92, .08, .92) - T.SkinButton(button) - end - end - - for i=1, 10 do - Glyphs(nil, true, i) - end - - GlyphFrameClearInfoFrameIcon:SetTexCoord(.08, .92, .08, .92) - GlyphFrameClearInfoFrameIcon:ClearAllPoints() - GlyphFrameClearInfoFrameIcon:Point("TOPLEFT", 2, -2) - GlyphFrameClearInfoFrameIcon:Point("BOTTOMRIGHT", -2, 2) - - GlyphFrameClearInfoFrame:CreateBackdrop("Default", true) - GlyphFrameClearInfoFrame.backdrop:SetAllPoints() - GlyphFrameClearInfoFrame:StyleButton() - GlyphFrameClearInfoFrame:Size(25, 25) - - GlyphFrame.levelOverlay1:SetParent(GlyphFrameSparkleFrame) - GlyphFrame.levelOverlayText1:SetParent(GlyphFrameSparkleFrame) - GlyphFrame.levelOverlay2:SetParent(GlyphFrameSparkleFrame) - GlyphFrame.levelOverlayText2:SetParent(GlyphFrameSparkleFrame) - - T.SkinScrollBar(GlyphFrameScrollFrameScrollBar) - - local StripAllTextures = { - "GlyphFrameScrollFrame", - "GlyphFrameSideInset", - "GlyphFrameScrollFrameScrollChild", - } - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end -end - -T.SkinFuncs["Blizzard_GlyphUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/gossip.lua b/Tukui/modules/skins/blizzard/gossip.lua deleted file mode 100644 index f5a6d04..0000000 --- a/Tukui/modules/skins/blizzard/gossip.lua +++ /dev/null @@ -1,57 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local StripAllTextures = { - "GossipFrameGreetingPanel", - } - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end - - local KillTextures = { - "GossipFramePortrait", - } - - for _, texture in pairs(KillTextures) do - _G[texture]:Kill() - end - - local buttons = { - "GossipFrameGreetingGoodbyeButton", - } - - for i = 1, #buttons do - _G[buttons[i]]:StripTextures() - T.SkinButton(_G[buttons[i]]) - end - - - for i = 1, NUMGOSSIPBUTTONS do - obj = select(3,_G["GossipTitleButton"..i]:GetRegions()) - obj:SetTextColor(1,1,1) - end - - GossipGreetingText:SetTextColor(1,1,1) - GossipFrame:CreateBackdrop("Default") - GossipFrame.backdrop:Point("TOPLEFT", GossipFrame, "TOPLEFT", 15, -20) - GossipFrame.backdrop:Point("BOTTOMRIGHT", GossipFrame, "BOTTOMRIGHT", -30, 65) - T.SkinCloseButton(GossipFrameCloseButton,GossipFrame.backdrop) - T.SkinScrollBar(GossipGreetingScrollFrameScrollBar) - - - --Extreme hackage, blizzard makes button text on quest frame use hex color codes for some reason - hooksecurefunc("GossipFrameUpdate", function() - for i=1, NUMGOSSIPBUTTONS do - local button = _G["GossipTitleButton"..i] - - if button:GetFontString() then - if button:GetFontString():GetText() and button:GetFontString():GetText():find("|cff000000") then - button:GetFontString():SetText(string.gsub(button:GetFontString():GetText(), "|cff000000", "|cffFFFF00")) - end - end - end - end) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/greeting.lua b/Tukui/modules/skins/blizzard/greeting.lua deleted file mode 100644 index 1fd71cc..0000000 --- a/Tukui/modules/skins/blizzard/greeting.lua +++ /dev/null @@ -1,23 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - QuestFrameGreetingPanel:HookScript("OnShow", function() - QuestFrameGreetingPanel:StripTextures() - T.SkinButton(QuestFrameGreetingGoodbyeButton, true) - GreetingText:SetTextColor(1, 1, 1) - CurrentQuestsText:SetTextColor(1, 1, 0) - QuestGreetingFrameHorizontalBreak:Kill() - AvailableQuestsText:SetTextColor(1, 1, 0) - - for i=1, MAX_NUM_QUESTS do - local button = _G["QuestTitleButton"..i] - if button:GetFontString() then - if button:GetFontString():GetText() and button:GetFontString():GetText():find("|cff000000") then - button:GetFontString():SetText(string.gsub(button:GetFontString():GetText(), "|cff000000", "|cffFFFF00")) - end - end - end - end) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/guild.lua b/Tukui/modules/skins/blizzard/guild.lua deleted file mode 100644 index b5f5439..0000000 --- a/Tukui/modules/skins/blizzard/guild.lua +++ /dev/null @@ -1,268 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - GuildFrame:StripTextures(true) - GuildFrame:SetTemplate("Default") - GuildFrame:CreateShadow("Default") - GuildLevelFrame:Kill() - - T.SkinCloseButton(GuildMemberDetailCloseButton) - T.SkinCloseButton(GuildFrameCloseButton) - - local striptextures = { - "GuildNewPerksFrame", - "GuildFrameInset", - "GuildFrameBottomInset", - "GuildAllPerksFrame", - "GuildMemberDetailFrame", - "GuildMemberNoteBackground", - "GuildInfoFrameInfo", - "GuildLogContainer", - "GuildLogFrame", - "GuildRewardsFrame", - "GuildMemberOfficerNoteBackground", - "GuildTextEditContainer", - "GuildTextEditFrame", - "GuildRecruitmentRolesFrame", - "GuildRecruitmentAvailabilityFrame", - "GuildRecruitmentInterestFrame", - "GuildRecruitmentLevelFrame", - "GuildRecruitmentCommentFrame", - "GuildRecruitmentCommentInputFrame", - "GuildInfoFrameApplicantsContainer", - "GuildInfoFrameApplicants", - "GuildNewsBossModel", - "GuildNewsBossModelTextFrame", - "GuildInfoFrameApplicantsContainerScrollBar", - } - GuildRewardsFrameVisitText:ClearAllPoints() - GuildRewardsFrameVisitText:SetPoint("TOP", GuildRewardsFrame, "TOP", 0, 30) - for _, frame in pairs(striptextures) do - _G[frame]:StripTextures() - end - - GuildNewsBossModel:CreateBackdrop("Default") - GuildNewsBossModelTextFrame:CreateBackdrop("Default") - GuildNewsBossModelTextFrame.backdrop:Point("TOPLEFT", GuildNewsBossModel.backdrop, "BOTTOMLEFT", 0, -1) - GuildNewsBossModel:Point("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -43) - - local buttons = { - "GuildPerksToggleButton", - "GuildMemberRemoveButton", - "GuildMemberGroupInviteButton", - "GuildAddMemberButton", - "GuildViewLogButton", - "GuildControlButton", - "GuildRecruitmentListGuildButton", - "GuildTextEditFrameAcceptButton", - "GuildRecruitmentInviteButton", - "GuildRecruitmentMessageButton", - "GuildRecruitmentDeclineButton", - } - - for i, button in pairs(buttons) do - if i == 1 then - T.SkinButton(_G[button]) - else - T.SkinButton(_G[button], true) - end - end - - local checkbuttons = { - "Quest", - "Dungeon", - "Raid", - "PvP", - "RP", - "Weekdays", - "Weekends", - "LevelAny", - "LevelMax", - } - - for _, frame in pairs(checkbuttons) do - T.SkinCheckBox(_G["GuildRecruitment"..frame.."Button"]) - end - - T.SkinCheckBox(GuildRecruitmentTankButton:GetChildren()) - T.SkinCheckBox(GuildRecruitmentHealerButton:GetChildren()) - T.SkinCheckBox(GuildRecruitmentDamagerButton:GetChildren()) - - for i=1,5 do - T.SkinTab(_G["GuildFrameTab"..i]) - end - GuildXPFrame:ClearAllPoints() - GuildXPFrame:Point("TOP", GuildFrame, "TOP", 0, -40) - - T.SkinScrollBar(GuildPerksContainerScrollBar) - - GuildFactionBar:StripTextures() - GuildFactionBar.progress:SetTexture(C["media"].normTex) - GuildFactionBar:CreateBackdrop("Default") - GuildFactionBar.backdrop:Point("TOPLEFT", GuildFactionBar.progress, "TOPLEFT", -2, 2) - GuildFactionBar.backdrop:Point("BOTTOMRIGHT", GuildFactionBar, "BOTTOMRIGHT", -2, 0) - - GuildXPBarLeft:Kill() - GuildXPBarRight:Kill() - GuildXPBarMiddle:Kill() - GuildXPBarBG:Kill() - GuildXPBarShadow:Kill() - GuildXPBarCap:Kill() - GuildXPBar.progress:SetTexture(C["media"].normTex) - GuildXPBar:CreateBackdrop("Default") - GuildXPBar.backdrop:Point("TOPLEFT", GuildXPBar.progress, "TOPLEFT", -2, 2) - GuildXPBar.backdrop:Point("BOTTOMRIGHT", GuildXPBar, "BOTTOMRIGHT", -2, 4) - - GuildLatestPerkButton:StripTextures() - GuildLatestPerkButtonIconTexture:SetTexCoord(.08, .92, .08, .92) - GuildLatestPerkButtonIconTexture:ClearAllPoints() - GuildLatestPerkButtonIconTexture:Point("TOPLEFT", 2, -2) - GuildLatestPerkButton:CreateBackdrop("Default") - GuildLatestPerkButton.backdrop:Point("TOPLEFT", GuildLatestPerkButtonIconTexture, "TOPLEFT", -2, 2) - GuildLatestPerkButton.backdrop:Point("BOTTOMRIGHT", GuildLatestPerkButtonIconTexture, "BOTTOMRIGHT", 2, -2) - - GuildNextPerkButton:StripTextures() - GuildNextPerkButtonIconTexture:SetTexCoord(.08, .92, .08, .92) - GuildNextPerkButtonIconTexture:ClearAllPoints() - GuildNextPerkButtonIconTexture:Point("TOPLEFT", 2, -2) - GuildNextPerkButton:CreateBackdrop("Default") - GuildNextPerkButton.backdrop:Point("TOPLEFT", GuildNextPerkButtonIconTexture, "TOPLEFT", -2, 2) - GuildNextPerkButton.backdrop:Point("BOTTOMRIGHT", GuildNextPerkButtonIconTexture, "BOTTOMRIGHT", 2, -2) - - --Guild Perk buttons list - for i=1, 8 do - local button = _G["GuildPerksContainerButton"..i] - button:StripTextures() - - if button.icon then - button.icon:SetTexCoord(.08, .92, .08, .92) - button.icon:ClearAllPoints() - button.icon:Point("TOPLEFT", 2, -2) - button:CreateBackdrop("Default") - button.backdrop:Point("TOPLEFT", button.icon, "TOPLEFT", -2, 2) - button.backdrop:Point("BOTTOMRIGHT", button.icon, "BOTTOMRIGHT", 2, -2) - button.icon:SetParent(button.backdrop) - end - end - - --Roster - T.SkinScrollBar(GuildRosterContainerScrollBar) - T.SkinCheckBox(GuildRosterShowOfflineButton) - - - for i=1, 4 do - _G["GuildRosterColumnButton"..i]:StripTextures(true) - end - - T.SkinDropDownBox(GuildRosterViewDropdown, 200) - - for i=1, 14 do - T.SkinButton(_G["GuildRosterContainerButton"..i.."HeaderButton"], true) - end - - --Detail Frame - GuildMemberDetailFrame:SetTemplate("Default") - GuildMemberNoteBackground:SetTemplate("Default") - GuildMemberOfficerNoteBackground:SetTemplate("Default") - GuildMemberRankDropdown:SetFrameLevel(GuildMemberRankDropdown:GetFrameLevel() + 5) - T.SkinDropDownBox(GuildMemberRankDropdown, 175) - - --News - GuildNewsFrame:StripTextures() - for i=1, 17 do - _G["GuildNewsContainerButton"..i].header:Kill() - end - - GuildNewsFiltersFrame:StripTextures() - GuildNewsFiltersFrame:SetTemplate("Default") - T.SkinCloseButton(GuildNewsFiltersFrameCloseButton) - - for i=1, 7 do - T.SkinCheckBox(_G["GuildNewsFilterButton"..i]) - end - - GuildNewsFiltersFrame:Point("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -20) - T.SkinScrollBar(GuildNewsContainerScrollBar) - - --Info Frame - T.SkinScrollBar(GuildInfoDetailsFrameScrollBar) - T.SkinScrollBar(GuildInfoFrameApplicantsContainerScrollBar) - - for i=1, 3 do - _G["GuildInfoFrameTab"..i]:StripTextures() - end - - local backdrop1 = CreateFrame("Frame", nil, GuildInfoFrameInfo) - backdrop1:SetTemplate("Default") - backdrop1:SetFrameLevel(GuildInfoFrameInfo:GetFrameLevel() - 1) - backdrop1:Point("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -22) - backdrop1:Point("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 200) - - local backdrop2 = CreateFrame("Frame", nil, GuildInfoFrameInfo) - backdrop2:SetTemplate("Default") - backdrop2:SetFrameLevel(GuildInfoFrameInfo:GetFrameLevel() - 1) - backdrop2:Point("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -158) - backdrop2:Point("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 118) - - local backdrop3 = CreateFrame("Frame", nil, GuildInfoFrameInfo) - backdrop3:SetTemplate("Default") - backdrop3:SetFrameLevel(GuildInfoFrameInfo:GetFrameLevel() - 1) - backdrop3:Point("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -233) - backdrop3:Point("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 3) - - GuildRecruitmentCommentInputFrame:SetTemplate("Default") - - for _, button in next, GuildInfoFrameApplicantsContainer.buttons do - button.selectedTex:Kill() - button:GetHighlightTexture():Kill() - button:SetBackdrop(nil) - end - - --Text Edit Frame - GuildTextEditFrame:SetTemplate("Default") - T.SkinScrollBar(GuildTextEditScrollFrameScrollBar) - GuildTextEditContainer:SetTemplate("Default") - for i = 1, GuildTextEditFrame:GetNumChildren() do - local child = select(i, GuildTextEditFrame:GetChildren()) - local point = select(1, child:GetPoint()) - if point == "TOPRIGHT" then - T.SkinCloseButton(child) - else - T.SkinButton(child, true) - end - end - - --Guild Log - T.SkinScrollBar(GuildLogScrollFrameScrollBar) - GuildLogFrame:SetTemplate("Default") - - for i = 1, GuildLogFrame:GetNumChildren() do - local child = select(i, GuildLogFrame:GetChildren()) - local point = select(1, child:GetPoint()) - if point == "TOPRIGHT" then - T.SkinCloseButton(child) - else - T.SkinButton(child, true) - end - end - - --Rewards - T.SkinScrollBar(GuildRewardsContainerScrollBar) - - for i=1, 8 do - local button = _G["GuildRewardsContainerButton"..i] - button:StripTextures() - - if button.icon then - button.icon:SetTexCoord(.08, .92, .08, .92) - button.icon:ClearAllPoints() - button.icon:Point("TOPLEFT", 2, -2) - button:CreateBackdrop("Default") - button.backdrop:Point("TOPLEFT", button.icon, "TOPLEFT", -2, 2) - button.backdrop:Point("BOTTOMRIGHT", button.icon, "BOTTOMRIGHT", 2, -2) - button.icon:SetParent(button.backdrop) - end - end -end - -T.SkinFuncs["Blizzard_GuildUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/guildbank.lua b/Tukui/modules/skins/blizzard/guildbank.lua deleted file mode 100644 index af9e013..0000000 --- a/Tukui/modules/skins/blizzard/guildbank.lua +++ /dev/null @@ -1,96 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - GuildBankFrame:StripTextures() - GuildBankFrame:SetTemplate("Default") - GuildBankEmblemFrame:StripTextures(true) - - --Close button doesn't have a fucking name, extreme hackage - for i=1, GuildBankFrame:GetNumChildren() do - local child = select(i, GuildBankFrame:GetChildren()) - if child.GetPushedTexture and child:GetPushedTexture() and not child:GetName() then - T.SkinCloseButton(child) - end - end - - T.SkinButton(GuildBankFrameDepositButton, true) - T.SkinButton(GuildBankFrameWithdrawButton, true) - T.SkinButton(GuildBankInfoSaveButton, true) - T.SkinButton(GuildBankFramePurchaseButton, true) - - GuildBankFrameWithdrawButton:Point("RIGHT", GuildBankFrameDepositButton, "LEFT", -2, 0) - - GuildBankInfoScrollFrame:StripTextures() - GuildBankTransactionsScrollFrame:StripTextures() - - GuildBankFrame.inset = CreateFrame("Frame", nil, GuildBankFrame) - GuildBankFrame.inset:SetTemplate("Default") - GuildBankFrame.inset:Point("TOPLEFT", 30, -65) - GuildBankFrame.inset:Point("BOTTOMRIGHT", -20, 63) - - for i=1, NUM_GUILDBANK_COLUMNS do - _G["GuildBankColumn"..i]:StripTextures() - - for x=1, NUM_SLOTS_PER_GUILDBANK_GROUP do - local button = _G["GuildBankColumn"..i.."Button"..x] - local icon = _G["GuildBankColumn"..i.."Button"..x.."IconTexture"] - button:StripTextures() - button:StyleButton() - button:SetTemplate("Default", true) - - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - icon:SetTexCoord(.08, .92, .08, .92) - end - end - - for i=1, 8 do - local button = _G["GuildBankTab"..i.."Button"] - local texture = _G["GuildBankTab"..i.."ButtonIconTexture"] - _G["GuildBankTab"..i]:StripTextures(true) - - button:StripTextures() - button:StyleButton(true) - button:SetTemplate("Default", true) - - texture:ClearAllPoints() - texture:Point("TOPLEFT", 2, -2) - texture:Point("BOTTOMRIGHT", -2, 2) - texture:SetTexCoord(.08, .92, .08, .92) - end - - for i=1, 4 do - T.SkinTab(_G["GuildBankFrameTab"..i]) - end - - --Popup - GuildBankPopupFrame:StripTextures() - GuildBankPopupScrollFrame:StripTextures() - GuildBankPopupFrame:SetTemplate("Default") - GuildBankPopupFrame:Point("TOPLEFT", GuildBankFrame, "TOPRIGHT", 1, -30) - T.SkinButton(GuildBankPopupOkayButton) - T.SkinButton(GuildBankPopupCancelButton) - T.SkinEditBox(GuildBankPopupEditBox) - GuildBankPopupNameLeft:Kill() - GuildBankPopupNameRight:Kill() - GuildBankPopupNameMiddle:Kill() - - for i=1, 16 do - local button = _G["GuildBankPopupButton"..i] - local icon = _G[button:GetName().."Icon"] - button:StripTextures() - button:SetTemplate("Default") - button:StyleButton(true) - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - icon:SetTexCoord(.08, .92, .08, .92) - end - - if T.toc >= 40300 then - T.SkinEditBox(GuildItemSearchBox) - end -end - -T.SkinFuncs["Blizzard_GuildBankUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/guildcontrol.lua b/Tukui/modules/skins/blizzard/guildcontrol.lua deleted file mode 100644 index f78e376..0000000 --- a/Tukui/modules/skins/blizzard/guildcontrol.lua +++ /dev/null @@ -1,76 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - GuildControlUI:StripTextures() - GuildControlUIHbar:StripTextures() - GuildControlUI:SetTemplate("Default") - GuildControlUI:CreateShadow("Default") - - local function SkinGuildRanks() - for i=1, GuildControlGetNumRanks() do - local rankFrame = _G["GuildControlUIRankOrderFrameRank"..i] - if rankFrame then - T.SkinButton(rankFrame.downButton) - T.SkinButton(rankFrame.upButton) - T.SkinButton(rankFrame.deleteButton) - - if not rankFrame.nameBox.backdrop then - T.SkinEditBox(rankFrame.nameBox) - end - - rankFrame.nameBox.backdrop:Point("TOPLEFT", -2, -4) - rankFrame.nameBox.backdrop:Point("BOTTOMRIGHT", -4, 4) - end - end - end - hooksecurefunc("GuildControlUI_RankOrder_Update", SkinGuildRanks) - GuildControlUIRankOrderFrameNewButton:HookScript("OnClick", function() - T.Delay(1, SkinGuildRanks) - end) - - T.SkinDropDownBox(GuildControlUINavigationDropDown) - T.SkinDropDownBox(GuildControlUIRankSettingsFrameRankDropDown, 180) - GuildControlUINavigationDropDownButton:Width(20) - GuildControlUIRankSettingsFrameRankDropDownButton:Width(20) - - for i=1, NUM_RANK_FLAGS do - if _G["GuildControlUIRankSettingsFrameCheckbox"..i] then - T.SkinCheckBox(_G["GuildControlUIRankSettingsFrameCheckbox"..i]) - end - end - - T.SkinButton(GuildControlUIRankOrderFrameNewButton) - - T.SkinEditBox(GuildControlUIRankSettingsFrameGoldBox) - GuildControlUIRankSettingsFrameGoldBox.backdrop:Point("TOPLEFT", -2, -4) - GuildControlUIRankSettingsFrameGoldBox.backdrop:Point("BOTTOMRIGHT", 2, 4) - GuildControlUIRankSettingsFrameGoldBox:StripTextures() - - GuildControlUIRankBankFrame:StripTextures() - - local once = false - hooksecurefunc("GuildControlUI_BankTabPermissions_Update", function() - local numTabs = GetNumGuildBankTabs() - if numTabs < MAX_BUY_GUILDBANK_TABS then - numTabs = numTabs + 1 - end - for i=1, numTabs do - local tab = _G["GuildControlBankTab"..i.."Owned"] - local icon = tab.tabIcon - local editbox = tab.editBox - - icon:SetTexCoord(.08, .92, .08, .92) - - if once == false then - T.SkinButton(_G["GuildControlBankTab"..i.."BuyPurchaseButton"]) - _G["GuildControlBankTab"..i.."OwnedStackBox"]:StripTextures() - end - end - once = true - end) - - T.SkinDropDownBox(GuildControlUIRankBankFrameRankDropDown, 180) - GuildControlUIRankBankFrameRankDropDownButton:Width(20) -end - -T.SkinFuncs["Blizzard_GuildControlUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/guildregister.lua b/Tukui/modules/skins/blizzard/guildregister.lua deleted file mode 100644 index 5714bd2..0000000 --- a/Tukui/modules/skins/blizzard/guildregister.lua +++ /dev/null @@ -1,31 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - GuildRegistrarFrame:StripTextures(true) - GuildRegistrarFrame:SetTemplate("Default") - GuildRegistrarGreetingFrame:StripTextures() - T.SkinButton(GuildRegistrarFrameGoodbyeButton) - T.SkinButton(GuildRegistrarFrameCancelButton) - T.SkinButton(GuildRegistrarFramePurchaseButton) - T.SkinCloseButton(GuildRegistrarFrameCloseButton) - T.SkinEditBox(GuildRegistrarFrameEditBox) - for i=1, GuildRegistrarFrameEditBox:GetNumRegions() do - local region = select(i, GuildRegistrarFrameEditBox:GetRegions()) - if region:GetObjectType() == "Texture" then - if region:GetTexture() == "Interface\\ChatFrame\\UI-ChatInputBorder-Left" or region:GetTexture() == "Interface\\ChatFrame\\UI-ChatInputBorder-Right" then - region:Kill() - end - end - end - - GuildRegistrarFrameEditBox:Height(20) - - for i=1, 2 do - _G["GuildRegistrarButton"..i]:GetFontString():SetTextColor(1, 1, 1) - end - - GuildRegistrarPurchaseText:SetTextColor(1, 1, 1) - AvailableServicesText:SetTextColor(1, 1, 0) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/help.lua b/Tukui/modules/skins/blizzard/help.lua deleted file mode 100644 index beda1f3..0000000 --- a/Tukui/modules/skins/blizzard/help.lua +++ /dev/null @@ -1,142 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local frames = { - "HelpFrameLeftInset", - "HelpFrameMainInset", - "HelpFrameKnowledgebase", - "HelpFrameHeader", - "HelpFrameKnowledgebaseErrorFrame", - } - - local buttons = { - "HelpFrameAccountSecurityOpenTicket", - "HelpFrameReportLagLoot", - "HelpFrameReportLagAuctionHouse", - "HelpFrameReportLagMail", - "HelpFrameReportLagMovement", - "HelpFrameReportLagSpell", - "HelpFrameReportLagChat", - "HelpFrameReportAbuseOpenTicket", - "HelpFrameOpenTicketHelpTopIssues", - "HelpFrameOpenTicketHelpOpenTicket", - "HelpFrameKnowledgebaseSearchButton", - "HelpFrameKnowledgebaseNavBarHomeButton", - "HelpFrameCharacterStuckStuck", - "GMChatOpenLog", - "HelpFrameTicketSubmit", - "HelpFrameTicketCancel", - } - - -- skin main frames - for i = 1, #frames do - _G[frames[i]]:StripTextures(true) - _G[frames[i]]:CreateBackdrop("Default") - end - - HelpFrameHeader:SetFrameLevel(HelpFrameHeader:GetFrameLevel() + 2) - HelpFrameKnowledgebaseErrorFrame:SetFrameLevel(HelpFrameKnowledgebaseErrorFrame:GetFrameLevel() + 2) - - HelpFrameTicketScrollFrame:StripTextures() - HelpFrameTicketScrollFrame:CreateBackdrop("Default") - HelpFrameTicketScrollFrame.backdrop:Point("TOPLEFT", -4, 4) - HelpFrameTicketScrollFrame.backdrop:Point("BOTTOMRIGHT", 6, -4) - for i=1, HelpFrameTicket:GetNumChildren() do - local child = select(i, HelpFrameTicket:GetChildren()) - if not child:GetName() then - child:StripTextures() - end - end - - T.SkinScrollBar(HelpFrameKnowledgebaseScrollFrame2ScrollBar) - - -- skin sub buttons - for i = 1, #buttons do - _G[buttons[i]]:StripTextures(true) - T.SkinButton(_G[buttons[i]], true) - - if _G[buttons[i]].text then - _G[buttons[i]].text:ClearAllPoints() - _G[buttons[i]].text:SetPoint("CENTER") - _G[buttons[i]].text:SetJustifyH("CENTER") - end - end - - -- skin main buttons - for i = 1, 6 do - local b = _G["HelpFrameButton"..i] - T.SkinButton(b, true) - b.text:ClearAllPoints() - b.text:SetPoint("CENTER") - b.text:SetJustifyH("CENTER") - end - - -- skin table options - for i = 1, HelpFrameKnowledgebaseScrollFrameScrollChild:GetNumChildren() do - local b = _G["HelpFrameKnowledgebaseScrollFrameButton"..i] - b:StripTextures(true) - T.SkinButton(b, true) - end - - -- skin misc items - HelpFrameKnowledgebaseSearchBox:ClearAllPoints() - HelpFrameKnowledgebaseSearchBox:Point("TOPLEFT", HelpFrameMainInset, "TOPLEFT", 13, -10) - HelpFrameKnowledgebaseNavBarOverlay:Kill() - - if T.toc >= 40200 then - HelpFrameKnowledgebaseNavBar:StripTextures() - end - - HelpFrame:StripTextures(true) - HelpFrame:CreateBackdrop("Default") - T.SkinEditBox(HelpFrameKnowledgebaseSearchBox) - T.SkinScrollBar(HelpFrameKnowledgebaseScrollFrameScrollBar) - T.SkinScrollBar(HelpFrameTicketScrollFrameScrollBar) - T.SkinCloseButton(HelpFrameCloseButton, HelpFrame.backdrop) - T.SkinCloseButton(HelpFrameKnowledgebaseErrorFrameCloseButton, HelpFrameKnowledgebaseErrorFrame.backdrop) - - --Hearth Stone Button - HelpFrameCharacterStuckHearthstone:StyleButton() - HelpFrameCharacterStuckHearthstone:SetTemplate("Default", true) - HelpFrameCharacterStuckHearthstone.IconTexture:ClearAllPoints() - HelpFrameCharacterStuckHearthstone.IconTexture:Point("TOPLEFT", 2, -2) - HelpFrameCharacterStuckHearthstone.IconTexture:Point("BOTTOMRIGHT", -2, 2) - HelpFrameCharacterStuckHearthstone.IconTexture:SetTexCoord(.08, .92, .08, .92) - - local function navButtonFrameLevel(self) - for i=1, #self.navList do - local navButton = self.navList[i] - local lastNav = self.navList[i-1] - if navButton and lastNav then - navButton:SetFrameLevel(lastNav:GetFrameLevel() - 2) - end - end - end - - hooksecurefunc("NavBar_AddButton", function(self, buttonData) - local navButton = self.navList[#self.navList] - - - if not navButton.skinned then - T.SkinButton(navButton, true) - navButton.skinned = true - - navButton:HookScript("OnClick", function() - navButtonFrameLevel(self) - end) - end - - navButtonFrameLevel(self) - end) - - T.SkinButton(HelpFrameGM_ResponseNeedMoreHelp) - T.SkinButton(HelpFrameGM_ResponseCancel) - for i=1, HelpFrameGM_Response:GetNumChildren() do - local child = select(i, HelpFrameGM_Response:GetChildren()) - if child and child:GetObjectType() == "Frame" and not child:GetName() then - child:SetTemplate("Default") - end - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/inspect.lua b/Tukui/modules/skins/blizzard/inspect.lua deleted file mode 100644 index 83caefb..0000000 --- a/Tukui/modules/skins/blizzard/inspect.lua +++ /dev/null @@ -1,112 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - InspectFrame:StripTextures(true) - InspectFrameInset:StripTextures(true) - InspectTalentFramePointsBar:StripTextures() - InspectFrame:CreateBackdrop("Default") - InspectFrame.backdrop:SetAllPoints() - T.SkinCloseButton(InspectFrameCloseButton) - - for i=1, 4 do - T.SkinTab(_G["InspectFrameTab"..i]) - end - - InspectModelFrameBorderTopLeft:Kill() - InspectModelFrameBorderTopRight:Kill() - InspectModelFrameBorderTop:Kill() - InspectModelFrameBorderLeft:Kill() - InspectModelFrameBorderRight:Kill() - InspectModelFrameBorderBottomLeft:Kill() - InspectModelFrameBorderBottomRight:Kill() - InspectModelFrameBorderBottom:Kill() - InspectModelFrameBorderBottom2:Kill() - InspectModelFrameBackgroundOverlay:Kill() - InspectModelFrame:CreateBackdrop("Default") - - local slots = { - "HeadSlot", - "NeckSlot", - "ShoulderSlot", - "BackSlot", - "ChestSlot", - "ShirtSlot", - "TabardSlot", - "WristSlot", - "HandsSlot", - "WaistSlot", - "LegsSlot", - "FeetSlot", - "Finger0Slot", - "Finger1Slot", - "Trinket0Slot", - "Trinket1Slot", - "MainHandSlot", - "SecondaryHandSlot", - "RangedSlot", - } - for _, slot in pairs(slots) do - local icon = _G["Inspect"..slot.."IconTexture"] - local slot = _G["Inspect"..slot] - slot:StripTextures() - slot:StyleButton(false) - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - - slot:SetFrameLevel(slot:GetFrameLevel() + 2) - slot:CreateBackdrop("Default") - slot.backdrop:SetAllPoints() - end - - if T.toc < 40300 then - T.SkinRotateButton(InspectModelFrameRotateLeftButton) - T.SkinRotateButton(InspectModelFrameRotateRightButton) - InspectModelFrameRotateRightButton:Point("TOPLEFT", InspectModelFrameRotateLeftButton, "TOPRIGHT", 3, 0) - end - - InspectPVPFrameBottom:Kill() - InspectGuildFrameBG:Kill() - InspectPVPFrame:HookScript("OnShow", function() InspectPVPFrameBG:Kill() end) - - for i=1, 3 do - _G["InspectPVPTeam"..i]:StripTextures() - _G["InspectTalentFrameTab"..i]:StripTextures() - end - - InspectTalentFrame.bg = CreateFrame("Frame", nil, InspectTalentFrame) - InspectTalentFrame.bg:SetTemplate("Default") - InspectTalentFrame.bg:Point("TOPLEFT", InspectTalentFrameBackgroundTopLeft, "TOPLEFT", -2, 2) - InspectTalentFrame.bg:Point("BOTTOMRIGHT", InspectTalentFrameBackgroundBottomRight, "BOTTOMRIGHT", -20, 52) - InspectTalentFrame.bg:SetFrameLevel(InspectTalentFrame.bg:GetFrameLevel() - 2) - - for i = 1, MAX_NUM_TALENTS do - local button = _G["InspectTalentFrameTalent"..i] - local icon = _G["InspectTalentFrameTalent"..i.."IconTexture"] - if button then - button:StripTextures() - button:StyleButton() - button:SetTemplate("Default") - button.SetHighlightTexture = T.dummy - button.SetPushedTexture = T.dummy - button:GetNormalTexture():SetTexCoord(.08, .92, .08, .92) - button:GetPushedTexture():SetTexCoord(.08, .92, .08, .92) - button:GetHighlightTexture():SetAllPoints(icon) - button:GetPushedTexture():SetAllPoints(icon) - - if button.Rank then - button.Rank:SetFont(C.media.font, 12, "THINOUTLINE") - button.Rank:ClearAllPoints() - button.Rank:SetPoint("BOTTOMRIGHT") - end - - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - icon:SetTexCoord(.08, .92, .08, .92) - end - end -end - -T.SkinFuncs["Blizzard_InspectUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/itemtext.lua b/Tukui/modules/skins/blizzard/itemtext.lua deleted file mode 100644 index fcfd4cc..0000000 --- a/Tukui/modules/skins/blizzard/itemtext.lua +++ /dev/null @@ -1,14 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - ItemTextFrame:StripTextures(true) - ItemTextScrollFrame:StripTextures() - ItemTextFrame:SetTemplate("Default") - T.SkinCloseButton(ItemTextCloseButton) - T.SkinNextPrevButton(ItemTextPrevPageButton) - T.SkinNextPrevButton(ItemTextNextPageButton) - ItemTextPageText:SetTextColor(1, 1, 1) - ItemTextPageText.SetTextColor = T.dummy -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/itemtransmogrify.lua b/Tukui/modules/skins/blizzard/itemtransmogrify.lua deleted file mode 100644 index 478b294..0000000 --- a/Tukui/modules/skins/blizzard/itemtransmogrify.lua +++ /dev/null @@ -1,56 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -if T.toc < 40300 then return end - ----------------------------------------------------------------------------------------- --- Transmogrify skin (written by shestak) ----------------------------------------------------------------------------------------- - -local function LoadSkin() - TransmogrifyArtFrame:StripTextures() - TransmogrifyArtFrame:SetTemplate("Default") - TransmogrifyModelFrame:SetFrameLevel(TransmogrifyArtFrame:GetFrameLevel() + 2) - - local KillTextures = { - "TransmogrifyModelFrameLines", - "TransmogrifyModelFrameMarbleBg", - "TransmogrifyFrameButtonFrameButtonBorder", - "TransmogrifyFrameButtonFrameButtonBottomBorder", - "TransmogrifyFrameButtonFrameMoneyLeft", - "TransmogrifyFrameButtonFrameMoneyRight", - "TransmogrifyFrameButtonFrameMoneyMiddle", - } - - for _, texture in pairs(KillTextures) do - _G[texture]:Kill() - end - - select(2, TransmogrifyModelFrame:GetRegions()):Kill() - TransmogrifyFrameButtonFrame:GetRegions():Kill() - - T.SkinButton(TransmogrifyApplyButton, true) - TransmogrifyApplyButton:Point("BOTTOMRIGHT", TransmogrifyFrame, "BOTTOMRIGHT", -4, 4) - T.SkinCloseButton(TransmogrifyArtFrameCloseButton) - - local slots = {"Head", "Shoulder", "Chest", "Waist", "Legs", "Feet", - "Wrist", "Hands", "Back", "MainHand", "SecondaryHand", "Ranged"} - - for _, slot in pairs(slots) do - local icon = _G["TransmogrifyFrame"..slot.."SlotIconTexture"] - local slot = _G["TransmogrifyFrame"..slot.."Slot"] - - if slot then - slot:StripTextures() - slot:StyleButton(false) - slot:SetFrameLevel(slot:GetFrameLevel() + 2) - slot:CreateBackdrop("Default") - slot.backdrop:SetAllPoints() - - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - end - end -end - -T.SkinFuncs["Blizzard_ItemAlterationUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/journal.lua b/Tukui/modules/skins/blizzard/journal.lua deleted file mode 100644 index 5ae26f1..0000000 --- a/Tukui/modules/skins/blizzard/journal.lua +++ /dev/null @@ -1,109 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - if T.toc >= 40200 then - EncounterJournal:StripTextures(true) - - EncounterJournal.backdrop = EncounterJournal:CreateTexture(nil, "BACKGROUND") - EncounterJournal.backdrop:SetDrawLayer("BACKGROUND", -7) - EncounterJournal.backdrop:SetTexture(0, 0, 0) - EncounterJournal.backdrop:Point("TOPLEFT", EncounterJournal, "TOPLEFT", -T.mult*3, T.mult*3) - EncounterJournal.backdrop:Point("BOTTOMRIGHT", EncounterJournal, "BOTTOMRIGHT", T.mult*3, -T.mult*3) - - EncounterJournal.backdrop2 = EncounterJournal:CreateTexture(nil, "BACKGROUND") - EncounterJournal.backdrop2:SetDrawLayer("BACKGROUND", -6) - EncounterJournal.backdrop2:SetTexture(unpack(C["media"].bordercolor)) - EncounterJournal.backdrop2:Point("TOPLEFT", EncounterJournal, "TOPLEFT", -T.mult*2, T.mult*2) - EncounterJournal.backdrop2:Point("BOTTOMRIGHT", EncounterJournal, "BOTTOMRIGHT", T.mult*2, -T.mult*2) - - EncounterJournal.backdrop3 = EncounterJournal:CreateTexture(nil, "BACKGROUND") - EncounterJournal.backdrop3:SetDrawLayer("BACKGROUND", -5) - EncounterJournal.backdrop3:SetTexture(0, 0, 0) - EncounterJournal.backdrop3:Point("TOPLEFT", EncounterJournal, "TOPLEFT", -T.mult, T.mult) - EncounterJournal.backdrop3:Point("BOTTOMRIGHT", EncounterJournal, "BOTTOMRIGHT", T.mult, -T.mult) - - EncounterJournal.backdrop4 = EncounterJournal:CreateTexture(nil, "BACKGROUND") - EncounterJournal.backdrop4:SetDrawLayer("BACKGROUND", -4) - EncounterJournal.backdrop4:SetTexture(unpack(C["media"].backdropcolor)) - EncounterJournal.backdrop4:SetAllPoints() - - EncounterJournalNavBar:StripTextures(true) - EncounterJournalNavBarOverlay:StripTextures(true) - - EncounterJournalNavBar:CreateBackdrop("Default") - EncounterJournalNavBar.backdrop:Point("TOPLEFT", -2, 0) - EncounterJournalNavBar.backdrop:SetPoint("BOTTOMRIGHT") - T.SkinButton(EncounterJournalNavBarHomeButton, true) - - T.SkinEditBox(EncounterJournalSearchBox) - T.SkinCloseButton(EncounterJournalCloseButton) - - EncounterJournalInset:StripTextures(true) - EncounterJournal:HookScript("OnShow", function() - if not EncounterJournalInstanceSelect.backdrop then - EncounterJournalInstanceSelect.backdrop = EncounterJournalInstanceSelect:CreateTexture(nil, "BACKGROUND") - EncounterJournalInstanceSelect.backdrop:SetDrawLayer("BACKGROUND", -3) - EncounterJournalInstanceSelect.backdrop:SetTexture(0, 0, 0) - EncounterJournalInstanceSelect.backdrop:Point("TOPLEFT", EncounterJournalInstanceSelect.bg, "TOPLEFT", -T.mult*3, T.mult*3) - EncounterJournalInstanceSelect.backdrop:Point("BOTTOMRIGHT", EncounterJournalInstanceSelect.bg, "BOTTOMRIGHT", T.mult*3, -T.mult*3) - - EncounterJournalInstanceSelect.backdrop2 = EncounterJournalInstanceSelect:CreateTexture(nil, "BACKGROUND") - EncounterJournalInstanceSelect.backdrop2:SetDrawLayer("BACKGROUND", -2) - EncounterJournalInstanceSelect.backdrop2:SetTexture(unpack(C["media"].bordercolor)) - EncounterJournalInstanceSelect.backdrop2:Point("TOPLEFT", EncounterJournalInstanceSelect.bg, "TOPLEFT", -T.mult*2, T.mult*2) - EncounterJournalInstanceSelect.backdrop2:Point("BOTTOMRIGHT", EncounterJournalInstanceSelect.bg, "BOTTOMRIGHT", T.mult*2, -T.mult*2) - - EncounterJournalInstanceSelect.backdrop3 = EncounterJournalInstanceSelect:CreateTexture(nil, "BACKGROUND") - EncounterJournalInstanceSelect.backdrop3:SetDrawLayer("BACKGROUND", -1) - EncounterJournalInstanceSelect.backdrop3:SetTexture(0, 0, 0) - EncounterJournalInstanceSelect.backdrop3:Point("TOPLEFT", EncounterJournalInstanceSelect.bg, "TOPLEFT", -T.mult, T.mult) - EncounterJournalInstanceSelect.backdrop3:Point("BOTTOMRIGHT", EncounterJournalInstanceSelect.bg, "BOTTOMRIGHT", T.mult, -T.mult) - end - - if not EncounterJournalEncounterFrameInfo.backdrop then - EncounterJournalEncounterFrameInfo.backdrop = EncounterJournalEncounterFrameInfo:CreateTexture(nil, "BACKGROUND") - EncounterJournalEncounterFrameInfo.backdrop:SetDrawLayer("BACKGROUND", -3) - EncounterJournalEncounterFrameInfo.backdrop:SetTexture(0, 0, 0) - EncounterJournalEncounterFrameInfo.backdrop:Point("TOPLEFT", EncounterJournalEncounterFrameInfoBG, "TOPLEFT", -T.mult*3, T.mult*3) - EncounterJournalEncounterFrameInfo.backdrop:Point("BOTTOMRIGHT", EncounterJournalEncounterFrameInfoBG, "BOTTOMRIGHT", T.mult*3, -T.mult*3) - - EncounterJournalEncounterFrameInfo.backdrop2 = EncounterJournalEncounterFrameInfo:CreateTexture(nil, "BACKGROUND") - EncounterJournalEncounterFrameInfo.backdrop2:SetDrawLayer("BACKGROUND", -2) - EncounterJournalEncounterFrameInfo.backdrop2:SetTexture(unpack(C["media"].bordercolor)) - EncounterJournalEncounterFrameInfo.backdrop2:Point("TOPLEFT", EncounterJournalEncounterFrameInfoBG, "TOPLEFT", -T.mult*2, T.mult*2) - EncounterJournalEncounterFrameInfo.backdrop2:Point("BOTTOMRIGHT", EncounterJournalEncounterFrameInfoBG, "BOTTOMRIGHT", T.mult*2, -T.mult*2) - - EncounterJournalEncounterFrameInfo.backdrop3 = EncounterJournalEncounterFrameInfo:CreateTexture(nil, "BACKGROUND") - EncounterJournalEncounterFrameInfo.backdrop3:SetDrawLayer("BACKGROUND", -1) - EncounterJournalEncounterFrameInfo.backdrop3:SetTexture(0, 0, 0) - EncounterJournalEncounterFrameInfo.backdrop3:Point("TOPLEFT", EncounterJournalEncounterFrameInfoBG, "TOPLEFT", -T.mult, T.mult) - EncounterJournalEncounterFrameInfo.backdrop3:Point("BOTTOMRIGHT", EncounterJournalEncounterFrameInfoBG, "BOTTOMRIGHT", T.mult, -T.mult) - end - EncounterJournalEncounterFrameInfoBossTab:SetTemplate("Default") - EncounterJournalEncounterFrameInfoBossTab:ClearAllPoints() - EncounterJournalEncounterFrameInfoBossTab:Point("TOPRIGHT", EncounterJournalEncounterFrame, "TOPRIGHT", 75, 20) - - EncounterJournalEncounterFrameInfoLootTab:SetTemplate("Default") - EncounterJournalEncounterFrameInfoLootTab:ClearAllPoints() - EncounterJournalEncounterFrameInfoLootTab:Point("TOP", EncounterJournalEncounterFrameInfoBossTab, "BOTTOM", 0, -4) - end) - - T.SkinScrollBar(EncounterJournalInstanceSelectScrollFrameScrollBar) - - EncounterJournalEncounterFrameInfoBossTab:GetNormalTexture():SetTexture(nil) - EncounterJournalEncounterFrameInfoBossTab:GetPushedTexture():SetTexture(nil) - EncounterJournalEncounterFrameInfoBossTab:GetDisabledTexture():SetTexture(nil) - EncounterJournalEncounterFrameInfoBossTab:GetHighlightTexture():SetTexture(nil) - - EncounterJournalEncounterFrameInfoLootTab:GetNormalTexture():SetTexture(nil) - EncounterJournalEncounterFrameInfoLootTab:GetPushedTexture():SetTexture(nil) - EncounterJournalEncounterFrameInfoLootTab:GetDisabledTexture():SetTexture(nil) - EncounterJournalEncounterFrameInfoLootTab:GetHighlightTexture():SetTexture(nil) - end -end - -if T.toc == 40200 then - tinsert(T.SkinFuncs["Tukui"], LoadSkin) -else - T.SkinFuncs["Blizzard_EncounterJournal"] = LoadSkin -end \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/lfd.lua b/Tukui/modules/skins/blizzard/lfd.lua deleted file mode 100644 index b26baec..0000000 --- a/Tukui/modules/skins/blizzard/lfd.lua +++ /dev/null @@ -1,144 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local StripAllTextures = { - "LFDParentFrame", - "LFDQueueFrame", - "LFDQueueFrameSpecific", - "LFDQueueFrameRandom", - "LFDQueueFrameRandomScrollFrame", - "LFDQueueFrameCapBar", - "LFDDungeonReadyDialog", - "LFGDungeonReadyDialog", - } - - local KillTextures = { - "LFDQueueFrameBackground", - "LFDParentFrameInset", - "LFDParentFrameEyeFrame", - "LFDQueueFrameRoleButtonTankBackground", - "LFDQueueFrameRoleButtonHealerBackground", - "LFDQueueFrameRoleButtonDPSBackground", - "LFDDungeonReadyDialogBackground", - "LFGDungeonReadyDialogBackground", - } - - local buttons = { - "LFDQueueFrameFindGroupButton", - "LFDQueueFrameCancelButton", - "LFDQueueFramePartyBackfillBackfillButton", - "LFDQueueFramePartyBackfillNoBackfillButton", - "LFDQueueFrameNoLFDWhileLFRLeaveQueueButton", - } - - local checkButtons = { - "LFDQueueFrameRoleButtonTank", - "LFDQueueFrameRoleButtonHealer", - "LFDQueueFrameRoleButtonDPS", - "LFDQueueFrameRoleButtonLeader", - } - - for _, object in pairs(checkButtons) do - _G[object]:GetChildren():SetFrameLevel(_G[object]:GetChildren():GetFrameLevel() + 2) - T.SkinCheckBox(_G[object]:GetChildren()) - end - - for _, object in pairs(StripAllTextures) do - if _G[object] then _G[object]:StripTextures() end - end - - for _, texture in pairs(KillTextures) do - if _G[texture] then _G[texture]:Kill() end - end - - for i = 1, #buttons do - _G[buttons[i]]:StripTextures() - T.SkinButton(_G[buttons[i]]) - end - - for i= 1,15 do - T.SkinCheckBox(_G["LFDQueueFrameSpecificListButton"..i.."EnableButton"]) - end - - LFDQueueFrameCapBar:SetPoint("LEFT", 40, 0) - LFDQueueFrameRandom:HookScript("OnShow", function() - for i=1, LFD_MAX_REWARDS do - local button = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i] - local icon = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."IconTexture"] - local count = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."Count"] - local role1 = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."RoleIcon1"] - local role2 = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."RoleIcon2"] - local role3 = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..i.."RoleIcon3"] - - if button then - button:StripTextures() - icon:SetTexCoord(.08, .92, .08, .92) - icon:Point("TOPLEFT", 2, -2) - icon:SetDrawLayer("OVERLAY") - count:SetDrawLayer("OVERLAY") - if not button.backdrop then - button:CreateBackdrop("Default") - button.backdrop:Point("TOPLEFT", icon, "TOPLEFT", -2, 2) - button.backdrop:Point("BOTTOMRIGHT", icon, "BOTTOMRIGHT", 2, -2) - icon:SetParent(button.backdrop) - icon.SetPoint = T.dummy - - if count then - count:SetParent(button.backdrop) - end - if role1 then - role1:SetParent(button.backdrop) - end - if role2 then - role2:SetParent(button.backdrop) - end - if role3 then - role3:SetParent(button.backdrop) - end - end - end - end - end) - - if T.toc < 40300 then - LFDDungeonReadyDialog:SetTemplate("Default") - LFDDungeonReadyDialog:CreateShadow("Default") - T.SkinCloseButton(LFDDungeonReadyDialogCloseButton,LFDDungeonReadyDialog) - T.SkinButton(LFDDungeonReadyDialogEnterDungeonButton) - T.SkinButton(LFDDungeonReadyDialogLeaveQueueButton) - end - - LFDQueueFrameSpecificListScrollFrame:StripTextures() - LFDQueueFrameSpecificListScrollFrame:Height(LFDQueueFrameSpecificListScrollFrame:GetHeight() - 8) - LFDParentFrame:CreateBackdrop("Default") - LFDParentFrame.backdrop:Point( "TOPLEFT", LFDParentFrame, "TOPLEFT") - LFDParentFrame.backdrop:Point( "BOTTOMRIGHT", LFDParentFrame, "BOTTOMRIGHT") - T.SkinCloseButton(LFDParentFrameCloseButton,LFDParentFrame) - T.SkinDropDownBox(LFDQueueFrameTypeDropDown, 300) - LFDQueueFrameTypeDropDown:Point("RIGHT",-10,0) - LFDQueueFrameCapBar:CreateBackdrop("Default") - LFDQueueFrameCapBar.backdrop:Point( "TOPLEFT", LFDQueueFrameCapBar, "TOPLEFT", 1, -1) - LFDQueueFrameCapBar.backdrop:Point( "BOTTOMRIGHT", LFDQueueFrameCapBar, "BOTTOMRIGHT", -1, 1 ) - LFDQueueFrameCapBarProgress:SetTexture(C["media"].normTex) - LFDQueueFrameCapBarCap1:SetTexture(C["media"].normTex) - LFDQueueFrameCapBarCap2:SetTexture(C["media"].normTex) - T.SkinScrollBar(LFDQueueFrameSpecificListScrollFrameScrollBar) - LFDQueueFrameNoLFDWhileLFR:SetTemplate("Default") - - if T.toc >= 40300 then - LFGDungeonReadyPopup:SetTemplate("Default") - LFGDungeonReadyPopup:CreateShadow("Default") - LFGDungeonReadyDialog.SetBackdrop = T.dummy - LFGDungeonReadyDialog.filigree:SetAlpha(0) - LFGDungeonReadyDialog.bottomArt:SetAlpha(0) - T.SkinButton(LFGDungeonReadyDialogLeaveQueueButton) - T.SkinButton(LFGDungeonReadyDialogEnterDungeonButton) - T.SkinCloseButton(LFGDungeonReadyDialogCloseButton) - LFGDungeonReadyDialogCloseButton.t:SetText("_") - LFGDungeonReadyStatus:SetTemplate("Default") - T.SkinCloseButton(LFGDungeonReadyStatusCloseButton) - LFGDungeonReadyStatusCloseButton.t:SetText("_") - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/lfg.lua b/Tukui/modules/skins/blizzard/lfg.lua deleted file mode 100644 index 86f8a39..0000000 --- a/Tukui/modules/skins/blizzard/lfg.lua +++ /dev/null @@ -1,126 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local checkbox = { - "LookingForGuildPvPButton", - "LookingForGuildWeekendsButton", - "LookingForGuildWeekdaysButton", - "LookingForGuildRPButton", - "LookingForGuildRaidButton", - "LookingForGuildQuestButton", - "LookingForGuildDungeonButton", - } - -- skin checkboxes - for _, v in pairs(checkbox) do - T.SkinCheckBox(_G[v]) - end - - local backdrop = { - "LookingForGuildInterestFrame", - "LookingForGuildAvailabilityFrame", - "LookingForGuildRolesFrame", - "LookingForGuildCommentFrame", - } - - for _, v in pairs(backdrop) do - _G[v]:StripTextures() - end - - -- have to skin these checkboxes seperate for some reason o_O - T.SkinCheckBox(LookingForGuildTankButton.checkButton) - T.SkinCheckBox(LookingForGuildHealerButton.checkButton) - T.SkinCheckBox(LookingForGuildDamagerButton.checkButton) - - -- skinning other frames - LookingForGuildFrameInset:StripTextures(false) - LookingForGuildFrame:StripTextures() - LookingForGuildFrame:SetTemplate("Default") - LookingForGuildBrowseButton_LeftSeparator:Kill() - LookingForGuildRequestButton_RightSeparator:Kill() - T.SkinScrollBar(LookingForGuildBrowseFrameContainerScrollBar) - T.SkinButton(LookingForGuildBrowseButton) - T.SkinButton(LookingForGuildRequestButton) - T.SkinCloseButton(LookingForGuildFrameCloseButton) - LookingForGuildCommentInputFrame:CreateBackdrop("Default") - LookingForGuildCommentInputFrame:StripTextures(false) - - -- skin container buttons on browse and request page - for i = 1, 5 do - local b = _G["LookingForGuildBrowseFrameContainerButton"..i] - local t = _G["LookingForGuildAppsFrameContainerButton"..i] - local r = _G["LookingForGuildBrowseFrameContainerButton"..i.."Pending"] - b:SetBackdrop(nil) - b:SetTemplate("Default") - b:SetBackdropColor(0, 0, 0, 0) - b:SetBackdropBorderColor(1, 0, 0, 0) - b:StyleButton() - t:SetBackdrop(nil) - b.selectedTex:Kill() - if r then - r:StripTextures() - r:SetTemplate("Transparent") - end - - b.isSelected = false - end - - -- skin apps request - hooksecurefunc("LookingForGuild_Update", function(self, button) - local s = GetRecruitingGuildSelection() - local f = LookingForGuildBrowseFrameContainer - local o = HybridScrollFrame_GetOffset(f) - local b = f.buttons - local nb = #b; - local button, index - - for i = 1, nb do - index = o + i - button = b[i] - if index == s then - if not button.isSelected then - button:SetBackdropBorderColor(1, 0, 0, 1) - button:SetBackdropColor(1, 1, 1, .1) - button.isSelected = true - end - else - if button.isSelected then - button:SetBackdropBorderColor(0, 0, 0, 0) - button:SetBackdropColor(0, 0, 0, 0) - button.isSelected = false - end - end - end - end) - - -- skin tabs - for i= 1, 3 do - T.SkinTab(_G["LookingForGuildFrameTab"..i]) - end - - GuildFinderRequestMembershipFrame:StripTextures(true) - GuildFinderRequestMembershipFrame:SetTemplate("Default") - T.SkinButton(GuildFinderRequestMembershipFrameAcceptButton) - T.SkinButton(GuildFinderRequestMembershipFrameCancelButton) - GuildFinderRequestMembershipFrameInputFrame:StripTextures() - GuildFinderRequestMembershipFrameInputFrame:SetTemplate("Default") - - -- skin apps request - hooksecurefunc("LookingForGuildApps_Update", function() - local f = LookingForGuildAppsFrameContainer - local b = f.buttons - local nb = #b - local na = GetNumGuildMembershipRequests() - local button - - for i = 1, nb do - button = b[i] - if not button.isSkinned then - button:SetTemplate("Default") - button:StyleButton() - button.isSkinned = true - end - end - end) -end - -T.SkinFuncs["Blizzard_LookingForGuildUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/lfr.lua b/Tukui/modules/skins/blizzard/lfr.lua deleted file mode 100644 index 6d13769..0000000 --- a/Tukui/modules/skins/blizzard/lfr.lua +++ /dev/null @@ -1,93 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local buttons = { - "LFRQueueFrameFindGroupButton", - "LFRQueueFrameAcceptCommentButton", - "LFRBrowseFrameSendMessageButton", - "LFRBrowseFrameInviteButton", - "LFRBrowseFrameRefreshButton", - "LFRQueueFrameNoLFRWhileLFDLeaveQueueButton", - "RaidFinderQueueFrameIneligibleFrameLeaveQueueButton", - "LFRQueueFrameNoLFRWhileLFD", - } - - LFRParentFrame:StripTextures() - LFRParentFrame:SetTemplate("Default") - LFRQueueFrame:StripTextures() - LFRBrowseFrame:StripTextures() - - for i=1, #buttons do - T.SkinButton(_G[buttons[i]]) - end - - --Close button doesn't have a fucking name, extreme hackage - for i=1, LFRParentFrame:GetNumChildren() do - local child = select(i, LFRParentFrame:GetChildren()) - if child.GetPushedTexture and child:GetPushedTexture() and not child:GetName() then - T.SkinCloseButton(child) - end - end - - T.SkinTab(LFRParentFrameTab1) - T.SkinTab(LFRParentFrameTab2) - - T.SkinDropDownBox(LFRBrowseFrameRaidDropDown) - - -- initial skinning for LFR expand - for i=1, 20 do - local button = _G["LFRQueueFrameSpecificListButton"..i.."ExpandOrCollapseButton"] - - if button then - button:HookScript("OnClick", function(self) - local text = self.t:GetText() - if text == "X" then - self.t:SetText("V") - else - self.t:SetText("X") - end - end) - T.SkinCloseButton(button) - button.SetNormalTexture = T.dummy - end - end - - -- refresh expand button when opening LFR - LFRQueueFrame:HookScript("OnShow", function(self) - for i=1, 20 do - local list = _G["LFRQueueFrameSpecificListButton"..i] - local button = _G["LFRQueueFrameSpecificListButton"..i.."ExpandOrCollapseButton"] - if list then - if list.isCollapsed then button.t:SetText("V") else button.t:SetText("X") end - end - end - end) - - LFRQueueFrameCommentTextButton:CreateBackdrop("Default") - LFRQueueFrameCommentTextButton:Height(35) - LFRQueueFrameNoLFRWhileLFD:SetTemplate("Default") - - for i=1, 7 do - local button = "LFRBrowseFrameColumnHeader"..i - _G[button.."Left"]:Kill() - _G[button.."Middle"]:Kill() - _G[button.."Right"]:Kill() - end - - for i=1, NUM_LFR_CHOICE_BUTTONS do - local button = _G["LFRQueueFrameSpecificListButton"..i] - T.SkinCheckBox(button.enableButton) - end - - --DPS, Healer, Tank check button's don't have a name, use it's parent as a referance. - T.SkinCheckBox(LFRQueueFrameRoleButtonTank:GetChildren()) - T.SkinCheckBox(LFRQueueFrameRoleButtonHealer:GetChildren()) - T.SkinCheckBox(LFRQueueFrameRoleButtonDPS:GetChildren()) - LFRQueueFrameRoleButtonTank:GetChildren():SetFrameLevel(LFRQueueFrameRoleButtonTank:GetChildren():GetFrameLevel() + 2) - LFRQueueFrameRoleButtonHealer:GetChildren():SetFrameLevel(LFRQueueFrameRoleButtonHealer:GetChildren():GetFrameLevel() + 2) - LFRQueueFrameRoleButtonDPS:GetChildren():SetFrameLevel(LFRQueueFrameRoleButtonDPS:GetChildren():GetFrameLevel() + 2) - T.SkinScrollBar(LFRQueueFrameCommentScrollFrame) - T.SkinScrollBar(RaidFinderQueueFrameScrollFrame) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/macosx.lua b/Tukui/modules/skins/blizzard/macosx.lua deleted file mode 100644 index f2027f4..0000000 --- a/Tukui/modules/skins/blizzard/macosx.lua +++ /dev/null @@ -1,58 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - -- mac menu/option panel, made by affli. - if IsMacClient() then - -- Skin main frame and reposition the header - MacOptionsFrame:SetTemplate("Default", true) - MacOptionsFrameHeader:SetTexture("") - MacOptionsFrameHeader:ClearAllPoints() - MacOptionsFrameHeader:SetPoint("TOP", MacOptionsFrame, 0, 0) - - --Skin internal frames - MacOptionsFrameMovieRecording:SetTemplate("Default", true) - MacOptionsITunesRemote:SetTemplate("Default", true) - - --Skin buttons - T.SkinButton(_G["MacOptionsFrameCancel"]) - T.SkinButton(_G["MacOptionsFrameOkay"]) - T.SkinButton(_G["MacOptionsButtonKeybindings"]) - T.SkinButton(_G["MacOptionsFrameDefaults"]) - T.SkinButton(_G["MacOptionsButtonCompress"]) - - --Reposition and resize buttons - local tPoint, tRTo, tRP, tX, tY = _G["MacOptionsButtonCompress"]:GetPoint() - _G["MacOptionsButtonCompress"]:SetWidth(136) - _G["MacOptionsButtonCompress"]:ClearAllPoints() - _G["MacOptionsButtonCompress"]:SetPoint(tPoint, tRTo, tRP, T.Scale(4), tY) - - _G["MacOptionsFrameCancel"]:SetWidth(96) - _G["MacOptionsFrameCancel"]:SetHeight(22) - tPoint, tRTo, tRP, tX, tY = _G["MacOptionsFrameCancel"]:GetPoint() - _G["MacOptionsFrameCancel"]:ClearAllPoints() - _G["MacOptionsFrameCancel"]:SetPoint(tPoint, tRTo, tRP, T.Scale(-14), tY) - - _G["MacOptionsFrameOkay"]:ClearAllPoints() - _G["MacOptionsFrameOkay"]:SetWidth(96) - _G["MacOptionsFrameOkay"]:SetHeight(22) - _G["MacOptionsFrameOkay"]:SetPoint("LEFT",_G["MacOptionsFrameCancel"],T.Scale(-99),0) - - _G["MacOptionsButtonKeybindings"]:ClearAllPoints() - _G["MacOptionsButtonKeybindings"]:SetWidth(96) - _G["MacOptionsButtonKeybindings"]:SetHeight(22) - _G["MacOptionsButtonKeybindings"]:SetPoint("LEFT",_G["MacOptionsFrameOkay"],T.Scale(-99),0) - - _G["MacOptionsFrameDefaults"]:SetWidth(96) - _G["MacOptionsFrameDefaults"]:SetHeight(22) - - -- why these buttons is using game menu template? oO - _G["MacOptionsButtonCompressLeft"]:SetAlpha(0) - _G["MacOptionsButtonCompressMiddle"]:SetAlpha(0) - _G["MacOptionsButtonCompressRight"]:SetAlpha(0) - _G["MacOptionsButtonKeybindingsLeft"]:SetAlpha(0) - _G["MacOptionsButtonKeybindingsMiddle"]:SetAlpha(0) - _G["MacOptionsButtonKeybindingsRight"]:SetAlpha(0) - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/macro.lua b/Tukui/modules/skins/blizzard/macro.lua deleted file mode 100644 index 1b186fc..0000000 --- a/Tukui/modules/skins/blizzard/macro.lua +++ /dev/null @@ -1,119 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - T.SkinCloseButton(MacroFrameCloseButton) - - MacroFrame:Width(360) - - local buttons = { - "MacroDeleteButton", - "MacroNewButton", - "MacroExitButton", - "MacroEditButton", - "MacroFrameTab1", - "MacroFrameTab2", - "MacroPopupOkayButton", - "MacroPopupCancelButton", - "MacroSaveButton", - "MacroCancelButton", - } - - for i = 1, #buttons do - if _G[buttons[i]] then - _G[buttons[i]]:StripTextures() - T.SkinButton(_G[buttons[i]]) - end - end - - for i = 1, 2 do - tab = _G[format("MacroFrameTab%s", i)] - tab:Height(22) - end - MacroFrameTab1:Point("TOPLEFT", MacroFrame, "TOPLEFT", 85, -39) - MacroFrameTab2:Point("LEFT", MacroFrameTab1, "RIGHT", 4, 0) - - - -- General - MacroFrame:StripTextures() - MacroFrame:SetTemplate("Default") - MacroFrameTextBackground:StripTextures() - MacroFrameTextBackground:CreateBackdrop() - MacroButtonScrollFrame:CreateBackdrop() - MacroPopupFrame:StripTextures() - MacroPopupFrame:SetTemplate("Default") - MacroPopupScrollFrame:StripTextures() - MacroPopupScrollFrame:CreateBackdrop() - MacroPopupScrollFrame.backdrop:Point("TOPLEFT", 51, 2) - MacroPopupScrollFrame.backdrop:Point("BOTTOMRIGHT", -4, 4) - MacroPopupEditBox:CreateBackdrop() - MacroPopupEditBox:StripTextures() - - --Reposition edit button - MacroEditButton:ClearAllPoints() - MacroEditButton:Point("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 10, 0) - - -- Regular scroll bar - T.SkinScrollBar(MacroButtonScrollFrame) - - MacroPopupFrame:HookScript("OnShow", function(self) - self:ClearAllPoints() - self:Point("TOPLEFT", MacroFrame, "TOPRIGHT", 5, -2) - end) - - -- Big icon - MacroFrameSelectedMacroButton:StripTextures() - MacroFrameSelectedMacroButton:StyleButton(true) - MacroFrameSelectedMacroButton:GetNormalTexture():SetTexture(nil) - MacroFrameSelectedMacroButton:SetTemplate("Default") - MacroFrameSelectedMacroButtonIcon:SetTexCoord(.08, .92, .08, .92) - MacroFrameSelectedMacroButtonIcon:ClearAllPoints() - MacroFrameSelectedMacroButtonIcon:Point("TOPLEFT", 2, -2) - MacroFrameSelectedMacroButtonIcon:Point("BOTTOMRIGHT", -2, 2) - - -- temporarily moving this text - MacroFrameCharLimitText:ClearAllPoints() - MacroFrameCharLimitText:Point("BOTTOM", MacroFrameTextBackground, 0, -70) - - -- Skin all buttons - for i = 1, MAX_ACCOUNT_MACROS do - local b = _G["MacroButton"..i] - local t = _G["MacroButton"..i.."Icon"] - local pb = _G["MacroPopupButton"..i] - local pt = _G["MacroPopupButton"..i.."Icon"] - - if b then - b:StripTextures() - b:StyleButton(true) - - b:SetTemplate("Default", true) - end - - if t then - t:SetTexCoord(.08, .92, .08, .92) - t:ClearAllPoints() - t:Point("TOPLEFT", 2, -2) - t:Point("BOTTOMRIGHT", -2, 2) - end - - if pb then - pb:StripTextures() - pb:StyleButton(true) - - pb:SetTemplate("Default") - end - - if pt then - pt:SetTexCoord(.08, .92, .08, .92) - pt:ClearAllPoints() - pt:Point("TOPLEFT", 2, -2) - pt:Point("BOTTOMRIGHT", -2, 2) - end - end - - -- scroll bars - T.SkinScrollBar(MacroButtonScrollFrameScrollBar) - T.SkinScrollBar(MacroFrameScrollFrameScrollBar) - T.SkinScrollBar(MacroPopupScrollFrameScrollBar) -end - -T.SkinFuncs["Blizzard_MacroUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/mail.lua b/Tukui/modules/skins/blizzard/mail.lua deleted file mode 100644 index 171942e..0000000 --- a/Tukui/modules/skins/blizzard/mail.lua +++ /dev/null @@ -1,138 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - MailFrame:StripTextures(true) - MailFrame:CreateBackdrop("Default") - MailFrame.backdrop:Point("TOPLEFT", 4, 0) - MailFrame.backdrop:Point("BOTTOMRIGHT", 2, 74) - MailFrame.backdrop:CreateShadow("Default") - MailFrame:SetWidth(360) - - for i = 1, INBOXITEMS_TO_DISPLAY do - local bg = _G["MailItem"..i] - bg:StripTextures() - bg:CreateBackdrop("Default") - bg.backdrop:Point("TOPLEFT", 2, 1) - bg.backdrop:Point("BOTTOMRIGHT", -2, 2) - - local b = _G["MailItem"..i.."Button"] - b:StripTextures() - b:SetTemplate("Default", true) - b:StyleButton() - - local t = _G["MailItem"..i.."ButtonIcon"] - t:SetTexCoord(.08, .92, .08, .92) - t:ClearAllPoints() - t:Point("TOPLEFT", 2, -2) - t:Point("BOTTOMRIGHT", -2, 2) - end - - T.SkinCloseButton(InboxCloseButton) - T.SkinNextPrevButton(InboxPrevPageButton) - T.SkinNextPrevButton(InboxNextPageButton) - - MailFrameTab1:StripTextures() - MailFrameTab2:StripTextures() - T.SkinTab(MailFrameTab1) - T.SkinTab(MailFrameTab2) - - -- send mail - SendMailScrollFrame:StripTextures(true) - SendMailScrollFrame:SetTemplate("Default") - - T.SkinScrollBar(SendMailScrollFrameScrollBar) - - T.SkinEditBox(SendMailNameEditBox) - T.SkinEditBox(SendMailSubjectEditBox) - T.SkinEditBox(SendMailMoneyGold) - T.SkinEditBox(SendMailMoneySilver) - T.SkinEditBox(SendMailMoneyCopper) - - SendMailNameEditBox.backdrop:Point("BOTTOMRIGHT", 2, 0) - SendMailSubjectEditBox.backdrop:Point("BOTTOMRIGHT", 2, 0) - SendMailFrame:StripTextures() - - local function MailFrameSkin() - for i = 1, ATTACHMENTS_MAX_SEND do - local b = _G["SendMailAttachment"..i] - if not b.skinned then - b:StripTextures() - b:SetTemplate("Default", true) - b:StyleButton() - b.skinned = true - end - local t = b:GetNormalTexture() - if t then - t:SetTexCoord(.08, .92, .08, .92) - t:ClearAllPoints() - t:Point("TOPLEFT", 2, -2) - t:Point("BOTTOMRIGHT", -2, 2) - end - end - end - hooksecurefunc("SendMailFrame_Update", MailFrameSkin) - - T.SkinButton(SendMailMailButton) - T.SkinButton(SendMailCancelButton) - - -- open mail (cod) - OpenMailFrame:StripTextures(true) - OpenMailFrame:CreateBackdrop("Default") - OpenMailFrame.backdrop:Point("TOPLEFT", 4, 0) - OpenMailFrame.backdrop:Point("BOTTOMRIGHT", 2, 74) - OpenMailFrame.backdrop:CreateShadow("Default") - OpenMailFrame:SetWidth(360) - - T.SkinCloseButton(OpenMailCloseButton) - T.SkinButton(OpenMailReportSpamButton) - T.SkinButton(OpenMailReplyButton) - T.SkinButton(OpenMailDeleteButton) - T.SkinButton(OpenMailCancelButton) - - OpenMailScrollFrame:StripTextures(true) - OpenMailScrollFrame:SetTemplate("Default") - - T.SkinScrollBar(OpenMailScrollFrameScrollBar) - - SendMailBodyEditBox:SetTextColor(1, 1, 1) - OpenMailBodyText:SetTextColor(1, 1, 1) - InvoiceTextFontNormal:SetTextColor(1, 1, 1) - OpenMailArithmeticLine:Kill() - - OpenMailLetterButton:StripTextures() - OpenMailLetterButton:SetTemplate("Default", true) - OpenMailLetterButton:StyleButton() - OpenMailLetterButtonIconTexture:SetTexCoord(.08, .92, .08, .92) - OpenMailLetterButtonIconTexture:ClearAllPoints() - OpenMailLetterButtonIconTexture:Point("TOPLEFT", 2, -2) - OpenMailLetterButtonIconTexture:Point("BOTTOMRIGHT", -2, 2) - - OpenMailMoneyButton:StripTextures() - OpenMailMoneyButton:SetTemplate("Default", true) - OpenMailMoneyButton:StyleButton() - OpenMailMoneyButtonIconTexture:SetTexCoord(.08, .92, .08, .92) - OpenMailMoneyButtonIconTexture:ClearAllPoints() - OpenMailMoneyButtonIconTexture:Point("TOPLEFT", 2, -2) - OpenMailMoneyButtonIconTexture:Point("BOTTOMRIGHT", -2, 2) - - for i = 1, ATTACHMENTS_MAX_SEND do - local b = _G["OpenMailAttachmentButton"..i] - b:StripTextures() - b:SetTemplate("Default", true) - b:StyleButton() - - local t = _G["OpenMailAttachmentButton"..i.."IconTexture"] - if t then - t:SetTexCoord(.08, .92, .08, .92) - t:ClearAllPoints() - t:Point("TOPLEFT", 2, -2) - t:Point("BOTTOMRIGHT", -2, 2) - end - end - - OpenMailReplyButton:Point("RIGHT", OpenMailDeleteButton, "LEFT", -2, 0) - OpenMailDeleteButton:Point("RIGHT", OpenMailCancelButton, "LEFT", -2, 0) - SendMailMailButton:Point("RIGHT", SendMailCancelButton, "LEFT", -2, 0) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/merchant.lua b/Tukui/modules/skins/blizzard/merchant.lua deleted file mode 100644 index d512e9e..0000000 --- a/Tukui/modules/skins/blizzard/merchant.lua +++ /dev/null @@ -1,91 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local frames = { - "MerchantBuyBackItem", - "MerchantFrame", - } - - -- skin main frames - for i = 1, #frames do - _G[frames[i]]:StripTextures(true) - _G[frames[i]]:CreateBackdrop("Default") - end - - MerchantBuyBackItem.backdrop:Point("TOPLEFT", -6, 6) - MerchantBuyBackItem.backdrop:Point("BOTTOMRIGHT", 6, -6) - MerchantFrame.backdrop:Point("TOPLEFT", 6, 0) - MerchantFrame.backdrop:Point("BOTTOMRIGHT", 0, 35) - MerchantFrame.backdrop:Point("BOTTOMRIGHT", 0, 60) - - -- skin tabs - for i= 1, 2 do - T.SkinTab(_G["MerchantFrameTab"..i]) - end - - -- skin icons / merchant slots - for i = 1, 12 do - local b = _G["MerchantItem"..i.."ItemButton"] - local t = _G["MerchantItem"..i.."ItemButtonIconTexture"] - local item_bar = _G["MerchantItem"..i] - item_bar:StripTextures(true) - item_bar:CreateBackdrop("Default") - - b:StripTextures() - b:StyleButton(false) - b:SetTemplate("Default", true) - b:Point("TOPLEFT", item_bar, "TOPLEFT", 4, -4) - t:SetTexCoord(.08, .92, .08, .92) - t:ClearAllPoints() - t:Point("TOPLEFT", 2, -2) - t:Point("BOTTOMRIGHT", -2, 2) - - _G["MerchantItem"..i.."MoneyFrame"]:ClearAllPoints() - _G["MerchantItem"..i.."MoneyFrame"]:Point("BOTTOMLEFT", b, "BOTTOMRIGHT", 3, 0) - - end - - -- Skin buyback item frame + icon - MerchantBuyBackItemItemButton:StripTextures() - MerchantBuyBackItemItemButton:StyleButton(false) - MerchantBuyBackItemItemButton:SetTemplate("Default", true) - MerchantBuyBackItemItemButtonIconTexture:SetTexCoord(.08, .92, .08, .92) - MerchantBuyBackItemItemButtonIconTexture:ClearAllPoints() - MerchantBuyBackItemItemButtonIconTexture:Point("TOPLEFT", 2, -2) - MerchantBuyBackItemItemButtonIconTexture:Point("BOTTOMRIGHT", -2, 2) - - - MerchantRepairItemButton:StyleButton(false) - MerchantRepairItemButton:SetTemplate("Default", true) - for i=1, MerchantRepairItemButton:GetNumRegions() do - local region = select(i, MerchantRepairItemButton:GetRegions()) - if region:GetObjectType() == "Texture" and region:GetTexture() == "Interface\\MerchantFrame\\UI-Merchant-RepairIcons" then - region:SetTexCoord(0.04, 0.24, 0.06, 0.5) - region:ClearAllPoints() - region:Point("TOPLEFT", 2, -2) - region:Point("BOTTOMRIGHT", -2, 2) - end - end - - MerchantGuildBankRepairButton:StyleButton() - MerchantGuildBankRepairButton:SetTemplate("Default", true) - MerchantGuildBankRepairButtonIcon:SetTexCoord(0.61, 0.82, 0.1, 0.52) - MerchantGuildBankRepairButtonIcon:ClearAllPoints() - MerchantGuildBankRepairButtonIcon:Point("TOPLEFT", 2, -2) - MerchantGuildBankRepairButtonIcon:Point("BOTTOMRIGHT", -2, 2) - - MerchantRepairAllButton:StyleButton(false) - MerchantRepairAllButton:SetTemplate("Default", true) - MerchantRepairAllIcon:SetTexCoord(0.34, 0.1, 0.34, 0.535, 0.535, 0.1, 0.535, 0.535) - MerchantRepairAllIcon:ClearAllPoints() - MerchantRepairAllIcon:Point("TOPLEFT", 2, -2) - MerchantRepairAllIcon:Point("BOTTOMRIGHT", -2, 2) - - -- Skin misc frames - MerchantFrame:Width(360) - T.SkinCloseButton(MerchantFrameCloseButton, MerchantFrame.backdrop) - T.SkinNextPrevButton(MerchantNextPageButton) - T.SkinNextPrevButton(MerchantPrevPageButton) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/opacity.lua b/Tukui/modules/skins/blizzard/opacity.lua deleted file mode 100644 index 4beb5b9..0000000 --- a/Tukui/modules/skins/blizzard/opacity.lua +++ /dev/null @@ -1,8 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - OpacityFrame:StripTextures() - OpacityFrame:SetTemplate("Default") -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/others.lua b/Tukui/modules/skins/blizzard/others.lua deleted file mode 100644 index 36db41f..0000000 --- a/Tukui/modules/skins/blizzard/others.lua +++ /dev/null @@ -1,216 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - -- Others Blizzard frame we want to reskin - local skins = { - "StaticPopup1", - "StaticPopup2", - "StaticPopup3", - "StaticPopup4", - "GameMenuFrame", - "InterfaceOptionsFrame", - "VideoOptionsFrame", - "AudioOptionsFrame", - "LFDDungeonReadyStatus", - "BNToastFrame", - "TicketStatusFrameButton", - "LFDSearchStatus", - "AutoCompleteBox", - "ConsolidatedBuffsTooltip", - "ReadyCheckFrame", - "StackSplitFrame", - "CharacterFrame", - "VoiceChatTalkers" - } - - for i = 1, getn(skins) do - if _G[skins[i]] then - _G[skins[i]]:SetTemplate("Default") - if _G[skins[i]] ~= _G["AutoCompleteBox"] then -- frame to blacklist from create shadow function - _G[skins[i]]:CreateShadow("Default") - end - end - end - - local StripAllTextures = { - "VideoOptionsFrameCategoryFrame", - "VideoOptionsFramePanelContainer", - "AudioOptionsSoundPanelPlayback", - "AudioOptionsSoundPanelHardware", - "AudioOptionsSoundPanelVolume", - "AudioOptionsVoicePanelTalking", - "AudioOptionsVoicePanelBinding", - "AudioOptionsVoicePanelListening", - "InterfaceOptionsFrameCategories", - "InterfaceOptionsFramePanelContainer", - "InterfaceOptionsFrameTab1", - "InterfaceOptionsFrameTab2", - "InterfaceOptionsFrameAddOns", - } - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end - - local ChatMenus = { - "ChatMenu", - "EmoteMenu", - "LanguageMenu", - "VoiceMacroMenu", - } - -- - for i = 1, getn(ChatMenus) do - if _G[ChatMenus[i]] == _G["ChatMenu"] then - _G[ChatMenus[i]]:HookScript("OnShow", function(self) self:SetTemplate("Default", true) self:SetBackdropColor(unpack(C["media"].backdropcolor)) self:ClearAllPoints() self:SetPoint("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, T.Scale(30)) end) - else - _G[ChatMenus[i]]:HookScript("OnShow", function(self) self:SetTemplate("Default", true) self:SetBackdropColor(unpack(C["media"].backdropcolor)) end) - end - end - - --LFD Role Picker frame - LFDRoleCheckPopup:StripTextures() - LFDRoleCheckPopup:SetTemplate("Default") - T.SkinButton(LFDRoleCheckPopupAcceptButton) - T.SkinButton(LFDRoleCheckPopupDeclineButton) - T.SkinCheckBox(LFDRoleCheckPopupRoleButtonTank:GetChildren()) - T.SkinCheckBox(LFDRoleCheckPopupRoleButtonDPS:GetChildren()) - T.SkinCheckBox(LFDRoleCheckPopupRoleButtonHealer:GetChildren()) - LFDRoleCheckPopupRoleButtonTank:GetChildren():SetFrameLevel(LFDRoleCheckPopupRoleButtonTank:GetChildren():GetFrameLevel() + 1) - LFDRoleCheckPopupRoleButtonDPS:GetChildren():SetFrameLevel(LFDRoleCheckPopupRoleButtonDPS:GetChildren():GetFrameLevel() + 1) - LFDRoleCheckPopupRoleButtonHealer:GetChildren():SetFrameLevel(LFDRoleCheckPopupRoleButtonHealer:GetChildren():GetFrameLevel() + 1) - - -- reskin popup buttons - for i = 1, 4 do - for j = 1, 3 do - T.SkinButton(_G["StaticPopup"..i.."Button"..j]) - T.SkinEditBox(_G["StaticPopup"..i.."EditBox"]) - T.SkinEditBox(_G["StaticPopup"..i.."MoneyInputFrameGold"]) - T.SkinEditBox(_G["StaticPopup"..i.."MoneyInputFrameSilver"]) - T.SkinEditBox(_G["StaticPopup"..i.."MoneyInputFrameCopper"]) - _G["StaticPopup"..i.."EditBox"].backdrop:Point("TOPLEFT", -2, -4) - _G["StaticPopup"..i.."EditBox"].backdrop:Point("BOTTOMRIGHT", 2, 4) - _G["StaticPopup"..i.."ItemFrameNameFrame"]:Kill() - _G["StaticPopup"..i.."ItemFrame"]:GetNormalTexture():Kill() - _G["StaticPopup"..i.."ItemFrame"]:SetTemplate("Default") - _G["StaticPopup"..i.."ItemFrame"]:StyleButton() - _G["StaticPopup"..i.."ItemFrameIconTexture"]:SetTexCoord(.08, .92, .08, .92) - _G["StaticPopup"..i.."ItemFrameIconTexture"]:ClearAllPoints() - _G["StaticPopup"..i.."ItemFrameIconTexture"]:Point("TOPLEFT", 2, -2) - _G["StaticPopup"..i.."ItemFrameIconTexture"]:Point("BOTTOMRIGHT", -2, 2) - end - end - - -- reskin all esc/menu buttons - local BlizzardMenuButtons = { - "Options", - "SoundOptions", - "UIOptions", - "Keybindings", - "Macros", - "Ratings", - "AddOns", - "Logout", - "Quit", - "Continue", - "MacOptions", - "Help" - } - - for i = 1, getn(BlizzardMenuButtons) do - local ElvuiMenuButtons = _G["GameMenuButton"..BlizzardMenuButtons[i]] - if ElvuiMenuButtons then - T.SkinButton(ElvuiMenuButtons) - end - end - - if IsAddOnLoaded("OptionHouse") then - T.SkinButton(GameMenuButtonOptionHouse) - end - - -- hide header textures and move text/buttons. - local BlizzardHeader = { - "GameMenuFrame", - "InterfaceOptionsFrame", - "AudioOptionsFrame", - "VideoOptionsFrame", - } - - for i = 1, getn(BlizzardHeader) do - local title = _G[BlizzardHeader[i].."Header"] - if title then - title:SetTexture("") - title:ClearAllPoints() - if title == _G["GameMenuFrameHeader"] then - title:SetPoint("TOP", GameMenuFrame, 0, 7) - else - title:SetPoint("TOP", BlizzardHeader[i], 0, 0) - end - end - end - - -- here we reskin all "normal" buttons - local BlizzardButtons = { - "VideoOptionsFrameOkay", - "VideoOptionsFrameCancel", - "VideoOptionsFrameDefaults", - "VideoOptionsFrameApply", - "AudioOptionsFrameOkay", - "AudioOptionsFrameCancel", - "AudioOptionsFrameDefaults", - "InterfaceOptionsFrameDefaults", - "InterfaceOptionsFrameOkay", - "InterfaceOptionsFrameCancel", - "ReadyCheckFrameYesButton", - "ReadyCheckFrameNoButton", - "StackSplitOkayButton", - "StackSplitCancelButton", - "RolePollPopupAcceptButton", - "InterfaceOptionsHelpPanelResetTutorials", - "CompactUnitFrameProfilesGeneralOptionsFrameResetPositionButton", - } - - for i = 1, getn(BlizzardButtons) do - local Buttons = _G[BlizzardButtons[i]] - if Buttons then - T.SkinButton(Buttons) - end - end - - -- if a button position is not really where we want, we move it here - _G["VideoOptionsFrameCancel"]:ClearAllPoints() - _G["VideoOptionsFrameCancel"]:SetPoint("RIGHT",_G["VideoOptionsFrameApply"],"LEFT",-4,0) - _G["VideoOptionsFrameOkay"]:ClearAllPoints() - _G["VideoOptionsFrameOkay"]:SetPoint("RIGHT",_G["VideoOptionsFrameCancel"],"LEFT",-4,0) - _G["AudioOptionsFrameOkay"]:ClearAllPoints() - _G["AudioOptionsFrameOkay"]:SetPoint("RIGHT",_G["AudioOptionsFrameCancel"],"LEFT",-4,0) - _G["InterfaceOptionsFrameOkay"]:ClearAllPoints() - _G["InterfaceOptionsFrameOkay"]:SetPoint("RIGHT",_G["InterfaceOptionsFrameCancel"],"LEFT", -4,0) - _G["ReadyCheckFrameYesButton"]:SetParent(_G["ReadyCheckFrame"]) - _G["ReadyCheckFrameNoButton"]:SetParent(_G["ReadyCheckFrame"]) - _G["ReadyCheckFrameYesButton"]:ClearAllPoints() - _G["ReadyCheckFrameNoButton"]:ClearAllPoints() - _G["ReadyCheckFrameYesButton"]:SetPoint("RIGHT", _G["ReadyCheckFrame"], "CENTER", -2, -20) - _G["ReadyCheckFrameNoButton"]:SetPoint("LEFT", _G["ReadyCheckFrameYesButton"], "RIGHT", 3, 0) - _G["ReadyCheckFrameText"]:SetParent(_G["ReadyCheckFrame"]) - _G["ReadyCheckFrameText"]:ClearAllPoints() - _G["ReadyCheckFrameText"]:SetPoint("TOP", 0, -12) - - -- others - _G["ReadyCheckListenerFrame"]:SetAlpha(0) - _G["ReadyCheckFrame"]:HookScript("OnShow", function(self) if UnitIsUnit("player", self.initiator) then self:Hide() end end) -- bug fix, don't show it if initiator - _G["StackSplitFrame"]:GetRegions():Hide() - - RolePollPopup:SetTemplate("Default") - RolePollPopup:CreateShadow("Default") - - for i = 1, 4 do - local button = _G["StaticPopup"..i.."CloseButton"] - button:SetNormalTexture("") - button.SetNormalTexture = T.dummy - button:SetPushedTexture("") - button.SetPushedTexture = T.dummy - T.SkinCloseButton(button) - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/petition.lua b/Tukui/modules/skins/blizzard/petition.lua deleted file mode 100644 index 2d3d8d0..0000000 --- a/Tukui/modules/skins/blizzard/petition.lua +++ /dev/null @@ -1,34 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - PetitionFrame:StripTextures(true) - PetitionFrame:SetTemplate("Default") - PetitionFrame:CreateShadow("Default") - - T.SkinButton(PetitionFrameRequestButton) - T.SkinButton(PetitionFrameRenameButton) - T.SkinButton(PetitionFrameCancelButton) - T.SkinButton(PetitionFrameSignButton) - T.SkinCloseButton(PetitionFrameCloseButton) - - PetitionFrameCharterTitle:SetTextColor(1, 1, 0) - PetitionFrameCharterName:SetTextColor(1, 1, 1) - PetitionFrameMasterTitle:SetTextColor(1, 1, 0) - PetitionFrameMasterName:SetTextColor(1, 1, 1) - PetitionFrameMemberTitle:SetTextColor(1, 1, 0) - - for i=1, 9 do - _G["PetitionFrameMemberName"..i]:SetTextColor(1, 1, 1) - end - - PetitionFrameInstructions:SetTextColor(1, 1, 1) - - PetitionFrameRenameButton:Point("LEFT", PetitionFrameRequestButton, "RIGHT", 3, 0) - PetitionFrameRenameButton:Point("RIGHT", PetitionFrameCancelButton, "LEFT", -3, 0) - PetitionFrame:Height(PetitionFrame:GetHeight() - 80) - - PetitionFrameCancelButton:Point("BOTTOMRIGHT", PetitionFrame, "BOTTOMRIGHT", -40, 20) - PetitionFrameRequestButton:Point("BOTTOMLEFT", PetitionFrame, "BOTTOMLEFT", 22, 20) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) diff --git a/Tukui/modules/skins/blizzard/pvp.lua b/Tukui/modules/skins/blizzard/pvp.lua deleted file mode 100644 index 0e48607..0000000 --- a/Tukui/modules/skins/blizzard/pvp.lua +++ /dev/null @@ -1,176 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local buttons = { - "PVPFrameLeftButton", - "PVPFrameRightButton", - "PVPColorPickerButton1", - "PVPColorPickerButton2", - "PVPColorPickerButton3", - "PVPBannerFrameAcceptButton", - } - - if T.toc < 40200 then - tinsert(buttons, "PVPHonorFrameWarGameButton") - end - - for i = 1, #buttons do - _G[buttons[i]]:StripTextures() - T.SkinButton(_G[buttons[i]]) - end - - local KillTextures = { - "PVPHonorFrameBGTex", - "PVPHonorFrameInfoScrollFrameScrollBar", - "PVPConquestFrameInfoButtonInfoBG", - "PVPConquestFrameInfoButtonInfoBGOff", - "PVPTeamManagementFrameFlag2GlowBG", - "PVPTeamManagementFrameFlag3GlowBG", - "PVPTeamManagementFrameFlag5GlowBG", - "PVPTeamManagementFrameFlag2HeaderSelected", - "PVPTeamManagementFrameFlag3HeaderSelected", - "PVPTeamManagementFrameFlag5HeaderSelected", - "PVPTeamManagementFrameFlag2Header", - "PVPTeamManagementFrameFlag3Header", - "PVPTeamManagementFrameFlag5Header", - "PVPTeamManagementFrameWeeklyDisplayLeft", - "PVPTeamManagementFrameWeeklyDisplayRight", - "PVPTeamManagementFrameWeeklyDisplayMiddle", - "PVPBannerFramePortrait", - "PVPBannerFramePortraitFrame", - "PVPBannerFrameInset", - "PVPBannerFrameEditBoxLeft", - "PVPBannerFrameEditBoxRight", - "PVPBannerFrameEditBoxMiddle", - "PVPBannerFrameCancelButton_LeftSeparator", - } - - for _, texture in pairs(KillTextures) do - _G[texture]:Kill() - end - - local StripAllTextures = { - "PVPFrame", - "PVPFrameInset", - "PVPHonorFrame", - "PVPConquestFrame", - "PVPTeamManagementFrame", - "PVPHonorFrameTypeScrollFrame", - "PVPFrameTopInset", - "PVPTeamManagementFrameInvalidTeamFrame", - "PVPBannerFrame", - "PVPBannerFrameCustomization1", - "PVPBannerFrameCustomization2", - "PVPBannerFrameCustomizationFrame", - } - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end - - local function ArenaHeader(self, first, i) - local button = _G["PVPTeamManagementFrameHeader"..i] - - if first then - button:StripTextures() - end - end - - for i=1, 4 do - ArenaHeader(nil, true, i) - end - - PVPBannerFrameEditBox:CreateBackdrop("Default") - PVPBannerFrameEditBox.backdrop:Point( "TOPLEFT", PVPBannerFrameEditBox, "TOPLEFT" ,-5,-5) - PVPBannerFrameEditBox.backdrop:Point( "BOTTOMRIGHT", PVPBannerFrameEditBox, "BOTTOMRIGHT",5,5) - PVPHonorFrameInfoScrollFrameChildFrameDescription:SetTextColor(1,1,1) - PVPHonorFrameInfoScrollFrameChildFrameRewardsInfo.description:SetTextColor(1,1,1) - PVPTeamManagementFrameInvalidTeamFrame:CreateBackdrop("Default") - PVPTeamManagementFrameInvalidTeamFrame:SetFrameLevel(PVPTeamManagementFrameInvalidTeamFrame:GetFrameLevel()+1) - PVPTeamManagementFrameInvalidTeamFrame.backdrop:Point( "TOPLEFT", PVPTeamManagementFrameInvalidTeamFrame, "TOPLEFT") - PVPTeamManagementFrameInvalidTeamFrame.backdrop:Point( "BOTTOMRIGHT", PVPTeamManagementFrameInvalidTeamFrame, "BOTTOMRIGHT") - PVPTeamManagementFrameInvalidTeamFrame.backdrop:SetFrameLevel(PVPTeamManagementFrameInvalidTeamFrame:GetFrameLevel()) - - if T.toc < 40200 then - PVPFrameConquestBar:StripTextures() - PVPFrameConquestBar:SetStatusBarTexture(C["media"].normTex) - PVPFrameConquestBar:CreateBackdrop("Default") - else - PVPFrameConquestBarLeft:Kill() - PVPFrameConquestBarRight:Kill() - PVPFrameConquestBarMiddle:Kill() - PVPFrameConquestBarBG:Kill() - PVPFrameConquestBarShadow:Kill() - PVPFrameConquestBar.progress:SetTexture(C["media"].normTex) - PVPFrameConquestBar:CreateBackdrop("Default") - PVPFrameConquestBar.backdrop:Point("TOPLEFT", PVPFrameConquestBar.progress, "TOPLEFT", -2, 2) - PVPFrameConquestBar.backdrop:Point("BOTTOMRIGHT", PVPFrameConquestBar, "BOTTOMRIGHT", -2, 2) - end - - PVPBannerFrame:CreateBackdrop("Default") - PVPBannerFrame.backdrop:Point( "TOPLEFT", PVPBannerFrame, "TOPLEFT") - PVPBannerFrame.backdrop:Point( "BOTTOMRIGHT", PVPBannerFrame, "BOTTOMRIGHT") - PVPBannerFrameCustomization1:CreateBackdrop("Default") - PVPBannerFrameCustomization1.backdrop:Point( "TOPLEFT", PVPBannerFrameCustomization1LeftButton, "TOPRIGHT" ,2,0) - PVPBannerFrameCustomization1.backdrop:Point( "BOTTOMRIGHT", PVPBannerFrameCustomization1RightButton, "BOTTOMLEFT",-2,0) - PVPBannerFrameCustomization2:CreateBackdrop("Default") - PVPBannerFrameCustomization2.backdrop:Point( "TOPLEFT", PVPBannerFrameCustomization2LeftButton, "TOPRIGHT",2,0) - PVPBannerFrameCustomization2.backdrop:Point( "BOTTOMRIGHT", PVPBannerFrameCustomization2RightButton, "BOTTOMLEFT",-2,0) - T.SkinCloseButton(PVPBannerFrameCloseButton,PVPBannerFrame) - T.SkinNextPrevButton(PVPBannerFrameCustomization1LeftButton) - PVPBannerFrameCustomization1LeftButton:Height(PVPBannerFrameCustomization1:GetHeight()) - T.SkinNextPrevButton(PVPBannerFrameCustomization1RightButton) - PVPBannerFrameCustomization1RightButton:Height(PVPBannerFrameCustomization1:GetHeight()) - T.SkinNextPrevButton(PVPBannerFrameCustomization2LeftButton) - PVPBannerFrameCustomization2LeftButton:Height(PVPBannerFrameCustomization1:GetHeight()) - T.SkinNextPrevButton(PVPBannerFrameCustomization2RightButton) - PVPBannerFrameCustomization2RightButton:Height(PVPBannerFrameCustomization1:GetHeight()) - PVPFrame:CreateBackdrop("Default") - PVPFrame.backdrop:Point( "TOPLEFT", PVPFrame, "TOPLEFT") - PVPFrame.backdrop:Point( "BOTTOMRIGHT", PVPFrame, "BOTTOMRIGHT") - T.SkinCloseButton(PVPFrameCloseButton,PVPFrame) - T.SkinNextPrevButton(PVPTeamManagementFrameWeeklyToggleLeft) - T.SkinNextPrevButton(PVPTeamManagementFrameWeeklyToggleRight) - PVPColorPickerButton1:Height(PVPColorPickerButton1:GetHeight()-5) - PVPColorPickerButton2:Height(PVPColorPickerButton1:GetHeight()) - PVPColorPickerButton3:Height(PVPColorPickerButton1:GetHeight()) - T.SkinScrollBar(PVPHonorFrameTypeScrollFrameScrollBar) - - --War Games - if T.toc >= 40200 then - T.SkinButton(WarGameStartButton, true) - WarGamesFrame:StripTextures() - T.SkinScrollBar(WarGamesFrameScrollFrameScrollBar) - - WarGameStartButton:ClearAllPoints() - WarGameStartButton:Point("LEFT", PVPFrameLeftButton, "RIGHT", 2, 0) - WarGamesFrameDescription:SetTextColor(1, 1, 1) - end - - --Freaking gay Cancel Button FFSlocal - local f = PVPBannerFrameCancelButton - local l = _G[f:GetName().."Left"] - local m = _G[f:GetName().."Middle"] - local r = _G[f:GetName().."Right"] - if l then l:SetAlpha(0) end - if m then m:SetAlpha(0) end - if r then r:SetAlpha(0) end - f:CreateBackdrop("Default") - f:SetFrameLevel(PVPBannerFrameAcceptButton:GetFrameLevel()+1) - f.backdrop:Point( "TOPLEFT", PVPBannerFrameAcceptButton, "TOPLEFT", PVPBannerFrame:GetWidth()-PVPBannerFrameAcceptButton:GetWidth()-10,0) - f.backdrop:Point( "BOTTOMRIGHT", PVPBannerFrameAcceptButton, "BOTTOMRIGHT", PVPBannerFrame:GetWidth()-PVPBannerFrameAcceptButton:GetWidth()-10, 0) - f.backdrop:SetFrameLevel(f:GetFrameLevel()-1) - - --Bottom Tabs - if T.toc < 40200 then - for i=1,3 do - T.SkinTab(_G["PVPFrameTab"..i]) - end - else - for i=1,4 do - T.SkinTab(_G["PVPFrameTab"..i]) - end - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/quest.lua b/Tukui/modules/skins/blizzard/quest.lua deleted file mode 100644 index b65baa9..0000000 --- a/Tukui/modules/skins/blizzard/quest.lua +++ /dev/null @@ -1,68 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - QuestFrame:StripTextures(true) - QuestFrameDetailPanel:StripTextures(true) - QuestDetailScrollFrame:StripTextures(true) - QuestDetailScrollChildFrame:StripTextures(true) - QuestRewardScrollFrame:StripTextures(true) - QuestRewardScrollChildFrame:StripTextures(true) - QuestFrameProgressPanel:StripTextures(true) - QuestFrameRewardPanel:StripTextures(true) - QuestFrame:CreateBackdrop("Default") - QuestFrame.backdrop:Point("TOPLEFT", 6, -8) - QuestFrame.backdrop:Point("BOTTOMRIGHT", -20, 65) - QuestFrame.backdrop:CreateShadow("Default") - T.SkinButton(QuestFrameAcceptButton, true) - T.SkinButton(QuestFrameDeclineButton, true) - T.SkinButton(QuestFrameCompleteButton, true) - T.SkinButton(QuestFrameGoodbyeButton, true) - T.SkinButton(QuestFrameCompleteQuestButton, true) - T.SkinCloseButton(QuestFrameCloseButton, QuestFrame.backdrop) - T.SkinScrollBar(QuestLogScrollFrameScrollBar) - T.SkinScrollBar(QuestDetailScrollFrameScrollBar) - T.SkinScrollBar(QuestRewardScrollFrameScrollBar) - - for i=1, 6 do - local button = _G["QuestProgressItem"..i] - local texture = _G["QuestProgressItem"..i.."IconTexture"] - button:StripTextures() - button:StyleButton() - button:Width(_G["QuestProgressItem"..i]:GetWidth() - 4) - button:SetFrameLevel(button:GetFrameLevel() + 2) - texture:SetTexCoord(.08, .92, .08, .92) - texture:SetDrawLayer("OVERLAY") - texture:Point("TOPLEFT", 2, -2) - texture:Size(texture:GetWidth() - 2, texture:GetHeight() - 2) - _G["QuestProgressItem"..i.."Count"]:SetDrawLayer("OVERLAY") - button:SetTemplate("Default") - end - - hooksecurefunc("QuestFrameProgressItems_Update", function() - QuestProgressTitleText:SetTextColor(1, 1, 0) - QuestProgressText:SetTextColor(1, 1, 1) - QuestProgressRequiredItemsText:SetTextColor(1, 1, 0) - QuestProgressRequiredMoneyText:SetTextColor(1, 1, 0) - end) - - T.SkinScrollBar(QuestNPCModelTextScrollFrameScrollBar) - T.SkinScrollBar(QuestGreetingScrollFrameScrollBar) - T.SkinScrollBar(QuestProgressScrollFrameScrollBar) - QuestNPCModel:StripTextures() - QuestNPCModel:CreateBackdrop("Default") - QuestNPCModel:Point("TOPLEFT", QuestLogDetailFrame, "TOPRIGHT", 4, -34) - QuestNPCModelTextFrame:StripTextures() - QuestNPCModelTextFrame:CreateBackdrop("Default") - QuestNPCModelTextFrame.backdrop:Point("TOPLEFT", QuestNPCModel.backdrop, "BOTTOMLEFT", 0, -2) - QuestLogDetailFrame:StripTextures() - QuestLogDetailFrame:SetTemplate("Default") - QuestLogDetailScrollFrame:StripTextures() - T.SkinCloseButton(QuestLogDetailFrameCloseButton) - - hooksecurefunc("QuestFrame_ShowQuestPortrait", function(parentFrame, portrait, text, name, x, y) - QuestNPCModel:ClearAllPoints(); - QuestNPCModel:SetPoint("TOPLEFT", parentFrame, "TOPRIGHT", x + 18, y); - end) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/questlog.lua b/Tukui/modules/skins/blizzard/questlog.lua deleted file mode 100644 index f16512d..0000000 --- a/Tukui/modules/skins/blizzard/questlog.lua +++ /dev/null @@ -1,133 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -local function LoadSkin() - T.SkinCloseButton(QuestLogFrameCloseButton) - QuestLogFrame:StripTextures() - QuestLogFrame:SetTemplate("Default") - QuestLogFrame:CreateShadow("Default") - QuestLogCount:StripTextures() - - EmptyQuestLogFrame:StripTextures() - - QuestLogFrameShowMapButton:StripTextures() - T.SkinButton(QuestLogFrameShowMapButton) - QuestLogFrameShowMapButton.text:ClearAllPoints() - QuestLogFrameShowMapButton.text:SetPoint("CENTER") - QuestLogFrameShowMapButton:Size(QuestLogFrameShowMapButton:GetWidth() - 30, QuestLogFrameShowMapButton:GetHeight(), - 40) - - QuestLogFrameCompleteButton:StripTextures() - T.SkinButton(QuestLogFrameCompleteButton) - T.SkinScrollBar(QuestLogDetailScrollFrameScrollBar) - - local buttons = { - "QuestLogFrameAbandonButton", - "QuestLogFramePushQuestButton", - "QuestLogFrameTrackButton", - "QuestLogFrameCancelButton", - } - - for _, button in pairs(buttons) do - T.SkinButton(_G[button]) - end - QuestLogFramePushQuestButton:Point("LEFT", QuestLogFrameAbandonButton, "RIGHT", 2, 0) - QuestLogFramePushQuestButton:Point("RIGHT", QuestLogFrameTrackButton, "LEFT", -2, 0) - - for i=1, MAX_NUM_ITEMS do - _G["QuestInfoItem"..i]:StripTextures() - _G["QuestInfoItem"..i]:StyleButton() - _G["QuestInfoItem"..i]:Width(_G["QuestInfoItem"..i]:GetWidth() - 4) - _G["QuestInfoItem"..i]:SetFrameLevel(_G["QuestInfoItem"..i]:GetFrameLevel() + 2) - _G["QuestInfoItem"..i.."IconTexture"]:SetTexCoord(.08, .92, .08, .92) - _G["QuestInfoItem"..i.."IconTexture"]:SetDrawLayer("OVERLAY") - _G["QuestInfoItem"..i.."IconTexture"]:Point("TOPLEFT", 2, -2) - _G["QuestInfoItem"..i.."IconTexture"]:Size(_G["QuestInfoItem"..i.."IconTexture"]:GetWidth() - 2, _G["QuestInfoItem"..i.."IconTexture"]:GetHeight() - 2) - _G["QuestInfoItem"..i]:SetTemplate("Default") - _G["QuestInfoItem"..i.."Count"]:SetDrawLayer("OVERLAY") - end - - QuestInfoSkillPointFrame:StripTextures() - QuestInfoSkillPointFrame:StyleButton() - QuestInfoSkillPointFrame:Width(QuestInfoSkillPointFrame:GetWidth() - 4) - QuestInfoSkillPointFrame:SetFrameLevel(QuestInfoSkillPointFrame:GetFrameLevel() + 2) - QuestInfoSkillPointFrameIconTexture:SetTexCoord(.08, .92, .08, .92) - QuestInfoSkillPointFrameIconTexture:SetDrawLayer("OVERLAY") - QuestInfoSkillPointFrameIconTexture:Point("TOPLEFT", 2, -2) - QuestInfoSkillPointFrameIconTexture:Size(QuestInfoSkillPointFrameIconTexture:GetWidth() - 2, QuestInfoSkillPointFrameIconTexture:GetHeight() - 2) - QuestInfoSkillPointFrame:SetTemplate("Default") - QuestInfoSkillPointFrameCount:SetDrawLayer("OVERLAY") - QuestInfoSkillPointFramePoints:ClearAllPoints() - QuestInfoSkillPointFramePoints:Point("BOTTOMRIGHT", QuestInfoSkillPointFrameIconTexture, "BOTTOMRIGHT") - - QuestInfoItemHighlight:StripTextures() - QuestInfoItemHighlight:SetTemplate("Default") - QuestInfoItemHighlight:SetBackdropBorderColor(1, 1, 0) - QuestInfoItemHighlight:SetBackdropColor(0, 0, 0, 0) - QuestInfoItemHighlight:Size(142, 40) - - hooksecurefunc("QuestInfoItem_OnClick", function(self) - QuestInfoItemHighlight:ClearAllPoints() - QuestInfoItemHighlight:SetAllPoints(self) - end) - - --Everything here to make the text a readable color - local function QuestObjectiveText() - local numObjectives = GetNumQuestLeaderBoards() - local objective - local type, finished - local numVisibleObjectives = 0 - for i = 1, numObjectives do - _, type, finished = GetQuestLogLeaderBoard(i) - if (type ~= "spell") then - numVisibleObjectives = numVisibleObjectives+1 - objective = _G["QuestInfoObjective"..numVisibleObjectives] - if ( finished ) then - objective:SetTextColor(1, 1, 0) - else - objective:SetTextColor(0.6, 0.6, 0.6) - end - end - end - end - - hooksecurefunc("QuestInfo_Display", function(template, parentFrame, acceptButton, material) - local textColor = {1, 1, 1} - local titleTextColor = {1, 1, 0} - - -- headers - QuestInfoTitleHeader:SetTextColor(unpack(titleTextColor)) - QuestInfoDescriptionHeader:SetTextColor(unpack(titleTextColor)) - QuestInfoObjectivesHeader:SetTextColor(unpack(titleTextColor)) - QuestInfoRewardsHeader:SetTextColor(unpack(titleTextColor)) - -- other text - QuestInfoDescriptionText:SetTextColor(unpack(textColor)) - QuestInfoObjectivesText:SetTextColor(unpack(textColor)) - QuestInfoGroupSize:SetTextColor(unpack(textColor)) - QuestInfoRewardText:SetTextColor(unpack(textColor)) - -- reward frame text - QuestInfoItemChooseText:SetTextColor(unpack(textColor)) - QuestInfoItemReceiveText:SetTextColor(unpack(textColor)) - QuestInfoSpellLearnText:SetTextColor(unpack(textColor)) - QuestInfoXPFrameReceiveText:SetTextColor(unpack(textColor)) - - QuestObjectiveText() - end) - - hooksecurefunc("QuestInfo_ShowRequiredMoney", function() - local requiredMoney = GetQuestLogRequiredMoney() - if ( requiredMoney > 0 ) then - if ( requiredMoney > GetMoney() ) then - -- Not enough money - QuestInfoRequiredMoneyText:SetTextColor(0.6, 0.6, 0.6) - else - QuestInfoRequiredMoneyText:SetTextColor(1, 1, 0) - end - end - end) - - QuestLogFrame:HookScript("OnShow", function() - QuestLogDetailScrollFrame:Height(QuestLogScrollFrame:GetHeight()-4) - QuestLogScrollFrame:SetTemplate("Default") - QuestLogDetailScrollFrame:SetTemplate("Default") - end) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/raid.lua b/Tukui/modules/skins/blizzard/raid.lua deleted file mode 100644 index 961caf2..0000000 --- a/Tukui/modules/skins/blizzard/raid.lua +++ /dev/null @@ -1,49 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -if T.toc >= 40300 then return end - -local function LoadSkin() - local buttons = { - "RaidFrameRaidBrowserButton", - "RaidFrameRaidInfoButton", - "RaidFrameReadyCheckButton", - } - - for i = 1, #buttons do - T.SkinButton(_G[buttons[i]]) - end - - local StripAllTextures = { - "RaidGroup1", - "RaidGroup2", - "RaidGroup3", - "RaidGroup4", - "RaidGroup5", - "RaidGroup6", - "RaidGroup7", - "RaidGroup8", - } - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end - - local function raidskinupdate() - nummembers = GetNumRaidMembers(); - - for i=1,nummembers do - T.SkinButton(_G["RaidGroupButton"..i]) - end - end - raidskinupdate() - RaidFrame:HookScript("OnShow", raidskinupdate) - hooksecurefunc("RaidGroupFrame_OnEvent", raidskinupdate) - - for i=1,8 do - for j=1,5 do - _G["RaidGroup"..i.."Slot"..j]:StripTextures() - _G["RaidGroup"..i.."Slot"..j]:SetTemplate("Default") - end - end -end - -T.SkinFuncs["Blizzard_RaidUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/raidinfo.lua b/Tukui/modules/skins/blizzard/raidinfo.lua deleted file mode 100644 index 9ddb17c..0000000 --- a/Tukui/modules/skins/blizzard/raidinfo.lua +++ /dev/null @@ -1,42 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - local StripAllTextures = { - "RaidInfoFrame", - "RaidInfoInstanceLabel", - "RaidInfoIDLabel", - } - - local KillTextures = { - "RaidInfoScrollFrameScrollBarBG", - "RaidInfoScrollFrameScrollBarTop", - "RaidInfoScrollFrameScrollBarBottom", - "RaidInfoScrollFrameScrollBarMiddle", - } - local buttons = { - "RaidFrameConvertToRaidButton", - "RaidFrameRaidInfoButton", - "RaidInfoExtendButton", - "RaidInfoCancelButton", - "RaidFrameNotInRaidRaidBrowserButton", - } - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end - - for _, texture in pairs(KillTextures) do - _G[texture]:Kill() - end - - for i = 1, #buttons do - if _G[buttons[i]] then T.SkinButton(_G[buttons[i]]) end - end - RaidInfoScrollFrame:StripTextures() - RaidInfoFrame:CreateBackdrop("Default") - RaidInfoFrame.backdrop:Point( "TOPLEFT", RaidInfoFrame, "TOPLEFT") - RaidInfoFrame.backdrop:Point( "BOTTOMRIGHT", RaidInfoFrame, "BOTTOMRIGHT") - T.SkinCloseButton(RaidInfoCloseButton,RaidInfoFrame) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/raidparent.lua b/Tukui/modules/skins/blizzard/raidparent.lua deleted file mode 100644 index 8fe7001..0000000 --- a/Tukui/modules/skins/blizzard/raidparent.lua +++ /dev/null @@ -1,85 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -if T.toc < 40300 then return end - -local function LoadSkin() - local StripAllTextures = { - "RaidParentFrame", - "RaidParentFrameInset", - "RaidFinderFrameRoleInset", - "RaidFinderQueueFrameScrollFrame", - "RaidFinderQueueFrame", - "RaidFinderQueueFrameIneligibleFrame", - } - - local buttons = { - "RaidFinderFrameFindRaidButton", - "RaidFinderFrameCancelButton", - } - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end - - for i = 1, #buttons do - _G[buttons[i]]:StripTextures() - T.SkinButton(_G[buttons[i]]) - end - - RaidParentFrame:SetTemplate("Default") - T.SkinCloseButton(RaidParentFrameCloseButton) - T.SkinDropDownBox(RaidFinderQueueFrameSelectionDropDown) - RaidFinderQueueFrameSelectionDropDown:ClearAllPoints() - RaidFinderQueueFrameSelectionDropDown:SetPoint("TOPRIGHT", -4, -112) - - for i=1, 3 do - local tab = _G["RaidParentFrameTab"..i] - if tab then - T.SkinTab(tab) - end - end - - local checkButtons = { - "RaidFinderQueueFrameRoleButtonTank", - "RaidFinderQueueFrameRoleButtonHealer", - "RaidFinderQueueFrameRoleButtonDPS", - "RaidFinderQueueFrameRoleButtonLeader", - } - - for _, object in pairs(checkButtons) do - _G[object].checkButton:SetFrameLevel(_G[object].checkButton:GetFrameLevel() + 2) - T.SkinCheckBox(_G[object].checkButton) - end -end - -local function LoadRaidSkin() - local groups = { - "RaidGroup1", - "RaidGroup2", - "RaidGroup3", - "RaidGroup4", - "RaidGroup5", - "RaidGroup6", - "RaidGroup7", - "RaidGroup8", - } - - T.SkinButton(RaidFrameReadyCheckButton) - for _, object in pairs(groups) do - _G[object]:StripTextures() - end - - for i=1,8 do - for j=1,5 do - _G["RaidGroup"..i.."Slot"..j]:StripTextures() - end - end - - for i=1,40 do - _G["RaidGroupButton"..i]:StripTextures() - _G["RaidGroupButton"..i]:SetTemplate("Default") - _G["RaidGroupButton"..i]:SetBackdropBorderColor(0, 0, 0, 0) - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) -T.SkinFuncs["Blizzard_RaidUI"] = LoadRaidSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/reforging.lua b/Tukui/modules/skins/blizzard/reforging.lua deleted file mode 100644 index 8892c18..0000000 --- a/Tukui/modules/skins/blizzard/reforging.lua +++ /dev/null @@ -1,42 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - ReforgingFrame:StripTextures() - ReforgingFrame:SetTemplate("Default") - - if T.toc < 40300 then - ReforgingFrameTopInset:StripTextures() - ReforgingFrameInset:StripTextures() - ReforgingFrameBottomInset:StripTextures() - T.SkinDropDownBox(ReforgingFrameFilterOldStat, 180) - T.SkinDropDownBox(ReforgingFrameFilterNewStat, 180) - else - ReforgingFrameButtonFrame:StripTextures() - ReforgingFrameReforgeButton:ClearAllPoints() - ReforgingFrameReforgeButton:Point("LEFT", ReforgingFrameRestoreButton, "RIGHT", 2, 0) - ReforgingFrameReforgeButton:Point("BOTTOMRIGHT", -3, 3) - end - - T.SkinButton(ReforgingFrameRestoreButton, true) - T.SkinButton(ReforgingFrameReforgeButton, true) - - ReforgingFrameItemButton:StripTextures() - ReforgingFrameItemButton:SetTemplate("Default", true) - ReforgingFrameItemButton:StyleButton() - ReforgingFrameItemButtonIconTexture:ClearAllPoints() - ReforgingFrameItemButtonIconTexture:Point("TOPLEFT", 2, -2) - ReforgingFrameItemButtonIconTexture:Point("BOTTOMRIGHT", -2, 2) - - hooksecurefunc("ReforgingFrame_Update", function(self) - local currentReforge, icon, name, quality, bound, cost = GetReforgeItemInfo() - if icon then - ReforgingFrameItemButtonIconTexture:SetTexCoord(.08, .92, .08, .92) - else - ReforgingFrameItemButtonIconTexture:SetTexture(nil) - end - end) - - T.SkinCloseButton(ReforgingFrameCloseButton) -end - -T.SkinFuncs["Blizzard_ReforgingUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/socket.lua b/Tukui/modules/skins/blizzard/socket.lua deleted file mode 100644 index 2837b92..0000000 --- a/Tukui/modules/skins/blizzard/socket.lua +++ /dev/null @@ -1,38 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - ItemSocketingFrame:StripTextures() - ItemSocketingFrame:SetTemplate("Default") - ItemSocketingScrollFrame:StripTextures() - ItemSocketingScrollFrame:CreateBackdrop("Default") - - for i = 1, MAX_NUM_SOCKETS do - local button = _G["ItemSocketingSocket"..i] - local button_bracket = _G["ItemSocketingSocket"..i.."BracketFrame"] - local button_bg = _G["ItemSocketingSocket"..i.."Background"] - local button_icon = _G["ItemSocketingSocket"..i.."IconTexture"] - button:StripTextures() - button:StyleButton(false) - button:SetTemplate("Default", true) - button_bracket:Kill() - button_bg:Kill() - button_icon:SetTexCoord(.08, .92, .08, .92) - button_icon:ClearAllPoints() - button_icon:Point("TOPLEFT", 2, -2) - button_icon:Point("BOTTOMRIGHT", -2, 2) - ItemSocketingFrame:HookScript("OnUpdate", function(self) - gemColor = GetSocketTypes(i) - local color = GEM_TYPE_INFO[gemColor] - button:SetBackdropColor(color.r, color.g, color.b, 0.15) - button:SetBackdropBorderColor(color.r, color.g, color.b) - end) - end - - ItemSocketingFramePortrait:Kill() - ItemSocketingSocketButton:ClearAllPoints() - ItemSocketingSocketButton:Point("BOTTOMRIGHT", ItemSocketingFrame, "BOTTOMRIGHT", -5, 5) - T.SkinButton(ItemSocketingSocketButton) - T.SkinCloseButton(ItemSocketingCloseButton) -end - -T.SkinFuncs["Blizzard_ItemSocketingUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/spellbook.lua b/Tukui/modules/skins/blizzard/spellbook.lua deleted file mode 100644 index 916c97c..0000000 --- a/Tukui/modules/skins/blizzard/spellbook.lua +++ /dev/null @@ -1,224 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -local function LoadSkin() - T.SkinCloseButton(SpellBookFrameCloseButton) - - local StripAllTextures = { - "SpellBookFrame", - "SpellBookFrameInset", - "SpellBookSpellIconsFrame", - "SpellBookSideTabsFrame", - "SpellBookPageNavigationFrame", - } - - local KillTextures = { - "SpellBookPage1", - "SpellBookPage2", - } - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end - - for _, texture in pairs(KillTextures) do - _G[texture]:Kill() - end - - local pagebackdrop = CreateFrame("Frame", nil, SpellBookPage1:GetParent()) - pagebackdrop:Point("TOPLEFT", SpellBookFrame, "TOPLEFT", 50, -50) - pagebackdrop:Point("BOTTOMRIGHT", SpellBookPage1, "BOTTOMRIGHT", 15, 35) - - T.SkinNextPrevButton(SpellBookPrevPageButton) - T.SkinNextPrevButton(SpellBookNextPageButton) - - --Skin SpellButtons - local function SpellButtons(self, first) - for i=1, SPELLS_PER_PAGE do - local button = _G["SpellButton"..i] - local icon = _G["SpellButton"..i.."IconTexture"] - - if first then - for i=1, button:GetNumRegions() do - local region = select(i, button:GetRegions()) - if region:GetObjectType() == "Texture" then - if region:GetTexture() ~= "Interface\\Buttons\\ActionBarFlyoutButton" then - region:SetTexture(nil) - end - end - end - end - - if _G["SpellButton"..i.."Highlight"] then - _G["SpellButton"..i.."Highlight"]:SetTexture(1, 1, 1, 0.3) - _G["SpellButton"..i.."Highlight"]:ClearAllPoints() - _G["SpellButton"..i.."Highlight"]:SetAllPoints(icon) - end - - if icon then - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:SetAllPoints() - - if not button.backdrop then - button:CreateBackdrop("Default", true) - end - end - - local r, g, b = _G["SpellButton"..i.."SpellName"]:GetTextColor() - - if r < 0.8 then - _G["SpellButton"..i.."SpellName"]:SetTextColor(0.6, 0.6, 0.6) - end - _G["SpellButton"..i.."SubSpellName"]:SetTextColor(0.6, 0.6, 0.6) - _G["SpellButton"..i.."RequiredLevelString"]:SetTextColor(0.6, 0.6, 0.6) - end - end - SpellButtons(nil, true) - hooksecurefunc("SpellButton_UpdateButton", SpellButtons) - - SpellBookPageText:SetTextColor(0.6, 0.6, 0.6) - - --Skill Line Tabs - for i=1, MAX_SKILLLINE_TABS do - local tab = _G["SpellBookSkillLineTab"..i] - _G["SpellBookSkillLineTab"..i.."Flash"]:Kill() - if tab then - tab:StripTextures() - tab:GetNormalTexture():SetTexCoord(.08, .92, .08, .92) - tab:GetNormalTexture():ClearAllPoints() - - tab:GetNormalTexture():Point("TOPLEFT", 2, -2) - tab:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - - tab:CreateBackdrop("Default") - tab.backdrop:SetAllPoints() - tab:StyleButton(true) - - local point, relatedTo, point2, x, y = tab:GetPoint() - tab:Point(point, relatedTo, point2, 1, y) - end - end - - local function SkinSkillLine() - for i=1, MAX_SKILLLINE_TABS do - local tab = _G["SpellBookSkillLineTab"..i] - local _, _, _, _, isGuild = GetSpellTabInfo(i) - if isGuild then - tab:GetNormalTexture():ClearAllPoints() - tab:GetNormalTexture():Point("TOPLEFT", 2, -2) - tab:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - tab:GetNormalTexture():SetTexCoord(.08, .92, .08, .92) - end - end - end - hooksecurefunc("SpellBookFrame_UpdateSkillLineTabs", SkinSkillLine) - SpellBookFrame:SetTemplate("Default") - SpellBookFrame:CreateShadow("Default") - - --Profession Tab - local professionbuttons = { - "PrimaryProfession1SpellButtonTop", - "PrimaryProfession1SpellButtonBottom", - "PrimaryProfession2SpellButtonTop", - "PrimaryProfession2SpellButtonBottom", - "SecondaryProfession1SpellButtonLeft", - "SecondaryProfession1SpellButtonRight", - "SecondaryProfession2SpellButtonLeft", - "SecondaryProfession2SpellButtonRight", - "SecondaryProfession3SpellButtonLeft", - "SecondaryProfession3SpellButtonRight", - "SecondaryProfession4SpellButtonLeft", - "SecondaryProfession4SpellButtonRight", - } - - local professionheaders = { - "PrimaryProfession1", - "PrimaryProfession2", - "SecondaryProfession1", - "SecondaryProfession2", - "SecondaryProfession3", - "SecondaryProfession4", - } - - for _, header in pairs(professionheaders) do - _G[header.."Missing"]:SetTextColor(1, 1, 0) - _G[header].missingText:SetTextColor(0.6, 0.6, 0.6) - end - - for _, button in pairs(professionbuttons) do - local icon = _G[button.."IconTexture"] - local rank = _G[button.."SubSpellName"] - local button = _G[button] - button:StripTextures() - - if rank then rank:SetTextColor(1, 1, 1) end - if icon then - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - - if not button.backdrop then - button:CreateBackdrop("Default", true) - button.backdrop:SetAllPoints() - end - end - end - - local professionstatusbars = { - "PrimaryProfession1StatusBar", - "PrimaryProfession2StatusBar", - "SecondaryProfession1StatusBar", - "SecondaryProfession2StatusBar", - "SecondaryProfession3StatusBar", - "SecondaryProfession4StatusBar", - } - - for _, statusbar in pairs(professionstatusbars) do - local statusbar = _G[statusbar] - statusbar:StripTextures() - statusbar:SetStatusBarTexture(C["media"].normTex) - statusbar:SetStatusBarColor(0, 220/255, 0) - statusbar:CreateBackdrop("Default") - - statusbar.rankText:ClearAllPoints() - statusbar.rankText:SetPoint("CENTER") - end - - --Mounts/Companions - for i = 1, NUM_COMPANIONS_PER_PAGE do - local button = _G["SpellBookCompanionButton"..i] - local icon = _G["SpellBookCompanionButton"..i.."IconTexture"] - button:StripTextures() - button:StyleButton(false) - - if icon then - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - - if not button.backdrop then - button:CreateBackdrop("Default", true) - button.backdrop:SetAllPoints() - end - end - end - - T.SkinButton(SpellBookCompanionSummonButton) - SpellBookCompanionModelFrame:StripTextures() - SpellBookCompanionModelFrameShadowOverlay:StripTextures() - SpellBookCompanionsModelFrame:Kill() - SpellBookCompanionModelFrame:SetTemplate("Default") - - T.SkinRotateButton(SpellBookCompanionModelFrameRotateRightButton) - T.SkinRotateButton(SpellBookCompanionModelFrameRotateLeftButton) - SpellBookCompanionModelFrameRotateRightButton:Point("TOPLEFT", SpellBookCompanionModelFrameRotateLeftButton, "TOPRIGHT", 3, 0) - - - --Bottom Tabs - for i=1, 5 do - T.SkinTab(_G["SpellBookFrameTabButton"..i]) - end -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/tabard.lua b/Tukui/modules/skins/blizzard/tabard.lua deleted file mode 100644 index 95b8b70..0000000 --- a/Tukui/modules/skins/blizzard/tabard.lua +++ /dev/null @@ -1,37 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - TabardFrame:StripTextures(true) - TabardFrame:SetTemplate("Default") - TabardModel:CreateBackdrop("Default") - T.SkinButton(TabardFrameCancelButton) - T.SkinButton(TabardFrameAcceptButton) - T.SkinCloseButton(TabardFrameCloseButton) - T.SkinRotateButton(TabardCharacterModelRotateLeftButton) - T.SkinRotateButton(TabardCharacterModelRotateRightButton) - TabardFrameCostFrame:StripTextures() - TabardFrameCustomizationFrame:StripTextures() - - for i=1, 5 do - local custom = "TabardFrameCustomization"..i - _G[custom]:StripTextures() - T.SkinNextPrevButton(_G[custom.."LeftButton"]) - T.SkinNextPrevButton(_G[custom.."RightButton"]) - - - if i > 1 then - _G[custom]:ClearAllPoints() - _G[custom]:Point("TOP", _G["TabardFrameCustomization"..i-1], "BOTTOM", 0, -6) - else - local point, anchor, point2, x, y = _G[custom]:GetPoint() - _G[custom]:Point(point, anchor, point2, x, y+4) - end - end - - TabardCharacterModelRotateLeftButton:Point("BOTTOMLEFT", 4, 4) - TabardCharacterModelRotateRightButton:Point("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) - TabardCharacterModelRotateLeftButton.SetPoint = T.dummy - TabardCharacterModelRotateRightButton.SetPoint = T.dummy -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/talent.lua b/Tukui/modules/skins/blizzard/talent.lua deleted file mode 100644 index fb4ae94..0000000 --- a/Tukui/modules/skins/blizzard/talent.lua +++ /dev/null @@ -1,360 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - --PLAYER TALENTS - local buttons = { - "PlayerTalentFrameToggleSummariesButton", - "PlayerTalentFrameActivateButton", - } - PlayerTalentFrameToggleSummariesButton:Point("BOTTOM", PlayerTalentFrame, "BOTTOM",0,5) - - -- fix button frame level - PlayerTalentFrameActivateButton:SetFrameLevel(6) - - for i = 1, #buttons do - _G[buttons[i]]:StripTextures() - T.SkinButton(_G[buttons[i]]) - end - - local StripAllTextures = { - "PlayerTalentFrame", - "PlayerTalentFrameInset", - "PlayerTalentFrameTalents", - "PlayerTalentFramePanel1HeaderIcon", - "PlayerTalentFramePanel2HeaderIcon", - "PlayerTalentFramePanel3HeaderIcon", - "PlayerTalentFramePetTalents", - } - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end - - local function StripTalentFramePanelTextures(object) - for i=1, object:GetNumRegions() do - local region = select(i, object:GetRegions()) - if region:GetObjectType() == "Texture" then - if region:GetName():find("Branch") then - region:SetDrawLayer("OVERLAY") - else - region:SetTexture(nil) - end - end - end - end - - StripTalentFramePanelTextures(PlayerTalentFramePanel1) - StripTalentFramePanelTextures(PlayerTalentFramePanel2) - StripTalentFramePanelTextures(PlayerTalentFramePanel3) - StripTalentFramePanelTextures(PlayerTalentFramePetPanel) - - for i=1, 3 do - _G["PlayerTalentFramePanel"..i.."SelectTreeButton"]:SetFrameLevel(_G["PlayerTalentFramePanel"..i.."SelectTreeButton"]:GetFrameLevel() + 5) - _G["PlayerTalentFramePanel"..i.."SelectTreeButton"]:StripTextures(true) - T.SkinButton(_G["PlayerTalentFramePanel"..i.."SelectTreeButton"]) - end - - local KillTextures = { - "PlayerTalentFramePanel1InactiveShadow", - "PlayerTalentFramePanel2InactiveShadow", - "PlayerTalentFramePanel3InactiveShadow", - "PlayerTalentFramePanel1SummaryRoleIcon", - "PlayerTalentFramePanel2SummaryRoleIcon", - "PlayerTalentFramePanel3SummaryRoleIcon", - "PlayerTalentFramePetShadowOverlay", - "PlayerTalentFrameHeaderHelpBox", - } - - for _, texture in pairs(KillTextures) do - _G[texture]:Kill() - end - - for i=1, 3 do - _G["PlayerTalentFramePanel"..i.."Arrow"]:SetFrameLevel(_G["PlayerTalentFramePanel"..i.."Arrow"]:GetFrameLevel() + 2) - end - PlayerTalentFramePetPanelArrow:SetFrameStrata("HIGH") - - - PlayerTalentFrame:SetTemplate("Default") - PlayerTalentFramePanel1:CreateBackdrop("Default") - PlayerTalentFramePanel1.backdrop:Point( "TOPLEFT", PlayerTalentFramePanel1, "TOPLEFT", 3, -3 ) - PlayerTalentFramePanel1.backdrop:Point( "BOTTOMRIGHT", PlayerTalentFramePanel1, "BOTTOMRIGHT", -3, 3 ) - PlayerTalentFramePanel2:CreateBackdrop("Default") - PlayerTalentFramePanel2.backdrop:Point( "TOPLEFT", PlayerTalentFramePanel2, "TOPLEFT", 3, -3 ) - PlayerTalentFramePanel2.backdrop:Point( "BOTTOMRIGHT", PlayerTalentFramePanel2, "BOTTOMRIGHT", -3, 3 ) - PlayerTalentFramePanel3:CreateBackdrop("Default") - PlayerTalentFramePanel3.backdrop:Point( "TOPLEFT", PlayerTalentFramePanel3, "TOPLEFT", 3, -3 ) - PlayerTalentFramePanel3.backdrop:Point( "BOTTOMRIGHT", PlayerTalentFramePanel3, "BOTTOMRIGHT", -3, 3 ) - PlayerTalentFrame:CreateShadow("Default") - T.SkinCloseButton(PlayerTalentFrameCloseButton) - - function talentpairs(inspect,pet) - local tab,tal=1,0 - return function() - tal=tal+1 - if tal>GetNumTalents(tab,inspect,pet) then - tal=1 - tab=tab+1 - end - if tab<=GetNumTalentTabs(inspect,pet) then - return tab,tal - end - end - end - - --Skin TalentButtons - local function TalentButtons(self, first, i, j) - local button = _G["PlayerTalentFramePanel"..i.."Talent"..j] - local icon = _G["PlayerTalentFramePanel"..i.."Talent"..j.."IconTexture"] - - if first then - button:StripTextures() - end - - if button.Rank then - button.Rank:SetFont(C.media.font, 12, "THINOUTLINE") - button.Rank:ClearAllPoints() - button.Rank:SetPoint("BOTTOMRIGHT") - end - - if icon then - icon:SetTexCoord(.08, .92, .08, .92) - button:StyleButton() - button.SetHighlightTexture = T.dummy - button.SetPushedTexture = T.dummy - button:GetNormalTexture():SetTexCoord(.08, .92, .08, .92) - button:GetPushedTexture():SetTexCoord(.08, .92, .08, .92) - button:GetHighlightTexture():SetAllPoints(icon) - button:GetPushedTexture():SetAllPoints(icon) - - icon:ClearAllPoints() - icon:SetAllPoints() - button:SetFrameLevel(button:GetFrameLevel() +1) - button:CreateBackdrop("Default", true) - end - end - - local function TalentSummaryButtons(self, first, active, i, j) - if active then - button = _G["PlayerTalentFramePanel"..i.."SummaryActiveBonus1"] - icon = _G["PlayerTalentFramePanel"..i.."SummaryActiveBonus1Icon"] - else - button = _G["PlayerTalentFramePanel"..i.."SummaryBonus"..j] - icon = _G["PlayerTalentFramePanel"..i.."SummaryBonus"..j.."Icon"] - end - - if first then - button:StripTextures() - end - - if icon then - icon:SetTexCoord(.08, .92, .08, .92) - button:SetFrameLevel(button:GetFrameLevel() +1) - local frame = CreateFrame("Frame",nil, button) - frame:CreateBackdrop("Default", true) - frame:SetFrameLevel(button:GetFrameLevel() -1) - frame:ClearAllPoints() - frame:Point( "TOPLEFT", icon, "TOPLEFT", 0, 0 ) - frame:Point( "BOTTOMRIGHT", icon, "BOTTOMRIGHT", 0, 0 ) - end - end - - for i=1, 2 do - local tab = _G["PlayerSpecTab"..i] - if tab then - local a = tab:GetRegions() - a:Hide() - tab:StripTextures() - tab:GetNormalTexture():SetTexCoord(.08, .92, .08, .92) - - tab:GetNormalTexture():ClearAllPoints() - tab:GetNormalTexture():Point("TOPLEFT", 2, -2) - tab:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - - tab:CreateBackdrop("Default") - tab.backdrop:SetAllPoints() - tab:StyleButton(true) - end - end - - --Reposition tabs - PlayerSpecTab1:ClearAllPoints() - PlayerSpecTab1:SetPoint("TOPLEFT", PlayerTalentFrame, "TOPRIGHT", 2, -32) - PlayerSpecTab1.SetPoint = T.dummy - - local function TalentSummaryClean(i) - local frame = _G["PlayerTalentFramePanel"..i.."Summary"] - frame:SetFrameLevel(frame:GetFrameLevel() + 2) - frame:CreateBackdrop("Default") - frame:SetFrameLevel(frame:GetFrameLevel() +1) - local a,b,_,d,_,_,_,_,_,_,_,_,m,_ = frame:GetRegions() - a:Hide() - b:Hide() - d:Hide() - m:Hide() - - _G["PlayerTalentFramePanel"..i.."SummaryIcon"]:SetTexCoord(.08, .92, .08, .92) - end - - local function TalentHeaderIcon(self, first, i) - local button = _G["PlayerTalentFramePanel"..i.."HeaderIcon"] - local icon = _G["PlayerTalentFramePanel"..i.."HeaderIconIcon"] - local panel = _G["PlayerTalentFramePanel"..i] - local text = _G["PlayerTalentFramePanel"..i.."HeaderIconPointsSpent"] - - if first then - button:StripTextures() - end - - _G["PlayerTalentFramePanel"..i.."HeaderIconPointsSpent"]:SetFont(C.media.font, 12, "THINOUTLINE") - - if icon then - icon:SetTexCoord(.08, .92, .08, .92) - button:SetFrameLevel(button:GetFrameLevel() +1) - button:ClearAllPoints() - button:Point("TOPLEFT",panel,"TOPLEFT", 4, -4) - text:SetFont(C.media.font, 12, "THINOUTLINE") - text:Point("BOTTOMRIGHT",button, "BOTTOMRIGHT", -1, 2) - local frame = CreateFrame("Frame",nil, button) - frame:CreateBackdrop("Default", true) - frame:SetFrameLevel(button:GetFrameLevel() +1) - frame:ClearAllPoints() - frame:Point( "TOPLEFT", icon, "TOPLEFT", 0, 0 ) - frame:Point( "BOTTOMRIGHT", icon, "BOTTOMRIGHT", 0, 0 ) - end - end - - for i=1, 3 do - TalentSummaryClean(i) - TalentHeaderIcon(nil, true, i) - for j=1, NUM_TALENT_COLUMNS do - TalentSummaryButtons(nil, true, true, i, j) - TalentSummaryButtons(nil, true, false, i, j) - end - end - - for tab,talent in talentpairs() do - TalentButtons(nil, true, tab, talent) - end - - for i=1, 3 do - T.SkinTab(_G["PlayerTalentFrameTab"..i]) - end - - --PET TALENTS - T.SkinRotateButton(PlayerTalentFramePetModelRotateLeftButton) - T.SkinRotateButton(PlayerTalentFramePetModelRotateRightButton) - PlayerTalentFramePetModelRotateLeftButton:Point("BOTTOM", PlayerTalentFramePetModel, "BOTTOM", -4, 4) - PlayerTalentFramePetModelRotateRightButton:Point("TOPLEFT", PlayerTalentFramePetModelRotateLeftButton, "TOPRIGHT", 4, 0) - PlayerTalentFramePetPanel:CreateBackdrop("Default") - PlayerTalentFramePetPanel.backdrop:Point( "TOPLEFT", PlayerTalentFramePetPanel, "TOPLEFT", 3, -3 ) - PlayerTalentFramePetPanel.backdrop:Point( "BOTTOMRIGHT", PlayerTalentFramePetPanel, "BOTTOMRIGHT", -3, 3 ) - PlayerTalentFramePetModel:CreateBackdrop("Default") - PlayerTalentFramePetModel.backdrop:Point( "TOPLEFT", PlayerTalentFramePetModel, "TOPLEFT") - PlayerTalentFramePetModel.backdrop:Point( "BOTTOMRIGHT", PlayerTalentFramePetModel, "BOTTOMRIGHT") - T.SkinButton(PlayerTalentFrameLearnButton, true) - T.SkinButton(PlayerTalentFrameResetButton, true) - - local function PetHeaderIcon(self, first) - local button = _G["PlayerTalentFramePetPanelHeaderIcon"] - local icon = _G["PlayerTalentFramePetPanelHeaderIconIcon"] - local panel = _G["PlayerTalentFramePetPanel"] - local d = select(4, button:GetRegions()) - - if first then - button:StripTextures() - end - - if icon then - d:ClearAllPoints() - pointsSpent = select(5,GetTalentTabInfo( 1, Partycheck, true, 1 )) - icon:SetTexCoord(.08, .92, .08, .92) - button:SetFrameLevel(button:GetFrameLevel() +1) - button:ClearAllPoints() - button:Point("TOPLEFT",panel,"TOPLEFT", 5, -5) - local text = button:FontString(nil, C.media.font, 12, "THINOUTLINE") - text:Point("BOTTOMRIGHT",button, "BOTTOMRIGHT", -1, 2) - text:SetText(pointsSpent) - local frame = CreateFrame("Frame",nil, button) - frame:CreateBackdrop("Default", true) - frame:SetFrameLevel(button:GetFrameLevel() +1) - frame:ClearAllPoints() - frame:Point( "TOPLEFT", icon, "TOPLEFT", 0, 0 ) - frame:Point( "BOTTOMRIGHT", icon, "BOTTOMRIGHT", 0, 0 ) - end - end - - local function PetInfoIcon(self, first) - local button = _G["PlayerTalentFramePetInfo"] - local icon = _G["PlayerTalentFramePetIcon"] - local panel = _G["PlayerTalentFramePetModel"] - - PlayerTalentFramePetDiet:Hide(); - - local petFoodList = { GetPetFoodTypes() }; - if #petFoodList > 0 then - diet = petFoodList[1] - else - diet = "None" - end - - if first then - button:StripTextures() - end - - if icon then - icon:SetTexCoord(.08, .92, .08, .92) - button:SetFrameLevel(button:GetFrameLevel() +1) - button:ClearAllPoints() - button:Point("BOTTOMLEFT",panel,"TOPLEFT", 0, 10) - local text = button:FontString(nil, C.media.font, 12, "THINOUTLINE") - text:Point("TOPRIGHT",button, "TOPRIGHT", 0, -10) - text:SetText(diet) - local frame = CreateFrame("Frame",nil, button) - frame:CreateBackdrop("Default", true) - frame:SetFrameLevel(button:GetFrameLevel() +1) - frame:ClearAllPoints() - frame:Point( "TOPLEFT", icon, "TOPLEFT", 0, 0 ) - frame:Point( "BOTTOMRIGHT", icon, "BOTTOMRIGHT", 0, 0 ) - end - end - - local function PetTalentButtons(self, first, i) - local button = _G["PlayerTalentFramePetPanelTalent"..i] - local icon = _G["PlayerTalentFramePetPanelTalent"..i.."IconTexture"] - - if first then - button:StripTextures() - end - - if button.Rank then - button.Rank:SetFont(C.media.font, 12, "THINOUTLINE") - button.Rank:ClearAllPoints() - button.Rank:SetPoint("BOTTOMRIGHT") - end - - if icon then - button:StyleButton() - button.SetHighlightTexture = T.dummy - button.SetPushedTexture = T.dummy - button:GetNormalTexture():SetTexCoord(.08, .92, .08, .92) - button:GetPushedTexture():SetTexCoord(.08, .92, .08, .92) - button:GetHighlightTexture():SetAllPoints(icon) - button:GetPushedTexture():SetAllPoints(icon) - - icon:SetTexCoord(.08, .92, .08, .92) - icon:ClearAllPoints() - icon:SetAllPoints() - button:SetFrameLevel(button:GetFrameLevel() +1) - button:CreateBackdrop("Default", true) - end - end - - PetInfoIcon(nil, true) - PetHeaderIcon(nil, true) - for i=1,GetNumTalents(1,false,true) do - PetTalentButtons(nil,true,i) - end -end - -T.SkinFuncs["Blizzard_TalentUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/taxi.lua b/Tukui/modules/skins/blizzard/taxi.lua deleted file mode 100644 index 4797133..0000000 --- a/Tukui/modules/skins/blizzard/taxi.lua +++ /dev/null @@ -1,11 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - TaxiFrame:StripTextures() - TaxiFrame:CreateBackdrop("Default") - TaxiRouteMap:CreateBackdrop("Default") - TaxiRouteMap.backdrop:SetAllPoints() - T.SkinCloseButton(TaxiFrameCloseButton) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/timemanager.lua b/Tukui/modules/skins/blizzard/timemanager.lua deleted file mode 100644 index 16c4cf7..0000000 --- a/Tukui/modules/skins/blizzard/timemanager.lua +++ /dev/null @@ -1,52 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - TimeManagerFrame:StripTextures() - TimeManagerFrame:SetTemplate("Default") - - T.SkinCloseButton(TimeManagerCloseButton) - - T.SkinDropDownBox(TimeManagerAlarmHourDropDown, 80) - T.SkinDropDownBox(TimeManagerAlarmMinuteDropDown, 80) - T.SkinDropDownBox(TimeManagerAlarmAMPMDropDown, 80) - - T.SkinEditBox(TimeManagerAlarmMessageEditBox) - - T.SkinButton(TimeManagerAlarmEnabledButton, true) - TimeManagerAlarmEnabledButton:HookScript("OnClick", function(self) - T.SkinButton(self) - end) - - TimeManagerFrame:HookScript("OnShow", function(self) - T.SkinButton(TimeManagerAlarmEnabledButton) - end) - - T.SkinCheckBox(TimeManagerMilitaryTimeCheck) - T.SkinCheckBox(TimeManagerLocalTimeCheck) - - TimeManagerStopwatchFrame:StripTextures() - TimeManagerStopwatchCheck:SetTemplate("Default") - TimeManagerStopwatchCheck:GetNormalTexture():SetTexCoord(.08, .92, .08, .92) - TimeManagerStopwatchCheck:GetNormalTexture():ClearAllPoints() - TimeManagerStopwatchCheck:GetNormalTexture():Point("TOPLEFT", 2, -2) - TimeManagerStopwatchCheck:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - local hover = TimeManagerStopwatchCheck:CreateTexture("frame", nil, TimeManagerStopwatchCheck) -- hover - hover:SetTexture(1,1,1,0.3) - hover:Point("TOPLEFT",TimeManagerStopwatchCheck,2,-2) - hover:Point("BOTTOMRIGHT",TimeManagerStopwatchCheck,-2,2) - TimeManagerStopwatchCheck:SetHighlightTexture(hover) - - StopwatchFrame:StripTextures() - StopwatchFrame:CreateBackdrop("Default") - StopwatchFrame.backdrop:Point("TOPLEFT", 0, -17) - StopwatchFrame.backdrop:Point("BOTTOMRIGHT", 0, 2) - - StopwatchTabFrame:StripTextures() - T.SkinCloseButton(StopwatchCloseButton) - T.SkinNextPrevButton(StopwatchPlayPauseButton) - T.SkinNextPrevButton(StopwatchResetButton) - StopwatchPlayPauseButton:Point("RIGHT", StopwatchResetButton, "LEFT", -4, 0) - StopwatchResetButton:Point("BOTTOMRIGHT", StopwatchFrame, "BOTTOMRIGHT", -4, 6) -end - -T.SkinFuncs["Blizzard_TimeManager"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/trade.lua b/Tukui/modules/skins/blizzard/trade.lua deleted file mode 100644 index b3c295e..0000000 --- a/Tukui/modules/skins/blizzard/trade.lua +++ /dev/null @@ -1,81 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - - -local function LoadSkin() - TradeFrame:StripTextures(true) - TradeFrame:CreateBackdrop("Default") - TradeFrame.backdrop:Point("TOPLEFT", 10, -4) - TradeFrame.backdrop:Point("BOTTOMRIGHT", -16, 35) - T.SkinButton(TradeFrameTradeButton, true) - T.SkinButton(TradeFrameCancelButton, true) - T.SkinCloseButton(TradeFrameCloseButton, TradeFrame.backdrop) - - T.SkinEditBox(TradePlayerInputMoneyFrameGold) - T.SkinEditBox(TradePlayerInputMoneyFrameSilver) - T.SkinEditBox(TradePlayerInputMoneyFrameCopper) - - for i=1, 7 do - local player = _G["TradePlayerItem"..i] - local recipient = _G["TradeRecipientItem"..i] - local player_button = _G["TradePlayerItem"..i.."ItemButton"] - local recipient_button = _G["TradeRecipientItem"..i.."ItemButton"] - local player_button_icon = _G["TradePlayerItem"..i.."ItemButtonIconTexture"] - local recipient_button_icon = _G["TradeRecipientItem"..i.."ItemButtonIconTexture"] - - if player_button and recipient_button then - player:StripTextures() - recipient:StripTextures() - player_button:StripTextures() - recipient_button:StripTextures() - - player_button_icon:ClearAllPoints() - player_button_icon:Point("TOPLEFT", player_button, "TOPLEFT", 2, -2) - player_button_icon:Point("BOTTOMRIGHT", player_button, "BOTTOMRIGHT", -2, 2) - player_button_icon:SetTexCoord(.08, .92, .08, .92) - player_button:SetTemplate("Default", true) - player_button:StyleButton() - player_button.bg = CreateFrame("Frame", nil, player_button) - player_button.bg:SetTemplate("Default") - player_button.bg:SetPoint("TOPLEFT", player_button, "TOPRIGHT", 4, 0) - player_button.bg:SetPoint("BOTTOMRIGHT", _G["TradePlayerItem"..i.."NameFrame"], "BOTTOMRIGHT", 0, 14) - player_button.bg:SetFrameLevel(player_button:GetFrameLevel() - 3) - - recipient_button_icon:ClearAllPoints() - recipient_button_icon:Point("TOPLEFT", recipient_button, "TOPLEFT", 2, -2) - recipient_button_icon:Point("BOTTOMRIGHT", recipient_button, "BOTTOMRIGHT", -2, 2) - recipient_button_icon:SetTexCoord(.08, .92, .08, .92) - recipient_button:SetTemplate("Default", true) - recipient_button:StyleButton() - recipient_button.bg = CreateFrame("Frame", nil, recipient_button) - recipient_button.bg:SetTemplate("Default") - recipient_button.bg:SetPoint("TOPLEFT", recipient_button, "TOPRIGHT", 4, 0) - recipient_button.bg:SetPoint("BOTTOMRIGHT", _G["TradeRecipientItem"..i.."NameFrame"], "BOTTOMRIGHT", 0, 14) - recipient_button.bg:SetFrameLevel(recipient_button:GetFrameLevel() - 3) - - end - end - - TradeHighlightPlayerTop:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayerBottom:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayerMiddle:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayer:SetFrameStrata("HIGH") - TradeHighlightPlayer:Point("TOPLEFT", TradeFrame, "TOPLEFT", 23, -100) - - TradeHighlightPlayerEnchantTop:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayerEnchantBottom:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayerEnchantMiddle:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayerEnchant:SetFrameStrata("HIGH") - - TradeHighlightRecipientTop:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipientBottom:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipientMiddle:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipient:SetFrameStrata("HIGH") - TradeHighlightRecipient:Point("TOPLEFT", TradeFrame, "TOPLEFT", 192, -100) - - TradeHighlightRecipientEnchantTop:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipientEnchantBottom:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipientEnchantMiddle:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipientEnchant:SetFrameStrata("HIGH") -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/tradeskill.lua b/Tukui/modules/skins/blizzard/tradeskill.lua deleted file mode 100644 index d00fe06..0000000 --- a/Tukui/modules/skins/blizzard/tradeskill.lua +++ /dev/null @@ -1,91 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - TradeSkillFrame:StripTextures(true) - TradeSkillListScrollFrame:StripTextures() - TradeSkillDetailScrollFrame:StripTextures() - TradeSkillFrameInset:StripTextures() - TradeSkillExpandButtonFrame:StripTextures() - TradeSkillDetailScrollChildFrame:StripTextures() - - TradeSkillFrame:SetTemplate("Default") - TradeSkillFrame:CreateShadow("Default") - TradeSkillFrame:Height(TradeSkillFrame:GetHeight() + 12) - TradeSkillRankFrame:StripTextures() - TradeSkillRankFrame:CreateBackdrop("Default") - TradeSkillRankFrame:SetStatusBarTexture(C["media"].normTex) - - T.SkinButton(TradeSkillCreateButton, true) - T.SkinButton(TradeSkillCancelButton, true) - T.SkinButton(TradeSkillFilterButton, true) - T.SkinButton(TradeSkillCreateAllButton, true) - T.SkinButton(TradeSkillViewGuildCraftersButton, true) - - TradeSkillLinkButton:GetNormalTexture():SetTexCoord(0.25, 0.7, 0.37, 0.75) - TradeSkillLinkButton:GetPushedTexture():SetTexCoord(0.25, 0.7, 0.45, 0.8) - TradeSkillLinkButton:GetHighlightTexture():Kill() - TradeSkillLinkButton:CreateBackdrop("Default") - TradeSkillLinkButton:Size(17, 14) - TradeSkillLinkButton:Point("LEFT", TradeSkillLinkFrame, "LEFT", 5, -1) - T.SkinEditBox(TradeSkillFrameSearchBox) - T.SkinEditBox(TradeSkillInputBox) - T.SkinNextPrevButton(TradeSkillDecrementButton) - T.SkinNextPrevButton(TradeSkillIncrementButton) - TradeSkillIncrementButton:Point("RIGHT", TradeSkillCreateButton, "LEFT", -13, 0) - - T.SkinCloseButton(TradeSkillFrameCloseButton) - T.SkinScrollBar(TradeSkillDetailScrollFrameScrollBar) - T.SkinScrollBar(TradeSkillListScrollFrameScrollBar) - - local once = false - hooksecurefunc("TradeSkillFrame_SetSelection", function(id) - TradeSkillSkillIcon:StyleButton() - if TradeSkillSkillIcon:GetNormalTexture() then - TradeSkillSkillIcon:GetNormalTexture():SetTexCoord(.08, .92, .08, .92) - TradeSkillSkillIcon:GetNormalTexture():ClearAllPoints() - TradeSkillSkillIcon:GetNormalTexture():Point("TOPLEFT", 2, -2) - TradeSkillSkillIcon:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - end - TradeSkillSkillIcon:SetTemplate("Default") - - for i=1, MAX_TRADE_SKILL_REAGENTS do - local button = _G["TradeSkillReagent"..i] - local icon = _G["TradeSkillReagent"..i.."IconTexture"] - local count = _G["TradeSkillReagent"..i.."Count"] - - icon:SetTexCoord(.08, .92, .08, .92) - icon:SetDrawLayer("OVERLAY") - if not icon.backdrop then - icon.backdrop = CreateFrame("Frame", nil, button) - icon.backdrop:SetFrameLevel(button:GetFrameLevel() - 1) - icon.backdrop:SetTemplate("Default") - icon.backdrop:Point("TOPLEFT", icon, "TOPLEFT", -2, 2) - icon.backdrop:Point("BOTTOMRIGHT", icon, "BOTTOMRIGHT", 2, -2) - end - - icon:SetParent(icon.backdrop) - count:SetParent(icon.backdrop) - count:SetDrawLayer("OVERLAY") - - if i > 2 and once == false then - local point, anchoredto, point2, x, y = button:GetPoint() - button:ClearAllPoints() - button:Point(point, anchoredto, point2, x, y - 3) - once = true - end - - _G["TradeSkillReagent"..i.."NameFrame"]:Kill() - end - end) - - - --Guild Crafters - TradeSkillGuildFrame:StripTextures() - TradeSkillGuildFrame:SetTemplate("Default") - TradeSkillGuildFrame:Point("BOTTOMLEFT", TradeSkillFrame, "BOTTOMRIGHT", 3, 19) - TradeSkillGuildFrameContainer:StripTextures() - TradeSkillGuildFrameContainer:SetTemplate("Default") - T.SkinCloseButton(TradeSkillGuildFrameCloseButton) -end - -T.SkinFuncs["Blizzard_TradeSkillUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/trainer.lua b/Tukui/modules/skins/blizzard/trainer.lua deleted file mode 100644 index 5a788db..0000000 --- a/Tukui/modules/skins/blizzard/trainer.lua +++ /dev/null @@ -1,72 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - --Class Trainer Frame - local StripAllTextures = { - "ClassTrainerFrame", - "ClassTrainerScrollFrameScrollChild", - "ClassTrainerFrameSkillStepButton", - "ClassTrainerFrameBottomInset", - } - - local buttons = { - "ClassTrainerTrainButton", - } - - local KillTextures = { - "ClassTrainerFrameInset", - "ClassTrainerFramePortrait", - "ClassTrainerScrollFrameScrollBarBG", - "ClassTrainerScrollFrameScrollBarTop", - "ClassTrainerScrollFrameScrollBarBottom", - "ClassTrainerScrollFrameScrollBarMiddle", - } - - for i=1,8 do - _G["ClassTrainerScrollFrameButton"..i]:StripTextures() - _G["ClassTrainerScrollFrameButton"..i]:StyleButton() - _G["ClassTrainerScrollFrameButton"..i.."Icon"]:SetTexCoord(.08, .92, .08, .92) - _G["ClassTrainerScrollFrameButton"..i]:CreateBackdrop() - _G["ClassTrainerScrollFrameButton"..i].backdrop:Point("TOPLEFT", _G["ClassTrainerScrollFrameButton"..i.."Icon"], "TOPLEFT", -2, 2) - _G["ClassTrainerScrollFrameButton"..i].backdrop:Point("BOTTOMRIGHT", _G["ClassTrainerScrollFrameButton"..i.."Icon"], "BOTTOMRIGHT", 2, -2) - _G["ClassTrainerScrollFrameButton"..i.."Icon"]:SetParent(_G["ClassTrainerScrollFrameButton"..i].backdrop) - - _G["ClassTrainerScrollFrameButton"..i].selectedTex:SetTexture(1, 1, 1, 0.3) - _G["ClassTrainerScrollFrameButton"..i].selectedTex:ClearAllPoints() - _G["ClassTrainerScrollFrameButton"..i].selectedTex:Point("TOPLEFT", 2, -2) - _G["ClassTrainerScrollFrameButton"..i].selectedTex:Point("BOTTOMRIGHT", -2, 2) - end - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end - - for _, texture in pairs(KillTextures) do - _G[texture]:Kill() - end - - for i = 1, #buttons do - _G[buttons[i]]:StripTextures() - T.SkinButton(_G[buttons[i]]) - end - - T.SkinDropDownBox(ClassTrainerFrameFilterDropDown, 155) - - ClassTrainerFrame:CreateBackdrop("Default") - ClassTrainerFrame.backdrop:Point("TOPLEFT", ClassTrainerFrame, "TOPLEFT") - ClassTrainerFrame.backdrop:Point("BOTTOMRIGHT", ClassTrainerFrame, "BOTTOMRIGHT") - T.SkinCloseButton(ClassTrainerFrameCloseButton,ClassTrainerFrame) - ClassTrainerFrameSkillStepButton.icon:SetTexCoord(.08, .92, .08, .92) - ClassTrainerFrameSkillStepButton:CreateBackdrop("Default") - ClassTrainerFrameSkillStepButton.backdrop:Point("TOPLEFT", ClassTrainerFrameSkillStepButton.icon, "TOPLEFT", -2, 2) - ClassTrainerFrameSkillStepButton.backdrop:Point("BOTTOMRIGHT", ClassTrainerFrameSkillStepButton.icon, "BOTTOMRIGHT", 2, -2) - ClassTrainerFrameSkillStepButton.icon:SetParent(ClassTrainerFrameSkillStepButton.backdrop) - ClassTrainerFrameSkillStepButtonHighlight:SetTexture(1,1,1,0.3) - ClassTrainerFrameSkillStepButton.selectedTex:SetTexture(1,1,1,0.3) - - ClassTrainerStatusBar:StripTextures() - ClassTrainerStatusBar:SetStatusBarTexture(C["media"].normTex) - ClassTrainerStatusBar:CreateBackdrop("Default") -end - -T.SkinFuncs["Blizzard_TrainerUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/tutorial.lua b/Tukui/modules/skins/blizzard/tutorial.lua deleted file mode 100644 index 9ba74f6..0000000 --- a/Tukui/modules/skins/blizzard/tutorial.lua +++ /dev/null @@ -1,17 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local function LoadSkin() - TutorialFrame:StripTextures() - TutorialFrame:CreateBackdrop("Default") - TutorialFrame.backdrop:CreateShadow("Default") - TutorialFrame.backdrop:Point("TOPLEFT", 6, 0) - TutorialFrame.backdrop:Point("BOTTOMRIGHT", 6, -6) - T.SkinCloseButton(TutorialFrameCloseButton, TutorialFrameCloseButton.backdrop) - T.SkinNextPrevButton(TutorialFramePrevButton) - T.SkinNextPrevButton(TutorialFrameNextButton) - T.SkinButton(TutorialFrameOkayButton) - TutorialFrameOkayButton:ClearAllPoints() - TutorialFrameOkayButton:Point("LEFT", TutorialFrameNextButton,"RIGHT", 10, 0) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/voidstorage.lua b/Tukui/modules/skins/blizzard/voidstorage.lua deleted file mode 100644 index cb407c2..0000000 --- a/Tukui/modules/skins/blizzard/voidstorage.lua +++ /dev/null @@ -1,80 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -if T.toc < 40300 then return end - ----------------------------------------------------------------------------------------- --- Void Storage skin (written by shestak) ----------------------------------------------------------------------------------------- - -local function LoadSkin() - local StripAllTextures = { - "VoidStorageBorderFrame", - "VoidStorageDepositFrame", - "VoidStorageWithdrawFrame", - "VoidStorageCostFrame", - "VoidStorageStorageFrame", - "VoidStoragePurchaseFrame", - "VoidItemSearchBox", - } - - for _, object in pairs(StripAllTextures) do - _G[object]:StripTextures() - end - - VoidStorageFrame:SetTemplate("Default") - VoidStoragePurchaseFrame:SetTemplate("Default") - VoidStorageFrameMarbleBg:Kill() - VoidStorageFrameLines:Kill() - select(2, VoidStorageFrame:GetRegions()):Kill() - - T.SkinButton(VoidStoragePurchaseButton) - T.SkinButton(VoidStorageHelpBoxButton) - T.SkinButton(VoidStorageTransferButton) - - T.SkinCloseButton(VoidStorageBorderFrameCloseButton) - VoidItemSearchBox:CreateBackdrop("Overlay") - VoidItemSearchBox.backdrop:Point("TOPLEFT", 10, -1) - VoidItemSearchBox.backdrop:Point("BOTTOMRIGHT", 4, 1) - - for i = 1, 9 do - local button_d = _G["VoidStorageDepositButton"..i] - local button_w = _G["VoidStorageWithdrawButton"..i] - local icon_d = _G["VoidStorageDepositButton"..i.."IconTexture"] - local icon_w = _G["VoidStorageWithdrawButton"..i.."IconTexture"] - - _G["VoidStorageDepositButton"..i.."Bg"]:Hide() - _G["VoidStorageWithdrawButton"..i.."Bg"]:Hide() - - button_d:StyleButton() - button_d:SetTemplate() - - button_w:StyleButton() - button_w:SetTemplate() - - icon_d:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icon_d:ClearAllPoints() - icon_d:Point("TOPLEFT", 2, -2) - icon_d:Point("BOTTOMRIGHT", -2, 2) - - icon_w:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icon_w:ClearAllPoints() - icon_w:Point("TOPLEFT", 2, -2) - icon_w:Point("BOTTOMRIGHT", -2, 2) - end - - for i = 1, 80 do - local button = _G["VoidStorageStorageButton"..i] - local icon = _G["VoidStorageStorageButton"..i.."IconTexture"] - - _G["VoidStorageStorageButton"..i.."Bg"]:Hide() - - button:StyleButton() - button:SetTemplate() - - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icon:ClearAllPoints() - icon:Point("TOPLEFT", 2, -2) - icon:Point("BOTTOMRIGHT", -2, 2) - end -end - -T.SkinFuncs["Blizzard_VoidStorageUI"] = LoadSkin \ No newline at end of file diff --git a/Tukui/modules/skins/blizzard/worldmap.lua b/Tukui/modules/skins/blizzard/worldmap.lua deleted file mode 100644 index 67c0712..0000000 --- a/Tukui/modules/skins/blizzard/worldmap.lua +++ /dev/null @@ -1,266 +0,0 @@ -local T, C, L = unpack(select(2, ...)) - -local Taint = T.FullMapQuestTaintFix - -local function LoadSkin() - WorldMapFrame:CreateBackdrop("Default") - WorldMapDetailFrame.backdrop = CreateFrame("Frame", nil, WorldMapFrame) - WorldMapDetailFrame.backdrop:SetTemplate("Default") - WorldMapDetailFrame.backdrop:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -2, 2) - WorldMapDetailFrame.backdrop:Point("BOTTOMRIGHT", WorldMapDetailFrame, "BOTTOMRIGHT", 2, -2) - WorldMapDetailFrame.backdrop:SetFrameLevel(WorldMapDetailFrame:GetFrameLevel() - 2) - - T.SkinCloseButton(WorldMapFrameCloseButton) - T.SkinCloseButton(WorldMapFrameSizeDownButton) - WorldMapFrameSizeDownButton.t:SetText("s") - T.SkinCloseButton(WorldMapFrameSizeUpButton) - WorldMapFrameSizeUpButton.t:SetText("s") - - T.SkinDropDownBox(WorldMapLevelDropDown) - T.SkinDropDownBox(WorldMapZoneMinimapDropDown) - T.SkinDropDownBox(WorldMapContinentDropDown) - T.SkinDropDownBox(WorldMapZoneDropDown) - T.SkinButton(WorldMapZoomOutButton) - T.SkinScrollBar(WorldMapQuestScrollFrameScrollBar) - T.SkinScrollBar(WorldMapQuestDetailScrollFrameScrollBar) - WorldMapZoomOutButton:Point("LEFT", WorldMapZoneDropDown, "RIGHT", 0, 4) - WorldMapLevelUpButton:Point("TOPLEFT", WorldMapLevelDropDown, "TOPRIGHT", -2, 8) - WorldMapLevelDownButton:Point("BOTTOMLEFT", WorldMapLevelDropDown, "BOTTOMRIGHT", -2, 2) - - T.SkinCheckBox(WorldMapTrackQuest) - T.SkinCheckBox(WorldMapQuestShowObjectives) - T.SkinCheckBox(WorldMapShowDigSites) - - --Mini - local function SmallSkin() - WorldMapLevelDropDown:ClearAllPoints() - WorldMapLevelDropDown:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -10, -4) - - WorldMapFrame.backdrop:ClearAllPoints() - WorldMapFrame.backdrop:Point("TOPLEFT", 2, 2) - WorldMapFrame.backdrop:Point("BOTTOMRIGHT", 2, -2) - end - - --Large - local function LargeSkin() - if not InCombatLockdown() then - WorldMapFrame:SetParent(UIParent) - WorldMapFrame:EnableMouse(false) - WorldMapFrame:EnableKeyboard(false) - SetUIPanelAttribute(WorldMapFrame, "area", "center"); - SetUIPanelAttribute(WorldMapFrame, "allowOtherPanels", true) - end - - WorldMapFrame.backdrop:ClearAllPoints() - WorldMapFrame.backdrop:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -25, 70) - WorldMapFrame.backdrop:Point("BOTTOMRIGHT", WorldMapDetailFrame, "BOTTOMRIGHT", 25, -30) - end - - local function QuestSkin() - if not InCombatLockdown() then - WorldMapFrame:SetParent(UIParent) - WorldMapFrame:EnableMouse(false) - WorldMapFrame:EnableKeyboard(false) - SetUIPanelAttribute(WorldMapFrame, "area", "center"); - SetUIPanelAttribute(WorldMapFrame, "allowOtherPanels", true) - end - - WorldMapFrame.backdrop:ClearAllPoints() - WorldMapFrame.backdrop:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -25, 70) - WorldMapFrame.backdrop:Point("BOTTOMRIGHT", WorldMapDetailFrame, "BOTTOMRIGHT", 325, -235) - - if not WorldMapQuestDetailScrollFrame.backdrop then - WorldMapQuestDetailScrollFrame:CreateBackdrop("Default") - WorldMapQuestDetailScrollFrame.backdrop:Point("TOPLEFT", -22, 2) - WorldMapQuestDetailScrollFrame.backdrop:Point("BOTTOMRIGHT", 23, -4) - end - - if not WorldMapQuestRewardScrollFrame.backdrop then - WorldMapQuestRewardScrollFrame:CreateBackdrop("Default") - WorldMapQuestRewardScrollFrame.backdrop:Point("BOTTOMRIGHT", 22, -4) - end - - if not WorldMapQuestScrollFrame.backdrop then - WorldMapQuestScrollFrame:CreateBackdrop("Default") - WorldMapQuestScrollFrame.backdrop:Point("TOPLEFT", 0, 2) - WorldMapQuestScrollFrame.backdrop:Point("BOTTOMRIGHT", 24, -3) - end - end - - local function FixSkin() - WorldMapFrame:StripTextures() - if WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then - LargeSkin() - elseif WORLDMAP_SETTINGS.size == WORLDMAP_WINDOWED_SIZE then - SmallSkin() - elseif WORLDMAP_SETTINGS.size == WORLDMAP_QUESTLIST_SIZE then - QuestSkin() - end - - if not InCombatLockdown() then - WorldMapFrame:SetScale(1) - WorldMapFrameSizeDownButton:Show() - WorldMapFrame:SetFrameLevel(40) - WorldMapFrame:SetFrameStrata("HIGH") - end - - WorldMapFrameAreaLabel:SetFont(C["media"].font, 50, "OUTLINE") - WorldMapFrameAreaLabel:SetShadowOffset(2, -2) - WorldMapFrameAreaLabel:SetTextColor(0.90, 0.8294, 0.6407) - - WorldMapFrameAreaDescription:SetFont(C["media"].font, 40, "OUTLINE") - WorldMapFrameAreaDescription:SetShadowOffset(2, -2) - - WorldMapZoneInfo:SetFont(C["media"].font, 27, "OUTLINE") - WorldMapZoneInfo:SetShadowOffset(2, -2) - end - - WorldMapFrame:HookScript("OnShow", FixSkin) - hooksecurefunc("WorldMapFrame_SetFullMapView", LargeSkin) - hooksecurefunc("WorldMapFrame_SetQuestMapView", QuestSkin) - hooksecurefunc("WorldMap_ToggleSizeUp", function() - if WORLDMAP_SETTINGS.size == WORLDMAP_QUESTLIST_SIZE then - Taint = true - end - FixSkin() - end) - - WorldMapFrame:RegisterEvent("PLAYER_LOGIN") - WorldMapFrame:RegisterEvent("PLAYER_REGEN_ENABLED") -- fix taint with small map & big map - WorldMapFrame:RegisterEvent("PLAYER_REGEN_DISABLED") -- fix taint with small map & big map - WorldMapFrame:HookScript("OnEvent", function(self, event) - local miniWorldMap = GetCVarBool("miniWorldMap") - local quest = WorldMapQuestShowObjectives:GetChecked() - - if event == "PLAYER_LOGIN" then - if not miniWorldMap then - ToggleFrame(WorldMapFrame) - ToggleFrame(WorldMapFrame) - end - elseif event == "PLAYER_REGEN_DISABLED" then - WorldMapFrameSizeDownButton:Disable() - WorldMapFrameSizeUpButton:Disable() - - if (quest) and (miniWorldMap or Taint) then - if WorldMapFrame:IsShown() then - HideUIPanel(WorldMapFrame) - end - - if not miniWorldMap and Taint and WORLDMAP_SETTINGS.size == WORLDMAP_QUESTLIST_SIZE then - WorldMapFrame_SetFullMapView() - end - - WatchFrame.showObjectives = nil - WorldMapTitleButton:Hide() - WorldMapBlobFrame:Hide() - WorldMapPOIFrame:Hide() - - WorldMapQuestShowObjectives.Show = T.dummy - WorldMapTitleButton.Show = T.dummy - WorldMapBlobFrame.Show = T.dummy - WorldMapPOIFrame.Show = T.dummy - - WatchFrame_Update() - end - WorldMapQuestShowObjectives:Hide() - elseif event == "PLAYER_REGEN_ENABLED" then - WorldMapFrameSizeDownButton:Enable() - WorldMapFrameSizeUpButton:Enable() - - if (quest) and (miniWorldMap or Taint) then - WorldMapQuestShowObjectives.Show = WorldMapQuestShowObjectives:Show() - WorldMapTitleButton.Show = WorldMapTitleButton:Show() - WorldMapBlobFrame.Show = WorldMapBlobFrame:Show() - WorldMapPOIFrame.Show = WorldMapPOIFrame:Show() - - WorldMapTitleButton:Show() - - WatchFrame.showObjectives = true - - if not miniWorldMap and Taint and WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then - WorldMapFrame_SetFullMapView() - end - - WorldMapBlobFrame:Show() - WorldMapPOIFrame:Show() - - WatchFrame_Update() - - if Taint and not miniWorldMap and WorldMapFrame:IsShown() and WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then - HideUIPanel(WorldMapFrame) - ShowUIPanel(WorldMapFrame) - end - end - WorldMapQuestShowObjectives:Show() - end - end) - - local coords = CreateFrame("Frame", "CoordsFrame", WorldMapFrame) - local fontheight = select(2, WorldMapQuestShowObjectivesText:GetFont())*1.1 - coords:SetFrameLevel(90) - coords:FontString("PlayerText", C["media"].font, fontheight, "THINOUTLINE") - coords:FontString("MouseText", C["media"].font, fontheight, "THINOUTLINE") - coords.PlayerText:SetTextColor(WorldMapQuestShowObjectivesText:GetTextColor()) - coords.MouseText:SetTextColor(WorldMapQuestShowObjectivesText:GetTextColor()) - coords.PlayerText:SetPoint("BOTTOMLEFT", WorldMapDetailFrame, "BOTTOMLEFT", 5, 5) - coords.PlayerText:SetText("Player: 0, 0") - coords.MouseText:SetPoint("BOTTOMLEFT", coords.PlayerText, "TOPLEFT", 0, 5) - coords.MouseText:SetText("Mouse: 0, 0") - local int = 0 - - WorldMapFrame:HookScript("OnUpdate", function(self, elapsed) - if WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then - WorldMapFrameSizeUpButton:Hide() - WorldMapFrameSizeDownButton:Show() - elseif WORLDMAP_SETTINGS.size == WORLDMAP_WINDOWED_SIZE then - WorldMapFrameSizeUpButton:Show() - WorldMapFrameSizeDownButton:Hide() - elseif WORLDMAP_SETTINGS.size == WORLDMAP_QUESTLIST_SIZE then - WorldMapFrameSizeUpButton:Hide() - WorldMapFrameSizeDownButton:Show() - end - - int = int + 1 - - if int >= 3 then - local inInstance, _ = IsInInstance() - local x,y = GetPlayerMapPosition("player") - x = math.floor(100 * x) - y = math.floor(100 * y) - if x ~= 0 and y ~= 0 then - coords.PlayerText:SetText(PLAYER..": "..x..", "..y) - else - coords.PlayerText:SetText(" ") - end - - - local scale = WorldMapDetailFrame:GetEffectiveScale() - local width = WorldMapDetailFrame:GetWidth() - local height = WorldMapDetailFrame:GetHeight() - local centerX, centerY = WorldMapDetailFrame:GetCenter() - local x, y = GetCursorPosition() - local adjustedX = (x / scale - (centerX - (width/2))) / width - local adjustedY = (centerY + (height/2) - y / scale) / height - - if (adjustedX >= 0 and adjustedY >= 0 and adjustedX <= 1 and adjustedY <= 1) then - adjustedX = math.floor(100 * adjustedX) - adjustedY = math.floor(100 * adjustedY) - coords.MouseText:SetText(MOUSE_LABEL..": "..adjustedX..", "..adjustedY) - else - coords.MouseText:SetText(" ") - end - - int = 0 - end - end) - - -- dropdown on full map is scaled incorrectly - WorldMapContinentDropDownButton:HookScript("OnClick", function() DropDownList1:SetScale(C.general.uiscale) end) - WorldMapZoneDropDownButton:HookScript("OnClick", function(self) - DropDownList1:SetScale(C.general.uiscale) - DropDownList1:ClearAllPoints() - DropDownList1:Point("TOPRIGHT", self, "BOTTOMRIGHT", 2, -4) - end) -end - -tinsert(T.SkinFuncs["Tukui"], LoadSkin) \ No newline at end of file diff --git a/Tukui/modules/tooltip/itemidcount.lua b/Tukui/modules/tooltip/itemidcount.lua deleted file mode 100644 index 0df875e..0000000 --- a/Tukui/modules/tooltip/itemidcount.lua +++ /dev/null @@ -1,33 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C.tooltip.enable ~= true then return end - -GameTooltip:HookScript("OnTooltipCleared", function(self) self.TukuiItemTooltip = nil end) -GameTooltip:HookScript("OnTooltipSetItem", function(self) - if (IsShiftKeyDown() or IsAltKeyDown()) and (TukuiItemTooltip and not self.TukuiItemTooltip and (TukuiItemTooltip.id or TukuiItemTooltip.count)) then - local item, link = self:GetItem() - local num = GetItemCount(link) - local left = "" - local right = "" - - if TukuiItemTooltip.id and link ~= nil then - left = "|cFFCA3C3CID|r "..link:match(":(%w+)") - end - - if TukuiItemTooltip.count and num > 1 then - right = "|cFFCA3C3C"..L.tooltip_count.."|r "..num - end - - self:AddLine(" ") - self:AddDoubleLine(left, right) - self.TukuiItemTooltip = 1 - end -end) - -local f = CreateFrame("Frame") -f:RegisterEvent("ADDON_LOADED") -f:SetScript("OnEvent", function(_, _, name) - if name ~= "Tukui" then return end - f:UnregisterEvent("ADDON_LOADED") - f:SetScript("OnEvent", nil) - TukuiItemTooltip = TukuiItemTooltip or {count=true, id=true} -end) diff --git a/Tukui/modules/tooltip/tooltip.lua b/Tukui/modules/tooltip/tooltip.lua deleted file mode 100644 index 7f3cd4e..0000000 --- a/Tukui/modules/tooltip/tooltip.lua +++ /dev/null @@ -1,415 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --- credits : Aezay (TipTac) and Caellian for some parts of code. - -if not C["tooltip"].enable then return end - -local TukuiTooltip = CreateFrame("Frame", "TukuiTooltip", UIParent) - -local _G = getfenv(0) - -local GameTooltip, GameTooltipStatusBar = _G["GameTooltip"], _G["GameTooltipStatusBar"] - -local gsub, find, format = string.gsub, string.find, string.format - -local Tooltips = {GameTooltip,ShoppingTooltip1,ShoppingTooltip2,ShoppingTooltip3,WorldMapTooltip,WorldMapCompareTooltip1,WorldMapCompareTooltip2,WorldMapCompareTooltip3} -local ItemRefTooltip = ItemRefTooltip - -local linkTypes = {item = true, enchant = true, spell = true, quest = true, unit = true, talent = true, achievement = true, glyph = true} - -local classification = { - worldboss = "|cffAF5050Boss|r", - rareelite = "|cffAF5050+ Rare|r", - elite = "|cffAF5050+|r", - rare = "|cffAF5050Rare|r", -} - -local NeedBackdropBorderRefresh = true - -local anchor = CreateFrame("Frame", "TukuiTooltipAnchor", UIParent) -anchor:SetSize(200, TukuiInfoRight:GetHeight()) -anchor:SetFrameStrata("TOOLTIP") -anchor:SetFrameLevel(20) -anchor:SetClampedToScreen(true) -anchor:SetAlpha(0) -if C.chat.background and TukuiChatBackgroundRight then - anchor:SetPoint("BOTTOMRIGHT", TukuiChatBackgroundRight, "TOPRIGHT", 0, -TukuiInfoRight:GetHeight()) -else - anchor:SetPoint("BOTTOMRIGHT", TukuiInfoRight) -end -anchor:SetTemplate("Default") -anchor:SetBackdropBorderColor(1, 0, 0, 1) -anchor:SetMovable(true) -anchor.text = T.SetFontString(anchor, C.media.uffont, 12) -anchor.text:SetPoint("CENTER") -anchor.text:SetText(L.move_tooltip) - --- Update Tukui Tooltip Position on some specifics Tooltip --- Also used because on Eyefinity, SetClampedToScreen doesn't work on left and right side of screen #1 -local function UpdateTooltip(self) - local owner = self:GetOwner() - if not owner then return end - local name = owner:GetName() - - -- fix X-offset or Y-offset - local x = T.Scale(5) - - -- mouseover - if self:GetAnchorType() == "ANCHOR_CURSOR" then - -- h4x for world object tooltip border showing last border color - -- or showing background sometime ~blue :x - if NeedBackdropBorderRefresh then - self:ClearAllPoints() - NeedBackdropBorderRefresh = false - self:SetBackdropColor(unpack(C.media.backdropcolor)) - if not C["tooltip"].cursor then - self:SetBackdropBorderColor(unpack(C.media.bordercolor)) - end - end - elseif self:GetAnchorType() == "ANCHOR_NONE" and InCombatLockdown() and C["tooltip"].hidecombat == true then - self:Hide() - end - - if name and (TukuiPlayerBuffs or TukuiPlayerDebuffs) then - if (TukuiPlayerBuffs:GetPoint():match("LEFT") or TukuiPlayerDebuffs:GetPoint():match("LEFT")) and (name:match("TukuiPlayerBuffs") or name:match("TukuiPlayerDebuffs")) then - self:SetAnchorType("ANCHOR_BOTTOMRIGHT", x, -x) - end - end - - if (owner == MiniMapBattlefieldFrame or owner == MiniMapMailFrame) and TukuiMinimap then - if TukuiMinimap:GetPoint():match("LEFT") then - self:SetAnchorType("ANCHOR_TOPRIGHT", x, -x) - end - end - - if self:GetAnchorType() == "ANCHOR_NONE" and TukuiTooltipAnchor then - local point = TukuiTooltipAnchor:GetPoint() - if point == "TOPLEFT" then - self:ClearAllPoints() - self:SetPoint("TOPLEFT", TukuiTooltipAnchor, "BOTTOMLEFT", 0, -x) - elseif point == "TOP" then - self:ClearAllPoints() - self:SetPoint("TOP", TukuiTooltipAnchor, "BOTTOM", 0, -x) - elseif point == "TOPRIGHT" then - self:ClearAllPoints() - self:SetPoint("TOPRIGHT", TukuiTooltipAnchor, "BOTTOMRIGHT", 0, -x) - elseif point == "BOTTOMLEFT" or point == "LEFT" then - self:ClearAllPoints() - self:SetPoint("BOTTOMLEFT", TukuiTooltipAnchor, "TOPLEFT", 0, x) - elseif point == "BOTTOMRIGHT" or point == "RIGHT" then - if TukuiBags and TukuiBags:IsShown() then - self:ClearAllPoints() - self:SetPoint("BOTTOMRIGHT", TukuiBags, "TOPRIGHT", 0, x) - else - self:ClearAllPoints() - self:SetPoint("BOTTOMRIGHT", TukuiTooltipAnchor, "TOPRIGHT", 0, x) - end - else - self:ClearAllPoints() - self:SetPoint("BOTTOM", TukuiTooltipAnchor, "TOP", 0, x) - end - end -end - -hooksecurefunc("GameTooltip_SetDefaultAnchor", function(self, parent) - if C["tooltip"].cursor == true then - if IsAddOnLoaded("Tukui_Raid_Healing") and parent ~= UIParent then - self:SetOwner(parent, "ANCHOR_NONE") - else - self:SetOwner(parent, "ANCHOR_CURSOR") - end - else - self:SetOwner(parent, "ANCHOR_NONE") - end - - self:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT", -111111, -111111) -- hack to update GameStatusBar instantly. -end) - -GameTooltip:HookScript("OnUpdate", function(self, ...) UpdateTooltip(self) end) - -local function Hex(color) - return string.format('|cff%02x%02x%02x', color.r * 255, color.g * 255, color.b * 255) -end - -local function GetColor(unit) - if(UnitIsPlayer(unit) and not UnitHasVehicleUI(unit)) then - local _, class = UnitClass(unit) - local color = RAID_CLASS_COLORS[class] - if not color then return end -- sometime unit too far away return nil for color :( - local r,g,b = color.r, color.g, color.b - return Hex(color), r, g, b - else - local color = FACTION_BAR_COLORS[UnitReaction(unit, "player")] - if not color then return end -- sometime unit too far away return nil for color :( - local r,g,b = color.r, color.g, color.b - return Hex(color), r, g, b - end -end - --- function to short-display HP value on StatusBar -local function ShortValue(value) - if value >= 1e7 then - return ('%.1fm'):format(value / 1e6):gsub('%.?0+([km])$', '%1') - elseif value >= 1e6 then - return ('%.2fm'):format(value / 1e6):gsub('%.?0+([km])$', '%1') - elseif value >= 1e5 then - return ('%.0fk'):format(value / 1e3) - elseif value >= 1e3 then - return ('%.1fk'):format(value / 1e3):gsub('%.?0+([km])$', '%1') - else - return value - end -end - --- update HP value on status bar -GameTooltipStatusBar:SetScript("OnValueChanged", function(self, value) - if not value then - return - end - local min, max = self:GetMinMaxValues() - - if (value < min) or (value > max) then - return - end - local _, unit = GameTooltip:GetUnit() - - -- fix target of target returning nil - if (not unit) then - local GMF = GetMouseFocus() - unit = GMF and GMF:GetAttribute("unit") - end - - if not self.text then - self.text = self:CreateFontString(nil, "OVERLAY") - local position = TukuiTooltipAnchor:GetPoint() - if position:match("TOP") then - self.text:Point("CENTER", GameTooltipStatusBar, 0, -6) - else - self.text:Point("CENTER", GameTooltipStatusBar, 0, 6) - end - - self.text:SetFont(C["media"].font, 12, "THINOUTLINE") - self.text:Show() - if unit then - min, max = UnitHealth(unit), UnitHealthMax(unit) - local hp = ShortValue(min).." / "..ShortValue(max) - if UnitIsGhost(unit) then - self.text:SetText(L.unitframes_ouf_ghost) - elseif min == 0 or UnitIsDead(unit) or UnitIsGhost(unit) then - self.text:SetText(L.unitframes_ouf_dead) - else - self.text:SetText(hp) - end - end - else - if unit then - min, max = UnitHealth(unit), UnitHealthMax(unit) - self.text:Show() - local hp = ShortValue(min).." / "..ShortValue(max) - if UnitIsGhost(unit) then - self.text:SetText(L.unitframes_ouf_ghost) - elseif min == 0 or UnitIsDead(unit) or UnitIsGhost(unit) then - self.text:SetText(L.unitframes_ouf_dead) - else - self.text:SetText(hp) - end - else - self.text:Hide() - end - end -end) - -local healthBar = GameTooltipStatusBar -healthBar:ClearAllPoints() -healthBar:Height(6) -healthBar:Point("BOTTOMLEFT", healthBar:GetParent(), "TOPLEFT", 2, 5) -healthBar:Point("BOTTOMRIGHT", healthBar:GetParent(), "TOPRIGHT", -2, 5) -healthBar:SetStatusBarTexture(C.media.normTex) - -local healthBarBG = CreateFrame("Frame", "StatusBarBG", healthBar) -healthBarBG:SetFrameLevel(healthBar:GetFrameLevel() - 1) -healthBarBG:Point("TOPLEFT", -2, 2) -healthBarBG:Point("BOTTOMRIGHT", 2, -2) -healthBarBG:SetTemplate("Default") - -GameTooltip:HookScript("OnTooltipSetUnit", function(self) - local lines = self:NumLines() - local GMF = GetMouseFocus() - local unit = (select(2, self:GetUnit())) or (GMF and GMF:GetAttribute("unit")) - - -- A mage's mirror images sometimes doesn't return a unit, this would fix it - if (not unit) and (UnitExists("mouseover")) then - unit = "mouseover" - end - - -- Sometimes when you move your mouse quicky over units in the worldframe, we can get here without a unit - if not unit then self:Hide() return end - - -- for hiding tooltip on unitframes - if (self:GetOwner() ~= UIParent and C["tooltip"].hideuf) then self:Hide() return end - - -- A "mouseover" unit is better to have as we can then safely say the tip should no longer show when it becomes invalid. - if (UnitIsUnit(unit,"mouseover")) then - unit = "mouseover" - end - - local race = UnitRace(unit) - local class = UnitClass(unit) - local level = UnitLevel(unit) - local guild = GetGuildInfo(unit) - local name, realm = UnitName(unit) - local crtype = UnitCreatureType(unit) - local classif = UnitClassification(unit) - local title = UnitPVPName(unit) - local r, g, b = GetQuestDifficultyColor(level).r, GetQuestDifficultyColor(level).g, GetQuestDifficultyColor(level).b - - local color = GetColor(unit) - if not color then color = "|CFFFFFFFF" end -- just safe mode for when GetColor(unit) return nil for unit too far away - - _G["GameTooltipTextLeft1"]:SetFormattedText("%s%s%s", color, title or name, realm and realm ~= "" and " - "..realm.."|r" or "|r") - - if(UnitIsPlayer(unit)) then - if UnitIsAFK(unit) then - self:AppendText((" %s"):format(CHAT_FLAG_AFK)) - elseif UnitIsDND(unit) then - self:AppendText((" %s"):format(CHAT_FLAG_DND)) - end - - local offset = 2 - if guild then - _G["GameTooltipTextLeft2"]:SetFormattedText("%s", IsInGuild() and GetGuildInfo("player") == guild and "|cff0090ff"..guild.."|r" or "|cff00ff10"..guild.."|r") - offset = offset + 1 - end - - for i= offset, lines do - if(_G["GameTooltipTextLeft"..i]:GetText():find("^"..LEVEL)) then - _G["GameTooltipTextLeft"..i]:SetFormattedText("|cff%02x%02x%02x%s|r %s %s%s", r*255, g*255, b*255, level > 0 and level or "??", race, color, class.."|r") - break - end - end - else - for i = 2, lines do - if((_G["GameTooltipTextLeft"..i]:GetText():find("^"..LEVEL)) or (crtype and _G["GameTooltipTextLeft"..i]:GetText():find("^"..crtype))) then - if level == -1 and classif == "elite" then classif = "worldboss" end - _G["GameTooltipTextLeft"..i]:SetFormattedText("|cff%02x%02x%02x%s|r%s %s", r*255, g*255, b*255, classif ~= "worldboss" and level ~= 0 and level or "", classification[classif] or "", crtype or "") - break - end - end - end - - local pvpLine - for i = 1, lines do - local text = _G["GameTooltipTextLeft"..i]:GetText() - if text and text == PVP_ENABLED then - pvpLine = _G["GameTooltipTextLeft"..i] - pvpLine:SetText() - break - end - end - - -- ToT line - if UnitExists(unit.."target") and unit~="player" then - local hex, r, g, b = GetColor(unit.."target") - if not r and not g and not b then r, g, b = 1, 1, 1 end - GameTooltip:AddLine(UnitName(unit.."target"), r, g, b) - end - - -- Sometimes this wasn't getting reset, the fact a cleanup isn't performed at this point, now that it was moved to "OnTooltipCleared" is very bad, so this is a fix - self.fadeOut = nil -end) - -local BorderColor = function(self) - local GMF = GetMouseFocus() - local unit = (select(2, self:GetUnit())) or (GMF and GMF:GetAttribute("unit")) - - local reaction = unit and UnitReaction(unit, "player") - local player = unit and UnitIsPlayer(unit) - local tapped = unit and UnitIsTapped(unit) - local tappedbyme = unit and UnitIsTappedByPlayer(unit) - local connected = unit and UnitIsConnected(unit) - local dead = unit and UnitIsDead(unit) - - if player then - local class = select(2, UnitClass(unit)) - local c = T.UnitColor.class[class] - r, g, b = c[1], c[2], c[3] - self:SetBackdropBorderColor(r, g, b) - healthBarBG:SetBackdropBorderColor(r, g, b) - healthBar:SetStatusBarColor(r, g, b) - elseif reaction then - local c = T.UnitColor.reaction[reaction] - r, g, b = c[1], c[2], c[3] - self:SetBackdropBorderColor(r, g, b) - healthBarBG:SetBackdropBorderColor(r, g, b) - healthBar:SetStatusBarColor(r, g, b) - else - local _, link = self:GetItem() - local quality = link and select(3, GetItemInfo(link)) - if quality and quality >= 2 then - local r, g, b = GetItemQualityColor(quality) - self:SetBackdropBorderColor(r, g, b) - else - self:SetBackdropBorderColor(unpack(C["media"].bordercolor)) - healthBarBG:SetBackdropBorderColor(unpack(C["media"].bordercolor)) - healthBar:SetStatusBarColor(unpack(C["media"].bordercolor)) - end - end - - -- need this - NeedBackdropBorderRefresh = true -end - -local SetStyle = function(self) - self:SetTemplate("Default") - BorderColor(self) -end - -TukuiTooltip:RegisterEvent("PLAYER_ENTERING_WORLD") -TukuiTooltip:RegisterEvent("ADDON_LOADED") -TukuiTooltip:SetScript("OnEvent", function(self, event, addon) - if event == "PLAYER_ENTERING_WORLD" then - for _, tt in pairs(Tooltips) do - tt:HookScript("OnShow", SetStyle) - end - - ItemRefTooltip:HookScript("OnTooltipSetItem", SetStyle) - ItemRefTooltip:HookScript("OnShow", SetStyle) - FriendsTooltip:SetTemplate("Default") - T.SkinCloseButton(ItemRefCloseButton) - - self:UnregisterEvent("PLAYER_ENTERING_WORLD") - - -- move health status bar if anchor is found at top - local position = TukuiTooltipAnchor:GetPoint() - if position:match("TOP") then - healthBar:ClearAllPoints() - healthBar:Point("TOPLEFT", healthBar:GetParent(), "BOTTOMLEFT", 2, -5) - healthBar:Point("TOPRIGHT", healthBar:GetParent(), "BOTTOMRIGHT", -2, -5) - end - - -- Hide tooltips in combat for actions, pet actions and shapeshift - if C["tooltip"].hidebuttons == true then - local CombatHideActionButtonsTooltip = function(self) - if not IsShiftKeyDown() then - self:Hide() - end - end - - hooksecurefunc(GameTooltip, "SetAction", CombatHideActionButtonsTooltip) - hooksecurefunc(GameTooltip, "SetPetAction", CombatHideActionButtonsTooltip) - hooksecurefunc(GameTooltip, "SetShapeshift", CombatHideActionButtonsTooltip) - end - else - if addon ~= "Blizzard_DebugTools" then return end - - if FrameStackTooltip then - FrameStackTooltip:SetScale(C.general.uiscale) - - -- Skin it - FrameStackTooltip:HookScript("OnShow", function(self) self:SetTemplate("Default") end) - end - - if EventTraceTooltip then - EventTraceTooltip:HookScript("OnShow", function(self) self:SetTemplate("Default") end) - end - end -end) \ No newline at end of file diff --git a/Tukui/modules/unitframes/core/oUF/LICENSE b/Tukui/modules/unitframes/core/oUF/LICENSE deleted file mode 100644 index e1e124d..0000000 --- a/Tukui/modules/unitframes/core/oUF/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2006-2011 Trond A Ekseth <troeks@gmail.com> - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/Tukui/modules/unitframes/core/oUF/blizzard.lua b/Tukui/modules/unitframes/core/oUF/blizzard.lua deleted file mode 100644 index 1140969..0000000 --- a/Tukui/modules/unitframes/core/oUF/blizzard.lua +++ /dev/null @@ -1,92 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local HandleFrame = function(baseName) - local frame - if(type(baseName) == 'string') then - frame = _G[baseName] - else - frame = baseName - end - - if(frame) then - frame:UnregisterAllEvents() - frame.Show = frame.Hide - frame:Hide() - - local health = frame.healthbar - if(health) then - health:UnregisterAllEvents() - end - - local power = frame.manabar - if(power) then - power:UnregisterAllEvents() - end - - local spell = frame.spellbar - if(spell) then - spell:UnregisterAllEvents() - end - - local altpowerbar = frame.powerBarAlt - if(altpowerbar) then - altpowerbar:UnregisterAllEvents() - end - end -end - -function oUF:DisableBlizzard(unit) - if(not unit) then return end - - if(unit == 'player') then - HandleFrame(PlayerFrame) - - -- For the damn vehicle support: - PlayerFrame:RegisterEvent('UNIT_ENTERING_VEHICLE') - PlayerFrame:RegisterEvent('UNIT_ENTERED_VEHICLE') - PlayerFrame:RegisterEvent('UNIT_EXITING_VEHICLE') - PlayerFrame:RegisterEvent('UNIT_EXITED_VEHICLE') - elseif(unit == 'pet') then - HandleFrame(PetFrame) - elseif(unit == 'target') then - HandleFrame(TargetFrame) - HandleFrame(ComboFrame) - elseif(unit == 'focus') then - HandleFrame(FocusFrame) - HandleFrame(TargetofFocusFrame) - elseif(unit == 'targettarget') then - HandleFrame(TargetFrameToT) - elseif(unit:match'(boss)%d?$' == 'boss') then - local id = unit:match'boss(%d)' - if(id) then - HandleFrame('Boss' .. id .. 'TargetFrame') - else - for i=1, 4 do - HandleFrame(('Boss%dTargetFrame'):format(i)) - end - end - elseif(unit:match'(party)%d?$' == 'party') then - local id = unit:match'party(%d)' - if(id) then - HandleFrame('PartyMemberFrame' .. id) - else - for i=1, 4 do - HandleFrame(('PartyMemberFrame%d'):format(i)) - end - end - elseif(unit:match'(arena)%d?$' == 'arena') then - local id = unit:match'arena(%d)' - if(id) then - HandleFrame('ArenaEnemyFrame' .. id) - else - for i=1, 4 do - HandleFrame(('ArenaEnemyFrame%d'):format(i)) - end - end - - -- Blizzard_ArenaUI should not be loaded - Arena_LoadUI = function() end - SetCVar('showArenaEnemyFrames', '0', 'SHOW_ARENA_ENEMY_FRAMES_TEXT') - end -end diff --git a/Tukui/modules/unitframes/core/oUF/colors.lua b/Tukui/modules/unitframes/core/oUF/colors.lua deleted file mode 100644 index ffebd1e..0000000 --- a/Tukui/modules/unitframes/core/oUF/colors.lua +++ /dev/null @@ -1,67 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF -local Private = oUF.Private - -local frame_metatable = Private.frame_metatable - -local colors = { - smooth = { - 1, 0, 0, - 1, 1, 0, - 0, 1, 0 - }, - disconnected = {.6, .6, .6}, - tapped = {.6,.6,.6}, - class = {}, - reaction = {}, -} - --- We do this because people edit the vars directly, and changing the default --- globals makes SPICE FLOW! -if(IsAddOnLoaded'!ClassColors' and CUSTOM_CLASS_COLORS) then - local updateColors = function() - for eclass, color in next, CUSTOM_CLASS_COLORS do - colors.class[eclass] = {color.r, color.g, color.b} - end - - for _, obj in next, oUF.objects do - obj:UpdateAllElements("CUSTOM_CLASS_COLORS") - end - end - - updateColors() - CUSTOM_CLASS_COLORS:RegisterCallback(updateColors) -else - for eclass, color in next, RAID_CLASS_COLORS do - colors.class[eclass] = {color.r, color.g, color.b} - end -end - -for eclass, color in next, FACTION_BAR_COLORS do - colors.reaction[eclass] = {color.r, color.g, color.b} -end - --- http://www.wowwiki.com/ColorGradient -local ColorGradient = function(perc, ...) - if perc >= 1 then - local r, g, b = select(select('#', ...) - 2, ...) - return r, g, b - elseif perc <= 0 then - local r, g, b = ... - return r, g, b - end - - local num = select('#', ...) / 3 - local segment, relperc = math.modf(perc*(num-1)) - local r1, g1, b1, r2, g2, b2 = select((segment*3)+1, ...) - - return r1 + (r2-r1)*relperc, g1 + (g2-g1)*relperc, b1 + (b2-b1)*relperc -end - -Private.colors = colors - -oUF.colors = colors -oUF.ColorGradient = ColorGradient - -frame_metatable.__index.colors = colors -frame_metatable.__index.ColorGradient = ColorGradient diff --git a/Tukui/modules/unitframes/core/oUF/elements/altpowerbar.lua b/Tukui/modules/unitframes/core/oUF/elements/altpowerbar.lua deleted file mode 100644 index a643b4d..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/altpowerbar.lua +++ /dev/null @@ -1,86 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local ALTERNATE_POWER_INDEX = ALTERNATE_POWER_INDEX - -local UpdatePower = function(self, event, unit, powerType) - if(self.unit ~= unit or powerType ~= 'ALTERNATE') then return end - - local altpowerbar = self.AltPowerBar - - if(altpowerbar.PreUpdate) then - altpowerbar:PreUpdate() - end - - local barType, min = UnitAlternatePowerInfo(unit) - local cur = UnitPower(unit, ALTERNATE_POWER_INDEX) - local max = UnitPowerMax(unit, ALTERNATE_POWER_INDEX) - - altpowerbar.barType = barType - altpowerbar:SetMinMaxValues(min, max) - altpowerbar:SetValue(cur) - - if(altpowerbar.PostUpdate) then - return altpowerbar:PostUpdate(min, cur, max) - end -end - -local ForceUpdate = function(element) - return UpdatePower(element.__owner, 'ForceUpdate', element.__owner.unit, 'ALTERNATE') -end - -local Toggler = function(self, event, unit) - if(unit ~= self.unit) then return end - local altpowerbar = self.AltPowerBar - - local barType, minPower, _, _, _, hideFromOthers = UnitAlternatePowerInfo(unit) - if(barType and (not hideFromOthers or unit == 'player' or self.realUnit == 'player')) then - self:RegisterEvent('UNIT_POWER', UpdatePower) - self:RegisterEvent('UNIT_MAXPOWER', UpdatePower) - - ForceUpdate(altpowerbar) - altpowerbar:Show() - else - self:UnregisterEvent('UNIT_POWER', UpdatePower) - self:UnregisterEvent('UNIT_MAXPOWER', UpdatePower) - - altpowerbar:Hide() - end -end - -local Enable = function(self, unit) - local altpowerbar = self.AltPowerBar - if(altpowerbar) then - altpowerbar.__owner = self - altpowerbar.ForceUpdate = ForceUpdate - - self:RegisterEvent('UNIT_POWER_BAR_SHOW', Toggler) - self:RegisterEvent('UNIT_POWER_BAR_HIDE', Toggler) - - altpowerbar:Hide() - - if(unit == 'player') then - PlayerPowerBarAlt:UnregisterEvent'UNIT_POWER_BAR_SHOW' - PlayerPowerBarAlt:UnregisterEvent'UNIT_POWER_BAR_HIDE' - PlayerPowerBarAlt:UnregisterEvent'PLAYER_ENTERING_WORLD' - end - - return true - end -end - -local Disable = function(self, unit) - local altpowerbar = self.AltPowerBar - if(altpowerbar) then - self:UnregisterEvent('UNIT_POWER_BAR_SHOW', Toggler) - self:UnregisterEvent('UNIT_POWER_BAR_HIDE', Toggler) - - if(unit == 'player') then - PlayerPowerBarAlt:RegisterEvent'UNIT_POWER_BAR_SHOW' - PlayerPowerBarAlt:RegisterEvent'UNIT_POWER_BAR_HIDE' - PlayerPowerBarAlt:RegisterEvent'PLAYER_ENTERING_WORLD' - end - end -end - -oUF:AddElement('AltPowerBar', Toggler, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/assistant.lua b/Tukui/modules/unitframes/core/oUF/elements/assistant.lua deleted file mode 100644 index 7e57a4f..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/assistant.lua +++ /dev/null @@ -1,44 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event) - local unit = self.unit - if(UnitInRaid(unit) and UnitIsRaidOfficer(unit) and not UnitIsPartyLeader(unit)) then - self.Assistant:Show() - else - self.Assistant:Hide() - end -end - -local Path = function(self, ...) - return (self.Assistant.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self) - local assistant = self.Assistant - if(assistant) then - self:RegisterEvent("PARTY_MEMBERS_CHANGED", Path) - - if(assistant:IsObjectType"Texture" and not assistant:GetTexture()) then - assistant:SetTexture[[Interface\GroupFrame\UI-Group-AssistantIcon]] - end - - assistant.__owner = self - assistant.ForceUpdate = ForceUpdate - - return true - end -end - -local Disable = function(self) - local assistant = self.Assistant - if(assistant) then - self:UnregisterEvent("PARTY_MEMBERS_CHANGED", Path) - end -end - -oUF:AddElement('Assistant', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/aura.lua b/Tukui/modules/unitframes/core/oUF/elements/aura.lua deleted file mode 100644 index bbe9b87..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/aura.lua +++ /dev/null @@ -1,295 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local VISIBLE = 1 -local HIDDEN = 0 - -local UpdateTooltip = function(self) - GameTooltip:SetUnitAura(self.parent.__owner.unit, self:GetID(), self.filter) -end - -local OnEnter = function(self) - if(not self:IsVisible()) then return end - - GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT") - self:UpdateTooltip() -end - -local OnLeave = function() - GameTooltip:Hide() -end - -local createAuraIcon = function(icons, index) - local button = CreateFrame("Button", nil, icons) - button:EnableMouse(true) - button:RegisterForClicks'RightButtonUp' - - button:SetWidth(icons.size or 16) - button:SetHeight(icons.size or 16) - - local cd = CreateFrame("Cooldown", nil, button) - cd:SetAllPoints(button) - - local icon = button:CreateTexture(nil, "BORDER") - icon:SetAllPoints(button) - - local count = button:CreateFontString(nil, "OVERLAY") - count:SetFontObject(NumberFontNormal) - count:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -1, 0) - - local overlay = button:CreateTexture(nil, "OVERLAY") - overlay:SetTexture"Interface\\Buttons\\UI-Debuff-Overlays" - overlay:SetAllPoints(button) - overlay:SetTexCoord(.296875, .5703125, 0, .515625) - button.overlay = overlay - - local stealable = button:CreateTexture(nil, 'OVERLAY') - stealable:SetTexture[[Interface\TargetingFrame\UI-TargetingFrame-Stealable]] - stealable:SetPoint('TOPLEFT', -3, 3) - stealable:SetPoint('BOTTOMRIGHT', 3, -3) - stealable:SetBlendMode'ADD' - button.stealable = stealable - - button.UpdateTooltip = UpdateTooltip - button:SetScript("OnEnter", OnEnter) - button:SetScript("OnLeave", OnLeave) - - table.insert(icons, button) - - button.parent = icons - button.icon = icon - button.count = count - button.cd = cd - - if(icons.PostCreateIcon) then icons:PostCreateIcon(button) end - - return button -end - -local customFilter = function(icons, unit, icon, name, rank, texture, count, dtype, duration, timeLeft, caster) - local isPlayer - - if(caster == 'player' or caster == 'vehicle') then - isPlayer = true - end - - if((icons.onlyShowPlayer and isPlayer) or (not icons.onlyShowPlayer and name)) then - icon.isPlayer = isPlayer - icon.owner = caster - return true - end -end - -local updateIcon = function(unit, icons, index, offset, filter, isDebuff, visible) - local name, rank, texture, count, dtype, duration, timeLeft, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff = UnitAura(unit, index, filter) - if(name) then - local n = visible + offset + 1 - local icon = icons[n] - if(not icon) then - icon = (icons.CreateIcon or createAuraIcon) (icons, n) - end - - local show = (icons.CustomFilter or customFilter) (icons, unit, icon, name, rank, texture, count, dtype, duration, timeLeft, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff) - if(show) then - -- We might want to consider delaying the creation of an actual cooldown - -- object to this point, but I think that will just make things needlessly - -- complicated. - local cd = icon.cd - if(cd and not icons.disableCooldown) then - if(duration and duration > 0) then - cd:SetCooldown(timeLeft - duration, duration) - cd:Show() - else - cd:Hide() - end - end - - if((isDebuff and icons.showDebuffType) or (not isDebuff and icons.showBuffType) or icons.showType) then - local color = DebuffTypeColor[dtype] or DebuffTypeColor.none - - icon.overlay:SetVertexColor(color.r, color.g, color.b) - icon.overlay:Show() - else - icon.overlay:Hide() - end - - -- XXX: Avoid popping errors on layouts without icon.stealable. - if(icon.stealable) then - local stealable = not isDebuff and isStealable - if(stealable and icons.showStealableBuffs and not UnitIsUnit('player', unit)) then - icon.stealable:Show() - else - icon.stealable:Hide() - end - end - - icon.icon:SetTexture(texture) - icon.count:SetText((count > 1 and count)) - - icon.filter = filter - icon.debuff = isDebuff - - icon:SetID(index) - icon:Show() - - if(icons.PostUpdateIcon) then - icons:PostUpdateIcon(unit, icon, index, offset) - end - - return VISIBLE - else - return HIDDEN - end - end -end - -local SetPosition = function(icons, x) - if(icons and x > 0) then - local col = 0 - local row = 0 - local gap = icons.gap - local sizex = (icons.size or 16) + (icons['spacing-x'] or icons.spacing or 0) - local sizey = (icons.size or 16) + (icons['spacing-y'] or icons.spacing or 0) - local anchor = icons.initialAnchor or "BOTTOMLEFT" - local growthx = (icons["growth-x"] == "LEFT" and -1) or 1 - local growthy = (icons["growth-y"] == "DOWN" and -1) or 1 - local cols = math.floor(icons:GetWidth() / sizex + .5) - local rows = math.floor(icons:GetHeight() / sizey + .5) - - for i = 1, #icons do - local button = icons[i] - if(button and button:IsShown()) then - if(gap and button.debuff) then - if(col > 0) then - col = col + 1 - end - - gap = false - end - - if(col >= cols) then - col = 0 - row = row + 1 - end - button:ClearAllPoints() - button:SetPoint(anchor, icons, anchor, col * sizex * growthx, row * sizey * growthy) - - col = col + 1 - elseif(not button) then - break - end - end - end -end - -local filterIcons = function(unit, icons, filter, limit, isDebuff, offset, dontHide) - if(not offset) then offset = 0 end - local index = 1 - local visible = 0 - while(visible < limit) do - local result = updateIcon(unit, icons, index, offset, filter, isDebuff, visible) - if(not result) then - break - elseif(result == VISIBLE) then - visible = visible + 1 - end - - index = index + 1 - end - - if(not dontHide) then - for i = visible + offset + 1, #icons do - icons[i]:Hide() - end - end - - return visible -end - -local Update = function(self, event, unit) - if(self.unit ~= unit) then return end - - local auras = self.Auras - if(auras) then - if(auras.PreUpdate) then auras:PreUpdate(unit) end - - local numBuffs = auras.numBuffs or 32 - local numDebuffs = auras.numDebuffs or 40 - local max = numBuffs + numDebuffs - - local visibleBuffs = filterIcons(unit, auras, auras.buffFilter or auras.filter or 'HELPFUL', numBuffs, nil, 0, true) - auras.visibleBuffs = visibleBuffs - - auras.visibleDebuffs = filterIcons(unit, auras, auras.debuffFilter or auras.filter or 'HARMFUL', numDebuffs, true, visibleBuffs) - auras.visibleAuras = auras.visibleBuffs + auras.visibleDebuffs - - if(auras.PreSetPosition) then auras:PreSetPosition(max) end - (auras.SetPosition or SetPosition) (auras, max) - - if(auras.PostUpdate) then auras:PostUpdate(unit) end - end - - local buffs = self.Buffs - if(buffs) then - if(buffs.PreUpdate) then buffs:PreUpdate(unit) end - - local numBuffs = buffs.num or 32 - buffs.visibleBuffs = filterIcons(unit, buffs, buffs.filter or 'HELPFUL', numBuffs) - - if(buffs.PreSetPosition) then buffs:PreSetPosition(numBuffs) end - (buffs.SetPosition or SetPosition) (buffs, numBuffs) - - if(buffs.PostUpdate) then buffs:PostUpdate(unit) end - end - - local debuffs = self.Debuffs - if(debuffs) then - if(debuffs.PreUpdate) then debuffs:PreUpdate(unit) end - - local numDebuffs = debuffs.num or 40 - debuffs.visibleDebuffs = filterIcons(unit, debuffs, debuffs.filter or 'HARMFUL', numDebuffs, true) - - if(debuffs.PreSetPosition) then debuffs:PreSetPosition(numDebuffs) end - (debuffs.SetPosition or SetPosition) (debuffs, numDebuffs) - - if(debuffs.PostUpdate) then debuffs:PostUpdate(unit) end - end -end - -local ForceUpdate = function(element) - return Update(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local Enable = function(self) - if(self.Buffs or self.Debuffs or self.Auras) then - self:RegisterEvent("UNIT_AURA", Update) - - local buffs = self.Buffs - if(buffs) then - buffs.__owner = self - buffs.ForceUpdate = ForceUpdate - end - - local debuffs = self.Debuffs - if(debuffs) then - debuffs.__owner = self - debuffs.ForceUpdate = ForceUpdate - end - - local auras = self.Auras - if(auras) then - auras.__owner = self - auras.ForceUpdate = ForceUpdate - end - - return true - end -end - -local Disable = function(self) - if(self.Buffs or self.Debuffs or self.Auras) then - self:UnregisterEvent("UNIT_AURA", Update) - end -end - -oUF:AddElement('Aura', Update, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/castbar.lua b/Tukui/modules/unitframes/core/oUF/elements/castbar.lua deleted file mode 100644 index 2e263a4..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/castbar.lua +++ /dev/null @@ -1,444 +0,0 @@ ---[[ - Original codebase: - oUF_Castbar by starlon. - http://svn.wowace.com/wowace/trunk/oUF_Castbar/ ---]] -local parent, ns = ... -local oUF = ns.oUF - -local UnitName = UnitName -local GetTime = GetTime -local UnitCastingInfo = UnitCastingInfo -local UnitChannelInfo = UnitChannelInfo - -local UNIT_SPELLCAST_START = function(self, event, unit, spell) - if(self.unit ~= unit) then return end - - local castbar = self.Castbar - local name, _, text, texture, startTime, endTime, _, castid, interrupt = UnitCastingInfo(unit) - if(not name) then - castbar:Hide() - return - end - - endTime = endTime / 1e3 - startTime = startTime / 1e3 - local max = endTime - startTime - - castbar.castid = castid - castbar.duration = GetTime() - startTime - castbar.max = max - castbar.delay = 0 - castbar.casting = true - castbar.interrupt = interrupt - - castbar:SetMinMaxValues(0, max) - castbar:SetValue(0) - - if(castbar.Text) then castbar.Text:SetText(text) end - if(castbar.Icon) then castbar.Icon:SetTexture(texture) end - if(castbar.Time) then castbar.Time:SetText() end - - local shield = castbar.Shield - if(shield and interrupt) then - shield:Show() - elseif(shield) then - shield:Hide() - end - - local sf = castbar.SafeZone - if(sf) then - sf:ClearAllPoints() - sf:SetPoint'RIGHT' - sf:SetPoint'TOP' - sf:SetPoint'BOTTOM' - end - - --- XXX: 1.6: Kill the rank field. - if(castbar.PostCastStart) then - castbar:PostCastStart(unit, name, nil, castid) - end - castbar:Show() -end - -local UNIT_SPELLCAST_FAILED = function(self, event, unit, spellname, _, castid) - if(self.unit ~= unit) then return end - - local castbar = self.Castbar - if(castbar.castid ~= castid) then - return - end - - castbar.casting = nil - castbar.interrupt = nil - castbar:SetValue(0) - castbar:Hide() - - --- XXX: 1.6: Kill the rank field. - if(castbar.PostCastFailed) then - return castbar:PostCastFailed(unit, spellname, nil, castid) - end -end - -local UNIT_SPELLCAST_INTERRUPTED = function(self, event, unit, spellname, _, castid) - if(self.unit ~= unit) then return end - - local castbar = self.Castbar - if(castbar.castid ~= castid) then - return - end - castbar.casting = nil - castbar.channeling = nil - - castbar:SetValue(0) - castbar:Hide() - - --- XXX: 1.6: Kill the rank field. - if(castbar.PostCastInterrupted) then - return castbar:PostCastInterrupted(unit, spellname, nil, castid) - end -end - -local UNIT_SPELLCAST_INTERRUPTIBLE = function(self, event, unit) - if(self.unit ~= unit) then return end - - local shield = self.Castbar.Shield - if(shield) then - shield:Hide() - end - - local castbar = self.Castbar - if(castbar.PostCastInterruptible) then - return castbar:PostCastInterruptible(unit) - end -end - -local UNIT_SPELLCAST_NOT_INTERRUPTIBLE = function(self, event, unit) - if(self.unit ~= unit) then return end - - local shield = self.Castbar.Shield - if(shield) then - shield:Show() - end - - local castbar = self.Castbar - if(castbar.PostCastNotInterruptible) then - return castbar:PostCastNotInterruptible(unit) - end -end - -local UNIT_SPELLCAST_DELAYED = function(self, event, unit, spellname, _, castid) - if(self.unit ~= unit) then return end - - local name, _, text, texture, startTime, endTime = UnitCastingInfo(unit) - if(not startTime) then return end - - local castbar = self.Castbar - local duration = GetTime() - (startTime / 1000) - if(duration < 0) then duration = 0 end - - castbar.delay = castbar.delay + castbar.duration - duration - castbar.duration = duration - - castbar:SetValue(duration) - - --- XXX: 1.6: Kill the rank field. - if(castbar.PostCastDelayed) then - return castbar:PostCastDelayed(unit, name, nil, castid) - end -end - -local UNIT_SPELLCAST_STOP = function(self, event, unit, spellname, _, castid) - if(self.unit ~= unit) then return end - - local castbar = self.Castbar - if(castbar.castid ~= castid) then - return - end - - castbar.casting = nil - castbar.interrupt = nil - castbar:SetValue(0) - castbar:Hide() - - --- XXX: 1.6: Kill the rank field. - if(castbar.PostCastStop) then - return castbar:PostCastStop(unit, spellname, nil, castid) - end -end - -local UNIT_SPELLCAST_CHANNEL_START = function(self, event, unit, spellname) - if(self.unit ~= unit) then return end - - local castbar = self.Castbar - local name, _, text, texture, startTime, endTime, isTrade, interrupt = UnitChannelInfo(unit) - if(not name) then - return - end - - endTime = endTime / 1e3 - startTime = startTime / 1e3 - local max = (endTime - startTime) - local duration = endTime - GetTime() - - castbar.duration = duration - castbar.max = max - castbar.delay = 0 - castbar.channeling = true - castbar.interrupt = interrupt - - -- We have to do this, as it's possible for spell casts to never have _STOP - -- executed or be fully completed by the OnUpdate handler before CHANNEL_START - -- is called. - castbar.casting = nil - castbar.castid = nil - - castbar:SetMinMaxValues(0, max) - castbar:SetValue(duration) - - if(castbar.Text) then castbar.Text:SetText(name) end - if(castbar.Icon) then castbar.Icon:SetTexture(texture) end - if(castbar.Time) then castbar.Time:SetText() end - - local shield = castbar.Shield - if(shield and interrupt) then - shield:Show() - elseif(shield) then - shield:Hide() - end - - local sf = castbar.SafeZone - if(sf) then - sf:ClearAllPoints() - sf:SetPoint'LEFT' - sf:SetPoint'TOP' - sf:SetPoint'BOTTOM' - end - - --- XXX: 1.6: Kill the rank field. - if(castbar.PostChannelStart) then castbar:PostChannelStart(unit, name) end - castbar:Show() -end - -local UNIT_SPELLCAST_CHANNEL_UPDATE = function(self, event, unit, spellname) - if(self.unit ~= unit) then return end - - local name, _, text, texture, startTime, endTime, oldStart = UnitChannelInfo(unit) - if(not name) then - return - end - - local castbar = self.Castbar - local duration = (endTime / 1000) - GetTime() - - castbar.delay = castbar.delay + castbar.duration - duration - castbar.duration = duration - castbar.max = (endTime - startTime) / 1000 - - castbar:SetMinMaxValues(0, castbar.max) - castbar:SetValue(duration) - - --- XXX: 1.6: Kill the rank field. - if(castbar.PostChannelUpdate) then - return castbar:PostChannelUpdate(unit, name) - end -end - -local UNIT_SPELLCAST_CHANNEL_STOP = function(self, event, unit, spellname) - if(self.unit ~= unit) then return end - - local castbar = self.Castbar - if(castbar:IsShown()) then - castbar.channeling = nil - castbar.interrupt = nil - - castbar:SetValue(castbar.max) - castbar:Hide() - - --- XXX: 1.6: Kill the rank field. - if(castbar.PostChannelStop) then - return castbar:PostChannelStop(unit, spellname) - end - end -end - -local onUpdate = function(self, elapsed) - if(self.casting) then - local duration = self.duration + elapsed - if(duration >= self.max) then - self.casting = nil - self:Hide() - - if(self.PostCastStop) then self:PostCastStop(self.__owner.unit) end - return - end - - if(self.SafeZone) then - local width = self:GetWidth() - local _, _, _, ms = GetNetStats() - -- MADNESS! - local safeZonePercent = (width / self.max) * (ms / 1e5) - if(safeZonePercent > 1) then safeZonePercent = 1 end - self.SafeZone:SetWidth(width * safeZonePercent) - end - - if(self.Time) then - if(self.delay ~= 0) then - if(self.CustomDelayText) then - self:CustomDelayText(duration) - else - self.Time:SetFormattedText("%.1f|cffff0000-%.1f|r", duration, self.delay) - end - else - if(self.CustomTimeText) then - self:CustomTimeText(duration) - else - self.Time:SetFormattedText("%.1f", duration) - end - end - end - - self.duration = duration - self:SetValue(duration) - - if(self.Spark) then - self.Spark:SetPoint("CENTER", self, "LEFT", (duration / self.max) * self:GetWidth(), 0) - end - elseif(self.channeling) then - local duration = self.duration - elapsed - - if(duration <= 0) then - self.channeling = nil - self:Hide() - - if(self.PostChannelStop) then self:PostChannelStop(self.__owner.unit) end - return - end - - if(self.SafeZone) then - local width = self:GetWidth() - local _, _, _, ms = GetNetStats() - -- MADNESS! - local safeZonePercent = (width / self.max) * (ms / 1e5) - if(safeZonePercent > 1) then safeZonePercent = 1 end - self.SafeZone:SetWidth(width * safeZonePercent) - end - - if(self.Time) then - if(self.delay ~= 0) then - if(self.CustomDelayText) then - self:CustomDelayText(duration) - else - self.Time:SetFormattedText("%.1f|cffff0000-%.1f|r", duration, self.delay) - end - else - if(self.CustomTimeText) then - self:CustomTimeText(duration) - else - self.Time:SetFormattedText("%.1f", duration) - end - end - end - - self.duration = duration - self:SetValue(duration) - if(self.Spark) then - self.Spark:SetPoint("CENTER", self, "LEFT", (duration / self.max) * self:GetWidth(), 0) - end - else - self.unitName = nil - self.casting = nil - self.castid = nil - self.channeling = nil - - self:SetValue(1) - self:Hide() - end -end - -local Update = function(self, ...) - UNIT_SPELLCAST_START(self, ...) - return UNIT_SPELLCAST_CHANNEL_START(self, ...) -end - -local ForceUpdate = function(element) - return Update(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local Enable = function(object, unit) - local castbar = object.Castbar - - if(castbar) then - castbar.__owner = object - castbar.ForceUpdate = ForceUpdate - - if(not (unit and unit:match'%wtarget$')) then - object:RegisterEvent("UNIT_SPELLCAST_START", UNIT_SPELLCAST_START) - object:RegisterEvent("UNIT_SPELLCAST_FAILED", UNIT_SPELLCAST_FAILED) - object:RegisterEvent("UNIT_SPELLCAST_STOP", UNIT_SPELLCAST_STOP) - object:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", UNIT_SPELLCAST_INTERRUPTED) - object:RegisterEvent("UNIT_SPELLCAST_INTERRUPTIBLE", UNIT_SPELLCAST_INTERRUPTIBLE) - object:RegisterEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", UNIT_SPELLCAST_NOT_INTERRUPTIBLE) - object:RegisterEvent("UNIT_SPELLCAST_DELAYED", UNIT_SPELLCAST_DELAYED) - object:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START", UNIT_SPELLCAST_CHANNEL_START) - object:RegisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE", UNIT_SPELLCAST_CHANNEL_UPDATE) - object:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP", UNIT_SPELLCAST_CHANNEL_STOP) - end - - castbar:SetScript("OnUpdate", castbar.OnUpdate or onUpdate) - - if(object.unit == "player") then - CastingBarFrame:UnregisterAllEvents() - CastingBarFrame.Show = CastingBarFrame.Hide - CastingBarFrame:Hide() - elseif(object.unit == 'pet') then - PetCastingBarFrame:UnregisterAllEvents() - PetCastingBarFrame.Show = PetCastingBarFrame.Hide - PetCastingBarFrame:Hide() - end - - if(castbar:IsObjectType'StatusBar' and not castbar:GetStatusBarTexture()) then - castbar:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]] - end - - local spark = castbar.Spark - if(spark and spark:IsObjectType'Texture' and not spark:GetTexture()) then - spark:SetTexture[[Interface\CastingBar\UI-CastingBar-Spark]] - end - - local shield = castbar.Shield - if(shield and shield:IsObjectType'Texture' and not shield:GetTexture()) then - shield:SetTexture[[Interface\CastingBar\UI-CastingBar-Small-Shield]] - end - - local sz = castbar.SafeZone - if(sz and sz:IsObjectType'Texture' and not sz:GetTexture()) then - sz:SetTexture(1, 0, 0) - end - - castbar:Hide() - - return true - end -end - -local Disable = function(object, unit) - local castbar = object.Castbar - - if(castbar) then - object:UnregisterEvent("UNIT_SPELLCAST_START", UNIT_SPELLCAST_START) - object:UnregisterEvent("UNIT_SPELLCAST_FAILED", UNIT_SPELLCAST_FAILED) - object:UnregisterEvent("UNIT_SPELLCAST_STOP", UNIT_SPELLCAST_STOP) - object:UnregisterEvent("UNIT_SPELLCAST_INTERRUPTED", UNIT_SPELLCAST_INTERRUPTED) - object:UnregisterEvent("UNIT_SPELLCAST_INTERRUPTIBLE", UNIT_SPELLCAST_INTERRUPTIBLE) - object:UnregisterEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", UNIT_SPELLCAST_NOT_INTERRUPTIBLE) - object:UnregisterEvent("UNIT_SPELLCAST_DELAYED", UNIT_SPELLCAST_DELAYED) - object:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_START", UNIT_SPELLCAST_CHANNEL_START) - object:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE", UNIT_SPELLCAST_CHANNEL_UPDATE) - object:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_STOP", UNIT_SPELLCAST_CHANNEL_STOP) - - castbar:SetScript("OnUpdate", nil) - end -end - -oUF:AddElement('Castbar', Update, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/combat.lua b/Tukui/modules/unitframes/core/oUF/elements/combat.lua deleted file mode 100644 index 1c2d2ce..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/combat.lua +++ /dev/null @@ -1,45 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event) - if(UnitAffectingCombat"player") then - self.Combat:Show() - else - self.Combat:Hide() - end -end - -local Path = function(self, ...) - return (self.Combat.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self, unit) - local combat = self.Combat - if(combat and unit == 'player') then - combat.__owner = self - combat.ForceUpdate = ForceUpdate - - self:RegisterEvent("PLAYER_REGEN_DISABLED", Path) - self:RegisterEvent("PLAYER_REGEN_ENABLED", Path) - - if(combat:IsObjectType"Texture" and not combat:GetTexture()) then - combat:SetTexture[[Interface\CharacterFrame\UI-StateIcon]] - combat:SetTexCoord(.5, 1, 0, .49) - end - - return true - end -end - -local Disable = function(self) - if(self.Combat) then - self:UnregisterEvent("PLAYER_REGEN_DISABLED", Path) - self:UnregisterEvent("PLAYER_REGEN_ENABLED", Path) - end -end - -oUF:AddElement('Combat', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/cpoints.lua b/Tukui/modules/unitframes/core/oUF/elements/cpoints.lua deleted file mode 100644 index 68e573c..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/cpoints.lua +++ /dev/null @@ -1,64 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local GetComboPoints = GetComboPoints -local MAX_COMBO_POINTS = MAX_COMBO_POINTS - -local Update = function(self, event, unit) - if(unit == 'pet') then return end - - local cp - if(UnitHasVehicleUI'player') then - cp = GetComboPoints('vehicle', 'target') - else - cp = GetComboPoints('player', 'target') - end - - local cpoints = self.CPoints - for i=1, MAX_COMBO_POINTS do - if(i <= cp) then - cpoints[i]:Show() - else - cpoints[i]:Hide() - end - end -end - -local Path = function(self, ...) - return (self.CPoints.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local Enable = function(self) - local cpoints = self.CPoints - if(cpoints) then - cpoints.__owner = self - cpoints.ForceUpdate = ForceUpdate - - self:RegisterEvent('UNIT_COMBO_POINTS', Path) - self:RegisterEvent('PLAYER_TARGET_CHANGED', Path) - - for index = 1, MAX_COMBO_POINTS do - local cpoint = cpoints[index] - if(cpoint:IsObjectType'Texture' and not cpoint:GetTexture()) then - cpoint:SetTexture[[Interface\ComboFrame\ComboPoint]] - cpoint:SetTexCoord(0, 0.375, 0, 1) - end - end - - return true - end -end - -local Disable = function(self) - local cpoints = self.CPoints - if(cpoints) then - self:UnregisterEvent('UNIT_COMBO_POINTS', Path) - self:UnregisterEvent('PLAYER_TARGET_CHANGED', Path) - end -end - -oUF:AddElement('CPoints', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/druidmana.lua b/Tukui/modules/unitframes/core/oUF/elements/druidmana.lua deleted file mode 100644 index d8caf03..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/druidmana.lua +++ /dev/null @@ -1,121 +0,0 @@ --- Druid Mana Bar for Cat and Bear forms --- Authors: Califpornia aka Ennie // some code taken from oUF`s EclipseBar element -if(select(2, UnitClass('player')) ~= 'DRUID') then return end - -local _, ns = ... -local oUF = ns.oUF - -local function Update(self, event, unit, powertype) - --only the player frame will have this unit enabled - --i mainly place this check for UNIT_DISPLAYPOWER and entering a vehicle - if(unit ~= 'player' or (powertype and powertype ~= 'MANA')) then return end - - local druidmana = self.DruidMana - if(druidmana.PreUpdate) then druidmana:PreUpdate(unit) end - - --check form - if(UnitPowerType('player') == SPELL_POWER_MANA) then - return druidmana:Hide() - else - druidmana:Show() - end - - local min, max = UnitPower('player', SPELL_POWER_MANA), UnitPowerMax('player', SPELL_POWER_MANA) - druidmana:SetMinMaxValues(0, max) - druidmana:SetValue(min) - - local r, g, b, t - if(druidmana.colorClass) then - t = self.colors.class['DRUID'] - elseif(druidmana.colorSmooth) then - local perc - if(max == 0) then - perc = 0 - else - perc = min / max - end - - r, g, b = self.ColorGradient(perc, unpack(druidmana.smoothGradient or self.colors.smooth)) - elseif(druidmana.colorPower) then - t = self.colors.power['MANA'] - end - - if(t) then - r, g, b = t[1], t[2], t[3] - end - - if(b) then - druidmana:SetStatusBarColor(r, g, b) - - local bg = druidmana.bg - if(bg) then - local mu = bg.multiplier or 1 - bg:SetVertexColor(r * mu, g * mu, b * mu) - end - end - - if(druidmana.PostUpdate) then - return druidmana:PostUpdate(unit, min, max) - end -end - -local function Path(self, ...) - return (self.DruidMana.Override or Update) (self, ...) -end - -local function ForceUpdate(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local OnDruidManaUpdate -do - local UnitPower = UnitPower - OnDruidManaUpdate = function(self) - local unit = self.__owner.unit - local mana = UnitPower(unit, SPELL_POWER_MANA) - - if(mana ~= self.min) then - self.min = mana - return Path(self.__owner, 'OnDruidManaUpdate', unit) - end - end -end - -local Enable = function(self, unit) - local druidmana = self.DruidMana - if(druidmana and unit == 'player') then - druidmana.__owner = self - druidmana.ForceUpdate = ForceUpdate - - if(druidmana.frequentUpdates) then - druidmana:SetScript('OnUpdate', OnDruidManaUpdate) - else - self:RegisterEvent('UNIT_POWER', Path) - end - - self:RegisterEvent('UNIT_DISPLAYPOWER', Path) - self:RegisterEvent('UNIT_MAXPOWER', Path) - - if(druidmana:IsObjectType'StatusBar' and not druidmana:GetStatusBarTexture()) then - druidmana:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]] - end - - return true - end -end - -local Disable = function(self) - local druidmana = self.DruidMana - if(druidmana) then - if(druidmana:GetScript'OnUpdate') then - druidmana:SetScript("OnUpdate", nil) - else - self:UnregisterEvent('UNIT_POWER', Path) - end - - self:UnregisterEvent('UNIT_DISPLAYPOWER', Path) - self:UnregisterEvent('UNIT_MAXPOWER', Path) - end -end - -oUF:AddElement('DruidMana', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/eclipsebar.lua b/Tukui/modules/unitframes/core/oUF/elements/eclipsebar.lua deleted file mode 100644 index 14f58e2..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/eclipsebar.lua +++ /dev/null @@ -1,140 +0,0 @@ -if(select(2, UnitClass('player')) ~= 'DRUID') then return end - -local parent, ns = ... -local oUF = ns.oUF - -local ECLIPSE_BAR_SOLAR_BUFF_ID = ECLIPSE_BAR_SOLAR_BUFF_ID -local ECLIPSE_BAR_LUNAR_BUFF_ID = ECLIPSE_BAR_LUNAR_BUFF_ID -local SPELL_POWER_ECLIPSE = SPELL_POWER_ECLIPSE -local MOONKIN_FORM = MOONKIN_FORM - -local UNIT_POWER = function(self, event, unit, powerType) - if(self.unit ~= unit or (event == 'UNIT_POWER' and powerType ~= 'ECLIPSE')) then return end - - local eb = self.EclipseBar - - local power = UnitPower('player', SPELL_POWER_ECLIPSE) - local maxPower = UnitPowerMax('player', SPELL_POWER_ECLIPSE) - - if(eb.LunarBar) then - eb.LunarBar:SetMinMaxValues(-maxPower, maxPower) - eb.LunarBar:SetValue(power) - end - - if(eb.SolarBar) then - eb.SolarBar:SetMinMaxValues(-maxPower, maxPower) - eb.SolarBar:SetValue(power * -1) - end - - if(eb.PostUpdatePower) then - return eb:PostUpdatePower(unit) - end -end - -local UPDATE_VISIBILITY = function(self, event) - local eb = self.EclipseBar - - -- check form/mastery - local showBar - local form = GetShapeshiftFormID() - if(not form) then - local ptt = GetPrimaryTalentTree() - if(ptt and ptt == 1) then -- player has balance spec - showBar = true - end - elseif(form == MOONKIN_FORM) then - showBar = true - end - - if(showBar) then - eb:Show() - else - eb:Hide() - end - - if(eb.PostUpdateVisibility) then - return eb:PostUpdateVisibility(self.unit) - end -end - -local UNIT_AURA = function(self, event, unit) - if(self.unit ~= unit) then return end - - local i = 1 - local hasSolarEclipse, hasLunarEclipse - repeat - local _, _, _, _, _, _, _, _, _, _, spellID = UnitAura(unit, i, 'HELPFUL') - - if(spellID == ECLIPSE_BAR_SOLAR_BUFF_ID) then - hasSolarEclipse = true - elseif(spellID == ECLIPSE_BAR_LUNAR_BUFF_ID) then - hasLunarEclipse = true - end - - i = i + 1 - until not spellID - - local eb = self.EclipseBar - eb.hasSolarEclipse = hasSolarEclipse - eb.hasLunarEclipse = hasLunarEclipse - - if(eb.PostUnitAura) then - return eb:PostUnitAura(unit) - end -end - -local ECLIPSE_DIRECTION_CHANGE = function(self, event, isLunar) - local eb = self.EclipseBar - - eb.directionIsLunar = isLunar - - if(eb.PostDirectionChange) then - return eb:PostDirectionChange(self.unit) - end -end - -local Update = function(self, ...) - UNIT_POWER(self, ...) - UNIT_AURA(self, ...) - return UPDATE_VISIBILITY(self, ...) -end - -local ForceUpdate = function(element) - return Update(element.__owner, 'ForceUpdate', element.__owner.unit, 'ECLIPSE') -end - -local function Enable(self) - local eb = self.EclipseBar - if(eb) then - eb.__owner = self - eb.ForceUpdate = ForceUpdate - - if(eb.LunarBar and eb.LunarBar:IsObjectType'StatusBar' and not eb.LunarBar:GetStatusBarTexture()) then - eb.LunarBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) - end - if(eb.SolarBar and eb.SolarBar:IsObjectType'StatusBar' and not eb.SolarBar:GetStatusBarTexture()) then - eb.SolarBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) - end - - self:RegisterEvent('ECLIPSE_DIRECTION_CHANGE', ECLIPSE_DIRECTION_CHANGE) - self:RegisterEvent('PLAYER_TALENT_UPDATE', UPDATE_VISIBILITY) - self:RegisterEvent('UNIT_AURA', UNIT_AURA) - self:RegisterEvent('UNIT_POWER', UNIT_POWER) - self:RegisterEvent('UPDATE_SHAPESHIFT_FORM', UPDATE_VISIBILITY) - - return true - end -end - -local function Disable(self) - local eb = self.EclipseBar - if(eb) then - self:UnregisterEvent('ECLIPSE_DIRECTION_CHANGE', ECLIPSE_DIRECTION_CHANGE) - self:UnregisterEvent('PLAYER_TALENT_UPDATE', UPDATE_VISIBILITY) - self:UnregisterEvent('UNIT_AURA', UNIT_AURA) - self:UnregisterEvent('UNIT_POWER', UNIT_POWER) - self:UnregisterEvent('UPDATE_SHAPESHIFT_FORM', UPDATE_VISIBILITY) - end -end - -oUF:AddElement('EclipseBar', Update, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/healprediction.lua b/Tukui/modules/unitframes/core/oUF/elements/healprediction.lua deleted file mode 100644 index d62e02d..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/healprediction.lua +++ /dev/null @@ -1,84 +0,0 @@ -local _, ns = ... -local oUF = ns.oUF - -local function Update(self, event, unit) - if(self.unit ~= unit) then return end - - local hp = self.HealPrediction - if(hp.PreUpdate) then hp:PreUpdate(unit) end - - local myIncomingHeal = UnitGetIncomingHeals(unit, 'player') or 0 - local allIncomingHeal = UnitGetIncomingHeals(unit) or 0 - local health, maxHealth = UnitHealth(unit), UnitHealthMax(unit) - - if(health + allIncomingHeal > maxHealth * hp.maxOverflow) then - allIncomingHeal = maxHealth * hp.maxOverflow - health - end - - if(allIncomingHeal < myIncomingHeal) then - myIncomingHeal = allIncomingHeal - allIncomingHeal = 0 - else - allIncomingHeal = allIncomingHeal - myIncomingHeal - end - - if(hp.myBar) then - hp.myBar:SetMinMaxValues(0, maxHealth) - hp.myBar:SetValue(myIncomingHeal) - hp.myBar:Show() - end - - if(hp.otherBar) then - hp.otherBar:SetMinMaxValues(0, maxHealth) - hp.otherBar:SetValue(allIncomingHeal) - hp.otherBar:Show() - end - - if(hp.PostUpdate) then - return hp:PostUpdate(unit) - end -end - -local function Path(self, ...) - return (self.HealPrediction.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local function Enable(self) - local hp = self.HealPrediction - if(hp) then - hp.__owner = self - hp.ForceUpdate = ForceUpdate - - self:RegisterEvent('UNIT_HEAL_PREDICTION', Path) - self:RegisterEvent('UNIT_MAXHEALTH', Path) - self:RegisterEvent('UNIT_HEALTH', Path) - - if(not hp.maxOverflow) then - hp.maxOverflow = 1.05 - end - - if(hp.myBar and hp.myBar:IsObjectType'StatusBar' and not hp.myBar:GetStatusBarTexture()) then - hp.myBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) - end - if(hp.otherBar and hp.otherBar:IsObjectType'StatusBar' and not hp.otherBar:GetStatusBarTexture()) then - hp.otherBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) - end - - return true - end -end - -local function Disable(self) - local hp = self.HealPrediction - if(hp) then - self:UnregisterEvent('UNIT_HEAL_PREDICTION', Path) - self:UnregisterEvent('UNIT_MAXHEALTH', Path) - self:UnregisterEvent('UNIT_HEALTH', Path) - end -end - -oUF:AddElement('HealPrediction', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/health.lua b/Tukui/modules/unitframes/core/oUF/elements/health.lua deleted file mode 100644 index 161dac8..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/health.lua +++ /dev/null @@ -1,113 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -oUF.colors.health = {49/255, 207/255, 37/255} - -local Update = function(self, event, unit, powerType) - if(self.unit ~= unit) then return end - local health = self.Health - - if(health.PreUpdate) then health:PreUpdate(unit) end - - local min, max = UnitHealth(unit), UnitHealthMax(unit) - local disconnected = not UnitIsConnected(unit) - health:SetMinMaxValues(0, max) - - if(disconnected) then - health:SetValue(max) - else - health:SetValue(min) - end - - health.disconnected = disconnected - - local r, g, b, t - if(health.colorTapping and UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) then - t = self.colors.tapped - elseif(health.colorDisconnected and not UnitIsConnected(unit)) then - t = self.colors.disconnected - elseif(health.colorClass and UnitIsPlayer(unit)) or - (health.colorClassNPC and not UnitIsPlayer(unit)) or - (health.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then - local _, class = UnitClass(unit) - t = self.colors.class[class] - elseif(health.colorReaction and UnitReaction(unit, 'player')) then - t = self.colors.reaction[UnitReaction(unit, "player")] - elseif(health.colorSmooth) then - local perc - if(max == 0) then - perc = 0 - else - perc = min / max - end - - r, g, b = self.ColorGradient(perc, unpack(health.smoothGradient or self.colors.smooth)) - elseif(health.colorHealth) then - t = self.colors.health - end - - if(t) then - r, g, b = t[1], t[2], t[3] - end - - if(b) then - health:SetStatusBarColor(r, g, b) - - local bg = health.bg - if(bg) then local mu = bg.multiplier or 1 - bg:SetVertexColor(r * mu, g * mu, b * mu) - end - end - - if(health.PostUpdate) then - return health:PostUpdate(unit, min, max) - end -end - -local Path = function(self, ...) - return (self.Health.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local Enable = function(self, unit) - local health = self.Health - if(health) then - health.__owner = self - health.ForceUpdate = ForceUpdate - - if(health.frequentUpdates) then - self:RegisterEvent('UNIT_HEALTH_FREQUENT', Path) - else - self:RegisterEvent('UNIT_HEALTH', Path) - end - - self:RegisterEvent("UNIT_MAXHEALTH", Path) - self:RegisterEvent('UNIT_CONNECTION', Path) - - -- For tapping. - self:RegisterEvent('UNIT_FACTION', Path) - - if(health:IsObjectType'StatusBar' and not health:GetStatusBarTexture()) then - health:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]] - end - - return true - end -end - -local Disable = function(self) - local health = self.Health - if(health) then - self:UnregisterEvent('UNIT_HEALTH_FREQUENT', Path) - self:UnregisterEvent('UNIT_HEALTH', Path) - self:UnregisterEvent('UNIT_MAXHEALTH', Path) - self:UnregisterEvent('UNIT_CONNECTION', Path) - - self:UnregisterEvent('UNIT_FACTION', Path) - end -end - -oUF:AddElement('Health', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/holypower.lua b/Tukui/modules/unitframes/core/oUF/elements/holypower.lua deleted file mode 100644 index a723c57..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/holypower.lua +++ /dev/null @@ -1,56 +0,0 @@ -if(select(2, UnitClass('player')) ~= 'PALADIN') then return end - -local parent, ns = ... -local oUF = ns.oUF - -local SPELL_POWER_HOLY_POWER = SPELL_POWER_HOLY_POWER -local MAX_HOLY_POWER = MAX_HOLY_POWER - -local Update = function(self, event, unit, powerType) - if(self.unit ~= unit or (powerType and powerType ~= 'HOLY_POWER')) then return end - - local hp = self.HolyPower - if(hp.PreUpdate) then hp:PreUpdate(unit) end - - local num = UnitPower('player', SPELL_POWER_HOLY_POWER) - for i = 1, MAX_HOLY_POWER do - if(i <= num) then - hp[i]:SetAlpha(1) - else - hp[i]:SetAlpha(0) - end - end - - if(hp.PostUpdate) then - return hp:PostUpdate(unit) - end -end - -local Path = function(self, ...) - return (self.HolyPower.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit, 'HOLY_POWER') -end - -local function Enable(self) - local hp = self.HolyPower - if(hp) then - hp.__owner = self - hp.ForceUpdate = ForceUpdate - - self:RegisterEvent('UNIT_POWER', Path) - - return true - end -end - -local function Disable(self) - local hp = self.HolyPower - if(hp) then - self:UnregisterEvent('UNIT_POWER', Path) - end -end - -oUF:AddElement('HolyPower', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/leader.lua b/Tukui/modules/unitframes/core/oUF/elements/leader.lua deleted file mode 100644 index 8bdf6c2..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/leader.lua +++ /dev/null @@ -1,46 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event) - local unit = self.unit - if((UnitInParty(unit) or UnitInRaid(unit)) and UnitIsPartyLeader(unit)) then - self.Leader:Show() - else - self.Leader:Hide() - end -end - -local Path = function(self, ...) - return (self.Leader.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self) - local leader = self.Leader - if(leader) then - leader.__owner = self - leader.ForceUpdate = ForceUpdate - - self:RegisterEvent("PARTY_LEADER_CHANGED", Path) - self:RegisterEvent("PARTY_MEMBERS_CHANGED", Path) - - if(leader:IsObjectType"Texture" and not leader:GetTexture()) then - leader:SetTexture[[Interface\GroupFrame\UI-Group-LeaderIcon]] - end - - return true - end -end - -local Disable = function(self) - local leader = self.Leader - if(leader) then - self:UnregisterEvent("PARTY_LEADER_CHANGED", Path) - self:UnregisterEvent("PARTY_MEMBERS_CHANGED", Path) - end -end - -oUF:AddElement('Leader', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/lfdrole.lua b/Tukui/modules/unitframes/core/oUF/elements/lfdrole.lua deleted file mode 100644 index 3d51323..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/lfdrole.lua +++ /dev/null @@ -1,53 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event) - local lfdrole = self.LFDRole - - local role = UnitGroupRolesAssigned(self.unit) - - if(role == 'TANK' or role == 'HEALER' or role == 'DAMAGER') then - lfdrole:SetTexCoord(GetTexCoordsForRoleSmallCircle(role)) - lfdrole:Show() - else - lfdrole:Hide() - end -end - -local Path = function(self, ...) - return (self.LFDRole.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self) - local lfdrole = self.LFDRole - if(lfdrole) then - lfdrole.__owner = self - lfdrole.ForceUpdate = ForceUpdate - - if(self.unit == "player") then - self:RegisterEvent("PLAYER_ROLES_ASSIGNED", Path) - else - self:RegisterEvent("PARTY_MEMBERS_CHANGED", Path) - end - - if(lfdrole:IsObjectType"Texture" and not lfdrole:GetTexture()) then - lfdrole:SetTexture[[Interface\LFGFrame\UI-LFG-ICON-PORTRAITROLES]] - end - - return true - end -end - -local Disable = function(self) - local lfdrole = self.LFDRole - if(lfdrole) then - self:UnregisterEvent("PLAYER_ROLES_ASSIGNED", Path) - self:UnregisterEvent("PARTY_MEMBERS_CHANGED", Path) - end -end - -oUF:AddElement('LFDRole', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/maintank.lua b/Tukui/modules/unitframes/core/oUF/elements/maintank.lua deleted file mode 100644 index 0f5c1b0..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/maintank.lua +++ /dev/null @@ -1,51 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event) - local raidID = UnitInRaid(self.unit) - if(not raidID) then return end - - local _, _, _, _, _, _, _, _, _, rinfo = GetRaidRosterInfo(raidID) - if(rinfo == 'MAINTANK' and not UnitHasVehicleUI(self.unit)) then - self.MainTank:Show() - else - self.MainTank:Hide() - end -end - -local Path = function(self, ...) - return (self.MainTank.Override or Update)(self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self) - local mt = self.MainTank - - if(mt) then - mt.__owner = self - mt.ForceUpdate = ForceUpdate - - self:RegisterEvent('PARTY_MEMBERS_CHANGED', Path) - self:RegisterEvent('RAID_ROSTER_UPDATE', Path) - - if(mt:IsObjectType'Texture' and not mt:GetTexture()) then - mt:SetTexture[[Interface\GROUPFRAME\UI-GROUP-MAINTANKICON]] - end - - return true - end -end - -local Disable = function(self) - local mt = self.MainTank - - if (mt) then - self:UnregisterEvent('PARTY_MEMBERS_CHANGED', Path) - self:UnregisterEvent('RAID_ROSTER_UPDATE', Path) - end -end - -oUF:AddElement('MainTank', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/masterlooter.lua b/Tukui/modules/unitframes/core/oUF/elements/masterlooter.lua deleted file mode 100644 index be80552..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/masterlooter.lua +++ /dev/null @@ -1,62 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local function Update(self, event) - local unit - local method, pid, rid = GetLootMethod() - if(method == 'master') then - if(pid) then - if(pid == 0) then - unit = 'player' - else - unit = 'party'..pid - end - elseif(rid) then - unit = 'raid'..rid - else - return - end - - if(UnitIsUnit(unit, self.unit)) then - self.MasterLooter:Show() - elseif(self.MasterLooter:IsShown()) then - self.MasterLooter:Hide() - end - elseif(self.MasterLooter:IsShown()) then - self.MasterLooter:Hide() - end -end - -local Path = function(self, ...) - return (self.MasterLooter.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local function Enable(self, unit) - local masterlooter = self.MasterLooter - if(masterlooter) then - masterlooter.__owner = self - masterlooter.ForceUpdate = ForceUpdate - - self:RegisterEvent('PARTY_LOOT_METHOD_CHANGED', Path) - self:RegisterEvent('PARTY_MEMBERS_CHANGED', Path) - - if(masterlooter:IsObjectType('Texture') and not masterlooter:GetTexture()) then - masterlooter:SetTexture([[Interface\GroupFrame\UI-Group-MasterLooter]]) - end - - return true - end -end - -local function Disable(self) - if(self.MasterLooter) then - self:UnregisterEvent('PARTY_LOOT_METHOD_CHANGED', Path) - self:UnregisterEvent('PARTY_MEMBERS_CHANGED', Path) - end -end - -oUF:AddElement('MasterLooter', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/picon.lua b/Tukui/modules/unitframes/core/oUF/elements/picon.lua deleted file mode 100644 index 2106d90..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/picon.lua +++ /dev/null @@ -1,46 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event) - local inPhase = UnitInPhase(self.unit) - local picon = self.PhaseIcon - - if(inPhase) then - picon:Hide() - else - picon:Show() - end -end - -local Path = function(self, ...) - return (self.PhaseIcon.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self) - local picon = self.PhaseIcon - if(picon) then - picon.__owner = self - picon.ForceUpdate = ForceUpdate - - self:RegisterEvent('UNIT_PHASE', Path) - - if(picon:IsObjectType'Texture' and not picon:GetTexture()) then - picon:SetTexture[[Interface\TargetingFrame\UI-PhasingIcon]] - end - - return true - end -end - -local Disable = function(self) - local picon = self.PhaseIcon - if(picon) then - self:UnregisterEvent('UNIT_PHASE', Path) - end -end - -oUF:AddElement('PhaseIcon', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/portraits.lua b/Tukui/modules/unitframes/core/oUF/elements/portraits.lua deleted file mode 100644 index f0eec92..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/portraits.lua +++ /dev/null @@ -1,75 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event, unit) - if(not unit or not UnitIsUnit(self.unit, unit)) then return end - - local portrait = self.Portrait - if(portrait.PreUpdate) then portrait:PreUpdate(unit) end - - if(portrait:IsObjectType'Model') then - local guid = UnitGUID(unit) - if(not UnitExists(unit) or not UnitIsConnected(unit) or not UnitIsVisible(unit)) then - portrait:SetModelScale(4.25) - portrait:SetPosition(0, 0, -1.5) - portrait:SetModel"Interface\\Buttons\\talktomequestionmark.mdx" - elseif(portrait.guid ~= guid or event == 'UNIT_MODEL_CHANGED') then - portrait:SetUnit(unit) - portrait:SetCamera(0) - - portrait.guid = guid - else - portrait:SetCamera(0) - end - else - SetPortraitTexture(portrait, unit) - end - - if(portrait.PostUpdate) then - return portrait:PostUpdate(unit) - end -end - -local Path = function(self, ...) - return (self.Portrait.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local Enable = function(self, unit) - local portrait = self.Portrait - if(portrait) then - portrait.__owner = self - portrait.ForceUpdate = ForceUpdate - - self:RegisterEvent("UNIT_PORTRAIT_UPDATE", Path) - self:RegisterEvent("UNIT_MODEL_CHANGED", Path) - self:RegisterEvent('UNIT_CONNECTION', Path) - - -- The quest log uses PARTY_MEMBER_{ENABLE,DISABLE} to handle updating of - -- party members overlapping quests. This will probably be enough to handle - -- model updating. - -- - -- DISABLE isn't used as it fires when we most likely don't have the - -- information we want. - if(unit == 'party') then - self:RegisterEvent('PARTY_MEMBER_ENABLE', Path) - end - - return true - end -end - -local Disable = function(self) - local portrait = self.Portrait - if(portrait) then - self:UnregisterEvent("UNIT_PORTRAIT_UPDATE", Path) - self:UnregisterEvent("UNIT_MODEL_CHANGED", Path) - self:UnregisterEvent('PARTY_MEMBER_ENABLE', Path) - self:UnregisterEvent('UNIT_CONNECTION', Path) - end -end - -oUF:AddElement('Portrait', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/power.lua b/Tukui/modules/unitframes/core/oUF/elements/power.lua deleted file mode 100644 index 2faed41..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/power.lua +++ /dev/null @@ -1,159 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -oUF.colors.power = {} -for power, color in next, PowerBarColor do - if(type(power) == 'string') then - oUF.colors.power[power] = {color.r, color.g, color.b} - end -end - -local GetDisplayPower = function(power, unit) - local _, _, _, _, _, _, showOnRaid = UnitAlternatePowerInfo(unit) - if(power.displayAltPower and showOnRaid) then - return ALTERNATE_POWER_INDEX - else - return (UnitPowerType(unit)) - end -end - -local Update = function(self, event, unit) - if(self.unit ~= unit) then return end - local power = self.Power - - if(power.PreUpdate) then power:PreUpdate(unit) end - - local displayType = GetDisplayPower(power, unit) - local min, max = UnitPower(unit, displayType), UnitPowerMax(unit, displayType) - local disconnected = not UnitIsConnected(unit) - power:SetMinMaxValues(0, max) - - if(disconnected) then - power:SetValue(max) - else - power:SetValue(min) - end - - power.disconnected = disconnected - - local r, g, b, t - if(power.colorTapping and UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) then - t = self.colors.tapped - elseif(power.colorDisconnected and not UnitIsConnected(unit)) then - t = self.colors.disconnected - elseif(power.colorPower) then - local ptype, ptoken, altR, altG, altB = UnitPowerType(unit) - - t = self.colors.power[ptoken] - if(not t and altR) then - r, g, b = altR, altG, altB - end - elseif(power.colorClass and UnitIsPlayer(unit)) or - (power.colorClassNPC and not UnitIsPlayer(unit)) or - (power.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then - local _, class = UnitClass(unit) - t = self.colors.class[class] - elseif(power.colorReaction and UnitReaction(unit, 'player')) then - t = self.colors.reaction[UnitReaction(unit, "player")] - elseif(power.colorSmooth) then - local perc - if(max == 0) then - perc = 0 - else - perc = min / max - end - - r, g, b = self.ColorGradient(perc, unpack(power.smoothGradient or self.colors.smooth)) - end - - if(t) then - r, g, b = t[1], t[2], t[3] - end - - if(b) then - power:SetStatusBarColor(r, g, b) - - local bg = power.bg - if(bg) then - local mu = bg.multiplier or 1 - bg:SetVertexColor(r * mu, g * mu, b * mu) - end - end - - if(power.PostUpdate) then - return power:PostUpdate(unit, min, max) - end -end - -local Path = function(self, ...) - return (self.Power.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local OnPowerUpdate -do - local UnitPower = UnitPower - OnPowerUpdate = function(self) - if(self.disconnected) then return end - local unit = self.__owner.unit - local power = UnitPower(unit, GetDisplayPower(self, unit)) - - if(power ~= self.min) then - self.min = power - - return Path(self.__owner, 'OnPowerUpdate', unit) - end - end -end - -local Enable = function(self, unit) - local power = self.Power - if(power) then - power.__owner = self - power.ForceUpdate = ForceUpdate - - if(power.frequentUpdates and (unit == 'player' or unit == 'pet')) then - power:SetScript("OnUpdate", OnPowerUpdate) - else - self:RegisterEvent('UNIT_POWER', Path) - end - - self:RegisterEvent('UNIT_POWER_BAR_SHOW', Path) - self:RegisterEvent('UNIT_POWER_BAR_HIDE', Path) - self:RegisterEvent('UNIT_DISPLAYPOWER', Path) - self:RegisterEvent('UNIT_CONNECTION', Path) - self:RegisterEvent('UNIT_MAXPOWER', Path) - - -- For tapping. - self:RegisterEvent('UNIT_FACTION', Path) - - if(power:IsObjectType'StatusBar' and not power:GetStatusBarTexture()) then - power:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]] - end - - return true - end -end - -local Disable = function(self) - local power = self.Power - if(power) then - if(power:GetScript'OnUpdate') then - power:SetScript("OnUpdate", nil) - else - self:UnregisterEvent('UNIT_POWER', Path) - end - - self:UnregisterEvent('UNIT_POWER_BAR_SHOW', Path) - self:UnregisterEvent('UNIT_POWER_BAR_HIDE', Path) - self:UnregisterEvent('UNIT_DISPLAYPOWER', Path) - self:UnregisterEvent('UNIT_CONNECTION', Path) - self:UnregisterEvent('UNIT_MAXPOWER', Path) - self:UnregisterEvent('UNIT_FACTION', Path) - end -end - -oUF:AddElement('Power', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/pvp.lua b/Tukui/modules/unitframes/core/oUF/elements/pvp.lua deleted file mode 100644 index 2ddb21b..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/pvp.lua +++ /dev/null @@ -1,48 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event, unit) - if(unit ~= self.unit) then return end - - if(self.PvP) then - local factionGroup = UnitFactionGroup(unit) - if(UnitIsPVPFreeForAll(unit)) then - self.PvP:SetTexture[[Interface\TargetingFrame\UI-PVP-FFA]] - self.PvP:Show() - elseif(factionGroup and UnitIsPVP(unit)) then - self.PvP:SetTexture([[Interface\TargetingFrame\UI-PVP-]]..factionGroup) - self.PvP:Show() - else - self.PvP:Hide() - end - end -end - -local Path = function(self, ...) - return (self.PvP.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local Enable = function(self) - local pvp = self.PvP - if(pvp) then - pvp.__owner = self - pvp.ForceUpdate = ForceUpdate - - self:RegisterEvent("UNIT_FACTION", Path) - - return true - end -end - -local Disable = function(self) - local pvp = self.PvP - if(pvp) then - self:UnregisterEvent("UNIT_FACTION", Path) - end -end - -oUF:AddElement('PvP', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/qicon.lua b/Tukui/modules/unitframes/core/oUF/elements/qicon.lua deleted file mode 100644 index f336c54..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/qicon.lua +++ /dev/null @@ -1,45 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event, unit) - if(unit ~= self.unit) then return end - - local qicon = self.QuestIcon - if(UnitIsQuestBoss(unit)) then - return qicon:Show() - else - return qicon:Hide() - end -end - -local Path = function(self, ...) - return (self.QuestIcon.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local Enable = function(self) - local qicon = self.QuestIcon - if(qicon) then - qicon.__owner = self - qicon.ForceUpdate = ForceUpdate - - self:RegisterEvent('UNIT_CLASSIFICATION_CHANGED', Path) - - if(qicon:IsObjectType'Texture' and not qicon:GetTexture()) then - qicon:SetTexture[[Interface\TargetingFrame\PortraitQuestBadge]] - end - - return true - end -end - -local Disable = function(self) - if(self.QuestIcon) then - self:UnregisterEvent('UNIT_CLASSIFICATION_CHANGED', Path) - end -end - -oUF:AddElement('QuestIcon', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/range.lua b/Tukui/modules/unitframes/core/oUF/elements/range.lua deleted file mode 100644 index e486dde..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/range.lua +++ /dev/null @@ -1,67 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local _FRAMES = {} -local OnRangeFrame - -local UnitInRange, UnitIsConnected = UnitInRange, UnitIsConnected - --- updating of range. -local timer = 0 -local OnRangeUpdate = function(self, elapsed) - timer = timer + elapsed - - if(timer >= .20) then - for _, object in next, _FRAMES do - if(object:IsShown()) then - local range = object.Range - if(UnitIsConnected(object.unit)) then - local inRange, checkedRange = UnitInRange(object.unit) - if(checkedRange and not inRange) then - if(object:GetAlpha() == range.insideAlpha) then - object:SetAlpha(range.outsideAlpha) - end - elseif(object:GetAlpha() ~= range.insideAlpha) then - object:SetAlpha(range.insideAlpha) - end - end - end - end - - timer = 0 - end -end - -local Enable = function(self) - local range = self.Range - if(range and range.insideAlpha and range.outsideAlpha) then - table.insert(_FRAMES, self) - - if(not OnRangeFrame) then - OnRangeFrame = CreateFrame"Frame" - OnRangeFrame:SetScript("OnUpdate", OnRangeUpdate) - end - - OnRangeFrame:Show() - - return true - end -end - -local Disable = function(self) - local range = self.Range - if(range) then - for k, frame in next, _FRAMES do - if(frame == self) then - table.remove(_FRAMES, k) - break - end - end - - if(#_FRAMES == 0) then - OnRangeFrame:Hide() - end - end -end - -oUF:AddElement('Range', nil, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/readycheck.lua b/Tukui/modules/unitframes/core/oUF/elements/readycheck.lua deleted file mode 100644 index 6a140b2..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/readycheck.lua +++ /dev/null @@ -1,125 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local _TIMERS = {} -local ReadyCheckFrame - -local removeEntry = function(icon) - _TIMERS[icon] = nil - if(not next(_TIMERS)) then - return ReadyCheckFrame:Hide() - end -end - -local Start = function(self) - removeEntry(self) - - self:SetTexture(READY_CHECK_WAITING_TEXTURE) - self.state = 'waiting' - self:SetAlpha(1) - self:Show() -end - -local Confirm = function(self, ready) - removeEntry(self) - - if(ready) then - self:SetTexture(READY_CHECK_READY_TEXTURE) - self.state = 'ready' - else - self:SetTexture(READY_CHECK_NOT_READY_TEXTURE) - self.state = 'notready' - end - - self:SetAlpha(1) - self:Show() -end - -local Finish = function(self) - if(self.state == 'waiting') then - self:SetTexture(READY_CHECK_AFK_TEXTURE) - self.state = 'afk' - end - - self.finishedTimer = self.finishedTime or 10 - self.fadeTimer = self.fadeTime or 1.5 - - _TIMERS[self] = true - ReadyCheckFrame:Show() -end - -local OnUpdate = function(self, elapsed) - for icon in next, _TIMERS do - if(icon.finishedTimer) then - icon.finishedTimer = icon.finishedTimer - elapsed - if(icon.finishedTimer <= 0) then - icon.finishedTimer = nil - end - elseif(icon.fadeTimer) then - icon.fadeTimer = icon.fadeTimer - elapsed - icon:SetAlpha(icon.fadeTimer / (icon.fadeTime or 1.5)) - - if(icon.fadeTimer <= 0) then - icon:Hide() - removeEntry(icon) - end - end - end -end - -local Update = function(self, event) - local unit = self.unit - local readyCheck = self.ReadyCheck - if(event == 'READY_CHECK_FINISHED') then - Finish(readyCheck) - else - local status = GetReadyCheckStatus(unit) - if(UnitExists(unit) and status) then - if(status == 'ready') then - Confirm(readyCheck, 1) - elseif(status == 'notready') then - Confirm(readyCheck) - else - Start(readyCheck) - end - end - end -end - -local Path = function(self, ...) - return (self.ReadyCheck.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self, unit) - local readyCheck = self.ReadyCheck - if(readyCheck and (unit and (unit:sub(1, 5) == 'party' or unit:sub(1,4) == 'raid'))) then - readyCheck.__owner = self - readyCheck.ForceUpdate = ForceUpdate - - if(not ReadyCheckFrame) then - ReadyCheckFrame = CreateFrame'Frame' - ReadyCheckFrame:SetScript('OnUpdate', OnUpdate) - end - - self:RegisterEvent('READY_CHECK', Path) - self:RegisterEvent('READY_CHECK_CONFIRM', Path) - self:RegisterEvent('READY_CHECK_FINISHED', Path) - - return true - end -end - -local Disable = function(self) - local readyCheck = self.ReadyCheck - if(readyCheck) then - self:UnregisterEvent('READY_CHECK', Path) - self:UnregisterEvent('READY_CHECK_CONFIRM', Path) - self:UnregisterEvent('READY_CHECK_FINISHED', Path) - end -end - -oUF:AddElement('ReadyCheck', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/resting.lua b/Tukui/modules/unitframes/core/oUF/elements/resting.lua deleted file mode 100644 index 9d1f590..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/resting.lua +++ /dev/null @@ -1,44 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event) - if(IsResting()) then - self.Resting:Show() - else - self.Resting:Hide() - end -end - -local Path = function(self, ...) - return (self.Resting.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self, unit) - local resting = self.Resting - if(resting and unit == 'player') then - resting.__owner = self - resting.ForceUpdate = ForceUpdate - - self:RegisterEvent("PLAYER_UPDATE_RESTING", Path) - - if(resting:IsObjectType"Texture" and not resting:GetTexture()) then - resting:SetTexture[[Interface\CharacterFrame\UI-StateIcon]] - resting:SetTexCoord(0, .5, 0, .421875) - end - - return true - end -end - -local Disable = function(self) - local resting = self.Resting - if(resting) then - self:UnregisterEvent("PLAYER_UPDATE_RESTING", Path) - end -end - -oUF:AddElement('Resting', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/resurrect.lua b/Tukui/modules/unitframes/core/oUF/elements/resurrect.lua deleted file mode 100644 index 0ebe955..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/resurrect.lua +++ /dev/null @@ -1,46 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event) - local incomingResurrect = UnitHasIncomingResurrection(self.unit) - local resurrect = self.ResurrectIcon - - if(incomingResurrect) then - resurrect:Show() - else - resurrect:Hide() - end -end - -local Path = function(self, ...) - return (self.ResurrectIcon.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self) - local resurrect = self.ResurrectIcon - if(resurrect) then - resurrect.__owner = self - resurrect.ForceUpdate = ForceUpdate - - self:RegisterEvent('INCOMING_RESURRECT_CHANGED', Path) - - if(resurrect:IsObjectType('Texture') and not resurrect:GetTexture()) then - resurrect:SetTexture[[Interface\RaidFrame\Raid-Icon-Rez]] - end - - return true - end -end - -local Disable = function(self) - local resurrect = self.ResurrectIcon - if(resurrect) then - self:UnregisterEvent('INCOMING_RESURRECT_CHANGED', Path) - end -end - -oUF:AddElement('ResurrectIcon', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/ricons.lua b/Tukui/modules/unitframes/core/oUF/elements/ricons.lua deleted file mode 100644 index cc86db9..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/ricons.lua +++ /dev/null @@ -1,51 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local GetRaidTargetIndex = GetRaidTargetIndex -local SetRaidTargetIconTexture = SetRaidTargetIconTexture - -local Update = function(self, event) - local index = GetRaidTargetIndex(self.unit) - local icon = self.RaidIcon - - if(index) then - SetRaidTargetIconTexture(icon, index) - icon:Show() - else - icon:Hide() - end -end - -local Path = function(self, ...) - return (self.RaidIcon.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - if(not element.__owner.unit) then return end - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self) - local ricon = self.RaidIcon - if(ricon) then - ricon.__owner = self - ricon.ForceUpdate = ForceUpdate - - self:RegisterEvent("RAID_TARGET_UPDATE", Path) - - if(ricon:IsObjectType"Texture" and not ricon:GetTexture()) then - ricon:SetTexture[[Interface\TargetingFrame\UI-RaidTargetingIcons]] - end - - return true - end -end - -local Disable = function(self) - local ricon = self.RaidIcon - if(ricon) then - self:UnregisterEvent("RAID_TARGET_UPDATE", Path) - end -end - -oUF:AddElement('RaidIcon', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/runebar.lua b/Tukui/modules/unitframes/core/oUF/elements/runebar.lua deleted file mode 100644 index 65c0589..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/runebar.lua +++ /dev/null @@ -1,110 +0,0 @@ ---[[ Runebar: - Authors: Zariel, Haste -]] - -if select(2, UnitClass("player")) ~= "DEATHKNIGHT" then return end - -local parent, ns = ... -local oUF = ns.oUF - -oUF.colors.runes = { - {1, 0, 0}; - {0, .5, 0}; - {0, 1, 1}; - {.9, .1, 1}; -} - -local OnUpdate = function(self, elapsed) - local duration = self.duration + elapsed - if(duration >= self.max) then - return self:SetScript("OnUpdate", nil) - else - self.duration = duration - return self:SetValue(duration) - end -end - -local UpdateType = function(self, event, rune, alt) - local colors = self.colors.runes[GetRuneType(rune) or alt] - local rune = self.Runes[rune] - local r, g, b = colors[1], colors[2], colors[3] - - rune:SetStatusBarColor(r, g, b) - - if(rune.bg) then - local mu = rune.bg.multiplier or 1 - rune.bg:SetVertexColor(r * mu, g * mu, b * mu) - end -end - -local UpdateRune = function(self, event, rid) - local rune = self.Runes[rid] - if(rune) then - local start, duration, runeReady = GetRuneCooldown(rune:GetID()) - if(runeReady) then - rune:SetMinMaxValues(0, 1) - rune:SetValue(1) - rune:SetScript("OnUpdate", nil) - else - rune.duration = GetTime() - start - rune.max = duration - rune:SetMinMaxValues(1, duration) - rune:SetScript("OnUpdate", OnUpdate) - end - end -end - -local Update = function(self, event) - for i=1, 6 do - UpdateRune(self, event, i) - end -end - -local ForceUpdate = function(element) - return Update(element.__owner, 'ForceUpdate') -end - -local Enable = function(self, unit) - local runes = self.Runes - if(runes and unit == 'player') then - runes.__owner = self - runes.ForceUpdate = ForceUpdate - - for i=1, 6 do - local rune = runes[i] - rune:SetID(i) - -- From my minor testing this is a okey solution. A full login always remove - -- the death runes, or at least the clients knowledge about them. - UpdateType(self, nil, i, math.floor((i+1)/2)) - - if(rune:IsObjectType'StatusBar' and not rune:GetStatusBarTexture()) then - rune:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]] - end - end - - self:RegisterEvent("RUNE_POWER_UPDATE", UpdateRune) - self:RegisterEvent("RUNE_TYPE_UPDATE", UpdateType) - - runes:Show() - - -- oUF leaves the vehicle events registered on the player frame, so - -- buffs and such are correctly updated when entering/exiting vehicles. - -- - -- This however makes the code also show/hide the RuneFrame. - RuneFrame.Show = RuneFrame.Hide - RuneFrame:Hide() - - return true - end -end - -local Disable = function(self) - self.Runes:Hide() - RuneFrame.Show = nil - RuneFrame:Show() - - self:UnregisterEvent("RUNE_POWER_UPDATE", UpdateRune) - self:UnregisterEvent("RUNE_TYPE_UPDATE", UpdateType) -end - -oUF:AddElement("Runes", Update, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/soulshards.lua b/Tukui/modules/unitframes/core/oUF/elements/soulshards.lua deleted file mode 100644 index 614395c..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/soulshards.lua +++ /dev/null @@ -1,56 +0,0 @@ -if(select(2, UnitClass('player')) ~= 'WARLOCK') then return end - -local parent, ns = ... -local oUF = ns.oUF - -local SPELL_POWER_SOUL_SHARDS = SPELL_POWER_SOUL_SHARDS -local SHARD_BAR_NUM_SHARDS = SHARD_BAR_NUM_SHARDS - -local Update = function(self, event, unit, powerType) - if(self.unit ~= unit or (powerType and powerType ~= 'SOUL_SHARDS')) then return end - - local ss = self.SoulShards - if(ss.PreUpdate) then ss:PreUpdate(unit) end - - local num = UnitPower('player', SPELL_POWER_SOUL_SHARDS) - for i = 1, SHARD_BAR_NUM_SHARDS do - if(i <= num) then - ss[i]:SetAlpha(1) - else - ss[i]:SetAlpha(0) - end - end - - if(ss.PostUpdate) then - return ss:PostUpdate(unit) - end -end - -local Path = function(self, ...) - return (self.SoulShards.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit, 'SOUL_SHARDS') -end - -local function Enable(self) - local ss = self.SoulShards - if(ss) then - ss.__owner = self - ss.ForceUpdate = ForceUpdate - - self:RegisterEvent('UNIT_POWER', Path) - - return true - end -end - -local function Disable(self) - local ss = self.SoulShards - if(ss) then - self:UnregisterEvent('UNIT_POWER', Path) - end -end - -oUF:AddElement('SoulShards', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/tags.lua b/Tukui/modules/unitframes/core/oUF/elements/tags.lua deleted file mode 100644 index 630ca78..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/tags.lua +++ /dev/null @@ -1,650 +0,0 @@ ---[[ --- Credits: Vika, Cladhaire, Tekkub -]] - -local parent, ns = ... -local oUF = ns.oUF - -local _PATTERN = '%[..-%]+' - -local _ENV = { - Hex = function(r, g, b) - if type(r) == "table" then - if r.r then r, g, b = r.r, r.g, r.b else r, g, b = unpack(r) end - end - return string.format("|cff%02x%02x%02x", r*255, g*255, b*255) - end, - ColorGradient = oUF.ColorGradient, -} -local _PROXY = setmetatable(_ENV, {__index = _G}) - -local tagStrings = { - ["creature"] = [[function(u) - return UnitCreatureFamily(u) or UnitCreatureType(u) - end]], - - ["dead"] = [[function(u) - if(UnitIsDead(u)) then - return 'Dead' - elseif(UnitIsGhost(u)) then - return 'Ghost' - end - end]], - - ["difficulty"] = [[function(u) - if UnitCanAttack("player", u) then - local l = UnitLevel(u) - return Hex(GetQuestDifficultyColor((l > 0) and l or 99)) - end - end]], - - ["leader"] = [[function(u) - if(UnitIsPartyLeader(u)) then - return 'L' - end - end]], - - ["leaderlong"] = [[function(u) - if(UnitIsPartyLeader(u)) then - return 'Leader' - end - end]], - - ["level"] = [[function(u) - local l = UnitLevel(u) - if(l > 0) then - return l - else - return '??' - end - end]], - - ["missinghp"] = [[function(u) - local current = UnitHealthMax(u) - UnitHealth(u) - if(current > 0) then - return current - end - end]], - - ["missingpp"] = [[function(u) - local current = UnitPowerMax(u) - UnitPower(u) - if(current > 0) then - return current - end - end]], - - ["name"] = [[function(u, r) - return UnitName(r or u) - end]], - - ["offline"] = [[function(u) - if(not UnitIsConnected(u)) then - return 'Offline' - end - end]], - - ["perhp"] = [[function(u) - local m = UnitHealthMax(u) - if(m == 0) then - return 0 - else - return math.floor(UnitHealth(u)/m*100+.5) - end - end]], - - ["perpp"] = [[function(u) - local m = UnitPowerMax(u) - if(m == 0) then - return 0 - else - return math.floor(UnitPower(u)/m*100+.5) - end - end]], - - ["plus"] = [[function(u) - local c = UnitClassification(u) - if(c == 'elite' or c == 'rareelite') then - return '+' - end - end]], - - ["pvp"] = [[function(u) - if(UnitIsPVP(u)) then - return 'PvP' - end - end]], - - ["raidcolor"] = [[function(u) - local _, x = UnitClass(u) - if(x) then - return Hex(_COLORS.class[x]) - end - end]], - - ["rare"] = [[function(u) - local c = UnitClassification(u) - if(c == 'rare' or c == 'rareelite') then - return 'Rare' - end - end]], - - ["resting"] = [[function(u) - if(u == 'player' and IsResting()) then - return 'zzz' - end - end]], - - ["sex"] = [[function(u) - local s = UnitSex(u) - if(s == 2) then - return 'Male' - elseif(s == 3) then - return 'Female' - end - end]], - - ["smartclass"] = [[function(u) - if(UnitIsPlayer(u)) then - return _TAGS['class'](u) - end - - return _TAGS['creature'](u) - end]], - - ["status"] = [[function(u) - if(UnitIsDead(u)) then - return 'Dead' - elseif(UnitIsGhost(u)) then - return 'Ghost' - elseif(not UnitIsConnected(u)) then - return 'Offline' - else - return _TAGS['resting'](u) - end - end]], - - ["threat"] = [[function(u) - local s = UnitThreatSituation(u) - if(s == 1) then - return '++' - elseif(s == 2) then - return '--' - elseif(s == 3) then - return 'Aggro' - end - end]], - - ["threatcolor"] = [[function(u) - return Hex(GetThreatStatusColor(UnitThreatSituation(u))) - end]], - - ["cpoints"] = [[function(u) - local cp - if(UnitHasVehicleUI'player') then - cp = GetComboPoints('vehicle', 'target') - else - cp = GetComboPoints('player', 'target') - end - - if(cp > 0) then - return cp - end - end]], - - ['smartlevel'] = [[function(u) - local c = UnitClassification(u) - if(c == 'worldboss') then - return 'Boss' - else - local plus = _TAGS['plus'](u) - local level = _TAGS['level'](u) - if(plus) then - return level .. plus - else - return level - end - end - end]], - - ["classification"] = [[function(u) - local c = UnitClassification(u) - if(c == 'rare') then - return 'Rare' - elseif(c == 'eliterare') then - return 'Rare Elite' - elseif(c == 'elite') then - return 'Elite' - elseif(c == 'worldboss') then - return 'Boss' - end - end]], - - ["shortclassification"] = [[function(u) - local c = UnitClassification(u) - if(c == 'rare') then - return 'R' - elseif(c == 'eliterare') then - return 'R+' - elseif(c == 'elite') then - return '+' - elseif(c == 'worldboss') then - return 'B' - end - end]], - - ["group"] = [[function(unit) - local name, server = UnitName(unit) - if(server and server ~= "") then - name = string.format("%s-%s", name, server) - end - - for i=1, GetNumRaidMembers() do - local raidName, _, group = GetRaidRosterInfo(i) - if( raidName == name ) then - return group - end - end - end]], - - ["deficit:name"] = [[function(u) - local missinghp = _TAGS['missinghp'](u) - if(missinghp) then - return '-' .. missinghp - else - return _TAGS['name'](u) - end - end]], - - ['pereclipse'] = [[function(u) - local m = UnitPowerMax('player', SPELL_POWER_ECLIPSE) - if(m == 0) then - return 0 - else - return math.abs(UnitPower('player', SPELL_POWER_ECLIPSE)/m*100) - end - end]], - - ['curmana'] = [[function(unit) - return UnitPower(unit, SPELL_POWER_MANA) - end]], - - ['maxmana'] = [[function(unit) - return UnitPowerMax(unit, SPELL_POWER_MANA) - end]], -} - -local tags = setmetatable( - { - curhp = UnitHealth, - curpp = UnitPower, - maxhp = UnitHealthMax, - maxpp = UnitPowerMax, - class = UnitClass, - faction = UnitFactionGroup, - race = UnitRace, - }, - - { - __index = function(self, key) - local tagFunc = tagStrings[key] - if(tagFunc) then - local func, err = loadstring('return ' .. tagFunc) - if(func) then - func = func() - - -- Want to trigger __newindex, so no rawset. - self[key] = func - tagStrings[key] = nil - - return func - else - error(err, 3) - end - end - end, - __newindex = function(self, key, val) - if(type(val) == 'string') then - tagStrings[key] = val - elseif(type(val) == 'function') then - -- So we don't clash with any custom envs. - if(getfenv(val) == _G) then - setfenv(val, _PROXY) - end - - rawset(self, key, val) - end - end, - } -) - -_ENV._TAGS = tags - -local tagEvents = { - ["curhp"] = "UNIT_HEALTH", - ["dead"] = "UNIT_HEALTH", - ["leader"] = "PARTY_LEADER_CHANGED", - ["leaderlong"] = "PARTY_LEADER_CHANGED", - ["level"] = "UNIT_LEVEL PLAYER_LEVEL_UP", - ["maxhp"] = "UNIT_MAXHEALTH", - ["missinghp"] = "UNIT_HEALTH UNIT_MAXHEALTH", - ["name"] = "UNIT_NAME_UPDATE", - ["perhp"] = "UNIT_HEALTH UNIT_MAXHEALTH", - ["pvp"] = "UNIT_FACTION", - ["resting"] = "PLAYER_UPDATE_RESTING", - ["smartlevel"] = "UNIT_LEVEL PLAYER_LEVEL_UP UNIT_CLASSIFICATION_CHANGED", - ["threat"] = "UNIT_THREAT_SITUATION_UPDATE", - ["threatcolor"] = "UNIT_THREAT_SITUATION_UPDATE", - ['cpoints'] = 'UNIT_COMBO_POINTS PLAYER_TARGET_CHANGED', - ['rare'] = 'UNIT_CLASSIFICATION_CHANGED', - ['classification'] = 'UNIT_CLASSIFICATION_CHANGED', - ['shortclassification'] = 'UNIT_CLASSIFICATION_CHANGED', - ["group"] = "RAID_ROSTER_UPDATE", - ["curpp"] = 'UNIT_POWER', - ["maxpp"] = 'UNIT_MAXPOWER', - ["missingpp"] = 'UNIT_MAXPOWER UNIT_POWER', - ["perpp"] = 'UNIT_MAXPOWER UNIT_POWER', - ["offline"] = "UNIT_HEALTH UNIT_CONNECTION", - ["status"] = "UNIT_HEALTH PLAYER_UPDATE_RESTING UNIT_CONNECTION", - ["pereclipse"] = 'UNIT_POWER', - ['curmana'] = 'UNIT_POWER UNIT_MAXPOWER', - ['maxmana'] = 'UNIT_POWER UNIT_MAXPOWER', -} - -local unitlessEvents = { - PLAYER_LEVEL_UP = true, - PLAYER_UPDATE_RESTING = true, - PLAYER_TARGET_CHANGED = true, - - PARTY_LEADER_CHANGED = true, - - RAID_ROSTER_UPDATE = true, - - UNIT_COMBO_POINTS = true -} - -local events = {} -local frame = CreateFrame"Frame" -frame:SetScript('OnEvent', function(self, event, unit) - local strings = events[event] - if(strings) then - for k, fontstring in next, strings do - if(fontstring:IsVisible() and (unitlessEvents[event] or fontstring.parent.unit == unit)) then - fontstring:UpdateTag() - end - end - end -end) - -local OnUpdates = {} -local eventlessUnits = {} - -local createOnUpdate = function(timer) - local OnUpdate = OnUpdates[timer] - - if(not OnUpdate) then - local total = timer - local frame = CreateFrame'Frame' - local strings = eventlessUnits[timer] - - frame:SetScript('OnUpdate', function(self, elapsed) - if(total >= timer) then - for k, fs in next, strings do - if(fs.parent:IsShown() and UnitExists(fs.parent.unit)) then - fs:UpdateTag() - end - end - - total = 0 - end - - total = total + elapsed - end) - - OnUpdates[timer] = frame - end -end - -local OnShow = function(self) - for _, fs in next, self.__tags do - fs:UpdateTag() - end -end - -local getTagName = function(tag) - local s = (tag:match('>+()') or 2) - local e = tag:match('.*()<+') - e = (e and e - 1) or -2 - - return tag:sub(s, e), s, e -end - -local RegisterEvent = function(fontstr, event) - if(not events[event]) then events[event] = {} end - - frame:RegisterEvent(event) - table.insert(events[event], fontstr) -end - -local RegisterEvents = function(fontstr, tagstr) - for tag in tagstr:gmatch(_PATTERN) do - tag = getTagName(tag) - local tagevents = tagEvents[tag] - if(tagevents) then - for event in tagevents:gmatch'%S+' do - RegisterEvent(fontstr, event) - end - end - end -end - -local UnregisterEvents = function(fontstr) - for event, data in pairs(events) do - for k, tagfsstr in pairs(data) do - if(tagfsstr == fontstr) then - if(#data == 1) then - frame:UnregisterEvent(event) - end - - table.remove(data, k) - end - end - end -end - -local tagPool = {} -local funcPool = {} -local tmp = {} - -local Tag = function(self, fs, tagstr) - if(not fs or not tagstr) then return end - - if(not self.__tags) then - self.__tags = {} - table.insert(self.__elements, OnShow) - else - -- Since people ignore everything that's good practice - unregister the tag - -- if it already exists. - for _, tag in pairs(self.__tags) do - if(fs == tag) then - -- We don't need to remove it from the __tags table as Untag handles - -- that for us. - self:Untag(fs) - end - end - end - - fs.parent = self - - local func = tagPool[tagstr] - if(not func) then - local format, numTags = tagstr:gsub('%%', '%%%%'):gsub(_PATTERN, '%%s') - local args = {} - - for bracket in tagstr:gmatch(_PATTERN) do - local tagFunc = funcPool[bracket] or tags[bracket:sub(2, -2)] - if(not tagFunc) then - local tagName, s, e = getTagName(bracket) - - local tag = tags[tagName] - if(tag) then - s = s - 2 - e = e + 2 - - if(s ~= 0 and e ~= 0) then - local pre = bracket:sub(2, s) - local ap = bracket:sub(e, -2) - - tagFunc = function(u,r) - local str = tag(u,r) - if(str) then - return pre..str..ap - end - end - elseif(s ~= 0) then - local pre = bracket:sub(2, s) - - tagFunc = function(u,r) - local str = tag(u,r) - if(str) then - return pre..str - end - end - elseif(e ~= 0) then - local ap = bracket:sub(e, -2) - - tagFunc = function(u,r) - local str = tag(u,r) - if(str) then - return str..ap - end - end - end - - funcPool[bracket] = tagFunc - end - end - - if(tagFunc) then - table.insert(args, tagFunc) - else - return error(('Attempted to use invalid tag %s.'):format(bracket), 3) - end - end - - if(numTags == 1) then - func = function(self) - local parent = self.parent - local realUnit - if(self.overrideUnit) then - realUnit = parent.realUnit - end - - _ENV._COLORS = parent.colors - return self:SetFormattedText( - format, - args[1](parent.unit, realUnit) or '' - ) - end - elseif(numTags == 2) then - func = function(self) - local parent = self.parent - local unit = parent.unit - local realUnit - if(self.overrideUnit) then - realUnit = parent.realUnit - end - - _ENV._COLORS = parent.colors - return self:SetFormattedText( - format, - args[1](unit, realUnit) or '', - args[2](unit, realUnit) or '' - ) - end - elseif(numTags == 3) then - func = function(self) - local parent = self.parent - local unit = parent.unit - local realUnit - if(self.overrideUnit) then - realUnit = parent.realUnit - end - - _ENV._COLORS = parent.colors - return self:SetFormattedText( - format, - args[1](unit, realUnit) or '', - args[2](unit, realUnit) or '', - args[3](unit, realUnit) or '' - ) - end - else - func = function(self) - local parent = self.parent - local unit = parent.unit - local realUnit - if(self.overrideUnit) then - realUnit = parent.realUnit - end - - _ENV._COLORS = parent.colors - for i, func in next, args do - tmp[i] = func(unit, realUnit) or '' - end - - -- We do 1, numTags because tmp can hold several unneeded variables. - return self:SetFormattedText(format, unpack(tmp, 1, numTags)) - end - end - - tagPool[tagstr] = func - end - fs.UpdateTag = func - - local unit = self.unit - if((unit and unit:match'%w+target') or fs.frequentUpdates) then - local timer - if(type(fs.frequentUpdates) == 'number') then - timer = fs.frequentUpdates - else - timer = .5 - end - - if(not eventlessUnits[timer]) then eventlessUnits[timer] = {} end - table.insert(eventlessUnits[timer], fs) - - createOnUpdate(timer) - else - RegisterEvents(fs, tagstr) - end - - table.insert(self.__tags, fs) -end - -local Untag = function(self, fs) - if(not fs) then return end - - UnregisterEvents(fs) - for _, timers in next, eventlessUnits do - for k, fontstr in next, timers do - if(fs == fontstr) then - table.remove(timers, k) - end - end - end - - for k, fontstr in next, self.__tags do - if(fontstr == fs) then - table.remove(self.__tags, k) - end - end - - fs.UpdateTag = nil -end - -oUF.Tags = tags -oUF.TagEvents = tagEvents -oUF.UnitlessTagEvents = unitlessEvents - -oUF:RegisterMetaFunction('Tag', Tag) -oUF:RegisterMetaFunction('Untag', Untag) diff --git a/Tukui/modules/unitframes/core/oUF/elements/threat.lua b/Tukui/modules/unitframes/core/oUF/elements/threat.lua deleted file mode 100644 index 13b8a30..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/threat.lua +++ /dev/null @@ -1,60 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event, unit) - if(unit ~= self.unit) then return end - - local threat = self.Threat - if(threat.PreUpdate) then threat:PreUpdate(unit) end - - unit = unit or self.unit - local status = UnitThreatSituation(unit) - - local r, g, b - if(status and status > 0) then - r, g, b = GetThreatStatusColor(status) - threat:SetVertexColor(r, g, b) - threat:Show() - else - threat:Hide() - end - - if(threat.PostUpdate) then - return threat:PostUpdate(unit, status, r, g, b) - end -end - -local Path = function(self, ...) - return (self.Threat.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local Enable = function(self) - local threat = self.Threat - if(threat) then - threat.__owner = self - threat.ForceUpdate = ForceUpdate - - self:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE", Path) - threat:Hide() - - if(threat:IsObjectType"Texture" and not threat:GetTexture()) then - threat:SetTexture[[Interface\Minimap\ObjectIcons]] - threat:SetTexCoord(1/4, 3/8, 0, 1/4) - end - - return true - end -end - -local Disable = function(self) - local threat = self.Threat - if(threat) then - self:UnregisterEvent("UNIT_THREAT_SITUATION_UPDATE", Path) - end -end - -oUF:AddElement('Threat', Path, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/elements/totems.lua b/Tukui/modules/unitframes/core/oUF/elements/totems.lua deleted file mode 100644 index d4ccfaf..0000000 --- a/Tukui/modules/unitframes/core/oUF/elements/totems.lua +++ /dev/null @@ -1,126 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - --- colors --- from Interface/BUTTONS/UI-TotemBar.blp -oUF.colors.totems = { - [FIRE_TOTEM_SLOT] = { 181/255, 073/255, 033/255 }, - [EARTH_TOTEM_SLOT] = { 074/255, 142/255, 041/255 }, - [WATER_TOTEM_SLOT] = { 057/255, 146/255, 181/255 }, - [AIR_TOTEM_SLOT] = { 132/255, 056/255, 231/255 } -} - -local OnClick = function(self) - DestroyTotem(self:GetID()) -end - -local UpdateTooltip = function(self) - GameTooltip:SetTotem(self:GetID()) -end - -local OnEnter = function(self) - if(not self:IsVisible()) then return end - - GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMRIGHT') - self:UpdateTooltip() -end - -local OnLeave = function() - GameTooltip:Hide() -end - -local UpdateTotem = function(self, event, slot) - local totems = self.Totems - - if(totems.PreUpdate) then totems:PreUpdate(slot) end - - local totem = totems[slot] - local haveTotem, name, start, duration, icon = GetTotemInfo(slot) - if(duration > 0) then - if(totem.Icon) then - totem.Icon:SetTexture(icon) - end - - if(totem.Cooldown) then - totem.Cooldown:SetCooldown(start, duration) - end - - totem:Show() - else - totem:Hide() - end - - if(totems.PostUpdate) then - return totems:PostUpdate(slot, haveTotem, name, start, duration, icon) - end -end - -local Path = function(self, ...) - return (self.Totems.Override or UpdateTotem) (self, ...) -end - -local Update = function(self, event) - for i = 1, MAX_TOTEMS do - Path(self, event, i) - end -end - -local ForceUpdate = function(element) - return Update(element.__owner, 'ForceUpdate') -end - -local Enable = function(self) - local totems = self.Totems - - if(totems) then - totems.__owner = self - totems.ForceUpdate = ForceUpdate - - for i = 1, MAX_TOTEMS do - local totem = totems[i] - - totem:SetID(i) - - if(totem:HasScript'OnClick') then - totem:SetScript('OnClick', OnClick) - end - - if(totem:IsMouseEnabled()) then - totem:SetScript('OnEnter', OnEnter) - totem:SetScript('OnLeave', OnLeave) - - if(not totem.UpdateTooltip) then - totem.UpdateTooltip = UpdateTooltip - end - end - end - - self:RegisterEvent('PLAYER_TOTEM_UPDATE', Path) - - TotemFrame.Show = TotemFrame.Hide - TotemFrame:Hide() - - TotemFrame:UnregisterEvent"PLAYER_TOTEM_UPDATE" - TotemFrame:UnregisterEvent"PLAYER_ENTERING_WORLD" - TotemFrame:UnregisterEvent"UPDATE_SHAPESHIFT_FORM" - TotemFrame:UnregisterEvent"PLAYER_TALENT_UPDATE" - - return true - end -end - -local Disable = function(self) - if(self.Totems) then - TotemFrame.Show = nil - TotemFrame:Show() - - TotemFrame:RegisterEvent"PLAYER_TOTEM_UPDATE" - TotemFrame:RegisterEvent"PLAYER_ENTERING_WORLD" - TotemFrame:RegisterEvent"UPDATE_SHAPESHIFT_FORM" - TotemFrame:RegisterEvent"PLAYER_TALENT_UPDATE" - - self:UnregisterEvent('PLAYER_TOTEM_UPDATE', Path) - end -end - -oUF:AddElement("Totems", Update, Enable, Disable) diff --git a/Tukui/modules/unitframes/core/oUF/events.lua b/Tukui/modules/unitframes/core/oUF/events.lua deleted file mode 100644 index 3d9dd3d..0000000 --- a/Tukui/modules/unitframes/core/oUF/events.lua +++ /dev/null @@ -1,81 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF -local Private = oUF.Private - -local argcheck = Private.argcheck -local error = Private.error -local frame_metatable = Private.frame_metatable - --- Events -Private.OnEvent = function(self, event, ...) - if(not self:IsShown()) then return end - return self[event](self, event, ...) -end - -local event_metatable = { - __call = function(funcs, self, ...) - for _, func in next, funcs do - func(self, ...) - end - end, -} - -local RegisterEvent = frame_metatable.__index.RegisterEvent -function frame_metatable.__index:RegisterEvent(event, func) - argcheck(event, 2, 'string') - - if(type(func) == 'string' and type(self[func]) == 'function') then - func = self[func] - end - - local curev = self[event] - local kind = type(curev) - if(curev and func) then - if(kind == 'function' and curev ~= func) then - self[event] = setmetatable({curev, func}, event_metatable) - elseif(kind == 'table') then - for _, infunc in next, curev do - if(infunc == func) then return end - end - - table.insert(curev, func) - end - elseif(self:IsEventRegistered(event)) then - return - else - if(type(func) == 'function') then - self[event] = func - elseif(not self[event]) then - return error("Style [%s] attempted to register event [%s] on unit [%s] with a handler that doesn't exist.", self.style, event, self.unit or 'unknown') - end - - RegisterEvent(self, event) - end -end - -local UnregisterEvent = frame_metatable.__index.UnregisterEvent -function frame_metatable.__index:UnregisterEvent(event, func) - argcheck(event, 2, 'string') - - local curev = self[event] - if(type(curev) == 'table' and func) then - for k, infunc in next, curev do - if(infunc == func) then - table.remove(curev, k) - - local n = #curev - if(n == 1) then - local _, handler = next(curev) - self[event] = handler - elseif(n == 0) then - UnregisterEvent(self, event) - end - - break - end - end - elseif(curev == func) then - self[event] = nil - UnregisterEvent(self, event) - end -end diff --git a/Tukui/modules/unitframes/core/oUF/factory.lua b/Tukui/modules/unitframes/core/oUF/factory.lua deleted file mode 100644 index 9b09261..0000000 --- a/Tukui/modules/unitframes/core/oUF/factory.lua +++ /dev/null @@ -1,45 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF -local Private = oUF.Private - -local argcheck = Private.argcheck - -local _QUEUE = {} -local _FACTORY = CreateFrame'Frame' -_FACTORY:SetScript('OnEvent', Private.OnEvent) -_FACTORY:RegisterEvent'PLAYER_LOGIN' -_FACTORY.active = true - -function _FACTORY:PLAYER_LOGIN() - if(not self.active) then return end - - for _, func in next, _QUEUE do - func(oUF) - end - - -- Avoid creating dupes. - wipe(_QUEUE) -end - -function oUF:Factory(func) - argcheck(func, 2, 'function') - - -- Call the function directly if we're active and logged in. - if(IsLoggedIn() and _FACTORY.active) then - return func(self) - else - table.insert(_QUEUE, func) - end -end - -function oUF:EnableFactory() - _FACTORY.active = true -end - -function oUF:DisableFactory() - _FACTORY.active = nil -end - -function oUF:RunFactoryQueue() - _FACTORY:PLAYER_LOGIN() -end diff --git a/Tukui/modules/unitframes/core/oUF/finalize.lua b/Tukui/modules/unitframes/core/oUF/finalize.lua deleted file mode 100644 index 9355d19..0000000 --- a/Tukui/modules/unitframes/core/oUF/finalize.lua +++ /dev/null @@ -1,4 +0,0 @@ -local parent, ns = ... - --- It's named Private for a reason! -ns.oUF.Private = nil diff --git a/Tukui/modules/unitframes/core/oUF/init.lua b/Tukui/modules/unitframes/core/oUF/init.lua deleted file mode 100644 index 46aef44..0000000 --- a/Tukui/modules/unitframes/core/oUF/init.lua +++ /dev/null @@ -1,3 +0,0 @@ -local parent, ns = ... -ns.oUF = {} -ns.oUF.Private = {} diff --git a/Tukui/modules/unitframes/core/oUF/oUF.toc b/Tukui/modules/unitframes/core/oUF/oUF.toc deleted file mode 100644 index 2ce4bd5..0000000 --- a/Tukui/modules/unitframes/core/oUF/oUF.toc +++ /dev/null @@ -1,10 +0,0 @@ -## Interface: 40200 -## Title: oUF -## Author: Haste -## Version: 1.5.15 -## OptionalDeps: !ClassColors, Clique -## X-eMail: troeks@gmail.com -## X-oUF: oUF -## Notes: Unit frame framework. Does nothing by itself. - -oUF.xml diff --git a/Tukui/modules/unitframes/core/oUF/oUF.xml b/Tukui/modules/unitframes/core/oUF/oUF.xml deleted file mode 100644 index 16a6776..0000000 --- a/Tukui/modules/unitframes/core/oUF/oUF.xml +++ /dev/null @@ -1,93 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Script file='init.lua' /> - <Script file='private.lua' /> - <Script file='ouf.lua' /> - <Script file='events.lua'/> - <Script file='factory.lua' /> - <Script file='blizzard.lua' /> - <Script file='units.lua' /> - <Script file='colors.lua' /> - <Script file='finalize.lua' /> - - <Script file='elements\power.lua' /> - <Script file='elements\aura.lua' /> - <Script file='elements\health.lua' /> - <Script file='elements\cpoints.lua' /> - <Script file='elements\ricons.lua' /> - <Script file='elements\leader.lua' /> - <Script file='elements\combat.lua' /> - <Script file='elements\resting.lua' /> - <Script file='elements\pvp.lua' /> - <Script file='elements\portraits.lua' /> - <Script file='elements\range.lua' /> - <Script file='elements\castbar.lua' /> - <Script file='elements\threat.lua' /> - <Script file='elements\tags.lua' /> - <Script file='elements\masterlooter.lua' /> - <Script file='elements\assistant.lua' /> - <Script file='elements\runebar.lua' /> - <Script file='elements\lfdrole.lua' /> - <Script file='elements\healprediction.lua' /> - <Script file='elements\holypower.lua' /> - <Script file='elements\soulshards.lua' /> - <Script file='elements\picon.lua' /> - <Script file='elements\readycheck.lua' /> - <Script file='elements\qicon.lua' /> - <Script file='elements\eclipsebar.lua' /> - <Script file='elements\altpowerbar.lua' /> - <Script file='elements\totems.lua' /> - <Script file='elements\resurrect.lua' /> - <Script file='elements\maintank.lua' /> - <Script file='elements\druidmana.lua' /> - - <!-- Clique support --> - <Button name="oUF_ClickCastUnitTemplate" virtual="true" inherits="SecureUnitButtonTemplate,SecureHandlerEnterLeaveTemplate"> - <Attributes> - <Attribute name="_onenter" type="string" value="local snippet = self:GetAttribute('clickcast_onenter'); if snippet then self:Run(snippet) end"/> - <Attribute name="_onleave" type="string" value="local snippet = self:GetAttribute('clickcast_onleave'); if snippet then self:Run(snippet) end"/> - </Attributes> - </Button> - - <!-- - Sub-object as a child of the parent unit frame: - <Button name="oUF_HeaderTargetTemplate" inherits="SecureUnitButtonTemplate" hidden="true" virtual="true"> - <Frames> - <Button name="$parentTarget" inherits="SecureUnitButtonTemplate"> - <Attributes> - <Attribute name="unitsuffix" type="string" value="target"/> - <Attribute name="useparent-unit" type="boolean" value="true"/> - </Attributes> - </Button> - </Frames> - </Button> - - Separate unit template example: - <Button name="oUF_HeaderSeparateSubOjectsTemplate" inherits="SecureUnitButtonTemplate" hidden="true" virtual="true"> - <Attributes> - <Attribute name="oUF-onlyProcessChildren" type="boolean" value="true"/> - </Attributes> - - <Frames> - <Button name="$parentUnit" inherits="SecureUnitButtonTemplate"> - <Attributes> - <Attribute name="useparent-unit" type="boolean" value="true"/> - </Attributes> - </Button> - - <Button name="$parentPet" inherits="SecureUnitButtonTemplate"> - <Attributes> - <Attribute name="unitsuffix" type="string" value="pet"/> - <Attribute name="useparent-unit" type="boolean" value="true"/> - </Attributes> - </Button> - - <Button name="$parentTarget" inherits="SecureUnitButtonTemplate"> - <Attributes> - <Attribute name="unitsuffix" type="string" value="target"/> - <Attribute name="useparent-unit" type="boolean" value="true"/> - </Attributes> - </Button> - </Frames> - </Button> - --> -</Ui> diff --git a/Tukui/modules/unitframes/core/oUF/ouf.lua b/Tukui/modules/unitframes/core/oUF/ouf.lua deleted file mode 100644 index 1389777..0000000 --- a/Tukui/modules/unitframes/core/oUF/ouf.lua +++ /dev/null @@ -1,595 +0,0 @@ -local parent, ns = ... -local global = GetAddOnMetadata(parent, 'X-oUF') -local _VERSION = GetAddOnMetadata(parent, 'version') - -local oUF = ns.oUF -local Private = oUF.Private - -local argcheck = Private.argcheck - -local print = Private.print -local error = Private.error -local OnEvent = Private.OnEvent - -local styles, style = {} -local callback, units, objects = {}, {}, {} - -local select = select -local UnitExists = UnitExists - -local conv = { - ['playerpet'] = 'pet', - ['playertarget'] = 'target', -} -local elements = {} -local activeElements = {} - --- updating of "invalid" units. -local enableTargetUpdate = function(object) - local total = 0 - object.onUpdateFrequency = object.onUpdateFrequency or .5 - - object:SetScript('OnUpdate', function(self, elapsed) - if(not self.unit) then - return - elseif(total > self.onUpdateFrequency) then - self:UpdateAllElements'OnUpdate' - total = 0 - end - - total = total + elapsed - end) -end -Private.enableTargetUpdate = enableTargetUpdate - -local iterateChildren = function(...) - for l = 1, select("#", ...) do - local obj = select(l, ...) - - if(type(obj) == 'table' and obj.isChild) then - local unit = SecureButton_GetModifiedUnit(obj) - local subUnit = conv[unit] or unit - units[subUnit] = obj - obj.unit = subUnit - obj.id = subUnit:match'^.-(%d+)' - obj:UpdateAllElements"PLAYER_ENTERING_WORLD" - end - end -end - -local OnAttributeChanged = function(self, name, value) - if(name == "unit" and value) then - if(self.unit and (self.unit == value or self.realUnit == value)) then - return - else - if(self.hasChildren) then - iterateChildren(self:GetChildren()) - end - - if(not self:GetAttribute'oUF-onlyProcessChildren') then - local unit = SecureButton_GetModifiedUnit(self) - unit = conv[unit] or unit - units[unit] = self - self.unit = unit - self.id = unit:match"^.-(%d+)" - self:UpdateAllElements"PLAYER_ENTERING_WORLD" - end - end - end -end - -local frame_metatable = { - __index = CreateFrame"Button" -} -Private.frame_metatable = frame_metatable - -for k, v in pairs{ - EnableElement = function(self, name, unit) - argcheck(name, 2, 'string') - argcheck(unit, 3, 'string', 'nil') - - local element = elements[name] - if(not element or self:IsElementEnabled(name)) then return end - - if(element.enable(self, unit or self.unit)) then - activeElements[self][name] = true - - if(element.update) then - table.insert(self.__elements, element.update) - end - end - end, - - DisableElement = function(self, name) - argcheck(name, 2, 'string') - - local enabled = self:IsElementEnabled(name) - if(not enabled) then return end - - local update = elements[name].update - for k, func in next, self.__elements do - if(func == update) then - table.remove(self.__elements, k) - break - end - end - - activeElements[self][name] = nil - - -- We need to run a new update cycle incase we knocked ourself out of sync. - -- The main reason we do this is to make sure the full update is completed - -- if an element for some reason removes itself _during_ the update - -- progress. - self:UpdateAllElements('DisableElement', name) - - return elements[name].disable(self) - end, - - IsElementEnabled = function(self, name) - argcheck(name, 2, 'string') - - local element = elements[name] - if(not element) then return end - - local active = activeElements[self] - return active and active[name] - end, - - Enable = RegisterUnitWatch, - Disable = function(self) - UnregisterUnitWatch(self) - self:Hide() - end, - - UpdateAllElements = function(self, event) - local unit = self.unit - if(not UnitExists(unit)) then return end - - if(self.PreUpdate) then - self:PreUpdate(event) - end - - for _, func in next, self.__elements do - func(self, event, unit) - end - - if(self.PostUpdate) then - self:PostUpdate(event) - end - end, -} do - frame_metatable.__index[k] = v -end - -local updateActiveUnit = function(self, event, unit) - -- Calculate units to work with - local realUnit, modUnit = SecureButton_GetUnit(self), SecureButton_GetModifiedUnit(self) - - -- _GetUnit() doesn't rewrite playerpet -> pet like _GetModifiedUnit does. - if(realUnit == 'playerpet') then - realUnit = 'pet' - end - - if(modUnit == "pet" and realUnit ~= "pet") then - modUnit = "vehicle" - end - - -- Drop out if the event unit doesn't match any of the frame units. - if(not UnitExists(modUnit) or unit and unit ~= realUnit and unit ~= modUnit) then return end - - if(modUnit ~= realUnit) then - self.realUnit = realUnit - else - self.realUnit = nil - end - - -- Change the active unit and run a full update. - if(self.unit ~= modUnit) then - self.unit = modUnit - self:UpdateAllElements('RefreshUnit') - - return true - end -end - -local OnShow = function(self) - if(not updateActiveUnit(self, 'OnShow')) then - return self:UpdateAllElements'OnShow' - end -end - -local initObject = function(unit, style, styleFunc, header, ...) - local num = select('#', ...) - for i=1, num do - local object = select(i, ...) - local objectUnit = object:GetAttribute'oUF-guessUnit' or unit - local suffix = object:GetAttribute'unitsuffix' - - object.__elements = {} - object.style = style - object = setmetatable(object, frame_metatable) - - -- Expose the frame through oUF.objects. - table.insert(objects, object) - - -- We have to force update the frames when PEW fires. - object:RegisterEvent("PLAYER_ENTERING_WORLD", object.UpdateAllElements) - - -- Handle the case where someone has modified the unitsuffix attribute in - -- oUF-initialConfigFunction. - if(suffix and not objectUnit:match(suffix)) then - objectUnit = objectUnit .. suffix - end - - if(not (suffix == 'target' or objectUnit and objectUnit:match'target')) then - object:RegisterEvent('UNIT_ENTERED_VEHICLE', updateActiveUnit) - object:RegisterEvent('UNIT_EXITED_VEHICLE', updateActiveUnit) - - -- We don't need to register UNIT_PET for the player unit. We rigester it - -- mainly because UNIT_EXITED_VEHICLE and UNIT_ENTERED_VEHICLE doesn't always - -- have pet information when they fire for party and raid units. - if(objectUnit ~= 'player') then - object:RegisterEvent('UNIT_PET', updateActiveUnit) - end - end - - if(not header) then - -- No header means it's a frame created through :Spawn(). - object:SetAttribute("*type1", "target") - object:SetAttribute('*type2', 'menu') - - -- No need to enable this for *target frames. - if(not (unit:match'target' or suffix == 'target')) then - object:SetAttribute('toggleForVehicle', true) - end - - -- Other boss and target units are handled by :HandleUnit(). - if(suffix == 'target') then - enableTargetUpdate(object) - elseif(not (unit:match'%w+target' or unit:match'(boss)%d?$' == 'boss')) then - object:SetScript('OnEvent', Private.OnEvent) - end - else - -- Used to update frames when they change position in a group. - object:RegisterEvent('PARTY_MEMBERS_CHANGED', object.UpdateAllElements) - - if(num > 1) then - if(object:GetParent() == header) then - object.hasChildren = true - else - object.isChild = true - end - end - - if(suffix == 'target') then - enableTargetUpdate(object) - else - object:SetScript('OnEvent', Private.OnEvent) - end - end - - styleFunc(object, objectUnit, not header) - - object:SetScript("OnAttributeChanged", OnAttributeChanged) - object:SetScript("OnShow", OnShow) - - activeElements[object] = {} - for element in next, elements do - object:EnableElement(element, objectUnit) - end - - for _, func in next, callback do - func(object) - end - - -- Make Clique happy - _G.ClickCastFrames = ClickCastFrames or {} - ClickCastFrames[object] = true - end -end - -local walkObject = function(object, unit) - local parent = object:GetParent() - local style = parent.style or style - local styleFunc = styles[style] - - local header = parent:GetAttribute'oUF-headerType' and parent - - -- Check if we should leave the main frame blank. - if(object:GetAttribute'oUF-onlyProcessChildren') then - object.hasChildren = true - object:SetScript('OnAttributeChanged', OnAttributeChanged) - return initObject(unit, style, styleFunc, header, object:GetChildren()) - end - - return initObject(unit, style, styleFunc, header, object, object:GetChildren()) -end - -function oUF:RegisterInitCallback(func) - table.insert(callback, func) -end - -function oUF:RegisterMetaFunction(name, func) - argcheck(name, 2, 'string') - argcheck(func, 3, 'function', 'table') - - if(frame_metatable.__index[name]) then - return - end - - frame_metatable.__index[name] = func -end - -function oUF:RegisterStyle(name, func) - argcheck(name, 2, 'string') - argcheck(func, 3, 'function', 'table') - - if(styles[name]) then return error("Style [%s] already registered.", name) end - if(not style) then style = name end - - styles[name] = func -end - -function oUF:SetActiveStyle(name) - argcheck(name, 2, 'string') - if(not styles[name]) then return error("Style [%s] does not exist.", name) end - - style = name -end - -do - local function iter(_, n) - -- don't expose the style functions. - return (next(styles, n)) - end - - function oUF.IterateStyles() - return iter, nil, nil - end -end - -local getCondition -do - local conditions = { - raid40 = '[@raid26,exists] show;', - raid25 = '[@raid11,exists] show;', - raid10 = '[@raid6,exists] show;', - raid = '[group:raid] show;', - party = '[group:party,nogroup:raid] show;', - solo = '[@player,exists,nogroup:party] show;', - } - - function getCondition(...) - local cond = '' - - for i=1, select('#', ...) do - local short = select(i, ...) - - local condition = conditions[short] - if(condition) then - cond = cond .. condition - end - end - - return cond .. 'hide' - end -end - -local generateName = function(unit, ...) - local name = 'oUF_' .. style:gsub('[^%a%d_]+', '') - - local raid, party, groupFilter - for i=1, select('#', ...), 2 do - local att, val = select(i, ...) - if(att == 'showRaid') then - raid = true - elseif(att == 'showParty') then - party = true - elseif(att == 'groupFilter') then - groupFilter = val - end - end - - local append - if(raid) then - if(groupFilter) then - if(type(groupFilter) == 'number' and groupFilter > 0) then - append = groupFilter - elseif(groupFilter:match'TANK') then - append = 'MainTank' - elseif(groupFilter:match'ASSIST') then - append = 'MainAssist' - else - local _, count = groupFilter:gsub(',', '') - if(count == 0) then - append = groupFilter - else - append = 'Raid' - end - end - else - append = 'Raid' - end - elseif(party) then - append = 'Party' - elseif(unit) then - append = unit:gsub("^%l", string.upper) - end - - if(append) then - name = name .. append - end - - -- Change oUF_LilyRaidRaid into oUF_LilyRaid - name = name:gsub('(%u%l+)([%u%l]*)%1', '%1') - - local base = name - local i = 2 - while(_G[name]) do - name = base .. i - i = i + 1 - end - - return name -end - -do - local styleProxy = function(self, frame, ...) - return walkObject(_G[frame]) - end - - -- There has to be an easier way to do this. - local initialConfigFunction = [[ - local header = self:GetParent() - local frames = table.new() - table.insert(frames, self) - self:GetChildList(frames) - for i=1, #frames do - local frame = frames[i] - local unit - -- There's no need to do anything on frames with onlyProcessChildren - if(not frame:GetAttribute'oUF-onlyProcessChildren') then - RegisterUnitWatch(frame) - - -- Attempt to guess what the header is set to spawn. - local groupFilter = header:GetAttribute'groupFilter' - - if(type(groupFilter) == 'string' and groupFilter:match('MAIN[AT]')) then - local role = groupFilter:match('MAIN([AT])') - if(role == 'T') then - unit = 'maintank' - else - unit = 'mainassist' - end - elseif(header:GetAttribute'showRaid') then - unit = 'raid' - elseif(header:GetAttribute'showParty') then - unit = 'party' - end - - local headerType = header:GetAttribute'oUF-headerType' - local suffix = frame:GetAttribute'unitsuffix' - if(unit and suffix) then - if(headerType == 'pet' and suffix == 'target') then - unit = unit .. headerType .. suffix - else - unit = unit .. suffix - end - elseif(unit and headerType == 'pet') then - unit = unit .. headerType - end - - frame:SetAttribute('*type1', 'target') - frame:SetAttribute('*type2', 'menu') - frame:SetAttribute('toggleForVehicle', true) - frame:SetAttribute('oUF-guessUnit', unit) - end - - local body = header:GetAttribute'oUF-initialConfigFunction' - if(body) then - frame:Run(body, unit) - end - end - - header:CallMethod('styleFunction', self:GetName()) - - local clique = header:GetFrameRef("clickcast_header") - if(clique) then - clique:SetAttribute("clickcast_button", self) - clique:RunAttribute("clickcast_register") - end - ]] - - function oUF:SpawnHeader(overrideName, template, visibility, ...) - if(not style) then return error("Unable to create frame. No styles have been registered.") end - - template = (template or 'SecureGroupHeaderTemplate') - - local isPetHeader = template:match'PetHeader' - local name = overrideName or generateName(nil, ...) - local header = CreateFrame('Frame', name, UIParent, template) - - header:SetAttribute("template", "oUF_ClickCastUnitTemplate") - for i=1, select("#", ...), 2 do - local att, val = select(i, ...) - if(not att) then break end - header:SetAttribute(att, val) - end - - header.style = style - header.styleFunction = styleProxy - - -- We set it here so layouts can't directly override it. - header:SetAttribute('initialConfigFunction', initialConfigFunction) - header:SetAttribute('oUF-headerType', isPetHeader and 'pet' or 'group') - - if(Clique) then - SecureHandlerSetFrameRef(header, 'clickcast_header', Clique.header) - end - - if(header:GetAttribute'showParty') then - self:DisableBlizzard'party' - end - - if(visibility) then - local type, list = string.split(' ', visibility, 2) - if(list and type == 'custom') then - RegisterAttributeDriver(header, 'state-visibility', list) - else - local condition = getCondition(string.split(',', visibility)) - RegisterAttributeDriver(header, 'state-visibility', condition) - end - end - - return header - end -end - -function oUF:Spawn(unit, overrideName) - argcheck(unit, 2, 'string') - if(not style) then return error("Unable to create frame. No styles have been registered.") end - - unit = unit:lower() - - local name = overrideName or generateName(unit) - local object = CreateFrame("Button", name, UIParent, "SecureUnitButtonTemplate") - object.unit = unit - object.id = unit:match"^.-(%d+)" - - units[unit] = object - walkObject(object, unit) - - object:SetAttribute("unit", unit) - RegisterUnitWatch(object) - - self:DisableBlizzard(unit) - self:HandleUnit(object) - - return object -end - -function oUF:AddElement(name, update, enable, disable) - argcheck(name, 2, 'string') - argcheck(update, 3, 'function', 'nil') - argcheck(enable, 4, 'function', 'nil') - argcheck(disable, 5, 'function', 'nil') - - if(elements[name]) then return error('Element [%s] is already registered.', name) end - elements[name] = { - update = update; - enable = enable; - disable = disable; - } -end - -oUF.version = _VERSION -oUF.units = units -oUF.objects = objects - -if(global) then - if(parent ~= 'oUF' and global == 'oUF') then - error("%s is doing it wrong and setting its global to oUF.", parent) - else - _G[global] = oUF - end -end diff --git a/Tukui/modules/unitframes/core/oUF/private.lua b/Tukui/modules/unitframes/core/oUF/private.lua deleted file mode 100644 index c73b873..0000000 --- a/Tukui/modules/unitframes/core/oUF/private.lua +++ /dev/null @@ -1,22 +0,0 @@ -local parent, ns = ... -local Private = ns.oUF.Private - -function Private.argcheck(value, num, ...) - assert(type(num) == 'number', "Bad argument #2 to 'argcheck' (number expected, got "..type(num)..")") - - for i=1,select("#", ...) do - if type(value) == select(i, ...) then return end - end - - local types = strjoin(", ", ...) - local name = string.match(debugstack(2,2,0), ": in function [`<](.-)['>]") - error(("Bad argument #%d to '%s' (%s expected, got %s"):format(num, name, types, type(value)), 3) -end - -function Private.print(...) - print("|cff33ff99oUF:|r", ...) -end - -function Private.error(...) - Private.print("|cffff0000Error:|r "..string.format(...)) -end diff --git a/Tukui/modules/unitframes/core/oUF/units.lua b/Tukui/modules/unitframes/core/oUF/units.lua deleted file mode 100644 index d47d23a..0000000 --- a/Tukui/modules/unitframes/core/oUF/units.lua +++ /dev/null @@ -1,20 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF -local Private = oUF.Private - -local enableTargetUpdate = Private.enableTargetUpdate - --- Handles unit specific actions. -function oUF:HandleUnit(object, unit) - local unit = object.unit or unit - - if(unit == 'target') then - object:RegisterEvent('PLAYER_TARGET_CHANGED', object.UpdateAllElements) - elseif(unit == 'mouseover') then - object:RegisterEvent('UPDATE_MOUSEOVER_UNIT', object.UpdateAllElements) - elseif(unit == 'focus') then - object:RegisterEvent('PLAYER_FOCUS_CHANGED', object.UpdateAllElements) - elseif(unit:match'%w+target' or unit:match'(boss)%d?$' == 'boss') then - enableTargetUpdate(object) - end -end diff --git a/Tukui/modules/unitframes/layouts/tukui.lua b/Tukui/modules/unitframes/layouts/tukui.lua deleted file mode 100644 index 831dcfe..0000000 --- a/Tukui/modules/unitframes/layouts/tukui.lua +++ /dev/null @@ -1,1729 +0,0 @@ -local ADDON_NAME, ns = ... -local oUF = ns.oUF or oUF -assert(oUF, "Tukui was unable to locate oUF install.") - -ns._Objects = {} -ns._Headers = {} - -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -if not C["unitframes"].enable == true then return end - ------------------------------------------------------------------------- --- local variables ------------------------------------------------------------------------- - -local font1 = C["media"].uffont -local font2 = C["media"].font -local normTex = C["media"].normTex -local glowTex = C["media"].glowTex -local bubbleTex = C["media"].bubbleTex -local bdcr, bdcg, bdcb = unpack(C["media"].bordercolor) - -local backdrop = { - bgFile = C["media"].blank, - insets = {top = -T.mult, left = -T.mult, bottom = -T.mult, right = -T.mult}, -} - ------------------------------------------------------------------------- --- Layout ------------------------------------------------------------------------- - -local function Shared(self, unit) - -- set our own colors - self.colors = T.UnitColor - - -- register click - self:RegisterForClicks("AnyUp") - self:SetScript('OnEnter', UnitFrame_OnEnter) - self:SetScript('OnLeave', UnitFrame_OnLeave) - - -- menu? lol - self.menu = T.SpawnMenu - - -- backdrop for every units - self:SetBackdrop(backdrop) - self:SetBackdropColor(0, 0, 0) - - -- this is the glow border - self:CreateShadow("Default") - - ------------------------------------------------------------------------ - -- Features we want for all units at the same time - ------------------------------------------------------------------------ - - -- here we create an invisible frame for all element we want to show over health/power. - local InvFrame = CreateFrame("Frame", nil, self) - InvFrame:SetFrameStrata("HIGH") - InvFrame:SetFrameLevel(5) - InvFrame:SetAllPoints() - - -- symbols, now put the symbol on the frame we created above. - local RaidIcon = InvFrame:CreateTexture(nil, "OVERLAY") - RaidIcon:SetTexture("Interface\\AddOns\\Tukui\\medias\\textures\\raidicons.blp") -- thx hankthetank for texture - RaidIcon:SetHeight(20) - RaidIcon:SetWidth(20) - RaidIcon:SetPoint("TOP", 0, 11) - self.RaidIcon = RaidIcon - - ------------------------------------------------------------------------ - -- Player and Target units layout (mostly mirror'd) - ------------------------------------------------------------------------ - - if (unit == "player" or unit == "target") then - -- create a panel - local panel = CreateFrame("Frame", nil, self) - if T.lowversion then - panel:CreatePanel("Default", 186, 21, "BOTTOM", self, "BOTTOM", 0, 0) - else - panel:CreatePanel("Default", 250, 21, "BOTTOM", self, "BOTTOM", 0, 0) - end - panel:SetFrameLevel(2) - panel:SetFrameStrata("MEDIUM") - panel:SetBackdropBorderColor(bdcr * 0.7, bdcg * 0.7, bdcb * 0.7) - self.panel = panel - - -- health bar - local health = CreateFrame('StatusBar', nil, self) - if T.lowversion then - health:Height(20) - else - health:Height(26) - end - health:SetPoint("TOPLEFT") - health:SetPoint("TOPRIGHT") - health:SetStatusBarTexture(normTex) - - -- health bar background - local healthBG = health:CreateTexture(nil, 'BORDER') - healthBG:SetAllPoints() - healthBG:SetTexture(.1, .1, .1) - - health.value = T.SetFontString(panel, font1, 12) - health.value:Point("RIGHT", panel, "RIGHT", -4, 0) - health.PostUpdate = T.PostUpdateHealth - - self.Health = health - self.Health.bg = healthBG - - health.frequentUpdates = true - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - - if C["unitframes"].unicolor == true then - health.colorTapping = false - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - healthBG:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorTapping = true - health.colorClass = true - health.colorReaction = true - end - - -- power - local power = CreateFrame('StatusBar', nil, self) - power:Height(8) - power:Point("TOPLEFT", health, "BOTTOMLEFT", 0, -1) - power:Point("TOPRIGHT", health, "BOTTOMRIGHT", 0, -1) - power:SetStatusBarTexture(normTex) - - local powerBG = power:CreateTexture(nil, 'BORDER') - powerBG:SetAllPoints(power) - powerBG:SetTexture(normTex) - powerBG.multiplier = 0.3 - - power.value = T.SetFontString(panel, font1, 12) - power.value:Point("LEFT", panel, "LEFT", 4, 0) - power.PreUpdate = T.PreUpdatePower - power.PostUpdate = T.PostUpdatePower - - self.Power = power - self.Power.bg = powerBG - - power.frequentUpdates = true - power.colorDisconnected = true - - if C["unitframes"].showsmooth == true then - power.Smooth = true - end - - if C["unitframes"].unicolor == true then - power.colorTapping = true - power.colorClass = true - powerBG.multiplier = 0.1 - else - power.colorPower = true - end - - -- portraits - if (C["unitframes"].charportrait == true) then - local portrait = CreateFrame("PlayerModel", self:GetName().."_Portrait", self) - portrait:SetFrameLevel(8) - if T.lowversion then - portrait:SetHeight(51) - else - portrait:SetHeight(57) - end - portrait:SetWidth(33) - portrait:SetAlpha(1) - if unit == "player" then - health:SetPoint("TOPLEFT", 34,0) - health:SetPoint("TOPRIGHT") - power:Point("TOPLEFT", health, "BOTTOMLEFT", 0, -1) - power:Point("TOPRIGHT", health, "BOTTOMRIGHT", 0, -1) - panel:Point("TOPLEFT", power, "BOTTOMLEFT", 0, -1) - panel:Point("TOPRIGHT", power, "BOTTOMRIGHT", 0, -1) - portrait:SetPoint("TOPLEFT", health, "TOPLEFT", -34,0) - elseif unit == "target" then - health:SetPoint("TOPRIGHT", -34,0) - health:SetPoint("TOPLEFT") - power:Point("TOPRIGHT", health, "BOTTOMRIGHT", 0, -1) - power:Point("TOPLEFT", health, "BOTTOMLEFT", 0, -1) - panel:Point("TOPRIGHT", power, "BOTTOMRIGHT", 0, -1) - panel:Point("TOPLEFT", power, "BOTTOMLEFT", 0, -1) - portrait:SetPoint("TOPRIGHT", health, "TOPRIGHT", 34,0) - end - panel:SetWidth(panel:GetWidth() - 34) -- panel need to be resized if charportrait is enabled - table.insert(self.__elements, T.HidePortrait) - portrait.PostUpdate = T.PortraitUpdate --Worgen Fix (Hydra) - self.Portrait = portrait - end - - if T.myclass == "PRIEST" and C["unitframes"].weakenedsoulbar then - local ws = CreateFrame("StatusBar", self:GetName().."_WeakenedSoul", power) - ws:SetAllPoints(power) - ws:SetStatusBarTexture(C.media.normTex) - ws:GetStatusBarTexture():SetHorizTile(false) - ws:SetBackdrop(backdrop) - ws:SetBackdropColor(unpack(C.media.backdropcolor)) - ws:SetStatusBarColor(191/255, 10/255, 10/255) - - self.WeakenedSoul = ws - end - - --[[ leaving here just in case someone want to use it, we now use our own Alt Power Bar. - -- alt power bar - local AltPowerBar = CreateFrame("StatusBar", self:GetName().."_AltPowerBar", self.Health) - AltPowerBar:SetFrameLevel(0) - AltPowerBar:SetFrameStrata("LOW") - AltPowerBar:SetHeight(5) - AltPowerBar:SetStatusBarTexture(C.media.normTex) - AltPowerBar:GetStatusBarTexture():SetHorizTile(false) - AltPowerBar:SetStatusBarColor(163/255, 24/255, 24/255) - AltPowerBar:EnableMouse(true) - - AltPowerBar:Point("LEFT", TukuiInfoLeft, 2, -2) - AltPowerBar:Point("RIGHT", TukuiInfoLeft, -2, 2) - AltPowerBar:Point("TOP", TukuiInfoLeft, 2, -2) - AltPowerBar:Point("BOTTOM", TukuiInfoLeft, -2, 2) - - AltPowerBar:SetBackdrop({ - bgFile = C["media"].blank, - edgeFile = C["media"].blank, - tile = false, tileSize = 0, edgeSize = 1, - insets = { left = 0, right = 0, top = 0, bottom = T.Scale(-1)} - }) - AltPowerBar:SetBackdropColor(0, 0, 0) - - self.AltPowerBar = AltPowerBar - --]] - - if (unit == "player") then - -- combat icon - local Combat = health:CreateTexture(nil, "OVERLAY") - Combat:Height(19) - Combat:Width(19) - Combat:SetPoint("LEFT",0,1) - Combat:SetVertexColor(0.69, 0.31, 0.31) - self.Combat = Combat - - -- custom info (low mana warning) - FlashInfo = CreateFrame("Frame", "TukuiFlashInfo", self) - FlashInfo:SetScript("OnUpdate", T.UpdateManaLevel) - FlashInfo.parent = self - FlashInfo:SetAllPoints(panel) - FlashInfo.ManaLevel = T.SetFontString(FlashInfo, font1, 12) - FlashInfo.ManaLevel:SetPoint("CENTER", panel, "CENTER", 0, 0) - self.FlashInfo = FlashInfo - - -- pvp status text - local status = T.SetFontString(panel, font1, 12) - status:SetPoint("CENTER", panel, "CENTER", 0, 0) - status:SetTextColor(0.69, 0.31, 0.31) - status:Hide() - self.Status = status - - -- leader icon - local Leader = InvFrame:CreateTexture(nil, "OVERLAY") - Leader:Height(14) - Leader:Width(14) - Leader:Point("TOPLEFT", 2, 8) - self.Leader = Leader - - -- master looter - local MasterLooter = InvFrame:CreateTexture(nil, "OVERLAY") - MasterLooter:Height(14) - MasterLooter:Width(14) - self.MasterLooter = MasterLooter - self:RegisterEvent("PARTY_LEADER_CHANGED", T.MLAnchorUpdate) - self:RegisterEvent("PARTY_MEMBERS_CHANGED", T.MLAnchorUpdate) - - -- experience bar on player via mouseover for player currently levelling a character - if T.level ~= MAX_PLAYER_LEVEL then - local Experience = CreateFrame("StatusBar", self:GetName().."_Experience", self) - Experience:SetStatusBarTexture(normTex) - Experience:SetStatusBarColor(0, 0.4, 1, .8) - Experience:SetBackdrop(backdrop) - Experience:SetBackdropColor(unpack(C["media"].backdropcolor)) - Experience:Width(panel:GetWidth() - 4) - Experience:Height(panel:GetHeight() - 4) - Experience:Point("TOPLEFT", panel, 2, -2) - Experience:Point("BOTTOMRIGHT", panel, -2, 2) - Experience:SetFrameLevel(10) - Experience:SetAlpha(0) - Experience:HookScript("OnEnter", function(self) self:SetAlpha(1) end) - Experience:HookScript("OnLeave", function(self) self:SetAlpha(0) end) - Experience.Tooltip = true - Experience.Rested = CreateFrame('StatusBar', nil, self) - Experience.Rested:SetParent(Experience) - Experience.Rested:SetAllPoints(Experience) - Experience.Rested:SetStatusBarTexture(normTex) - Experience.Rested:SetStatusBarColor(1, 0, 1, 0.2) - local Resting = Experience:CreateTexture(nil, "OVERLAY") - Resting:SetHeight(28) - Resting:SetWidth(28) - if T.myclass == "SHAMAN" or T.myclass == "DEATHKNIGHT" or T.myclass == "PALADIN" or T.myclass == "WARLOCK" or T.myclass == "DRUID" then - Resting:SetPoint("LEFT", -18, 76) - else - Resting:SetPoint("LEFT", -18, 68) - end - Resting:SetTexture([=[Interface\CharacterFrame\UI-StateIcon]=]) - Resting:SetTexCoord(0, 0.5, 0, 0.421875) - self.Resting = Resting - self.Experience = Experience - end - - -- reputation bar for max level character - if T.level == MAX_PLAYER_LEVEL then - local Reputation = CreateFrame("StatusBar", self:GetName().."_Reputation", self) - Reputation:SetStatusBarTexture(normTex) - Reputation:SetBackdrop(backdrop) - Reputation:SetBackdropColor(unpack(C["media"].backdropcolor)) - Reputation:Width(panel:GetWidth() - 4) - Reputation:Height(panel:GetHeight() - 4) - Reputation:Point("TOPLEFT", panel, 2, -2) - Reputation:Point("BOTTOMRIGHT", panel, -2, 2) - Reputation:SetFrameLevel(10) - Reputation:SetAlpha(0) - - Reputation:HookScript("OnEnter", function(self) self:SetAlpha(1) end) - Reputation:HookScript("OnLeave", function(self) self:SetAlpha(0) end) - - Reputation.PostUpdate = T.UpdateReputationColor - Reputation.Tooltip = true - self.Reputation = Reputation - end - - -- show druid mana when shapeshifted in bear, cat or whatever - if T.myclass == "DRUID" then - local DruidManaUpdate = CreateFrame("Frame") - DruidManaUpdate:SetScript("OnUpdate", function() T.UpdateDruidManaText(self) end) - local DruidManaText = T.SetFontString(health, font1, 12) - DruidManaText:SetTextColor(1, 0.49, 0.04) - self.DruidManaText = DruidManaText - end - - if C["unitframes"].classbar then - if T.myclass == "DRUID" then - -- DRUID MANA BAR - local DruidManaBackground = CreateFrame("Frame", nil, self) - DruidManaBackground:Point("BOTTOMLEFT", self, "TOPLEFT", 0, 1) - if T.lowversion then - DruidManaBackground:Size(186, 8) - else - DruidManaBackground:Size(250, 8) - end - DruidManaBackground:SetFrameLevel(8) - DruidManaBackground:SetFrameStrata("MEDIUM") - DruidManaBackground:SetTemplate("Default") - DruidManaBackground:SetBackdropBorderColor(0,0,0,0) - - local DruidManaBarStatus = CreateFrame('StatusBar', nil, DruidManaBackground) - DruidManaBarStatus:SetPoint('LEFT', DruidManaBackground, 'LEFT', 0, 0) - DruidManaBarStatus:SetSize(DruidManaBackground:GetWidth(), DruidManaBackground:GetHeight()) - DruidManaBarStatus:SetStatusBarTexture(normTex) - DruidManaBarStatus:SetStatusBarColor(.30, .52, .90) - - DruidManaBarStatus:SetScript("OnShow", function() T.DruidBarDisplay(self, false) end) - DruidManaBarStatus:SetScript("OnUpdate", function() T.DruidBarDisplay(self, true) end) -- just forcing 1 update on login for buffs/shadow/etc. - DruidManaBarStatus:SetScript("OnHide", function() T.DruidBarDisplay(self, false) end) - - self.DruidManaBackground = DruidManaBackground - self.DruidMana = DruidManaBarStatus - - -- ECLIPSE BAR - local eclipseBar = CreateFrame('Frame', nil, self) - eclipseBar:Point("BOTTOMLEFT", self, "TOPLEFT", 0, 1) - if T.lowversion then - eclipseBar:Size(186, 8) - else - eclipseBar:Size(250, 8) - end - eclipseBar:SetFrameStrata("MEDIUM") - eclipseBar:SetFrameLevel(8) - eclipseBar:SetTemplate("Default") - eclipseBar:SetBackdropBorderColor(0,0,0,0) - eclipseBar:SetScript("OnShow", function() T.DruidBarDisplay(self, false) end) - eclipseBar:SetScript("OnHide", function() T.DruidBarDisplay(self, false) end) - - local lunarBar = CreateFrame('StatusBar', nil, eclipseBar) - lunarBar:SetPoint('LEFT', eclipseBar, 'LEFT', 0, 0) - lunarBar:SetSize(eclipseBar:GetWidth(), eclipseBar:GetHeight()) - lunarBar:SetStatusBarTexture(normTex) - lunarBar:SetStatusBarColor(.50, .52, .70) - eclipseBar.LunarBar = lunarBar - - local solarBar = CreateFrame('StatusBar', nil, eclipseBar) - solarBar:SetPoint('LEFT', lunarBar:GetStatusBarTexture(), 'RIGHT', 0, 0) - solarBar:SetSize(eclipseBar:GetWidth(), eclipseBar:GetHeight()) - solarBar:SetStatusBarTexture(normTex) - solarBar:SetStatusBarColor(.80, .82, .60) - eclipseBar.SolarBar = solarBar - - local eclipseBarText = eclipseBar:CreateFontString(nil, 'OVERLAY') - eclipseBarText:SetPoint('TOP', panel) - eclipseBarText:SetPoint('BOTTOM', panel) - eclipseBarText:SetFont(font1, 12) - eclipseBar.PostUpdatePower = T.EclipseDirection - - -- hide "low mana" text on load if eclipseBar is show - if eclipseBar and eclipseBar:IsShown() then FlashInfo.ManaLevel:SetAlpha(0) end - - self.EclipseBar = eclipseBar - self.EclipseBar.Text = eclipseBarText - end - - -- set holy power bar or shard bar - if (T.myclass == "WARLOCK" or T.myclass == "PALADIN") then - self.shadow:Point("TOPLEFT", -4, 11) - - local bars = CreateFrame("Frame", nil, self) - bars:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, 1) - if T.lowversion then - bars:Width(186) - else - bars:Width(250) - end - bars:Height(8) - bars:SetTemplate("Default") - bars:SetBackdropBorderColor(0,0,0,0) - - for i = 1, 3 do - bars[i]=CreateFrame("StatusBar", self:GetName().."_Shard"..i, self) - bars[i]:Height(8) - bars[i]:SetStatusBarTexture(normTex) - bars[i]:GetStatusBarTexture():SetHorizTile(false) - - bars[i].bg = bars[i]:CreateTexture(nil, 'BORDER') - - if T.myclass == "WARLOCK" then - bars[i]:SetStatusBarColor(255/255,101/255,101/255) - bars[i].bg:SetTexture(255/255,101/255,101/255) - elseif T.myclass == "PALADIN" then - bars[i]:SetStatusBarColor(228/255,225/255,16/255) - bars[i].bg:SetTexture(228/255,225/255,16/255) - end - - if i == 1 then - bars[i]:SetPoint("LEFT", bars) - if T.lowversion then - bars[i]:Width(62) - else - bars[i]:Width(82) -- setting SetWidth here just to fit fit 250 perfectly - end - bars[i].bg:SetAllPoints(bars[i]) - else - bars[i]:Point("LEFT", bars[i-1], "RIGHT", 1, 0) - if T.lowversion then - bars[i]:Width(61) - else - bars[i]:Width(83) -- setting SetWidth here just to fit fit 250 perfectly - end - bars[i].bg:SetAllPoints(bars[i]) - end - - bars[i].bg:SetTexture(normTex) - bars[i].bg:SetAlpha(.15) - end - - if T.myclass == "WARLOCK" then - bars.Override = T.UpdateShards - self.SoulShards = bars - elseif T.myclass == "PALADIN" then - bars.Override = T.UpdateHoly - self.HolyPower = bars - end - end - - -- deathknight runes - if T.myclass == "DEATHKNIGHT" then - -- rescale top shadow border - self.shadow:Point("TOPLEFT", -4, 12) - - local Runes = CreateFrame("Frame", nil, self) - Runes:Point("BOTTOMLEFT", self, "TOPLEFT", 0,1) - Runes:Height(8) - if T.lowversion then - Runes:SetWidth(186) - else - Runes:SetWidth(250) - end - Runes:SetBackdrop(backdrop) - Runes:SetBackdropColor(0, 0, 0) - - for i = 1, 6 do - Runes[i] = CreateFrame("StatusBar", self:GetName().."_Runes"..i, health) - Runes[i]:SetHeight(8) - if T.lowversion then - if i == 1 then - Runes[i]:SetWidth(31) - else - Runes[i]:SetWidth(30) - end - else - if i == 1 then - Runes[i]:SetWidth(40) - else - Runes[i]:SetWidth(41) - end - end - if (i == 1) then - Runes[i]:Point("BOTTOMLEFT", self, "TOPLEFT", 0, 1) - else - Runes[i]:Point("TOPLEFT", Runes[i-1], "TOPRIGHT", 1, 0) - end - Runes[i]:SetStatusBarTexture(normTex) - Runes[i]:GetStatusBarTexture():SetHorizTile(false) - end - - self.Runes = Runes - end - - -- shaman totem bar - if T.myclass == "SHAMAN" then - -- rescale top shadow border - self.shadow:Point("TOPLEFT", -4, 12) - - local TotemBar = {} - TotemBar.Destroy = true - for i = 1, 4 do - TotemBar[i] = CreateFrame("StatusBar", self:GetName().."_TotemBar"..i, self) - -- a totem 'slot' in the default ui doesn't necessarily correspond to its place on the screen. - -- for example, on the default totem action bar frame, the first totem is earth, but earth's - -- slot id is two according to Blizzard default slotID! - -- we want to match action bar so we fix them by moving status bar around. - local fixme - if (i == 2) then - TotemBar[i]:Point("BOTTOMLEFT", self, "TOPLEFT", 0, 1) - elseif i == 1 then - fixme = 62 - if T.lowversion then fixme = 46 end - TotemBar[i]:Point("BOTTOMLEFT", self, "TOPLEFT", fixme + 1, 1) - else - fixme = i - if i == 3 then fixme = i-1 end - TotemBar[i]:Point("TOPLEFT", TotemBar[fixme-1], "TOPRIGHT", 1, 0) - end - TotemBar[i]:SetStatusBarTexture(normTex) - TotemBar[i]:Height(8) - if T.lowversion then - if i == 1 then - TotemBar[i]:SetWidth(45) - else - TotemBar[i]:SetWidth(46) - end - else - if i == 4 then - TotemBar[i]:SetWidth(61) - else - TotemBar[i]:SetWidth(62) - end - end - TotemBar[i]:SetBackdrop(backdrop) - TotemBar[i]:SetBackdropColor(0, 0, 0) - TotemBar[i]:SetMinMaxValues(0, 1) - - TotemBar[i].bg = TotemBar[i]:CreateTexture(nil, "BORDER") - TotemBar[i].bg:SetAllPoints(TotemBar[i]) - TotemBar[i].bg:SetTexture(normTex) - TotemBar[i].bg.multiplier = 0.3 - end - self.TotemBar = TotemBar - end - end - - -- script for pvp status and low mana - self:SetScript("OnEnter", function(self) - if self.EclipseBar and self.EclipseBar:IsShown() then - self.EclipseBar.Text:Hide() - end - FlashInfo.ManaLevel:Hide() - status:Show() - UnitFrame_OnEnter(self) - if UnitIsPVP("Player") then - status:SetText("PvP") - else - status:SetText("") - end - end) - self:SetScript("OnLeave", function(self) - if self.EclipseBar and self.EclipseBar:IsShown() then - self.EclipseBar.Text:Show() - end - FlashInfo.ManaLevel:Show() - status:Hide() - UnitFrame_OnLeave(self) - end) - end - - if (unit == "target") then - -- Unit name on target - local Name = health:CreateFontString(nil, "OVERLAY") - Name:Point("LEFT", panel, "LEFT", 4, 0) - Name:SetJustifyH("LEFT") - Name:SetFont(font1, 12) - - self:Tag(Name, '[Tukui:getnamecolor][Tukui:namelong] [Tukui:diffcolor][level] [shortclassification]') - self.Name = Name - - -- standard combo points on target if classbar is disabled - if C["unitframes"].classiccombo then - local CPoints = {} - CPoints.unit = PlayerFrame.unit - for i = 1, 5 do - CPoints[i] = self:CreateTexture(nil, "OVERLAY") - CPoints[i]:Height(12) - CPoints[i]:Width(12) - CPoints[i]:SetTexture(bubbleTex) - if i == 1 then - if T.lowversion then - CPoints[i]:Point("TOPRIGHT", 15, 1.5) - else - CPoints[i]:Point("TOPLEFT", -15, 1.5) - end - CPoints[i]:SetVertexColor(0.69, 0.31, 0.31) - else - CPoints[i]:Point("TOP", CPoints[i-1], "BOTTOM", 1) - end - end - CPoints[2]:SetVertexColor(0.69, 0.31, 0.31) - CPoints[3]:SetVertexColor(0.65, 0.63, 0.35) - CPoints[4]:SetVertexColor(0.65, 0.63, 0.35) - CPoints[5]:SetVertexColor(0.33, 0.59, 0.33) - self.CPoints = CPoints - end - end - - if (unit == "target" and C["unitframes"].targetauras) then - local buffs = CreateFrame("Frame", nil, self) - local debuffs = CreateFrame("Frame", nil, self) - - buffs:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, 4) - - if T.lowversion then - buffs:SetHeight(21.5) - buffs:SetWidth(186) - buffs.size = 21.5 - buffs.num = 8 - - debuffs:SetHeight(21.5) - debuffs:SetWidth(186) - debuffs:SetPoint("BOTTOMLEFT", buffs, "TOPLEFT", 0, 2) - debuffs.size = 21.5 - debuffs.num = 24 - else - buffs:SetHeight(26) - buffs:SetWidth(252) - buffs.size = 26 - buffs.num = 9 - - debuffs:SetHeight(26) - debuffs:SetWidth(252) - debuffs:SetPoint("BOTTOMLEFT", buffs, "TOPLEFT", -2, 2) - debuffs.size = 26 - debuffs.num = 27 - end - - buffs.spacing = 2 - buffs.initialAnchor = 'TOPLEFT' - buffs.PostCreateIcon = T.PostCreateAura - buffs.PostUpdateIcon = T.PostUpdateAura - self.Buffs = buffs - - debuffs.spacing = 2 - debuffs.initialAnchor = 'TOPRIGHT' - debuffs["growth-y"] = "UP" - debuffs["growth-x"] = "LEFT" - debuffs.PostCreateIcon = T.PostCreateAura - debuffs.PostUpdateIcon = T.PostUpdateAura - - -- an option to show only our debuffs on target - if unit == "target" then - debuffs.onlyShowPlayer = C.unitframes.onlyselfdebuffs - end - - self.Debuffs = debuffs - end - - -- cast bar for player and target - if (C["unitframes"].unitcastbar == true) then - -- castbar of player and target - local castbar = CreateFrame("StatusBar", self:GetName().."CastBar", self) - castbar:SetStatusBarTexture(normTex) - - castbar.bg = castbar:CreateTexture(nil, "BORDER") - castbar.bg:SetAllPoints(castbar) - castbar.bg:SetTexture(normTex) - castbar.bg:SetVertexColor(0.15, 0.15, 0.15) - castbar:SetFrameLevel(6) - castbar:Point("TOPLEFT", panel, 2, -2) - castbar:Point("BOTTOMRIGHT", panel, -2, 2) - - castbar.CustomTimeText = T.CustomCastTimeText - castbar.CustomDelayText = T.CustomCastDelayText - castbar.PostCastStart = T.CheckCast - castbar.PostChannelStart = T.CheckChannel - - castbar.time = T.SetFontString(castbar, font1, 12) - castbar.time:Point("RIGHT", panel, "RIGHT", -4, 0) - castbar.time:SetTextColor(0.84, 0.75, 0.65) - castbar.time:SetJustifyH("RIGHT") - - castbar.Text = T.SetFontString(castbar, font1, 12) - castbar.Text:Point("LEFT", panel, "LEFT", 4, 0) - castbar.Text:SetTextColor(0.84, 0.75, 0.65) - - if C["unitframes"].cbicons == true then - castbar.button = CreateFrame("Frame", nil, castbar) - castbar.button:Size(26) - castbar.button:SetTemplate("Default") - castbar.button:CreateShadow("Default") - - castbar.icon = castbar.button:CreateTexture(nil, "ARTWORK") - castbar.icon:Point("TOPLEFT", castbar.button, 2, -2) - castbar.icon:Point("BOTTOMRIGHT", castbar.button, -2, 2) - castbar.icon:SetTexCoord(0.08, 0.92, 0.08, .92) - - if unit == "player" then - if C["unitframes"].charportrait == true then - castbar.button:SetPoint("LEFT", -82.5, 26.5) - else - castbar.button:SetPoint("LEFT", -46.5, 26.5) - end - elseif unit == "target" then - if C["unitframes"].charportrait == true then - castbar.button:SetPoint("RIGHT", 82.5, 26.5) - else - castbar.button:SetPoint("RIGHT", 46.5, 26.5) - end - end - end - - -- cast bar latency on player - if unit == "player" and C["unitframes"].cblatency == true then - castbar.safezone = castbar:CreateTexture(nil, "ARTWORK") - castbar.safezone:SetTexture(normTex) - castbar.safezone:SetVertexColor(0.69, 0.31, 0.31, 0.75) - castbar.SafeZone = castbar.safezone - end - - self.Castbar = castbar - self.Castbar.Time = castbar.time - self.Castbar.Icon = castbar.icon - end - - -- add combat feedback support - if C["unitframes"].combatfeedback == true then - local CombatFeedbackText - if T.lowversion then - CombatFeedbackText = T.SetFontString(health, font1, 12, "OUTLINE") - else - CombatFeedbackText = T.SetFontString(health, font1, 14, "OUTLINE") - end - CombatFeedbackText:SetPoint("CENTER", 0, 1) - CombatFeedbackText.colors = { - DAMAGE = {0.69, 0.31, 0.31}, - CRUSHING = {0.69, 0.31, 0.31}, - CRITICAL = {0.69, 0.31, 0.31}, - GLANCING = {0.69, 0.31, 0.31}, - STANDARD = {0.84, 0.75, 0.65}, - IMMUNE = {0.84, 0.75, 0.65}, - ABSORB = {0.84, 0.75, 0.65}, - BLOCK = {0.84, 0.75, 0.65}, - RESIST = {0.84, 0.75, 0.65}, - MISS = {0.84, 0.75, 0.65}, - HEAL = {0.33, 0.59, 0.33}, - CRITHEAL = {0.33, 0.59, 0.33}, - ENERGIZE = {0.31, 0.45, 0.63}, - CRITENERGIZE = {0.31, 0.45, 0.63}, - } - self.CombatFeedbackText = CombatFeedbackText - end - - if C["unitframes"].healcomm then - local mhpb = CreateFrame('StatusBar', nil, self.Health) - mhpb:SetPoint('TOPLEFT', self.Health:GetStatusBarTexture(), 'TOPRIGHT', 0, 0) - mhpb:SetPoint('BOTTOMLEFT', self.Health:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0) - if T.lowversion then - mhpb:SetWidth(186) - else - mhpb:SetWidth(250) - end - mhpb:SetStatusBarTexture(normTex) - mhpb:SetStatusBarColor(0, 1, 0.5, 0.25) - mhpb:SetMinMaxValues(0,1) - - local ohpb = CreateFrame('StatusBar', nil, self.Health) - ohpb:SetPoint('TOPLEFT', mhpb:GetStatusBarTexture(), 'TOPRIGHT', 0, 0) - ohpb:SetPoint('BOTTOMLEFT', mhpb:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0) - ohpb:SetWidth(250) - ohpb:SetStatusBarTexture(normTex) - ohpb:SetStatusBarColor(0, 1, 0, 0.25) - - self.HealPrediction = { - myBar = mhpb, - otherBar = ohpb, - maxOverflow = 1, - } - end - - -- player aggro - if C["unitframes"].playeraggro == true then - table.insert(self.__elements, T.UpdateThreat) - self:RegisterEvent('PLAYER_TARGET_CHANGED', T.UpdateThreat) - self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', T.UpdateThreat) - self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', T.UpdateThreat) - end - end - - ------------------------------------------------------------------------ - -- Target of Target unit layout - ------------------------------------------------------------------------ - - if (unit == "targettarget") then - -- create panel if higher version - local panel = CreateFrame("Frame", nil, self) - if not T.lowversion then - panel:CreatePanel("Default", 129, 17, "BOTTOM", self, "BOTTOM", 0, T.Scale(0)) - panel:SetFrameLevel(2) - panel:SetFrameStrata("MEDIUM") - panel:SetBackdropBorderColor(bdcr * 0.7, bdcg * 0.7, bdcb * 0.7) - self.panel = panel - end - - -- health bar - local health = CreateFrame('StatusBar', nil, self) - health:Height(18) - health:SetPoint("TOPLEFT") - health:SetPoint("TOPRIGHT") - health:SetStatusBarTexture(normTex) - - local healthBG = health:CreateTexture(nil, 'BORDER') - healthBG:SetAllPoints() - healthBG:SetTexture(.1, .1, .1) - - self.Health = health - self.Health.bg = healthBG - - health.frequentUpdates = true - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - - if C["unitframes"].unicolor == true then - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - healthBG:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorClass = true - health.colorReaction = true - end - - -- Unit name - local Name = health:CreateFontString(nil, "OVERLAY") - if T.lowversion then - Name:SetPoint("CENTER", health, "CENTER", 0, 0) - Name:SetFont(font1, 12, "OUTLINE") - else - Name:SetPoint("CENTER", panel, "CENTER", 0, 0) - Name:SetFont(font1, 12) - end - Name:SetJustifyH("CENTER") - - self:Tag(Name, '[Tukui:getnamecolor][Tukui:namemedium]') - self.Name = Name - - if C["unitframes"].totdebuffs == true and T.lowversion ~= true then - local debuffs = CreateFrame("Frame", nil, health) - debuffs:SetHeight(20) - debuffs:SetWidth(127) - debuffs.size = 20 - debuffs.spacing = 2 - debuffs.num = 6 - - debuffs:SetPoint("TOPLEFT", health, "TOPLEFT", -0.5, 24) - debuffs.initialAnchor = "TOPLEFT" - debuffs["growth-y"] = "UP" - debuffs.PostCreateIcon = T.PostCreateAura - debuffs.PostUpdateIcon = T.PostUpdateAura - self.Debuffs = debuffs - end - end - - ------------------------------------------------------------------------ - -- Pet unit layout - ------------------------------------------------------------------------ - - if (unit == "pet") then - -- create panel if higher version - local panel = CreateFrame("Frame", nil, self) - if not T.lowversion then - panel:CreatePanel("Default", 129, 17, "BOTTOM", self, "BOTTOM", 0, 0) - panel:SetFrameLevel(2) - panel:SetFrameStrata("MEDIUM") - panel:SetBackdropBorderColor(bdcr * 0.7, bdcg * 0.7, bdcb * 0.7) - self.panel = panel - end - - -- health bar - local health = CreateFrame('StatusBar', nil, self) - health:Height(13) - health:SetPoint("TOPLEFT") - health:SetPoint("TOPRIGHT") - health:SetStatusBarTexture(normTex) - - health.PostUpdate = T.PostUpdatePetColor - - self.Health = health - - local healthBG = health:CreateTexture(nil, 'BORDER') - healthBG:SetAllPoints() - healthBG:SetTexture(.1, .1, .1) - - health.frequentUpdates = true - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - - if C["unitframes"].unicolor == true then - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - healthBG:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorClass = true - health.colorReaction = true - if T.myclass == "HUNTER" then - health.colorHappiness = true - end - end - - self.Health.bg = healthBG - - -- power - local power = CreateFrame('StatusBar', nil, self) - power:Height(4) - power:Point("TOPLEFT", health, "BOTTOMLEFT", 0, -1) - power:Point("TOPRIGHT", health, "BOTTOMRIGHT", 0, -1) - power:SetStatusBarTexture(normTex) - - power.frequentUpdates = true - power.colorPower = true - if C["unitframes"].showsmooth == true then - power.Smooth = true - end - - local powerBG = power:CreateTexture(nil, 'BORDER') - powerBG:SetAllPoints(power) - powerBG:SetTexture(normTex) - powerBG.multiplier = 0.3 - - self.Power = power - self.Power.bg = powerBG - - -- Unit name - local Name = health:CreateFontString(nil, "OVERLAY") - if T.lowversion then - Name:SetPoint("CENTER", self, "CENTER", 0, 0) - Name:SetFont(font1, 12, "OUTLINE") - else - Name:SetPoint("CENTER", panel, "CENTER", 0, 0) - Name:SetFont(font1, 12) - end - Name:SetJustifyH("CENTER") - - self:Tag(Name, '[Tukui:getnamecolor][Tukui:namemedium] [Tukui:diffcolor][level]') - self.Name = Name - - if (C["unitframes"].unitcastbar == true) then - local castbar = CreateFrame("StatusBar", self:GetName().."CastBar", self) - castbar:SetStatusBarTexture(normTex) - self.Castbar = castbar - - if not T.lowversion then - castbar.bg = castbar:CreateTexture(nil, "BORDER") - castbar.bg:SetAllPoints(castbar) - castbar.bg:SetTexture(normTex) - castbar.bg:SetVertexColor(0.15, 0.15, 0.15) - castbar:SetFrameLevel(6) - castbar:Point("TOPLEFT", panel, 2, -2) - castbar:Point("BOTTOMRIGHT", panel, -2, 2) - - castbar.CustomTimeText = T.CustomCastTimeText - castbar.CustomDelayText = T.CustomCastDelayText - castbar.PostCastStart = T.CheckCast - castbar.PostChannelStart = T.CheckChannel - - castbar.time = T.SetFontString(castbar, font1, 12) - castbar.time:Point("RIGHT", panel, "RIGHT", -4, 0) - castbar.time:SetTextColor(0.84, 0.75, 0.65) - castbar.time:SetJustifyH("RIGHT") - - castbar.Text = T.SetFontString(castbar, font1, 12) - castbar.Text:Point("LEFT", panel, "LEFT", 4, 0) - castbar.Text:SetTextColor(0.84, 0.75, 0.65) - - self.Castbar.Time = castbar.time - end - end - - -- update pet name, this should fix "UNKNOWN" pet names on pet unit, health and bar color sometime being "grayish". - self:RegisterEvent("UNIT_PET", T.updateAllElements) - end - - - ------------------------------------------------------------------------ - -- Focus unit layout - ------------------------------------------------------------------------ - - if (unit == "focus") then - -- health - local health = CreateFrame('StatusBar', nil, self) - health:Height(22) - health:SetPoint("TOPLEFT") - health:SetPoint("TOPRIGHT") - health:SetStatusBarTexture(normTex) - - health.frequentUpdates = true - health.colorDisconnected = true - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - health.colorClass = true - - local healthBG = health:CreateTexture(nil, 'BORDER') - healthBG:SetAllPoints() - healthBG:SetTexture(.1, .1, .1) - - health.value = T.SetFontString(health, font1,12, "OUTLINE") - health.value:Point("LEFT", 2, 0) - health.PostUpdate = T.PostUpdateHealth - - self.Health = health - self.Health.bg = healthBG - - health.frequentUpdates = true - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - - if C["unitframes"].unicolor == true then - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - healthBG:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorClass = true - health.colorReaction = true - end - - -- power - local power = CreateFrame('StatusBar', nil, self) - power:Height(6) - power:Point("TOPLEFT", health, "BOTTOMLEFT", 0, -1) - power:Point("TOPRIGHT", health, "BOTTOMRIGHT", 0, -1) - power:SetStatusBarTexture(normTex) - - power.frequentUpdates = true - power.colorPower = true - if C["unitframes"].showsmooth == true then - power.Smooth = true - end - - local powerBG = power:CreateTexture(nil, 'BORDER') - powerBG:SetAllPoints(power) - powerBG:SetTexture(normTex) - powerBG.multiplier = 0.3 - - power.value = T.SetFontString(health, font1, 12, "OUTLINE") - power.value:Point("RIGHT", -2, 0) - power.PreUpdate = T.PreUpdatePower - power.PostUpdate = T.PostUpdatePower - - self.Power = power - self.Power.bg = powerBG - - -- names - local Name = health:CreateFontString(nil, "OVERLAY") - Name:SetPoint("CENTER", health, "CENTER", 0, 0) - Name:SetJustifyH("CENTER") - Name:SetFont(font1, 12, "OUTLINE") - Name:SetShadowColor(0, 0, 0) - Name:SetShadowOffset(1.25, -1.25) - - self:Tag(Name, '[Tukui:getnamecolor][Tukui:namelong]') - self.Name = Name - - -- create debuff for arena units - local debuffs = CreateFrame("Frame", nil, self) - debuffs:SetHeight(26) - debuffs:SetWidth(200) - debuffs:Point('RIGHT', self, 'LEFT', -4, 0) - debuffs.size = 26 - debuffs.num = 5 - debuffs.spacing = 2 - debuffs.initialAnchor = 'RIGHT' - debuffs["growth-x"] = "LEFT" - debuffs.PostCreateIcon = T.PostCreateAura - debuffs.PostUpdateIcon = T.PostUpdateAura - self.Debuffs = debuffs - - if (C["unitframes"].unitcastbar == true) then - local castbar = CreateFrame("StatusBar", self:GetName().."CastBar", self) - castbar:SetPoint("LEFT", 2, 0) - castbar:SetPoint("RIGHT", -24, 0) - castbar:SetPoint("BOTTOM", 0, -22) - - castbar:SetHeight(16) - castbar:SetStatusBarTexture(normTex) - castbar:SetFrameLevel(6) - - castbar.bg = CreateFrame("Frame", nil, castbar) - castbar.bg:SetTemplate("Default") - castbar.bg:SetBackdropBorderColor(bdcr * 0.7, bdcg * 0.7, bdcb * 0.7) - castbar.bg:Point("TOPLEFT", -2, 2) - castbar.bg:Point("BOTTOMRIGHT", 2, -2) - castbar.bg:SetFrameLevel(5) - - castbar.time = T.SetFontString(castbar, font1, 12) - castbar.time:Point("RIGHT", castbar, "RIGHT", -4, 0) - castbar.time:SetTextColor(0.84, 0.75, 0.65) - castbar.time:SetJustifyH("RIGHT") - castbar.CustomTimeText = T.CustomCastTimeText - - castbar.Text = T.SetFontString(castbar, font1, 12) - castbar.Text:SetPoint("LEFT", castbar, "LEFT", 4, 0) - castbar.Text:SetTextColor(0.84, 0.75, 0.65) - - castbar.CustomDelayText = T.CustomCastDelayText - castbar.PostCastStart = T.CheckCast - castbar.PostChannelStart = T.CheckChannel - - castbar.button = CreateFrame("Frame", nil, castbar) - castbar.button:Height(castbar:GetHeight()+4) - castbar.button:Width(castbar:GetHeight()+4) - castbar.button:Point("LEFT", castbar, "RIGHT", 4, 0) - castbar.button:SetTemplate("Default") - castbar.button:SetBackdropBorderColor(bdcr * 0.7, bdcg * 0.7, bdcb * 0.7) - castbar.icon = castbar.button:CreateTexture(nil, "ARTWORK") - castbar.icon:Point("TOPLEFT", castbar.button, 2, -2) - castbar.icon:Point("BOTTOMRIGHT", castbar.button, -2, 2) - castbar.icon:SetTexCoord(0.08, 0.92, 0.08, .92) - - self.Castbar = castbar - self.Castbar.Time = castbar.time - self.Castbar.Icon = castbar.icon - end - end - - ------------------------------------------------------------------------ - -- Focus target unit layout - ------------------------------------------------------------------------ - - if (unit == "focustarget") then - -- health - local health = CreateFrame('StatusBar', nil, self) - health:Height(22) - health:SetPoint("TOPLEFT") - health:SetPoint("TOPRIGHT") - health:SetStatusBarTexture(normTex) - - health.frequentUpdates = true - health.colorDisconnected = true - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - health.colorClass = true - - local healthBG = health:CreateTexture(nil, 'BORDER') - healthBG:SetAllPoints() - healthBG:SetTexture(.1, .1, .1) - - health.value = T.SetFontString(health, font1,12, "OUTLINE") - health.value:Point("LEFT", 2, 0) - health.PostUpdate = T.PostUpdateHealth - - self.Health = health - self.Health.bg = healthBG - - health.frequentUpdates = true - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - - if C["unitframes"].unicolor == true then - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - healthBG:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorClass = true - health.colorReaction = true - end - - -- power - local power = CreateFrame('StatusBar', nil, self) - power:Height(6) - power:Point("TOPLEFT", health, "BOTTOMLEFT", 0, -1) - power:Point("TOPRIGHT", health, "BOTTOMRIGHT", 0, -1) - power:SetStatusBarTexture(normTex) - - power.frequentUpdates = true - power.colorPower = true - if C["unitframes"].showsmooth == true then - power.Smooth = true - end - - local powerBG = power:CreateTexture(nil, 'BORDER') - powerBG:SetAllPoints(power) - powerBG:SetTexture(normTex) - powerBG.multiplier = 0.3 - - power.value = T.SetFontString(health, font1, 12, "OUTLINE") - power.value:Point("RIGHT", -2, 0) - power.PreUpdate = T.PreUpdatePower - power.PostUpdate = T.PostUpdatePower - - self.Power = power - self.Power.bg = powerBG - - -- names - local Name = health:CreateFontString(nil, "OVERLAY") - Name:SetPoint("CENTER", health, "CENTER", 0, 0) - Name:SetJustifyH("CENTER") - Name:SetFont(font1, 12, "OUTLINE") - Name:SetShadowColor(0, 0, 0) - Name:SetShadowOffset(1.25, -1.25) - - self:Tag(Name, '[Tukui:getnamecolor][Tukui:namelong]') - self.Name = Name - - -- create debuff for arena units - local debuffs = CreateFrame("Frame", nil, self) - debuffs:SetHeight(26) - debuffs:SetWidth(200) - debuffs:Point('RIGHT', self, 'LEFT', -4, 0) - debuffs.size = 26 - debuffs.num = 5 - debuffs.spacing = 2 - debuffs.initialAnchor = 'RIGHT' - debuffs["growth-x"] = "LEFT" - debuffs.PostCreateIcon = T.PostCreateAura - debuffs.PostUpdateIcon = T.PostUpdateAura - self.Debuffs = debuffs - - if (C["unitframes"].unitcastbar == true) then - local castbar = CreateFrame("StatusBar", self:GetName().."CastBar", self) - castbar:SetPoint("LEFT", 2, 0) - castbar:SetPoint("RIGHT", -24, 0) - castbar:SetPoint("BOTTOM", 0, -22) - - castbar:SetHeight(16) - castbar:SetStatusBarTexture(normTex) - castbar:SetFrameLevel(6) - - castbar.bg = CreateFrame("Frame", nil, castbar) - castbar.bg:SetTemplate("Default") - castbar.bg:SetBackdropBorderColor(bdcr * 0.7, bdcg * 0.7, bdcb * 0.7) - castbar.bg:Point("TOPLEFT", -2, 2) - castbar.bg:Point("BOTTOMRIGHT", 2, -2) - castbar.bg:SetFrameLevel(5) - - castbar.time = T.SetFontString(castbar, font1, 12) - castbar.time:Point("RIGHT", castbar, "RIGHT", -4, 0) - castbar.time:SetTextColor(0.84, 0.75, 0.65) - castbar.time:SetJustifyH("RIGHT") - castbar.CustomTimeText = T.CustomCastTimeText - - castbar.Text = T.SetFontString(castbar, font1, 12) - castbar.Text:Point("LEFT", castbar, "LEFT", 4, 0) - castbar.Text:SetTextColor(0.84, 0.75, 0.65) - - castbar.CustomDelayText = T.CustomCastDelayText - castbar.PostCastStart = T.CheckCast - castbar.PostChannelStart = T.CheckChannel - - castbar.button = CreateFrame("Frame", nil, castbar) - castbar.button:Height(castbar:GetHeight()+4) - castbar.button:Width(castbar:GetHeight()+4) - castbar.button:Point("LEFT", castbar, "RIGHT", 4, 0) - castbar.button:SetTemplate("Default") - castbar.button:SetBackdropBorderColor(bdcr * 0.7, bdcg * 0.7, bdcb * 0.7) - castbar.icon = castbar.button:CreateTexture(nil, "ARTWORK") - castbar.icon:Point("TOPLEFT", castbar.button, 2, -2) - castbar.icon:Point("BOTTOMRIGHT", castbar.button, -2, 2) - castbar.icon:SetTexCoord(0.08, 0.92, 0.08, .92) - - self.Castbar = castbar - self.Castbar.Time = castbar.time - self.Castbar.Icon = castbar.icon - end - end - - ------------------------------------------------------------------------ - -- Arena or boss units layout (both mirror'd) - ------------------------------------------------------------------------ - - if (unit and unit:find("arena%d") and C["arena"].unitframes == true) or (unit and unit:find("boss%d") and C["unitframes"].showboss == true) then - -- Right-click focus on arena or boss units - self:SetAttribute("type2", "focus") - - -- health - local health = CreateFrame('StatusBar', nil, self) - health:Height(22) - health:SetPoint("TOPLEFT") - health:SetPoint("TOPRIGHT") - health:SetStatusBarTexture(normTex) - - health.frequentUpdates = true - health.colorDisconnected = true - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - health.colorClass = true - - local healthBG = health:CreateTexture(nil, 'BORDER') - healthBG:SetAllPoints() - healthBG:SetTexture(.1, .1, .1) - - health.value = T.SetFontString(health, font1,12, "OUTLINE") - health.value:Point("LEFT", 2, 0) - health.PostUpdate = T.PostUpdateHealth - - self.Health = health - self.Health.bg = healthBG - - health.frequentUpdates = true - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - - if C["unitframes"].unicolor == true then - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - healthBG:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorClass = true - health.colorReaction = true - end - - -- power - local power = CreateFrame('StatusBar', nil, self) - power:Height(6) - power:Point("TOPLEFT", health, "BOTTOMLEFT", 0, -1) - power:Point("TOPRIGHT", health, "BOTTOMRIGHT", 0, -1) - power:SetStatusBarTexture(normTex) - - power.frequentUpdates = true - power.colorPower = true - if C["unitframes"].showsmooth == true then - power.Smooth = true - end - - local powerBG = power:CreateTexture(nil, 'BORDER') - powerBG:SetAllPoints(power) - powerBG:SetTexture(normTex) - powerBG.multiplier = 0.3 - - power.value = T.SetFontString(health, font1, 12, "OUTLINE") - power.value:Point("RIGHT", -2, 0) - power.PreUpdate = T.PreUpdatePower - power.PostUpdate = T.PostUpdatePower - - self.Power = power - self.Power.bg = powerBG - - -- names - local Name = health:CreateFontString(nil, "OVERLAY") - Name:SetPoint("CENTER", health, "CENTER", 0, 0) - Name:SetJustifyH("CENTER") - Name:SetFont(font1, 12, "OUTLINE") - Name:SetShadowColor(0, 0, 0) - Name:SetShadowOffset(1.25, -1.25) - Name.frequentUpdates = 0.2 - - self:Tag(Name, '[Tukui:getnamecolor][Tukui:namelong]') - self.Name = Name - - if (unit and unit:find("boss%d")) then - -- alt power bar - local AltPowerBar = CreateFrame("StatusBar", nil, self.Health) - AltPowerBar:SetFrameLevel(self.Health:GetFrameLevel() + 1) - AltPowerBar:Height(4) - AltPowerBar:SetStatusBarTexture(C.media.normTex) - AltPowerBar:GetStatusBarTexture():SetHorizTile(false) - AltPowerBar:SetStatusBarColor(1, 0, 0) - - AltPowerBar:SetPoint("LEFT") - AltPowerBar:SetPoint("RIGHT") - AltPowerBar:SetPoint("TOP", self.Health, "TOP") - - AltPowerBar:SetBackdrop({ - bgFile = C["media"].blank, - edgeFile = C["media"].blank, - tile = false, tileSize = 0, edgeSize = T.Scale(1), - insets = { left = 0, right = 0, top = 0, bottom = T.Scale(-1)} - }) - AltPowerBar:SetBackdropColor(0, 0, 0) - - self.AltPowerBar = AltPowerBar - - -- create buff at left of unit if they are boss units - local buffs = CreateFrame("Frame", nil, self) - buffs:SetHeight(26) - buffs:SetWidth(252) - buffs:Point("RIGHT", self, "LEFT", -4, 0) - buffs.size = 26 - buffs.num = 3 - buffs.spacing = 2 - buffs.initialAnchor = 'RIGHT' - buffs["growth-x"] = "LEFT" - buffs.PostCreateIcon = T.PostCreateAura - buffs.PostUpdateIcon = T.PostUpdateAura - self.Buffs = buffs - - -- because it appear that sometime elements are not correct. - self:HookScript("OnShow", T.updateAllElements) - end - - -- create debuff for arena units - local debuffs = CreateFrame("Frame", nil, self) - debuffs:SetHeight(26) - debuffs:SetWidth(200) - debuffs:Point('LEFT', self, 'RIGHT', 4, 0) - debuffs.size = 26 - debuffs.num = 5 - debuffs.spacing = 2 - debuffs.initialAnchor = 'LEFT' - debuffs["growth-x"] = "RIGHT" - debuffs.PostCreateIcon = T.PostCreateAura - debuffs.PostUpdateIcon = T.PostUpdateAura - self.Debuffs = debuffs - - -- trinket feature via trinket plugin - if (C.arena.unitframes) and (unit and unit:find('arena%d')) then - local Trinketbg = CreateFrame("Frame", nil, self) - Trinketbg:SetHeight(26) - Trinketbg:SetWidth(26) - Trinketbg:SetPoint("RIGHT", self, "LEFT", -6, 0) - Trinketbg:SetTemplate("Default") - Trinketbg:SetFrameLevel(0) - self.Trinketbg = Trinketbg - - local Trinket = CreateFrame("Frame", nil, Trinketbg) - Trinket:SetAllPoints(Trinketbg) - Trinket:Point("TOPLEFT", Trinketbg, 2, -2) - Trinket:Point("BOTTOMRIGHT", Trinketbg, -2, 2) - Trinket:SetFrameLevel(1) - Trinket.trinketUseAnnounce = true - self.Trinket = Trinket - end - - if (C["unitframes"].unitcastbar == true) then - -- boss & arena frames cast bar! - local castbar = CreateFrame("StatusBar", self:GetName().."CastBar", self) - castbar:SetPoint("LEFT", 24, 0) - castbar:SetPoint("RIGHT", -2, 0) - castbar:SetPoint("BOTTOM", 0, -22) - - castbar:SetHeight(16) - castbar:SetStatusBarTexture(normTex) - castbar:SetFrameLevel(6) - - castbar.bg = CreateFrame("Frame", nil, castbar) - castbar.bg:SetTemplate("Default") - castbar.bg:SetBackdropBorderColor(bdcr * 0.7, bdcg * 0.7, bdcb * 0.7) - castbar.bg:Point("TOPLEFT", -2, 2) - castbar.bg:Point("BOTTOMRIGHT", 2, -2) - castbar.bg:SetFrameLevel(5) - - castbar.time = T.SetFontString(castbar, font1, 12) - castbar.time:Point("RIGHT", castbar, "RIGHT", -4, 0) - castbar.time:SetTextColor(0.84, 0.75, 0.65) - castbar.time:SetJustifyH("RIGHT") - castbar.CustomTimeText = T.CustomCastTimeText - - castbar.Text = T.SetFontString(castbar, font1, 12) - castbar.Text:Point("LEFT", castbar, "LEFT", 4, 0) - castbar.Text:SetTextColor(0.84, 0.75, 0.65) - - castbar.CustomDelayText = T.CustomCastDelayText - castbar.PostCastStart = T.CheckCast - castbar.PostChannelStart = T.CheckChannel - - castbar.button = CreateFrame("Frame", nil, castbar) - castbar.button:Height(castbar:GetHeight()+4) - castbar.button:Width(castbar:GetHeight()+4) - castbar.button:Point("RIGHT", castbar, "LEFT",-4, 0) - castbar.button:SetTemplate("Default") - castbar.button:SetBackdropBorderColor(bdcr * 0.7, bdcg * 0.7, bdcb * 0.7) - castbar.icon = castbar.button:CreateTexture(nil, "ARTWORK") - castbar.icon:Point("TOPLEFT", castbar.button, 2, -2) - castbar.icon:Point("BOTTOMRIGHT", castbar.button, -2, 2) - castbar.icon:SetTexCoord(0.08, 0.92, 0.08, .92) - - self.Castbar = castbar - self.Castbar.Time = castbar.time - self.Castbar.Icon = castbar.icon - end - end - - ------------------------------------------------------------------------ - -- Main tanks and Main Assists layout (both mirror'd) - ------------------------------------------------------------------------ - - if(self:GetParent():GetName():match"TukuiMainTank" or self:GetParent():GetName():match"TukuiMainAssist") then - -- Right-click focus on maintank or mainassist units - self:SetAttribute("type2", "focus") - - -- health - local health = CreateFrame('StatusBar', nil, self) - health:Height(20) - health:SetPoint("TOPLEFT") - health:SetPoint("TOPRIGHT") - health:SetStatusBarTexture(normTex) - - local healthBG = health:CreateTexture(nil, 'BORDER') - healthBG:SetAllPoints() - healthBG:SetTexture(.1, .1, .1) - - self.Health = health - self.Health.bg = healthBG - - health.frequentUpdates = true - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - - if C["unitframes"].unicolor == true then - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - healthBG:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorClass = true - health.colorReaction = true - end - - -- names - local Name = health:CreateFontString(nil, "OVERLAY") - Name:SetPoint("CENTER", health, "CENTER", 0, 0) - Name:SetJustifyH("CENTER") - Name:SetFont(font1, 12, "OUTLINE") - Name:SetShadowColor(0, 0, 0) - Name:SetShadowOffset(1.25, -1.25) - - self:Tag(Name, '[Tukui:getnamecolor][Tukui:nameshort]') - self.Name = Name - end - - return self -end - ------------------------------------------------------------------------- --- Default position of Tukui unitframes ------------------------------------------------------------------------- - -local adjust = 0 -if T.lowversion then adjust = 125 end - --- for lower reso -local adjustXY = 0 -local totdebuffs = 0 -if T.lowversion then adjustXY = 24 end -if C["unitframes"].totdebuffs then totdebuffs = 24 end - -oUF:RegisterStyle('Tukui', Shared) - --- player -local player = oUF:Spawn('player', "TukuiPlayer") -player:SetPoint("BOTTOMLEFT", InvTukuiActionBarBackground, "TOPLEFT", 0,8+adjustXY) -if T.lowversion then - player:Size(186, 51) -else - player:Size(250, 57) -end - --- focus -local focus = oUF:Spawn('focus', "TukuiFocus") -focus:SetPoint("BOTTOMLEFT", InvTukuiActionBarBackground, "TOPLEFT", 0 - adjust, 246) -focus:Size(200, 29) - --- target -local target = oUF:Spawn('target', "TukuiTarget") -target:SetPoint("BOTTOMRIGHT", InvTukuiActionBarBackground, "TOPRIGHT", 0,8+adjustXY) -if T.lowversion then - target:Size(186, 51) -else - target:Size(250, 57) -end - --- tot -local tot = oUF:Spawn('targettarget', "TukuiTargetTarget") -if T.lowversion then - tot:SetPoint("BOTTOMRIGHT", InvTukuiActionBarBackground, "TOPRIGHT", 0,8) - tot:Size(186, 18) -else - tot:SetPoint("BOTTOM", InvTukuiActionBarBackground, "TOP", 0,8) - tot:Size(129, 36) -end - --- pet -local pet = oUF:Spawn('pet', "TukuiPet") -if T.lowversion then - pet:SetPoint("BOTTOMLEFT", InvTukuiActionBarBackground, "TOPLEFT", 0,8) - pet:Size(186, 18) -else - pet:SetPoint("BOTTOM", InvTukuiActionBarBackground, "TOP", 0,49+totdebuffs) - pet:Size(129, 36) -end - -if C.unitframes.showfocustarget then - local focustarget = oUF:Spawn("focustarget", "TukuiFocusTarget") - focustarget:SetPoint("BOTTOM", focus, "TOP", 0 - adjust, 35) - focustarget:Size(200, 29) -end - - -if C.arena.unitframes then - local arena = {} - for i = 1, 5 do - arena[i] = oUF:Spawn("arena"..i, "TukuiArena"..i) - if i == 1 then - arena[i]:SetPoint("BOTTOMRIGHT", InvTukuiActionBarBackground, "TOPRIGHT", 0 + adjust, 246) - else - arena[i]:SetPoint("BOTTOM", arena[i-1], "TOP", 0, 35) - end - arena[i]:Size(200, 29) - end -end - -if C["unitframes"].showboss then - for i = 1,MAX_BOSS_FRAMES do - local t_boss = _G["Boss"..i.."TargetFrame"] - t_boss:UnregisterAllEvents() - t_boss.Show = T.dummy - t_boss:Hide() - _G["Boss"..i.."TargetFrame".."HealthBar"]:UnregisterAllEvents() - _G["Boss"..i.."TargetFrame".."ManaBar"]:UnregisterAllEvents() - end - - local boss = {} - for i = 1, MAX_BOSS_FRAMES do - boss[i] = oUF:Spawn("boss"..i, "TukuiBoss"..i) - if i == 1 then - boss[i]:SetPoint("BOTTOMRIGHT", InvTukuiActionBarBackground, "TOPRIGHT", 0 + adjust,246) - else - boss[i]:SetPoint('BOTTOM', boss[i-1], 'TOP', 0, 35) - end - boss[i]:Size(200, 29) - end -end - -local assisttank_width = 100 -local assisttank_height = 20 -if C["unitframes"].maintank == true then - local tank = oUF:SpawnHeader('TukuiMainTank', nil, 'raid', - 'oUF-initialConfigFunction', ([[ - self:SetWidth(%d) - self:SetHeight(%d) - ]]):format(assisttank_width, assisttank_height), - 'showRaid', true, - 'groupFilter', 'MAINTANK', - 'yOffset', 7, - 'point' , 'BOTTOM', - 'template', 'oUF_TukuiMtt' - ) - tank:SetPoint("CENTER", UIParent, "CENTER", 0, 0) -end - -if C["unitframes"].mainassist == true then - local assist = oUF:SpawnHeader("TukuiMainAssist", nil, 'raid', - 'oUF-initialConfigFunction', ([[ - self:SetWidth(%d) - self:SetHeight(%d) - ]]):format(assisttank_width, assisttank_height), - 'showRaid', true, - 'groupFilter', 'MAINASSIST', - 'yOffset', 7, - 'point' , 'BOTTOM', - 'template', 'oUF_TukuiMtt' - ) - if C["unitframes"].maintank == true then - assist:SetPoint("TOPLEFT", TukuiMainTank, "BOTTOMLEFT", 2, -50) - else - assist:SetPoint("CENTER", UIParent, "CENTER", 0, 0) - end -end - ------------------------------------------------------------------------- --- Right-Click on unit frames menu. --- Doing this to remove SET_FOCUS eveywhere. --- SET_FOCUS work only on default unitframes. --- Main Tank and Main Assist, use /maintank and /mainassist commands. ------------------------------------------------------------------------- - --- Hunter Dismiss Pet Taint (Blizzard issue) -local PET_DISMISS = "PET_DISMISS" -if T.myclass == "HUNTER" then PET_DISMISS = nil end - -do - UnitPopupMenus["SELF"] = { "PVP_FLAG", "LOOT_METHOD", "LOOT_THRESHOLD", "OPT_OUT_LOOT_TITLE", "LOOT_PROMOTE", "DUNGEON_DIFFICULTY", "RAID_DIFFICULTY", "RESET_INSTANCES", "RAID_TARGET_ICON", "SELECT_ROLE", "CONVERT_TO_PARTY", "CONVERT_TO_RAID", "LEAVE", "CANCEL" }; - UnitPopupMenus["PET"] = { "PET_PAPERDOLL", "PET_RENAME", "PET_ABANDON", PET_DISMISS, "CANCEL" }; - UnitPopupMenus["PARTY"] = { "MUTE", "UNMUTE", "PARTY_SILENCE", "PARTY_UNSILENCE", "RAID_SILENCE", "RAID_UNSILENCE", "BATTLEGROUND_SILENCE", "BATTLEGROUND_UNSILENCE", "WHISPER", "PROMOTE", "PROMOTE_GUIDE", "LOOT_PROMOTE", "VOTE_TO_KICK", "UNINVITE", "INSPECT", "ACHIEVEMENTS", "TRADE", "FOLLOW", "DUEL", "RAID_TARGET_ICON", "SELECT_ROLE", "PVP_REPORT_AFK", "RAF_SUMMON", "RAF_GRANT_LEVEL", "CANCEL" } - UnitPopupMenus["PLAYER"] = { "WHISPER", "INSPECT", "INVITE", "ACHIEVEMENTS", "TRADE", "FOLLOW", "DUEL", "RAID_TARGET_ICON", "RAF_SUMMON", "RAF_GRANT_LEVEL", "CANCEL" } - if T.toc < 40300 then - UnitPopupMenus["RAID_PLAYER"] = {"MUTE", "UNMUTE", "RAID_SILENCE", "RAID_UNSILENCE", "BATTLEGROUND_SILENCE", "BATTLEGROUND_UNSILENCE", "WHISPER", "INSPECT", "ACHIEVEMENTS", "TRADE", "FOLLOW", "DUEL", "RAID_TARGET_ICON", "SELECT_ROLE", "RAID_LEADER", "RAID_PROMOTE", "RAID_DEMOTE", "LOOT_PROMOTE", "RAID_REMOVE", "PVP_REPORT_AFK", "RAF_SUMMON", "RAF_GRANT_LEVEL", "CANCEL"} - UnitPopupMenus["RAID"] = {"MUTE", "UNMUTE", "RAID_SILENCE", "RAID_UNSILENCE", "BATTLEGROUND_SILENCE", "BATTLEGROUND_UNSILENCE", "RAID_LEADER", "RAID_PROMOTE", "RAID_MAINTANK", "RAID_MAINASSIST", "LOOT_PROMOTE", "RAID_DEMOTE", "RAID_REMOVE", "PVP_REPORT_AFK", "CANCEL"} - else - UnitPopupMenus["RAID_PLAYER"] = {"MUTE", "UNMUTE", "RAID_SILENCE", "RAID_UNSILENCE", "BATTLEGROUND_SILENCE", "BATTLEGROUND_UNSILENCE", "WHISPER", "INSPECT", "ACHIEVEMENTS", "TRADE", "FOLLOW", "DUEL", "RAID_TARGET_ICON", "SELECT_ROLE", "RAID_LEADER", "RAID_PROMOTE", "RAID_DEMOTE", "LOOT_PROMOTE", "VOTE_TO_KICK", "RAID_REMOVE", "PVP_REPORT_AFK", "RAF_SUMMON", "RAF_GRANT_LEVEL", "CANCEL"} - UnitPopupMenus["RAID"] = {"MUTE", "UNMUTE", "RAID_SILENCE", "RAID_UNSILENCE", "BATTLEGROUND_SILENCE", "BATTLEGROUND_UNSILENCE", "RAID_LEADER", "RAID_PROMOTE", "RAID_MAINTANK", "RAID_MAINASSIST", "LOOT_PROMOTE", "RAID_DEMOTE", "VOTE_TO_KICK", "RAID_REMOVE", "PVP_REPORT_AFK", "CANCEL"} - end - UnitPopupMenus["VEHICLE"] = { "RAID_TARGET_ICON", "VEHICLE_LEAVE", "CANCEL" } - UnitPopupMenus["TARGET"] = { "RAID_TARGET_ICON", "CANCEL" } - UnitPopupMenus["ARENAENEMY"] = { "CANCEL" } - UnitPopupMenus["FOCUS"] = { "RAID_TARGET_ICON", "CANCEL" } - UnitPopupMenus["BOSS"] = { "RAID_TARGET_ICON", "CANCEL" } -end \ No newline at end of file diff --git a/Tukui/modules/unitframes/plugins/oUF_AuraWatch/oUF_AuraWatch.lua b/Tukui/modules/unitframes/plugins/oUF_AuraWatch/oUF_AuraWatch.lua deleted file mode 100644 index 573a8b5..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_AuraWatch/oUF_AuraWatch.lua +++ /dev/null @@ -1,330 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C.unitframes.enable ~= true or C.unitframes.raidunitdebuffwatch ~= true then return end - -local _, ns = ... -local oUF = ns.oUF or oUF - -if not oUF then return end - ---[[------------------------------------------------------------------------------------------------------ -oUF_AuraWatch by Astromech -Please leave comments, suggestions, and bug reports on this addon's WoWInterface page - -To setup, create a table named AuraWatch in your unit frame. There are several options -you can specify, as explained below. - - icons - Mandatory! - A table of frames to be used as icons. oUF_Aurawatch does not position - these frames, so you must do so yourself. Each icon needs a spellID entry, - which is the spell ID of the aura to watch. Table should be set up - such that values are icon frames, but the keys can be anything. - - Note each icon can have several options set as well. See below. - strictMatching - Default: false - If true, AuraWatch will only show an icon if the specific aura - with the specified spell id is on the unit. If false, AuraWatch - will show the icon if any aura with the same name and icon texture - is on the unit. Strict matching can be undesireable because most - ranks of an aura have different spell ids. - missingAlpha - Default 0.75 - The alpha value for icons of auras which have faded from the unit. - presentAlpha - Default 1 - The alpha value for icons or auras present on the unit. - onlyShowMissing - Default false - If this is true, oUF_AW will hide icons if they are present on the unit. - onlyShowPresent - Default false - If this is true, oUF_AW will hide icons if they have expired from the unit. - hideCooldown - Default false - If this is true, oUF_AW will not create a cooldown frame - hideCount - Default false - If this is true, oUF_AW will not create a count fontstring - fromUnits - Default {["player"] = true, ["pet"] = true, ["vehicle"] = true} - A table of units from which auras can originate. Have the units be the keys - and "true" be the values. - anyUnit - Default false - Set to true for oUF_AW to to show an aura no matter what unit it - originates from. This will override any fromUnits setting. - PostCreateIcon - Default nil - A function to call when an icon is created to modify it, such as adding - a border or repositioning the count fontstring. Leave as nil to ignore. - The arguements are: AuraWatch table, icon, auraSpellID, auraName, unitFrame - -Below are options set on a per icon basis. Set these as fields in the icon frames. - -The following settings can be overridden from the AuraWatch table on a per-aura basis: - onlyShowMissing - onlyShowPresent - hideCooldown - hideCount - fromUnits - anyUnit - -The following settings are unique to icons: - - spellID - Mandatory! - The spell id of the aura, as explained above. - icon - Default aura texture - A texture value for this icon. - overlay - Default Blizzard aura overlay - An overlay for the icon. This is not created if a custom icon texture is created. - count - Default A fontstring - An fontstring to show the stack count of an aura. - -Here is an example of how to set oUF_AW up: - - local createAuraWatch = function(self, unit) - local auras = {} - - -- A table of spellIDs to create icons for - -- To find spellIDs, look up a spell on www.wowhead.com and look at the URL - -- http://www.wowhead.com/?spell=SPELL_ID - local spellIDs = { ... } - - auras.presentAlpha = 1 - auras.missingAlpha = .7 - auras.PostCreateIcon = myCustomIconSkinnerFunction - -- Set any other AuraWatch settings - auras.icons = {} - for i, sid in pairs(spellIDs) do - local icon = CreateFrame("Frame", nil, auras) - icon.spellID = sid - -- set the dimensions and positions - icon:SetWidth(24) - icon:SetHeight(24) - icon:SetPoint("BOTTOM", self, "BOTTOM", 0, 28 * i) - auras.icons[sid] = icon - -- Set any other AuraWatch icon settings - end - self.AuraWatch = auras - end ------------------------------------------------------------------------------------------------------------]] - -local _, ns = ... -local oUF = ns.oUF or _G.oUF -assert(oUF, "oUF_AuraWatch cannot find an instance of oUF. If your oUF is embedded into a layout, it may not be embedded properly.") - -local UnitBuff, UnitDebuff, UnitGUID = UnitBuff, UnitDebuff, UnitGUID -local GUIDs = {} - -local PLAYER_UNITS = { - player = true, - vehicle = true, - pet = true, -} - -local setupGUID -do - local cache = setmetatable({}, {__type = "k"}) - - local frame = CreateFrame"Frame" - frame:SetScript("OnEvent", function(self, event) - for k,t in pairs(GUIDs) do - GUIDs[k] = nil - for a in pairs(t) do - t[a] = nil - end - cache[t] = true - end - end) - frame:RegisterEvent"PLAYER_REGEN_ENABLED" - frame:RegisterEvent"PLAYER_ENTERING_WORLD" - - function setupGUID(guid) - local t = next(cache) - if t then - cache[t] = nil - else - t = {} - end - GUIDs[guid] = t - end -end - - -local function resetIcon(icon, frame, count, duration, remaining) - if icon.onlyShowMissing then - icon:Hide() - else - icon:Show() - if icon.cd then - if duration and duration > 0 then - icon.cd:SetCooldown(remaining - duration, duration) - icon.cd:Show() - else - icon.cd:Hide() - end - end - if icon.count then - icon.count:SetText((count > 1 and count)) - end - if icon.overlay then - icon.overlay:Hide() - end - icon:SetAlpha(frame.presentAlpha) - end -end - -local function expireIcon(icon, frame) - if icon.onlyShowPresent then - icon:Hide() - else - if (icon.cd) then icon.cd:Hide() end - if (icon.count) then icon.count:SetText() end - icon:SetAlpha(frame.missingAlpha) - if icon.overlay then - icon.overlay:Show() - end - icon:Show() - end -end - -local found = {} -local function Update(frame, event, unit) - if frame.unit ~= unit then return end - local watch = frame.AuraWatch - local index, icons = 1, watch.watched - local _, name, texture, count, duration, remaining, caster, key, icon, spellid - local filter = "HELPFUL" - local guid = UnitGUID(unit) - if not guid then return end - if not GUIDs[guid] then setupGUID(guid) end - - for key, icon in pairs(icons) do - icon:Hide() - end - - while true do - name, _, texture, count, _, duration, remaining, caster, _, _, spellid = UnitAura(unit, index, filter) - if not name then - if filter == "HELPFUL" then - filter = "HARMFUL" - index = 1 - else - break - end - else - if watch.strictMatching then - key = spellID - else - key = name..texture - end - icon = icons[key] - if icon and (icon.anyUnit or (caster and icon.fromUnits[caster])) then - resetIcon(icon, watch, count, duration, remaining) - GUIDs[guid][key] = true - found[key] = true - end - index = index + 1 - end - end - - for key in pairs(GUIDs[guid]) do - if icons[key] and not found[key] then - expireIcon(icons[key], watch) - end - end - - for k in pairs(found) do - found[k] = nil - end -end - -local function setupIcons(self) - - local watch = self.AuraWatch - local icons = watch.icons - watch.watched = {} - if not watch.missingAlpha then watch.missingAlpha = 0.75 end - if not watch.presentAlpha then watch.presentAlpha = 1 end - - for _,icon in pairs(icons) do - - local name, _, image = GetSpellInfo(icon.spellID) - if not name then error("oUF_AuraWatch error: no spell with "..tostring(icon.spellID).." spell ID exists") end - icon.name = name - - if not icon.cd and not (watch.hideCooldown or icon.hideCooldown) then - local cd = CreateFrame("Cooldown", nil, icon) - cd:SetAllPoints(icon) - icon.cd = cd - end - - if not icon.icon then - local tex = icon:CreateTexture(nil, "BACKGROUND") - tex:SetAllPoints(icon) - tex:SetTexture(image) - icon.icon = tex - if not icon.overlay then - local overlay = icon:CreateTexture(nil, "OVERLAY") - overlay:SetTexture"Interface\\Buttons\\UI-Debuff-Overlays" - overlay:SetAllPoints(icon) - overlay:SetTexCoord(.296875, .5703125, 0, .515625) - overlay:SetVertexColor(1, 0, 0) - icon.overlay = overlay - end - end - - if not icon.count and not (watch.hideCount or icon.hideCount) then - local count = icon:CreateFontString(nil, "OVERLAY") - count:SetFontObject(NumberFontNormal) - count:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT", -1, 0) - icon.count = count - end - - if icon.onlyShowMissing == nil then - icon.onlyShowMissing = watch.onlyShowMissing - end - if icon.onlyShowPresent == nil then - icon.onlyShowPresent = watch.onlyShowPresent - end - if icon.fromUnits == nil then - icon.fromUnits = watch.fromUnits or PLAYER_UNITS - end - if icon.anyUnit == nil then - icon.anyUnit = watch.anyUnit - end - - if watch.strictMatching then - watch.watched[icon.spellID] = icon - else - watch.watched[name..image] = icon - end - - if watch.PostCreateIcon then watch:PostCreateIcon(icon, icon.spellID, name, self) end - end -end - -local function Enable(self) - if self.AuraWatch then - self:RegisterEvent("UNIT_AURA", Update) - setupIcons(self) - return true - else - return false - end -end - -local function Disable(self) - if self.AuraWatch then - self:UnregisterEvent("UNIT_AURA", Update) - for _,icon in pairs(self.AuraWatch.icons) do - icon:Hide() - end - end -end -oUF:AddElement("AuraWatch", Update, Enable, Disable) diff --git a/Tukui/modules/unitframes/plugins/oUF_AuraWatch/oUF_AuraWatch.toc b/Tukui/modules/unitframes/plugins/oUF_AuraWatch/oUF_AuraWatch.toc deleted file mode 100644 index 5c0d75c..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_AuraWatch/oUF_AuraWatch.toc +++ /dev/null @@ -1,9 +0,0 @@ -## Interface: 30300 -## Title: oUF AuraWatch -## Author: Astromech -## Version: 1.3.28-6 -## Notes: Adds aura timers to oUF -## OptionalDeps: oUF -## X-oUF: oUF - -oUF_AuraWatch.lua \ No newline at end of file diff --git a/Tukui/modules/unitframes/plugins/oUF_CombatFeedback/oUF_CombatFeedback.lua b/Tukui/modules/unitframes/plugins/oUF_CombatFeedback/oUF_CombatFeedback.lua deleted file mode 100644 index 271c777..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_CombatFeedback/oUF_CombatFeedback.lua +++ /dev/null @@ -1,157 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C.unitframes.enable ~= true or C.unitframes.combatfeedback ~= true then return end - -local _, ns = ... -local oUF = ns.oUF or oUF - -if not oUF then return end - -local damage_format = "-%d" -local heal_format = "+%d" -local maxAlpha = 0.6 -local updateFrame -local feedback = {} -local originalHeight = {} -local color -local colors = { - STANDARD = { 1, 1, 1 }, -- color for everything not in the list below - -- damage colors - IMMUNE = { 1, 1, 1 }, - DAMAGE = { 1, 0, 0 }, - CRUSHING = { 1, 0, 0 }, - CRITICAL = { 1, 0, 0 }, - GLANCING = { 1, 0, 0 }, - ABSORB = { 1, 1, 1 }, - BLOCK = { 1, 1, 1 }, - RESIST = { 1, 1, 1 }, - MISS = { 1, 1, 1 }, - -- heal colors - HEAL = { 0, 1, 0 }, - CRITHEAL = { 0, 1, 0 }, - -- energize colors - ENERGIZE = { 0.41, 0.8, 0.94 }, - CRITENERGIZE = { 0.41, 0.8, 0.94 }, -} - -local function createUpdateFrame() - if updateFrame then return end - updateFrame = CreateFrame("Frame") - updateFrame:Hide() - updateFrame:SetScript("OnUpdate", function() - if next(feedback) == nil then - updateFrame:Hide() - return - end - for object, startTime in pairs(feedback) do - local maxalpha = object.CombatFeedbackText.maxAlpha - local elapsedTime = GetTime() - startTime - if ( elapsedTime < COMBATFEEDBACK_FADEINTIME ) then - local alpha = maxalpha*(elapsedTime / COMBATFEEDBACK_FADEINTIME) - object.CombatFeedbackText:SetAlpha(alpha) - elseif ( elapsedTime < (COMBATFEEDBACK_FADEINTIME + COMBATFEEDBACK_HOLDTIME) ) then - object.CombatFeedbackText:SetAlpha(maxalpha) - elseif ( elapsedTime < (COMBATFEEDBACK_FADEINTIME + COMBATFEEDBACK_HOLDTIME + COMBATFEEDBACK_FADEOUTTIME) ) then - local alpha = maxalpha - maxalpha*((elapsedTime - COMBATFEEDBACK_HOLDTIME - COMBATFEEDBACK_FADEINTIME) / COMBATFEEDBACK_FADEOUTTIME) - object.CombatFeedbackText:SetAlpha(alpha) - else - object.CombatFeedbackText:Hide() - feedback[object] = nil - end - end - end) -end - - -local function combat(self, event, unit, eventType, flags, amount, dtype) - if unit ~= self.unit then return end - if unit == "vehicle" then return end - local FeedbackText = self.CombatFeedbackText - local fColors = FeedbackText.colors - local font, fontHeight, fontFlags = FeedbackText:GetFont() - fontHeight = FeedbackText.origHeight -- always start at original height - local text, arg - color = fColors and fColors.STANDARD or colors.STANDARD - if eventType == "IMMUNE" and not FeedbackText.ignoreImmune then - color = fColors and fColors.IMMUNE or colors.IMMUNE - fontHeight = fontHeight * 0.75 - text = CombatFeedbackText[eventType] - elseif eventType == "WOUND" and not FeedbackText.ignoreDamage then - if amount ~= 0 then - if flags == "CRITICAL" then - color = fColors and fColors.CRITICAL or colors.CRITICAL - fontHeight = fontHeight * 1.5 - elseif flags == "CRUSHING" then - color = fColors and fColors.CRUSING or colors.CRUSHING - fontHeight = fontHeight * 1.5 - elseif flags == "GLANCING" then - color = fColors and fColors.GLANCING or colors.GLANCING - fontHeight = fontHeight * 0.75 - else - color = fColors and fColors.DAMAGE or colors.DAMAGE - end - text = damage_format - arg = amount - elseif flags == "ABSORB" then - color = fColors and fColors.ABSORB or colors.ABSORB - fontHeight = fontHeight * 0.75 - text = CombatFeedbackText["ABSORB"] - elseif flags == "BLOCK" then - color = fColors and fColors.BLOCK or colors.BLOCK - fontHeight = fontHeight * 0.75 - text = CombatFeedbackText["BLOCK"] - elseif flags == "RESIST" then - color = fColors and fColors.RESIST or colors.RESIST - fontHeight = fontHeight * 0.75 - text = CombatFeedbackText["RESIST"] - else - color = fColors and fColors.MISS or colors.MISS - text = CombatFeedbackText["MISS"] - end - elseif eventType == "BLOCK" and not FeedbackText.ignoreDamage then - color = fColors and fColors.BLOCK or colors.BLOCK - fontHeight = fontHeight * 0.75 - text = CombatFeedbackText[eventType] - elseif eventType == "HEAL" and not FeedbackText.ignoreHeal then - text = heal_format - arg = amount - if flags == "CRITICAL" then - color = fColors and fColors.CRITHEAL or colors.CRITHEAL - fontHeight = fontHeight * 1.3 - else - color = fColors and fColors.HEAL or colors.HEAL - end - elseif event == "ENERGIZE" and not FeedbackText.ignoreEnergize then - text = amount - if flags == "CRITICAL" then - color = fColors and fColors.ENERGIZE or colors.ENERGIZE - fontHeight = fontHeight * 1.3 - else - color = fColors and fColors.CRITENERGIZE or colors.CRITENERGIZE - end - elseif not FeedbackText.ignoreOther then - text = CombatFeedbackText[eventType] - end - - if text then - FeedbackText:SetFont(font,fontHeight,fontFlags) - FeedbackText:SetFormattedText(text, arg) - FeedbackText:SetTextColor(unpack(color)) - FeedbackText:SetAlpha(0) - FeedbackText:Show() - feedback[self] = GetTime() - updateFrame:Show() -- start our onupdate - end -end - -local function addCombat(object) - if not object.CombatFeedbackText then return end - -- store the original starting height - local font, fontHeight, fontFlags = object.CombatFeedbackText:GetFont() - object.CombatFeedbackText.origHeight = fontHeight - object.CombatFeedbackText.maxAlpha = object.CombatFeedbackText.maxAlpha or maxAlpha - createUpdateFrame() - object:RegisterEvent("UNIT_COMBAT", combat) -end - -for k, object in ipairs(oUF.objects) do addCombat(object) end -oUF:RegisterInitCallback(addCombat) diff --git a/Tukui/modules/unitframes/plugins/oUF_CombatFeedback/oUF_CombatFeedback.toc b/Tukui/modules/unitframes/plugins/oUF_CombatFeedback/oUF_CombatFeedback.toc deleted file mode 100644 index b36336e..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_CombatFeedback/oUF_CombatFeedback.toc +++ /dev/null @@ -1,14 +0,0 @@ -## Interface: 30300 -## Title: oUF Combat Feedback -## Notes: Adds combat feedback to oUF. -## Author: Ammo -## Version: 1.0 -## X-Category: UnitFrame -## Dependencies: oUF -## X-Curse-Packaged-Version: r40-release -## X-Curse-Project-Name: oUF_CombatFeedback -## X-Curse-Project-ID: o-uf_combat-feedback -## X-Curse-Repository-ID: wow/o-uf_combat-feedback/mainline - -oUF_CombatFeedback.lua - diff --git a/Tukui/modules/unitframes/plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua b/Tukui/modules/unitframes/plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua deleted file mode 100644 index 1d4a486..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua +++ /dev/null @@ -1,152 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C.unitframes.enable ~= true then return end - -local _, ns = ... -local oUF = ns.oUF or oUF - -if not oUF then return end - -local playerClass = select(2,UnitClass("player")) -local CanDispel = { - PRIEST = { Magic = true, Disease = true, }, - SHAMAN = { Magic = false, Curse = true, }, - PALADIN = { Magic = false, Poison = true, Disease = true, }, - MAGE = { Curse = true, }, - DRUID = { Magic = false, Curse = true, Poison = true, } -} -local dispellist = CanDispel[playerClass] or {} -local origColors = {} -local origBorderColors = {} -local origPostUpdateAura = {} - -local function GetDebuffType(unit, filter) - if not UnitCanAssist("player", unit) then return nil end - local i = 1 - while true do - local _, _, texture, _, debufftype = UnitAura(unit, i, "HARMFUL") - if not texture then break end - if debufftype and not filter or (filter and dispellist[debufftype]) then - return debufftype, texture - end - i = i + 1 - end -end - --- Return true if the talent matching the name of the spell given by (Credit Pitbull4) --- spellid has at least one point spent in it or false otherwise -local function CheckForKnownTalent(spellid) - local wanted_name = GetSpellInfo(spellid) - if not wanted_name then return nil end - local num_tabs = GetNumTalentTabs() - for t=1, num_tabs do - local num_talents = GetNumTalents(t) - for i=1, num_talents do - local name_talent, _, _, _, current_rank = GetTalentInfo(t,i) - if name_talent and (name_talent == wanted_name) then - if current_rank and (current_rank > 0) then - return true - else - return false - end - end - end - end - return false -end - -local function CheckSpec(self, event, levels) - -- Not interested in gained points from leveling - if event == "CHARACTER_POINTS_CHANGED" and levels > 0 then return end - - --Check for certain talents to see if we can dispel magic or not - if playerClass == "PALADIN" then - --Check to see if we have the 'Sacred Cleansing' talent. - if CheckForKnownTalent(53551) then - dispellist.Magic = true - else - dispellist.Magic = false - end - elseif playerClass == "SHAMAN" then - --Check to see if we have the 'Improved Cleanse Spirit' talent. - if CheckForKnownTalent(77130) then - dispellist.Magic = true - else - dispellist.Magic = false - end - elseif playerClass == "DRUID" then - --Check to see if we have the 'Nature's Cure' talent. - if CheckForKnownTalent(88423) then - dispellist.Magic = true - else - dispellist.Magic = false - end - end -end - -local function Update(object, event, unit) - if object.unit ~= unit then return end - local debuffType, texture = GetDebuffType(unit, object.DebuffHighlightFilter) - if debuffType then - local color = DebuffTypeColor[debuffType] - if object.DebuffHighlightBackdrop then - object:SetBackdropColor(color.r, color.g, color.b, object.DebuffHighlightAlpha or 1) - elseif object.DebuffHighlightUseTexture then - object.DebuffHighlight:SetTexture(texture) - else - object.DebuffHighlight:SetVertexColor(color.r, color.g, color.b, object.DebuffHighlightAlpha or .5) - end - else - if object.DebuffHighlightBackdrop then - local color = origColors[object] - object:SetBackdropColor(color.r, color.g, color.b, color.a) - color = origBorderColors[object] - object:SetBackdropBorderColor(color.r, color.g, color.b, color.a) - elseif object.DebuffHighlightUseTexture then - object.DebuffHighlight:SetTexture(nil) - else - local color = origColors[object] - object.DebuffHighlight:SetVertexColor(color.r, color.g, color.b, color.a) - end - end -end - -local function Enable(object) - -- if we're not highlighting this unit return - if not object.DebuffHighlightBackdrop and not object.DebuffHighlight then - return - end - -- if we're filtering highlights and we're not of the dispelling type, return - if object.DebuffHighlightFilter and not CanDispel[playerClass] then - return - end - - -- make sure aura scanning is active for this object - object:RegisterEvent("UNIT_AURA", Update) - object:RegisterEvent("PLAYER_TALENT_UPDATE", CheckSpec) - object:RegisterEvent("CHARACTER_POINTS_CHANGED", CheckSpec) - - if object.DebuffHighlightBackdrop then - local r, g, b, a = object:GetBackdropColor() - origColors[object] = { r = r, g = g, b = b, a = a} - r, g, b, a = object:GetBackdropBorderColor() - origBorderColors[object] = { r = r, g = g, b = b, a = a} - elseif not object.DebuffHighlightUseTexture then -- color debuffs - -- object.DebuffHighlight - local r, g, b, a = object.DebuffHighlight:GetVertexColor() - origColors[object] = { r = r, g = g, b = b, a = a} - end - - return true -end - -local function Disable(object) - if object.DebuffHighlightBackdrop or object.DebuffHighlight then - object:UnregisterEvent("UNIT_AURA", Update) - object:UnregisterEvent("PLAYER_TALENT_UPDATE", CheckSpec) - object:UnregisterEvent("CHARACTER_POINTS_CHANGED", CheckSpec) - end -end - -oUF:AddElement('DebuffHighlight', Update, Enable, Disable) - -for i, frame in ipairs(oUF.objects) do Enable(frame) end \ No newline at end of file diff --git a/Tukui/modules/unitframes/plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.toc b/Tukui/modules/unitframes/plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.toc deleted file mode 100644 index 58222fc..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.toc +++ /dev/null @@ -1,14 +0,0 @@ -## Interface: 30100 -## Title: oUF Debuff Highlight -## Notes: Adds Debuff Highlighting to oUF. -## Author: Ammo -## Version: 1.0 -## X-Category: UnitFrame -## Dependencies: oUF -## X-Curse-Packaged-Version: r44-release -## X-Curse-Project-Name: oUF_DebuffHighlight -## X-Curse-Project-ID: o-uf_debuff-highlight -## X-Curse-Repository-ID: wow/o-uf_debuff-highlight/mainline - -oUF_DebuffHighlight.lua - diff --git a/Tukui/modules/unitframes/plugins/oUF_Experience/oUF_Experience.lua b/Tukui/modules/unitframes/plugins/oUF_Experience/oUF_Experience.lua deleted file mode 100644 index d7f89a5..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_Experience/oUF_Experience.lua +++ /dev/null @@ -1,152 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C.unitframes.enable ~= true then return end - -local _, ns = ... -local oUF = ns.oUF or oUF - -if not oUF then return end ---[[ - - Elements handled: - .Experience [statusbar] - .Experience.Rested [statusbar] (optional, must be parented to Experience) - .Experience.Text [fontstring] (optional) - - Booleans: - - noTooltip - - Functions that can be overridden from within a layout: - - PostUpdate(element unit, min, max) - ---]] - -local _, ns = ... -local oUF = ns.oUF or oUF -assert(oUF, 'oUF Experience was unable to locate oUF install') - -local hunterPlayer = select(2, UnitClass('player')) == 'HUNTER' - -local function GetXP(unit) - if(unit == 'pet') then - return GetPetExperience() - else - return UnitXP(unit), UnitXPMax(unit) - end -end - -local function SetTooltip(self) - local unit = self:GetParent().unit - local min, max = GetXP(unit) - - local bars = unit == 'pet' and 6 or 20 - - GameTooltip:SetOwner(self, 'ANCHOR_BOTTOM', 0, -5) - GameTooltip:AddLine(string.format(XP..": %d / %d (%d%% - %d/%d)", min, max, min/max * 100, bars - (bars * (max - min) / max), bars)) - GameTooltip:AddLine(string.format(LEVEL_ABBR..": %d (%d%% - %d/%d)", max - min, (max - min) / max * 100, 1 + bars * (max - min) / max, bars)) - - if(self.rested) then - GameTooltip:AddLine(string.format("|cff0090ff"..TUTORIAL_TITLE26..": +%d (%d%%)", self.rested, self.rested / max * 100)) - end - - GameTooltip:Show() -end - -local function Update(self, event, owner) - if(event == 'UNIT_PET' and owner ~= 'player') then return end - - local experience = self.Experience - -- Conditional hiding - if(self.unit == 'player') then - if(UnitLevel('player') == MAX_PLAYER_LEVEL) then - return experience:Hide() - end - elseif(self.unit == 'pet') then - local _, hunterPet = HasPetUI() - if(not self.disallowVehicleSwap and UnitHasVehicleUI('player')) then - return experience:Hide() - elseif(not hunterPet or (UnitLevel('pet') == UnitLevel('player'))) then - return experience:Hide() - end - else - return experience:Hide() - end - - local unit = self.unit - local min, max = GetXP(unit) - experience:SetMinMaxValues(0, max) - experience:SetValue(min) - experience:Show() - - if(experience.Text) then - experience.Text:SetFormattedText('%d / %d', min, max) - end - - if(experience.Rested) then - local rested = GetXPExhaustion() - if(unit == 'player' and rested and rested > 0) then - experience.Rested:SetMinMaxValues(0, max) - experience.Rested:SetValue(math.min(min + rested, max)) - experience.rested = rested - else - experience.Rested:SetMinMaxValues(0, 1) - experience.Rested:SetValue(0) - experience.rested = nil - end - end - - if(experience.PostUpdate) then - return experience:PostUpdate(unit, min, max) - end -end - -local function Enable(self, unit) - local experience = self.Experience - if(experience) then - local Update = experience.Update or Update - - self:RegisterEvent('PLAYER_XP_UPDATE', Update) - self:RegisterEvent('PLAYER_LEVEL_UP', Update) - self:RegisterEvent('UNIT_PET', Update) - - if(experience.Rested) then - self:RegisterEvent('UPDATE_EXHAUSTION', Update) - end - - if(hunterPlayer) then - self:RegisterEvent('UNIT_PET_EXPERIENCE', Update) - end - - if(not experience.noTooltip) then - experience:EnableMouse() - experience:HookScript('OnLeave', GameTooltip_Hide) - experience:HookScript('OnEnter', SetTooltip) - end - - if(not experience:GetStatusBarTexture()) then - experience:SetStatusBarTexture([=[Interface\TargetingFrame\UI-StatusBar]=]) - end - - return true - end -end - -local function Disable(self) - local experience = self.Experience - if(experience) then - local Update = experience.Update or Update - - self:UnregisterEvent('PLAYER_XP_UPDATE', Update) - self:UnregisterEvent('PLAYER_LEVEL_UP', Update) - self:UnregisterEvent('UNIT_PET', Update) - - if(experience.Rested) then - self:UnregisterEvent('UPDATE_EXHAUSTION', Update) - end - - if(hunterPlayer) then - self:UnregisterEvent('UNIT_PET_EXPERIENCE', Update) - end - end -end - -oUF:AddElement('Experience', Update, Enable, Disable) diff --git a/Tukui/modules/unitframes/plugins/oUF_Experience/oUF_Experience.toc b/Tukui/modules/unitframes/plugins/oUF_Experience/oUF_Experience.toc deleted file mode 100644 index 28fca64..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_Experience/oUF_Experience.toc +++ /dev/null @@ -1,8 +0,0 @@ -## Interface: 30300 -## Author: p3lim -## Version: 30300.5-Release -## Title: oUF Experience -## Notes: Experience Bar support for oUF layouts. -## RequiredDeps: oUF - -oUF_Experience.lua diff --git a/Tukui/modules/unitframes/plugins/oUF_MovableFrames/movable.lua b/Tukui/modules/unitframes/plugins/oUF_MovableFrames/movable.lua deleted file mode 100644 index af76cde..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_MovableFrames/movable.lua +++ /dev/null @@ -1,556 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales - -if C.unitframes.enable ~= true then return end - -local _NAME, _NS = ... -local oUF = _NS.oUF or oUF - -assert(oUF, "oUF_MovableFrames was unable to locate oUF install.") - -local _DB -local _DBNAME = GetAddOnMetadata(_NAME, 'X-SavedVariables') -local _LOCK -local _TITLE = GetAddOnMetadata(_NAME, 'title') - --- I could use the title field in the TOC, but people tend to put color and --- other shit there, so we'll just use the folder name: -local slashGlobal = _NAME:gsub('%s+', '_'):gsub('[^%a%d_]+', ''):upper() -slashGlobal = slashGlobal .. '_OMF' - -local print_fmt = string.format('|cff33ff99%s:|r', _TITLE) -local print = function(...) - return print(print_fmt, ...) -end - -local backdropPool = {} - -local getPoint = function(obj, anchor) - if(not anchor) then - local UIx, UIy = UIParent:GetCenter() - local Ox, Oy = obj:GetCenter() - - -- Frame doesn't really have a positon yet. - if(not Ox) then return end - - local OS = obj:GetScale() - Ox, Oy = Ox * OS, Oy * OS - - local UIWidth, UIHeight = UIParent:GetRight(), UIParent:GetTop() - - local LEFT = UIWidth / 3 - local RIGHT = UIWidth * 2 / 3 - - local point, x, y - if(Ox >= RIGHT) then - point = 'RIGHT' - x = obj:GetRight() - UIWidth - elseif(Ox <= LEFT) then - point = 'LEFT' - x = obj:GetLeft() - else - x = Ox - UIx - end - - local BOTTOM = UIHeight / 3 - local TOP = UIHeight * 2 / 3 - - if(Oy >= TOP) then - point = 'TOP' .. (point or '') - y = obj:GetTop() - UIHeight - elseif(Oy <= BOTTOM) then - point = 'BOTTOM' .. (point or '') - y = obj:GetBottom() - else - if(not point) then point = 'CENTER' end - y = Oy - UIy - end - - return string.format( - '%s\031%s\031%d\031%d\031\%.3f', - point, 'UIParent', x, y, OS - ) - else - local point, parent, _, x, y = anchor:GetPoint() - - return string.format( - '%s\031%s\031%d\031%d\031\%.3f', - point, 'UIParent', x, y, obj:GetScale() - ) - end -end - -local getObjectInformation = function(obj) - -- This won't be set if we're dealing with oUF <1.3.22. Due to this we're just - -- setting it to Unknown. It will only break if the user has multiple layouts - -- spawning the same unit or change between layouts. - local style = obj.style or 'Unknown' - local identifier = obj:GetName() or obj.unit - - -- Are we dealing with header units? - local isHeader - local parent = obj:GetParent() - - if(parent) then - if(parent:GetAttribute'initialConfigFunction' and parent.style) then - isHeader = parent - - identifier = parent:GetName() - elseif(parent:GetAttribute'oUF-onlyProcessChildren') then - isHeader = parent:GetParent() - - identifier = isHeader:GetName() - end - end - - return style, identifier, isHeader -end - -local restoreDefaultPosition = function(style, identifier) - -- We've not saved any default position for this style. - if(not _DB.__INITIAL or not _DB.__INITIAL[style] or not _DB.__INITIAL[style][identifier]) then return end - - local obj, isHeader - for _, frame in next, oUF.objects do - local fStyle, fIdentifier, fIsHeader = getObjectInformation(frame) - if(fStyle == style and fIdentifier == identifier) then - obj = frame - isHeader = fIsHeader - - break - end - end - - if(obj) then - local target = isHeader or obj - - target:ClearAllPoints() - local point, parentName, x, y, scale = string.split('\031', _DB.__INITIAL[style][identifier]) - if(not scale) then scale = 1 end - - target:_SetScale(scale) - target:_SetPoint(point, parentName, point, x, y) - - local backdrop = backdropPool[target] - if(backdrop) then - backdrop:ClearAllPoints() - backdrop:SetAllPoints(target) - end - - -- We don't need this anymore - _DB.__INITIAL[style][identifier] = nil - if(not next(_DB.__INITIAL[style])) then - _DB[style] = nil - end - end -end - -local function restorePosition(obj) - if(InCombatLockdown()) then return end - local style, identifier, isHeader = getObjectInformation(obj) - -- We've not saved any custom position for this style. - if(not _DB[style] or not _DB[style][identifier]) then return end - - local target = isHeader or obj - if(not target._SetPoint) then - target._SetPoint = target.SetPoint - target.SetPoint = restorePosition - target._SetScale = target.SetScale - target.SetScale = restorePosition - end - target:ClearAllPoints() - - -- damn it Blizzard, _how_ did you manage to get the input of this function - -- reversed. Any sane person would implement this as: split(str, dlm, lim); - local point, parentName, x, y, scale = string.split('\031', _DB[style][identifier]) - if(not scale) then - scale = 1 - end - - if(scale) then - target:_SetScale(scale) - else - scale = target:GetScale() - end - target:_SetPoint(point, parentName, point, x / scale, y / scale) -end - -local restoreCustomPosition = function(style, ident) - for _, obj in next, oUF.objects do - local objStyle, objIdent = getObjectInformation(obj) - if(objStyle == style and objIdent == ident) then - return restorePosition(obj) - end - end -end - -local saveDefaultPosition = function(obj) - local style, identifier, isHeader = getObjectInformation(obj) - if(not _DB.__INITIAL) then - _DB.__INITIAL = {} - end - - if(not _DB.__INITIAL[style]) then - _DB.__INITIAL[style] = {} - end - - if(not _DB.__INITIAL[style][identifier]) then - local point - if(isHeader) then - point = getPoint(isHeader) - else - point = getPoint(obj) - end - - _DB.__INITIAL[style][identifier] = point - end -end - -local savePosition = function(obj, anchor) - local style, identifier, isHeader = getObjectInformation(obj) - if(not _DB[style]) then _DB[style] = {} end - - _DB[style][identifier] = getPoint(isHeader or obj, anchor) -end - -local saveCustomPosition = function(style, ident, point, x, y, scale) - -- Shouldn't really be the case, but you never know! - if(not _DB[style]) then _DB[style] = {} end - - _DB[style][ident] = string.format( - '%s\031%s\031%d\031%d\031\%.3f', - point, 'UIParent', x, y, scale - ) -end - --- Attempt to figure out a more sane name to dispaly. -local smartName -do - local nameCache = {} - local validNames = { - 'player', - 'target', - 'focus', - 'raid', - 'pet', - 'party', - 'maintank', - 'mainassist', - 'arena', - } - - local rewrite = { - mt = 'maintank', - mtt = 'maintanktarget', - - ma = 'mainassist', - mat = 'mainassisttarget', - } - - local validName = function(smartName) - -- Not really a valid name, but we'll accept it for simplicities sake. - if(tonumber(smartName)) then - return smartName - end - - if(type(smartName) == 'string') then - -- strip away trailing s from pets, but don't touch boss/focus. - smartName = smartName:gsub('([^us])s$', '%1') - - if(rewrite[smartName]) then - return rewrite[smartName] - end - - for _, v in next, validNames do - if(v == smartName) then - return smartName - end - end - - if( - smartName:match'^party%d?$' or - smartName:match'^arena%d?$' or - smartName:match'^boss%d?$' or - smartName:match'^partypet%d?$' or - smartName:match'^raid%d?%d?$' or - smartName:match'%w+target$' or - smartName:match'%w+pet$' - ) then - return smartName - end - end - end - - local function guessName(...) - local name = validName(select(1, ...)) - - local n = select('#', ...) - if(n > 1) then - for i=2, n do - local inp = validName(select(i, ...)) - if(inp) then - name = (name or '') .. inp - end - end - end - - return name - end - - local smartString = function(name) - if(nameCache[name]) then - return nameCache[name] - end - - -- Here comes the substitute train! - local n = name - :gsub('ToT', 'targettarget') - :gsub('(%l)(%u)', '%1_%2') - :gsub('([%l%u])(%d)', '%1_%2_') - :gsub('Main_', 'Main') - :lower() - - n = guessName(string.split('_', n)) - if(n) then - nameCache[name] = n - return n - end - - return name - end - - smartName = function(obj, header) - if(type(obj) == 'string') then - return smartString(obj) - elseif(header) then - return smartString(header:GetName()) - else - local name = obj:GetName() - if(name) then - return smartString(name) - end - - return obj.unit or '<unknown>' - end - end -end - -do - local frame = CreateFrame"Frame" - frame:SetScript("OnEvent", function(self, event) - return self[event](self) - end) - - function frame:VARIABLES_LOADED() - -- I honestly don't trust the load order of SVs. - if (TukuiDataPerChar == nil) then TukuiDataPerChar = {} end - _DB = TukuiDataPerChar.ufpos or {} - TukuiDataPerChar.ufpos = _DB - - -- Got to catch them all! - for _, obj in next, oUF.objects do - restorePosition(obj) - end - - oUF:RegisterInitCallback(restorePosition) - self:UnregisterEvent"VARIABLES_LOADED" - end - frame:RegisterEvent"VARIABLES_LOADED" - - function frame:PLAYER_REGEN_DISABLED() - if(_LOCK) then - print("Anchors hidden due to combat.") - for k, bdrop in next, backdropPool do - bdrop:Hide() - end - _LOCK = nil - end - end - frame:RegisterEvent"PLAYER_REGEN_DISABLED" -end - -local getBackdrop -do - local OnShow = function(self) - return self.name:SetText(smartName(self.obj, self.header)) - end - - local OnHide = function(self) - if(self.dirtyMinHeight) then - self:SetAttribute('minHeight', nil) - end - - if(self.dirtyMinWidth) then - self:SetAttribute('minWidth', nil) - end - end - - local OnDragStart = function(self) - saveDefaultPosition(self.obj) - self:StartMoving() - - local frame = self.header or self.obj - frame:ClearAllPoints(); - frame:SetAllPoints(self); - end - - local OnDragStop = function(self) - self:StopMovingOrSizing() - savePosition(self.obj, self) - - -- Restore the initial anchoring, so the anchor follows the frame when we - -- edit positions through the UI. - restorePosition(self.obj) - self:ClearAllPoints() - self:SetAllPoints(self.header or self.obj) - end - - local OnMouseDown = function(self) - local anchor = self:GetParent() - saveDefaultPosition(anchor.obj) - anchor:StartSizing('BOTTOMRIGHT') - - local frame = anchor.header or anchor.obj - frame:ClearAllPoints() - frame:SetAllPoints(anchor) - - self:SetButtonState("PUSHED", true) - end - - local OnMouseUp = function(self) - local anchor = self:GetParent() - self:SetButtonState("NORMAL", false) - - anchor:StopMovingOrSizing() - savePosition(anchor.obj, anchor) - end - - local OnSizeChanged = function(self, width, height) - local baseWidth, baseHeight = self.baseWidth, self.baseHeight - - local scale = width / baseWidth - - -- This is damn tiny! - if(scale <= .3) then - scale = .3 - end - - self:SetSize(scale * baseWidth, scale * baseHeight) - local target = self. target; - (target._SetScale or target.SetScale) (target, scale) - end - - getBackdrop = function(obj, isHeader) - local target = isHeader or obj - if(not target:GetCenter()) then return end - if(backdropPool[target]) then return backdropPool[target] end - - local backdrop = CreateFrame"Frame" - backdrop:SetParent(UIParent) - backdrop:Hide() - - backdrop:SetTemplate("Default") - backdrop:SetFrameStrata("MEDIUM") - backdrop:SetFrameLevel(20) - backdrop:SetAllPoints(target) - - backdrop:EnableMouse(true) - backdrop:SetMovable(true) - backdrop:SetResizable(true) - backdrop:RegisterForDrag"LeftButton" - - local name = backdrop:CreateFontString(nil, "OVERLAY", "GameFontNormal") - name:SetPoint"CENTER" - name:SetJustifyH"CENTER" - name:SetFont(C.media.uffont, 12) - name:SetTextColor(1, 1, 1) - - local scale = CreateFrame('Button', nil, backdrop) - scale:SetPoint'BOTTOMRIGHT' - scale:SetSize(16, 16) - - scale:SetNormalTexture[[Interface\ChatFrame\UI-ChatIM-SizeGrabber-Up]] - scale:SetHighlightTexture[[Interface\ChatFrame\UI-ChatIM-SizeGrabber-Highlight]] - scale:SetPushedTexture[[Interface\ChatFrame\UI-ChatIM-SizeGrabber-Down]] - - scale:SetScript('OnMouseDown', OnMouseDown) - scale:SetScript('OnMouseUp', OnMouseUp) - - backdrop.name = name - backdrop.obj = obj - backdrop.header = isHeader - backdrop.target = target - - backdrop:SetBackdropBorderColor(1, 0, 0) - - backdrop.baseWidth, backdrop.baseHeight = obj:GetSize() - - -- We have to define a minHeight on the header if it doesn't have one. The - -- reason for this is that the header frame will have an height of 0.1 when - -- it doesn't have any frames visible. - if( - isHeader and - ( - not isHeader:GetAttribute'minHeight' and math.floor(isHeader:GetHeight()) == 0 or - not isHeader:GetAttribute'minWidth' and math.floor(isHeader:GetWidth()) == 0 - ) - ) then - isHeader:SetHeight(obj:GetHeight()) - isHeader:SetWidth(obj:GetWidth()) - - if(not isHeader:GetAttribute'minHeight') then - isHeader.dirtyMinHeight = true - isHeader:SetAttribute('minHeight', obj:GetHeight()) - end - - if(not isHeader:GetAttribute'minWidth') then - isHeader.dirtyMinWidth = true - isHeader:SetAttribute('minWidth', obj:GetWidth()) - end - elseif(isHeader) then - backdrop.baseWidth, backdrop.baseHeight = isHeader:GetSize() - end - - backdrop:SetScript("OnShow", OnShow) - backdrop:SetScript('OnHide', OnHide) - - backdrop:SetScript("OnDragStart", OnDragStart) - backdrop:SetScript("OnDragStop", OnDragStop) - - backdrop:SetScript('OnSizeChanged', OnSizeChanged) - - backdropPool[target] = backdrop - - return backdrop - end -end - --- reset data -local function RESETUF() - TukuiDataPerChar.ufpos = {} - ReloadUI() -end -SLASH_RESETUF1 = "/resetuf" -SlashCmdList["RESETUF"] = RESETUF - -T.MoveUnitFrames = function(inp) - if(InCombatLockdown()) then - return print"Frames cannot be moved while in combat. Bailing out." - end - - if(not _LOCK) then - for k, obj in next, oUF.objects do - local style, identifier, isHeader = getObjectInformation(obj) - local backdrop = getBackdrop(obj, isHeader) - if(backdrop) then backdrop:Show() end - end - - _LOCK = true - else - for k, bdrop in next, backdropPool do - bdrop:Hide() - end - - _LOCK = nil - end -end --- It's not in your best interest to disconnect me. Someone could get hurt. \ No newline at end of file diff --git a/Tukui/modules/unitframes/plugins/oUF_MovableFrames/oUF_MovableFrames.toc b/Tukui/modules/unitframes/plugins/oUF_MovableFrames/oUF_MovableFrames.toc deleted file mode 100644 index 503f582..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_MovableFrames/oUF_MovableFrames.toc +++ /dev/null @@ -1,10 +0,0 @@ -## Interface: 30300 -## Title: oUF: MovableFrames -## Author: Haste -## Version: 1.9 -## OptionalDeps: oUF -## X-eMail: troeks@gmail.com -## SavedVariables: bb08df87101dd7f2161e5b77cf750f753c58ef1b -## Notes: Easily move frames created by oUF. - -movable.lua diff --git a/Tukui/modules/unitframes/plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua b/Tukui/modules/unitframes/plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua deleted file mode 100644 index db022a6..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua +++ /dev/null @@ -1,278 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales --- yleaf (yaroot@gmail.com) - -if C.unitframes.enable ~= true or C.unitframes.raidunitdebuffwatch ~= true then return end - -local _, ns = ... -local oUF = ns.oUF or oUF - -local addon = {} -ns.oUF_RaidDebuffs = addon -if not _G.oUF_RaidDebuffs then - _G.oUF_RaidDebuffs = addon -end - -local debuff_data = {} -addon.DebuffData = debuff_data - - -addon.ShowDispelableDebuff = true -addon.FilterDispellableDebuff = true -addon.MatchBySpellName = true - - -addon.priority = 10 - -local function add(spell) - if addon.MatchBySpellName and type(spell) == 'number' then - spell = GetSpellInfo(spell) - end - - debuff_data[spell] = addon.priority - addon.priority = addon.priority + 1 -end - -function addon:RegisterDebuffs(t) - for _, v in next, t do - add(v) - end -end - -function addon:ResetDebuffData() - wipe(debuff_data) - addon.priority = 10 -end - -local DispellColor = { - ['Magic'] = {.2, .6, 1}, - ['Curse'] = {.6, 0, 1}, - ['Disease'] = {.6, .4, 0}, - ['Poison'] = {0, .6, 0}, - ['none'] = {unpack(C.media.bordercolor)}, -} - -local DispellPriority = { - ['Magic'] = 4, - ['Curse'] = 3, - ['Disease'] = 2, - ['Poison'] = 1, -} - -local DispellFilter -do - local dispellClasses = { - ['PRIEST'] = { - ['Magic'] = true, - ['Disease'] = true, - }, - ['SHAMAN'] = { - ['Magic'] = false, - ['Curse'] = true, - }, - ['PALADIN'] = { - ['Poison'] = true, - ['Magic'] = false, - ['Disease'] = true, - }, - ['MAGE'] = { - ['Curse'] = true, - }, - ['DRUID'] = { - ['Magic'] = false, - ['Curse'] = true, - ['Poison'] = true, - }, - } - - DispellFilter = dispellClasses[select(2, UnitClass('player'))] or {} -end - --- Return true if the talent matching the name of the spell given by (Credit Pitbull4) --- spellid has at least one point spent in it or false otherwise -local function CheckForKnownTalent(spellid) - local wanted_name = GetSpellInfo(spellid) - if not wanted_name then return nil end - local num_tabs = GetNumTalentTabs() - for t=1, num_tabs do - local num_talents = GetNumTalents(t) - for i=1, num_talents do - local name_talent, _, _, _, current_rank = GetTalentInfo(t,i) - if name_talent and (name_talent == wanted_name) then - if current_rank and (current_rank > 0) then - return true - else - return false - end - end - end - end - return false -end - -local function CheckSpec(self, event, levels) - -- Not interested in gained points from leveling - if event == "CHARACTER_POINTS_CHANGED" and levels > 0 then return end - - --Check for certain talents to see if we can dispel magic or not - if select(2, UnitClass('player')) == "PALADIN" then - --Check to see if we have the 'Sacred Cleansing' talent. - if CheckForKnownTalent(53551) then - DispellFilter.Magic = true - else - DispellFilter.Magic = false - end - elseif select(2, UnitClass('player')) == "SHAMAN" then - --Check to see if we have the 'Improved Cleanse Spirit' talent. - if CheckForKnownTalent(77130) then - DispellFilter.Magic = true - else - DispellFilter.Magic = false - end - elseif select(2, UnitClass('player')) == "DRUID" then - --Check to see if we have the 'Nature's Cure' talent. - if CheckForKnownTalent(88423) then - DispellFilter.Magic = true - else - DispellFilter.Magic = false - end - end -end - - -local function formatTime(s) - if s > 60 then - return format('%dm', s/60), s%60 - elseif s < 1 then - return format("%.1f", s), s - floor(s) - else - return format('%d', s), s - floor(s) - end -end - -local abs = math.abs -local function OnUpdate(self, elapsed) - self.elapsed = (self.elapsed or 0) + elapsed - if self.elapsed >= 0.1 then - local timeLeft = self.endTime - GetTime() - if self.reverse then timeLeft = abs((self.endTime - GetTime()) - self.duration) end - if timeLeft > 0 then - local text = formatTime(timeLeft) - self.time:SetText(text) - else - self:SetScript('OnUpdate', nil) - self.time:Hide() - end - self.elapsed = 0 - end -end - -local function UpdateDebuff(self, name, icon, count, debuffType, duration, endTime, spellId) - local f = self.RaidDebuffs - if name then - f.icon:SetTexture(icon) - f.icon:Show() - f.duration = duration - - if f.count then - if count and (count > 0) then - f.count:SetText(count) - f.count:Show() - else - f.count:Hide() - end - end - - if spellId and T.ReverseTimer[spellId] then - f.reverse = true - else - f.reverse = nil - end - - if f.time then - if duration and (duration > 0) then - f.endTime = endTime - f.nextUpdate = 0 - f:SetScript('OnUpdate', OnUpdate) - f.time:Show() - else - f:SetScript('OnUpdate', nil) - f.time:Hide() - end - end - - if f.cd then - if duration and (duration > 0) then - f.cd:SetCooldown(endTime - duration, duration) - f.cd:Show() - else - f.cd:Hide() - end - end - - local c = DispellColor[debuffType] or DispellColor.none - f:SetBackdropBorderColor(c[1], c[2], c[3]) - - f:Show() - else - f:Hide() - end -end - -local function Update(self, event, unit) - if unit ~= self.unit then return end - local _name, _icon, _count, _dtype, _duration, _endTime, _spellId - local _priority, priority = 0 - for i = 1, 40 do - local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitAura(unit, i, 'HARMFUL') - if (not name) then break end - - if addon.ShowDispelableDebuff and debuffType then - if addon.FilterDispellableDebuff then - DispellPriority[debuffType] = DispellPriority[debuffType] + addon.priority --Make Dispell buffs on top of Boss Debuffs - priority = DispellFilter[debuffType] and DispellPriority[debuffType] - else - priority = DispellPriority[debuffType] - end - - if priority and (priority > _priority) then - _priority, _name, _icon, _count, _dtype, _duration, _endTime, _spellId = priority, name, icon, count, debuffType, duration, expirationTime, spellId - end - end - - priority = debuff_data[addon.MatchBySpellName and name or spellId] - if priority and (priority > _priority) then - _priority, _name, _icon, _count, _dtype, _duration, _endTime, _spellId = priority, name, icon, count, debuffType, duration, expirationTime, spellId - end - end - - UpdateDebuff(self, _name, _icon, _count, _dtype, _duration, _endTime, _spellId) - - --Reset the DispellPriority - DispellPriority = { - ['Magic'] = 4, - ['Curse'] = 3, - ['Disease'] = 2, - ['Poison'] = 1, - } -end - -local function Enable(self) - if self.RaidDebuffs then - self:RegisterEvent('UNIT_AURA', Update) - return true - end - --Need to run these always - self:RegisterEvent("PLAYER_TALENT_UPDATE", CheckSpec) - self:RegisterEvent("CHARACTER_POINTS_CHANGED", CheckSpec) -end - -local function Disable(self) - if self.RaidDebuffs then - self:UnregisterEvent('UNIT_AURA', Update) - self.RaidDebuffs:Hide() - end - self:UnregisterEvent("PLAYER_TALENT_UPDATE", CheckSpec) - self:UnregisterEvent("CHARACTER_POINTS_CHANGED", CheckSpec) -end - -oUF:AddElement('RaidDebuffs', Update, Enable, Disable) \ No newline at end of file diff --git a/Tukui/modules/unitframes/plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.toc b/Tukui/modules/unitframes/plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.toc deleted file mode 100644 index e42f9df..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.toc +++ /dev/null @@ -1,7 +0,0 @@ -## Interface: 30300 -## Title: oUF RaidDebuffs -## Notes: Raid debuff mod for oUF -## Version: 1.2 -## OptionalDeps: oUF - -oUF_RaidDebuffs.lua diff --git a/Tukui/modules/unitframes/plugins/oUF_Reputation/oUF_Reputation.lua b/Tukui/modules/unitframes/plugins/oUF_Reputation/oUF_Reputation.lua deleted file mode 100644 index 1f21537..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_Reputation/oUF_Reputation.lua +++ /dev/null @@ -1,75 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C.unitframes.enable ~= true then return end ---[[ - - Elements handled: - .Reputation [statusbar] - .Reputation.Text [fontstring] (optional) - - Booleans: - - Tooltip - - Functions that can be overridden from within a layout: - - PostUpdate(self, event, unit, bar, min, max, value, name, id) - - OverrideText(bar, min, max, value, name, id) - ---]] -local _, ns = ... -local oUF = ns.oUF or oUF - -if not oUF then return end - -local function tooltip(self) - local name, id, min, max, value = GetWatchedFactionInfo() - GameTooltip:SetOwner(self, 'ANCHOR_BOTTOM', 0, -5) - GameTooltip:AddLine(string.format('%s (%s)', name, _G['FACTION_STANDING_LABEL'..id])) - GameTooltip:AddLine(string.format('%d / %d (%d%%)', value - min, max - min, (value - min) / (max - min) * 100)) - GameTooltip:Show() -end - -local function update(self, event, unit) - local bar = self.Reputation - if(not GetWatchedFactionInfo()) then return bar:Hide() end - - local name, id, min, max, value = GetWatchedFactionInfo() - bar:SetMinMaxValues(min, max) - bar:SetValue(value) - bar:Show() - - if(bar.Text) then - if(bar.OverrideText) then - bar:OverrideText(min, max, value, name, id) - else - bar.Text:SetFormattedText('%d / %d - %s', value - min, max - min, name) - end - end - - if(bar.PostUpdate) then bar.PostUpdate(self, event, unit, bar, min, max, value, name, id) end -end - -local function enable(self, unit) - local bar = self.Reputation - if(bar and unit == 'player') then - if(not bar:GetStatusBarTexture()) then - bar:SetStatusBarTexture([=[Interface\TargetingFrame\UI-StatusBar]=]) - end - - self:RegisterEvent('UPDATE_FACTION', update) - - if(bar.Tooltip) then - bar:EnableMouse() - bar:HookScript('OnLeave', GameTooltip_Hide) - bar:HookScript('OnEnter', tooltip) - end - - return true - end -end - -local function disable(self) - if(self.Reputation) then - self:UnregisterEvent('UPDATE_FACTION', update) - end -end - -oUF:AddElement('Reputation', update, enable, disable) diff --git a/Tukui/modules/unitframes/plugins/oUF_Reputation/oUF_Reputation.toc b/Tukui/modules/unitframes/plugins/oUF_Reputation/oUF_Reputation.toc deleted file mode 100644 index d8d35f4..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_Reputation/oUF_Reputation.toc +++ /dev/null @@ -1,8 +0,0 @@ -## Interface: 30200 -## Author: p3lim -## Version: 30200.2-Release -## Title: oUF Reputation -## Notes: Reputation Bar support for oUF layouts. -## RequiredDeps: oUF - -oUF_Reputation.lua diff --git a/Tukui/modules/unitframes/plugins/oUF_Smooth/oUF_Smooth.lua b/Tukui/modules/unitframes/plugins/oUF_Smooth/oUF_Smooth.lua deleted file mode 100644 index b0c0aba..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_Smooth/oUF_Smooth.lua +++ /dev/null @@ -1,53 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C.unitframes.enable ~= true or C.unitframes.showsmooth ~= true then return end - -local _, ns = ... -local oUF = ns.oUF or oUF - -if not oUF then return end - -local smoothing = {} -local function Smooth(self, value) - if value ~= self:GetValue() or value == 0 then - smoothing[self] = value - else - smoothing[self] = nil - end -end - -local function SmoothBar(self, bar) - bar.SetValue_ = bar.SetValue - bar.SetValue = Smooth -end - -local function hook(frame) - frame.SmoothBar = SmoothBar - if frame.Health and frame.Health.Smooth then - frame:SmoothBar(frame.Health) - end - if frame.Power and frame.Power.Smooth then - frame:SmoothBar(frame.Power) - end -end - -for i, frame in ipairs(oUF.objects) do hook(frame) end -oUF:RegisterInitCallback(hook) - -local f, min, max = CreateFrame('Frame'), math.min, math.max -f:SetScript('OnUpdate', function() - local rate = GetFramerate() - local limit = 30/rate - for bar, value in pairs(smoothing) do - local cur = bar:GetValue() - local new = cur + min((value-cur)/3, max(value-cur, limit)) - if new ~= new then - -- Mad hax to prevent QNAN. - new = value - end - bar:SetValue_(new) - if cur == value or abs(new - value) < 2 then - bar:SetValue_(value) - smoothing[bar] = nil - end - end -end) \ No newline at end of file diff --git a/Tukui/modules/unitframes/plugins/oUF_TotemBar/License b/Tukui/modules/unitframes/plugins/oUF_TotemBar/License deleted file mode 100644 index e475647..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_TotemBar/License +++ /dev/null @@ -1,20 +0,0 @@ - Copyright (c) 2009 Arthur Guerard - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - diff --git a/Tukui/modules/unitframes/plugins/oUF_TotemBar/oUF_TotemBar.lua b/Tukui/modules/unitframes/plugins/oUF_TotemBar/oUF_TotemBar.lua deleted file mode 100644 index 364dc34..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_TotemBar/oUF_TotemBar.lua +++ /dev/null @@ -1,162 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C.unitframes.enable ~= true or T.myclass ~= "SHAMAN" then return end ---[[ - Documentation: - - Element handled: - .TotemBar (must be a table with statusbar inside) - - .TotemBar only: - .delay : The interval for updates (Default: 0.1) - .colors : The colors for the statusbar, depending on the totem - .Name : The totem name - .Destroy (boolean): Enables/Disable the totem destruction on right click - - NOT YET IMPLEMENTED - .Icon (boolean): If true an icon will be added to the left or right of the bar - .IconSize : If the Icon is enabled then changed the IconSize (default: 8) - .IconJustify : any anchor like "TOPLEFT", "BOTTOMRIGHT", "TOP", etc - - .TotemBar.bg only: - .multiplier : Sets the multiplier for the text or the background (can be two differents multipliers) - ---]] -local _, ns = ... -local oUF = ns.oUF or oUF - -if not oUF then return end - -local _, pClass = UnitClass("player") -local total = 0 -local delay = 0.01 - --- In the order, fire, earth, water, air -local colors = { - [1] = {.58,.23,.10}, - [2] = {.23,.45,.13}, - [3] = {.19,.48,.60}, - [4] = {.42,.18,.74}, -} - -local GetTotemInfo, SetValue, GetTime = GetTotemInfo, SetValue, GetTime - -local Abbrev = function(name) - return (string.len(name) > 10) and string.gsub(name, "%s*(.)%S*%s*", "%1. ") or name -end -local function TotemOnClick(self,...) - local id = self.ID - local mouse = ... ---~ print(id, mouse) - if IsShiftKeyDown() then - for j = 1,4 do - DestroyTotem(j) - end - else - DestroyTotem(id) - end -end - -local function InitDestroy(self) - local totem = self.TotemBar - for i = 1 , 4 do - local Destroy = CreateFrame("Button",nil, totem[i]) - Destroy:SetAllPoints(totem[i]) - Destroy:RegisterForClicks("LeftButtonUp", "RightButtonUp") - Destroy.ID = i - Destroy:SetScript("OnClick", TotemOnClick) - end -end -local function UpdateSlot(self, slot) - local totem = self.TotemBar - - - local haveTotem, name, startTime, duration, totemIcon = GetTotemInfo(slot) - - totem[slot]:SetStatusBarColor(unpack(totem.colors[slot])) - totem[slot]:SetValue(0) - - -- Multipliers - if (totem[slot].bg.multiplier) then - local mu = totem[slot].bg.multiplier - local r, g, b = totem[slot]:GetStatusBarColor() - r, g, b = r*mu, g*mu, b*mu - totem[slot].bg:SetVertexColor(r, g, b) - end - - totem[slot].ID = slot - - -- If we have a totem then set his value - if(haveTotem) then - - if totem[slot].Name then - totem[slot].Name:SetText(Abbrev(name)) - end - if(duration > 0) then - totem[slot]:SetValue(1 - ((GetTime() - startTime) / duration)) - -- Status bar update - totem[slot]:SetScript("OnUpdate",function(self,elapsed) - total = total + elapsed - if total >= delay then - total = 0 - haveTotem, name, startTime, duration, totemIcon = GetTotemInfo(self.ID) - if ((GetTime() - startTime) == 0) then - self:SetValue(0) - else - self:SetValue(1 - ((GetTime() - startTime) / duration)) - end - end - end) - else - -- There's no need to update because it doesn't have any duration - totem[slot]:SetScript("OnUpdate",nil) - totem[slot]:SetValue(0) - end - else - -- No totem = no time - if totem[slot].Name then - totem[slot].Name:SetText(" ") - end - totem[slot]:SetValue(0) - end - -end - -local function Update(self, unit) - -- Update every slot on login, still have issues with it - for i = 1, 4 do - UpdateSlot(self, i) - end -end - -local function Event(self,event,...) - if event == "PLAYER_TOTEM_UPDATE" then - UpdateSlot(self, ...) - end -end - -local function Enable(self, unit) - local totem = self.TotemBar - - if(totem) then - self:RegisterEvent("PLAYER_TOTEM_UPDATE" , Event, true) - totem.colors = setmetatable(totem.colors or {}, {__index = colors}) - delay = totem.delay or delay - if totem.Destroy then - InitDestroy(self) - end - TotemFrame:UnregisterAllEvents() - return true - end -end - -local function Disable(self,unit) - local totem = self.TotemBar - if(totem) then - self:UnregisterEvent("PLAYER_TOTEM_UPDATE", Event) - - TotemFrame:Show() - end -end - -oUF:AddElement("TotemBar",Update,Enable,Disable) - diff --git a/Tukui/modules/unitframes/plugins/oUF_TotemBar/oUF_TotemBar.toc b/Tukui/modules/unitframes/plugins/oUF_TotemBar/oUF_TotemBar.toc deleted file mode 100644 index f9e2021..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_TotemBar/oUF_TotemBar.toc +++ /dev/null @@ -1,8 +0,0 @@ -## Interface: 30300 -## Author: Soeters -## Version: r4 -## Title: oUF TotemBar -## Notes: Totem bars support for oUF layouts. -## Dependencies: oUF - -oUF_TotemBar.lua diff --git a/Tukui/modules/unitframes/plugins/oUF_Trinkets/oUF_Trinkets.lua b/Tukui/modules/unitframes/plugins/oUF_Trinkets/oUF_Trinkets.lua deleted file mode 100644 index 6017f33..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_Trinkets/oUF_Trinkets.lua +++ /dev/null @@ -1,122 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if C.unitframes.enable ~= true or C.arena.unitframes ~= true then return end - -local _, ns = ... -local oUF = ns.oUF -assert(oUF, 'oUF not loaded') - -local arenaFrame = {} -local arenaGUID = {} -local usedTrinkets = {} -local trinketFrame = {} - -local TrinketUpdate = function(self, elapsed) - if self.endTime < GetTime() then - usedTrinkets[self.guid] = false - local unit = arenaGUID[self.guid] - if unit and arenaFrame[unit] then - if arenaFrame[unit].Trinket.trinketUpAnnounce then - SendChatMessage("Trinket ready: "..UnitName(unit).." "..UnitClass(unit), "PARTY") - end - end - self:SetScript("OnUpdate", nil) - end -end - -local GetTrinketIcon = function(unit) - if UnitFactionGroup(unit) == "Horde" then - return UnitLevel(unit) == 80 and "Interface\\Icons\\INV_Jewelry_Necklace_38" or "Interface\\Icons\\INV_Jewelry_TrinketPVP_02" - else - return UnitLevel(unit) == 80 and "Interface\\Icons\\INV_Jewelry_Necklace_37" or "Interface\\Icons\\INV_Jewelry_TrinketPVP_01" - end -end - -local TrinketUsed = function(guid, time) - local message - local unit = arenaGUID[guid] - if unit and arenaFrame[unit] then - CooldownFrame_SetTimer(arenaFrame[unit].Trinket.cooldownFrame, GetTime(), time, 1) - if arenaFrame[unit].Trinket.trinketUseAnnounce then - message = time == 120 and "Trinket used: " or "WotF used: " - SendChatMessage(message..UnitName(unit).." "..UnitClass(unit), "PARTY") - end - end - usedTrinkets[guid] = true - if not trinketFrame[guid] then - trinketFrame[guid] = CreateFrame("Frame") - end - trinketFrame[guid].endTime = GetTime() + time - trinketFrame[guid].guid = guid - trinketFrame[guid]:SetScript("OnUpdate", TrinketUpdate) -end - -local Update = function(self, event, ...) - if event == "COMBAT_LOG_EVENT_UNFILTERED" then - local timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellID, spellName - - if T.toc < 40200 then - timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, spellID, spellName = ... - else - timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellID, spellName = ... - end - - if eventType == "SPELL_CAST_SUCCESS" then - -- enemy trinket usage - if spellID == 59752 or spellID == 42292 then - TrinketUsed(sourceGUID, 120) - end - -- WotF - if spellID == 7744 then - TrinketUsed(sourceGUID, 30) - end - end - elseif event == "ARENA_OPPONENT_UPDATE" then - local unit, type = ... - if type == "seen" then - if UnitExists(unit) and UnitIsPlayer(unit) and arenaFrame[unit] then - arenaGUID[UnitGUID(unit)] = unit - arenaFrame[unit].Trinket.Icon:SetTexture(GetTrinketIcon(unit)) - end - end - elseif event == "PLAYER_ENTERING_WORLD" then - for k, v in pairs(trinketFrame) do - v:SetScript("OnUpdate", nil) - end - for k, v in pairs(arenaFrame) do - CooldownFrame_SetTimer(v.Trinket.cooldownFrame, 1, 1, 1) - end - arenaGUID = {} - usedTrinkets = {} - trinketFrame = {} - end -end - -local frame = CreateFrame("Frame") -frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") -frame:RegisterEvent("ARENA_OPPONENT_UPDATE") -frame:RegisterEvent("PLAYER_ENTERING_WORLD") -frame:SetScript("OnEvent", Update) - -oUF.Tags['[trinket]'] = function(unit) - if usedTrinkets[UnitGUID(unit)] or not UnitIsPlayer(unit) then return end - return string.format("|T%s:20:20:0:0|t", GetTrinketIcon(unit)) -end - -local Enable = function(self) - if self.Trinket then - self.Trinket.cooldownFrame = CreateFrame("Cooldown", nil, self.Trinket) - self.Trinket.cooldownFrame:SetAllPoints(self.Trinket) - self.Trinket.Icon = self.Trinket:CreateTexture(nil, "BORDER") - self.Trinket.Icon:SetAllPoints(self.Trinket) - self.Trinket.Icon:SetTexCoord(0.07, 0.93, 0.07, 0.93) - arenaFrame[self.unit] = self - end -end - -local Disable = function(self) - if self.Trinket then - arenaFrame[self.unit] = nil - end -end - -oUF:AddElement('Trinket', function() return end, Enable, Disable) \ No newline at end of file diff --git a/Tukui/modules/unitframes/plugins/oUF_Trinkets/oUF_Trinkets.toc b/Tukui/modules/unitframes/plugins/oUF_Trinkets/oUF_Trinkets.toc deleted file mode 100644 index d331932..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_Trinkets/oUF_Trinkets.toc +++ /dev/null @@ -1,9 +0,0 @@ -## Interface: 30300 -## Title: oUF Trinkets -## Notes: Adds PvP trinket status to oUF frames. -## Author: Allez -## Version: 30300.4-Beta -## X-Category: oUF -## Dependencies: oUF - -oUF_Trinkets.lua \ No newline at end of file diff --git a/Tukui/modules/unitframes/plugins/oUF_WeakenedSoul/oUF_WeakenedSoul.lua b/Tukui/modules/unitframes/plugins/oUF_WeakenedSoul/oUF_WeakenedSoul.lua deleted file mode 100644 index 86e870e..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_WeakenedSoul/oUF_WeakenedSoul.lua +++ /dev/null @@ -1,75 +0,0 @@ -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if select(2, UnitClass('player')) ~= "PRIEST" then return end - -local _, ns = ... -local oUF = ns.oUF or oUF -assert(oUF, 'oUF_WeakenedSoul was unable to locate oUF install') - -local function GetDebuffInfo(unit) - if not UnitCanAssist('player', unit) then return end - - local i = 1 - repeat - local _, _, _, _, _, _, _, _, _, _, spellId = UnitAura(unit, i, 'HARMFUL') - - if spellId == 6788 then - return true - end - - i = i + 1 - until not spellId -end - -local function UpdateBar(self, event, unit) - local duration = self.dur - local timeLeft = self.exp-GetTime() - local value - if timeLeft == 0 then - value = 0 - else - value = (timeLeft * 100) / duration - end - - self:SetValue(value) -end - -local function Update(self, event, unit) - if self.unit ~= unit then return end - - local ws = self.WeakenedSoul - - if ws.PreUpdate then ws:PreUpdate(unit) end - - if GetDebuffInfo(unit) then - local _, _, _, _, _, duration, expirationTime = UnitDebuff(unit, GetSpellInfo(6788)) - ws.dur = duration - ws.exp = expirationTime - ws:Show() - ws:SetScript("OnUpdate", UpdateBar) - else - ws:Hide() - ws:SetScript("OnUpdate", nil) - end - - if ws.PostUpdate then ws:PostUpdate(unit) end -end - -local function Enable(self) - local ws = self.WeakenedSoul - if ws then - self:RegisterEvent("UNIT_AURA", Update) - ws:SetMinMaxValues(0, 100) - - ws.unit = self.unit - - return true - end -end - -local function Disable(self) - if self.WeakenedSoul then - self:UnregisterEvent('UNIT_AURA', Update) - end -end - -oUF:AddElement('WeakenedSoul', Update, Enable, Disable) \ No newline at end of file diff --git a/Tukui/modules/unitframes/plugins/oUF_WeakenedSoul/oUF_WeakenedSoul.toc b/Tukui/modules/unitframes/plugins/oUF_WeakenedSoul/oUF_WeakenedSoul.toc deleted file mode 100644 index 32e1464..0000000 --- a/Tukui/modules/unitframes/plugins/oUF_WeakenedSoul/oUF_WeakenedSoul.toc +++ /dev/null @@ -1,9 +0,0 @@ -## Interface: 40000 -## Title: oUF Weakened Soul -## Notes: Adds a status bar to watch Weakened Soul time left to oUF frames units. -## Author: Tukz -## Version: 1 -## X-Category: oUF -## Dependencies: oUF - -oUF_WeakenedSoul.lua \ No newline at end of file diff --git a/Tukui/modules/unitframes/tags/tags.lua b/Tukui/modules/unitframes/tags/tags.lua deleted file mode 100644 index e4e074d..0000000 --- a/Tukui/modules/unitframes/tags/tags.lua +++ /dev/null @@ -1,161 +0,0 @@ -local ADDON_NAME, ns = ... -local oUF = ns.oUF or oUF -assert(oUF, "Tukui was unable to locate oUF install.") - -local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["unitframes"].enable == true then return end - ------------------------------------------------------------------------- --- Tags ------------------------------------------------------------------------- - -local function ShortenValue(value) - if(value >= 1e6) then - return ('%.2fm'):format(value / 1e6):gsub('%.?0+([km])$', '%1') - elseif(value >= 1e4) then - return ('%.1fk'):format(value / 1e3):gsub('%.?0+([km])$', '%1') - else - return value - end -end - -oUF.TagEvents['Tukui:threat'] = 'UNIT_THREAT_LIST_UPDATE' -oUF.Tags['Tukui:threat'] = function(unit) - local tanking, status, percent = UnitDetailedThreatSituation('player', 'target') - if(percent and percent > 0) then - return ('%s%d%%|r'):format(Hex(GetThreatStatusColor(status)), percent) - end -end - -oUF.Tags['Tukui:health'] = function(unit) - local min, max = UnitHealth(unit), UnitHealthMax(unit) - local status = not UnitIsConnected(unit) and 'Offline' or UnitIsGhost(unit) and 'Ghost' or UnitIsDead(unit) and 'Dead' - - if(status) then - return status - elseif(unit == 'target' and UnitCanAttack('player', unit)) then - return ('%s (%d|cff0090ff%%|r)'):format(ShortenValue(min), min / max * 100) - elseif(unit == 'player' and min ~= max) then - return ('|cffff8080%d|r %d|cff0090ff%%|r'):format(min - max, min / max * 100) - elseif(min ~= max) then - return ('%s |cff0090ff/|r %s'):format(ShortenValue(min), ShortenValue(max)) - else - return max - end -end - -oUF.Tags['Tukui:power'] = function(unit) - local power = UnitPower(unit) - if(power > 0 and not UnitIsDeadOrGhost(unit)) then - local _, type = UnitPowerType(unit) - local colors = _COLORS.power - return ('%s%d|r'):format(Hex(colors[type] or colors['RUNES']), power) - end -end - -oUF.Tags['Tukui:druid'] = function(unit) - local min, max = UnitPower(unit, 0), UnitPowerMax(unit, 0) - if(UnitPowerType(unit) ~= 0 and min ~= max) then - return ('|cff0090ff%d%%|r'):format(min / max * 100) - end -end - -oUF.TagEvents['Tukui:diffcolor'] = 'UNIT_LEVEL' -oUF.Tags['Tukui:diffcolor'] = function(unit) - local r, g, b - local level = UnitLevel(unit) - if (level < 1) then - r, g, b = 0.69, 0.31, 0.31 - else - local DiffColor = UnitLevel('target') - UnitLevel('player') - if (DiffColor >= 5) then - r, g, b = 0.69, 0.31, 0.31 - elseif (DiffColor >= 3) then - r, g, b = 0.71, 0.43, 0.27 - elseif (DiffColor >= -2) then - r, g, b = 0.84, 0.75, 0.65 - elseif (-DiffColor <= GetQuestGreenRange()) then - r, g, b = 0.33, 0.59, 0.33 - else - r, g, b = 0.55, 0.57, 0.61 - end - end - return string.format('|cff%02x%02x%02x', r * 255, g * 255, b * 255) -end - -local utf8sub = function(string, i, dots) - if not string then return end - local bytes = string:len() - if (bytes <= i) then - return string - else - local len, pos = 0, 1 - while(pos <= bytes) do - len = len + 1 - local c = string:byte(pos) - if (c > 0 and c <= 127) then - pos = pos + 1 - elseif (c >= 192 and c <= 223) then - pos = pos + 2 - elseif (c >= 224 and c <= 239) then - pos = pos + 3 - elseif (c >= 240 and c <= 247) then - pos = pos + 4 - end - if (len == i) then break end - end - - if (len == i and pos <= bytes) then - return string:sub(1, pos - 1)..(dots and '...' or '') - else - return string - end - end -end - - -oUF.TagEvents['Tukui:getnamecolor'] = 'UNIT_POWER' -oUF.Tags['Tukui:getnamecolor'] = function(unit) - local reaction = UnitReaction(unit, 'player') - if (UnitIsPlayer(unit)) then - return _TAGS['raidcolor'](unit) - elseif (reaction) then - local c = T.UnitColor.reaction[reaction] - return string.format('|cff%02x%02x%02x', c[1] * 255, c[2] * 255, c[3] * 255) - else - r, g, b = .84,.75,.65 - return string.format('|cff%02x%02x%02x', r * 255, g * 255, b * 255) - end -end - -oUF.TagEvents['Tukui:nameshort'] = 'UNIT_NAME_UPDATE' -oUF.Tags['Tukui:nameshort'] = function(unit) - local name = UnitName(unit) - return utf8sub(name, 10, false) -end - -oUF.TagEvents['Tukui:namemedium'] = 'UNIT_NAME_UPDATE' -oUF.Tags['Tukui:namemedium'] = function(unit) - local name = UnitName(unit) - return utf8sub(name, 15, true) -end - -oUF.TagEvents['Tukui:namelong'] = 'UNIT_NAME_UPDATE' -oUF.Tags['Tukui:namelong'] = function(unit) - local name = UnitName(unit) - return utf8sub(name, 20, true) -end - -oUF.TagEvents['Tukui:dead'] = 'UNIT_HEALTH' -oUF.Tags['Tukui:dead'] = function(unit) - if UnitIsDeadOrGhost(unit) then - return L.unitframes_ouf_deaddps - end -end - -oUF.TagEvents['Tukui:afk'] = 'PLAYER_FLAGS_CHANGED' -oUF.Tags['Tukui:afk'] = function(unit) - if UnitIsAFK(unit) then - return CHAT_FLAG_AFK - end -end \ No newline at end of file diff --git a/Tukui/modules/unitframes/templates/colors.lua b/Tukui/modules/unitframes/templates/colors.lua deleted file mode 100644 index 1c24082..0000000 --- a/Tukui/modules/unitframes/templates/colors.lua +++ /dev/null @@ -1,56 +0,0 @@ -local ADDON_NAME, ns = ... -local oUF = ns.oUF or oUF -assert(oUF, "Tukui was unable to locate oUF install.") - -local T, C, L = unpack(select(2, ...)) - ------------------------------------------------------------------------- --- Colors ------------------------------------------------------------------------- - -T.UnitColor = setmetatable({ - tapped = {0.55, 0.57, 0.61}, - disconnected = {0.84, 0.75, 0.65}, - power = setmetatable({ - ["MANA"] = {0.31, 0.45, 0.63}, - ["RAGE"] = {0.69, 0.31, 0.31}, - ["FOCUS"] = {0.71, 0.43, 0.27}, - ["ENERGY"] = {0.65, 0.63, 0.35}, - ["RUNES"] = {0.55, 0.57, 0.61}, - ["RUNIC_POWER"] = {0, 0.82, 1}, - ["AMMOSLOT"] = {0.8, 0.6, 0}, - ["FUEL"] = {0, 0.55, 0.5}, - ["POWER_TYPE_STEAM"] = {0.55, 0.57, 0.61}, - ["POWER_TYPE_PYRITE"] = {0.60, 0.09, 0.17}, - }, {__index = oUF.colors.power}), - runes = setmetatable({ - [1] = {.69,.31,.31}, - [2] = {.33,.59,.33}, - [3] = {.31,.45,.63}, - [4] = {.84,.75,.65}, - }, {__index = oUF.colors.runes}), - reaction = setmetatable({ - [1] = { 222/255, 95/255, 95/255 }, -- Hated - [2] = { 222/255, 95/255, 95/255 }, -- Hostile - [3] = { 222/255, 95/255, 95/255 }, -- Unfriendly - [4] = { 218/255, 197/255, 92/255 }, -- Neutral - [5] = { 75/255, 175/255, 76/255 }, -- Friendly - [6] = { 75/255, 175/255, 76/255 }, -- Honored - [7] = { 75/255, 175/255, 76/255 }, -- Revered - [8] = { 75/255, 175/255, 76/255 }, -- Exalted - }, {__index = oUF.colors.reaction}), - class = setmetatable({ - ["DEATHKNIGHT"] = { 196/255, 30/255, 60/255 }, - ["DRUID"] = { 255/255, 125/255, 10/255 }, - ["HUNTER"] = { 171/255, 214/255, 116/255 }, - ["MAGE"] = { 104/255, 205/255, 255/255 }, - ["PALADIN"] = { 245/255, 140/255, 186/255 }, - ["PRIEST"] = { 212/255, 212/255, 212/255 }, - ["ROGUE"] = { 255/255, 243/255, 82/255 }, - ["SHAMAN"] = { 41/255, 79/255, 155/255 }, - ["WARLOCK"] = { 148/255, 130/255, 201/255 }, - ["WARRIOR"] = { 199/255, 156/255, 110/255 }, - }, {__index = oUF.colors.class}), -}, {__index = oUF.colors}) - -T.ColorTemplate = T.UnitColor \ No newline at end of file diff --git a/Tukui/modules/unitframes/templates/tankassist.xml b/Tukui/modules/unitframes/templates/tankassist.xml deleted file mode 100644 index f18a463..0000000 --- a/Tukui/modules/unitframes/templates/tankassist.xml +++ /dev/null @@ -1,39 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Button name="oUF_TukuiMtt" inherits="SecureUnitButtonTemplate" hidden="true" virtual="true"> - <Frames> - - <Button name="$parentTarget" inherits="SecureUnitButtonTemplate"> - <Anchors> - <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parent"> - <Offset> - <AbsDimension x="5" y="0"/> - </Offset> - </Anchor> - </Anchors> - <Attributes> - <Attribute name="unitsuffix" type="string" value="target"/> - <Attribute name="useparent-unit" type="boolean" value="true"/> - <Attribute name="type1" type="string" value="target"/> - <Attribute name="initial-unitWatch" type="boolean" value="true"/> - </Attributes> - </Button> - - <Button name="$parentTargetTarget" inherits="SecureUnitButtonTemplate"> - <Anchors> - <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parentTarget"> - <Offset> - <AbsDimension x="5" y="0"/> - </Offset> - </Anchor> - </Anchors> - <Attributes> - <Attribute name="unitsuffix" type="string" value="targettarget"/> - <Attribute name="useparent-unit" type="boolean" value="true"/> - <Attribute name="type1" type="string" value="targettarget"/> - <Attribute name="initial-unitWatch" type="boolean" value="true"/> - </Attributes> - </Button> - - </Frames> - </Button> -</Ui> \ No newline at end of file diff --git a/Tukui_Raid/Tukui_Raid.toc b/Tukui_Raid/Tukui_Raid.toc deleted file mode 100644 index 245afab..0000000 --- a/Tukui_Raid/Tukui_Raid.toc +++ /dev/null @@ -1,10 +0,0 @@ -## Interface: 40300 -## Author: Tukz -## Title: |cffC495DDTukui Raid|r -## Notes: Raid layout for party and raid, DPS/Tank mode. -## X-Email: tukz@tukui.org -## X-Category: UnitFrame -## RequiredDeps: Tukui - -oUF_Tukz_Raid01_25.lua -oUF_Tukz_Raid40.lua diff --git a/Tukui_Raid/oUF_Tukz_Raid01_25.lua b/Tukui_Raid/oUF_Tukz_Raid01_25.lua deleted file mode 100644 index 1c4d3b6..0000000 --- a/Tukui_Raid/oUF_Tukz_Raid01_25.lua +++ /dev/null @@ -1,194 +0,0 @@ -local ADDON_NAME, ns = ... -local oUF = oUFTukui or oUF -assert(oUF, "Tukui was unable to locate oUF install.") - -ns._Objects = {} -ns._Headers = {} - -local T, C, L = unpack(Tukui) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["unitframes"].enable == true then return end - -local font2 = C["media"].uffont -local font1 = C["media"].font -local backdrop = { - bgFile = C["media"].blank, - insets = {top = -T.mult, left = -T.mult, bottom = -T.mult, right = -T.mult}, -} - -local function Shared(self, unit) - self.colors = T.UnitColor - self:RegisterForClicks("AnyUp") - self:SetScript('OnEnter', UnitFrame_OnEnter) - self:SetScript('OnLeave', UnitFrame_OnLeave) - - self.menu = T.SpawnMenu - - self:SetBackdrop({bgFile = C["media"].blank, insets = {top = -T.mult, left = -T.mult, bottom = -T.mult, right = -T.mult}}) - self:SetBackdropColor(0.1, 0.1, 0.1) - - local health = CreateFrame('StatusBar', nil, self) - health:Height(12) - health:SetPoint("TOPLEFT") - health:SetPoint("TOPRIGHT") - health:SetStatusBarTexture(C["media"].normTex) - self.Health = health - - health.bg = self.Health:CreateTexture(nil, 'BORDER') - health.bg:SetAllPoints(self.Health) - health.bg:SetTexture(C["media"].blank) - health.bg:SetTexture(0.3, 0.3, 0.3) - health.bg.multiplier = (0.3) - self.Health.bg = health.bg - - health.PostUpdate = T.PostUpdatePetColor - health.frequentUpdates = true - - if C.unitframes.unicolor == true then - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - health.bg:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorClass = true - health.colorReaction = true - end - - local power = CreateFrame("StatusBar", nil, self) - power:Height(3) - power:Point("TOPLEFT", health, "BOTTOMLEFT", 0, -1) - power:SetPoint("TOPRIGHT", health, "BOTTOMRIGHT", 0, -1) - power:SetStatusBarTexture(C["media"].normTex) - self.Power = power - - power.frequentUpdates = true - power.colorDisconnected = true - - power.bg = self.Power:CreateTexture(nil, "BORDER") - power.bg:SetAllPoints(power) - power.bg:SetTexture(C["media"].normTex) - power.bg:SetAlpha(1) - power.bg.multiplier = 0.4 - self.Power.bg = power.bg - - if C.unitframes.unicolor == true then - power.colorClass = true - power.bg.multiplier = 0.1 - else - power.colorPower = true - end - - local name = health:CreateFontString(nil, 'OVERLAY') - name:SetFont(font2, 13*T.raidscale, "THINOUTLINE") - name:Point("LEFT", self, "RIGHT", 5, 0) - self:Tag(name, '[Tukui:namemedium] [Tukui:dead][Tukui:afk]') - self.Name = name - - if C["unitframes"].showsymbols == true then - RaidIcon = health:CreateTexture(nil, 'OVERLAY') - RaidIcon:Height(14*T.raidscale) - RaidIcon:Width(14*T.raidscale) - RaidIcon:SetPoint("CENTER", self, "CENTER") - RaidIcon:SetTexture("Interface\\AddOns\\Tukui\\medias\\textures\\raidicons.blp") -- thx hankthetank for texture - self.RaidIcon = RaidIcon - end - - if C["unitframes"].aggro == true then - table.insert(self.__elements, T.UpdateThreat) - self:RegisterEvent('PLAYER_TARGET_CHANGED', T.UpdateThreat) - self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', T.UpdateThreat) - self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', T.UpdateThreat) - end - - local LFDRole = health:CreateTexture(nil, "OVERLAY") - LFDRole:Height(6*T.raidscale) - LFDRole:Width(6*T.raidscale) - LFDRole:Point("TOPLEFT", 2, -2) - LFDRole:SetTexture("Interface\\AddOns\\Tukui\\medias\\textures\\lfdicons.blp") - self.LFDRole = LFDRole - - local ReadyCheck = health:CreateTexture(nil, "OVERLAY") - ReadyCheck:Height(12*T.raidscale) - ReadyCheck:Width(12*T.raidscale) - ReadyCheck:SetPoint('CENTER') - self.ReadyCheck = ReadyCheck - - --local picon = self.Health:CreateTexture(nil, 'OVERLAY') - --picon:SetPoint('CENTER', self.Health) - --picon:SetSize(16, 16) - --picon:SetTexture[[Interface\AddOns\Tukui\media\textures\picon]] - --picon.Override = T.Phasing - --self.PhaseIcon = picon - - self.DebuffHighlightAlpha = 1 - self.DebuffHighlightBackdrop = true - self.DebuffHighlightFilter = true - - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - - if C["unitframes"].showrange == true then - local range = {insideAlpha = 1, outsideAlpha = C["unitframes"].raidalphaoor} - self.Range = range - end - - return self -end - -oUF:RegisterStyle('TukuiDpsP05R10R15R25', Shared) -oUF:Factory(function(self) - oUF:SetActiveStyle("TukuiDpsP05R10R15R25") - - local raid = self:SpawnHeader("TukuiRaid25", nil, "custom [@raid26,exists] hide;show", - 'oUF-initialConfigFunction', [[ - local header = self:GetParent() - self:SetWidth(header:GetAttribute('initial-width')) - self:SetHeight(header:GetAttribute('initial-height')) - ]], - 'initial-width', T.Scale(120*T.raidscale), - 'initial-height', T.Scale(16*T.raidscale), - "showParty", true, "showPlayer", C["unitframes"].showplayerinparty, "showRaid", true, "groupFilter", "1,2,3,4,5,6,7,8", "groupingOrder", "1,2,3,4,5,6,7,8", "groupBy", "GROUP", "yOffset", T.Scale(-3) - ) - raid:SetPoint('TOPLEFT', UIParent, 15, -350*T.raidscale) - - local pets = {} - pets[1] = oUF:Spawn('partypet1', 'oUF_TukuiPartyPet1') - pets[1]:SetPoint('TOPLEFT', raid, 'TOPLEFT', 0, -120*T.raidscale) - pets[1]:Size(120*T.raidscale, 16*T.raidscale) - for i =2, 4 do - pets[i] = oUF:Spawn('partypet'..i, 'oUF_TukuiPartyPet'..i) - pets[i]:SetPoint('TOP', pets[i-1], 'BOTTOM', 0, -8) - pets[i]:Size(120*T.raidscale, 16*T.raidscale) - end - - local RaidMove = CreateFrame("Frame") - RaidMove:RegisterEvent("PLAYER_LOGIN") - RaidMove:RegisterEvent("RAID_ROSTER_UPDATE") - RaidMove:RegisterEvent("PARTY_LEADER_CHANGED") - RaidMove:RegisterEvent("PARTY_MEMBERS_CHANGED") - RaidMove:SetScript("OnEvent", function(self) - if InCombatLockdown() then - self:RegisterEvent("PLAYER_REGEN_ENABLED") - else - self:UnregisterEvent("PLAYER_REGEN_ENABLED") - local numraid = GetNumRaidMembers() - local numparty = GetNumPartyMembers() - if numparty > 0 and numraid == 0 or numraid > 0 and numraid <= 5 then - raid:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 15, -399*T.raidscale) - for i,v in ipairs(pets) do v:Enable() end - elseif numraid > 5 and numraid < 11 then - raid:SetPoint('TOPLEFT', UIParent, 15, -350*T.raidscale) - for i,v in ipairs(pets) do v:Disable() end - elseif numraid > 10 and numraid < 16 then - raid:SetPoint('TOPLEFT', UIParent, 15, -280*T.raidscale) - for i,v in ipairs(pets) do v:Disable() end - elseif numraid > 15 and numraid < 26 then - raid:SetPoint('TOPLEFT', UIParent, 15, -172*T.raidscale) - for i,v in ipairs(pets) do v:Disable() end - elseif numraid > 25 then - for i,v in ipairs(pets) do v:Disable() end - end - end - end) -end) \ No newline at end of file diff --git a/Tukui_Raid/oUF_Tukz_Raid40.lua b/Tukui_Raid/oUF_Tukz_Raid40.lua deleted file mode 100644 index 7776357..0000000 --- a/Tukui_Raid/oUF_Tukz_Raid40.lua +++ /dev/null @@ -1,122 +0,0 @@ -local ADDON_NAME, ns = ... -local oUF = oUFTukui or oUF -assert(oUF, "Tukui was unable to locate oUF install.") - -ns._Objects = {} -ns._Headers = {} - -local T, C, L = unpack(Tukui) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["unitframes"].enable == true then return end - -local font2 = C["media"].uffont -local font1 = C["media"].font -local backdrop = { - bgFile = C["media"].blank, - insets = {top = -T.mult, left = -T.mult, bottom = -T.mult, right = -T.mult}, -} - -local function Shared(self, unit) - self.colors = T.UnitColor - self:RegisterForClicks("AnyUp") - self:SetScript('OnEnter', UnitFrame_OnEnter) - self:SetScript('OnLeave', UnitFrame_OnLeave) - - self.menu = T.SpawnMenu - - self:SetBackdrop({bgFile = C["media"].blank, insets = {top = -T.mult, left = -T.mult, bottom = -T.mult, right = -T.mult}}) - self:SetBackdropColor(0.1, 0.1, 0.1) - - local health = CreateFrame('StatusBar', nil, self) - health:SetAllPoints(self) - health:SetStatusBarTexture(C["media"].normTex) - self.Health = health - - health.bg = self.Health:CreateTexture(nil, 'BORDER') - health.bg:SetAllPoints(self.Health) - health.bg:SetTexture(C["media"].blank) - health.bg:SetTexture(0.3, 0.3, 0.3) - health.bg.multiplier = (0.3) - - self.Health.bg = health.bg - - health.PostUpdate = T.PostUpdatePetColor - health.frequentUpdates = true - - if C.unitframes.unicolor == true then - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - health.bg:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorClass = true - health.colorReaction = true - end - - local name = health:CreateFontString(nil, 'OVERLAY') - name:SetFont(font2, 13*T.raidscale, "THINOUTLINE") - name:Point("LEFT", self, "RIGHT", 5, 0) - self:Tag(name, '[Tukui:namemedium] [Tukui:dead][Tukui:afk]') - self.Name = name - - if C["unitframes"].showsymbols == true then - RaidIcon = health:CreateTexture(nil, 'OVERLAY') - RaidIcon:Height(14*T.raidscale) - RaidIcon:Width(14*T.raidscale) - RaidIcon:SetPoint("CENTER", self, "CENTER") - RaidIcon:SetTexture("Interface\\AddOns\\Tukui\\medias\\textures\\raidicons.blp") -- thx hankthetank for texture - self.RaidIcon = RaidIcon - end - - if C["unitframes"].aggro == true then - table.insert(self.__elements, T.UpdateThreat) - self:RegisterEvent('PLAYER_TARGET_CHANGED', T.UpdateThreat) - self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', T.UpdateThreat) - self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', T.UpdateThreat) - end - - local ReadyCheck = health:CreateTexture(nil, "OVERLAY") - ReadyCheck:Height(12*T.raidscale) - ReadyCheck:Width(12*T.raidscale) - ReadyCheck:SetPoint('CENTER') - self.ReadyCheck = ReadyCheck - - --local picon = self.Health:CreateTexture(nil, 'OVERLAY') - --picon:SetPoint('CENTER', self.Health) - --picon:SetSize(16, 16) - --picon:SetTexture[[Interface\AddOns\Tukui\medias\textures\picon]] - --picon.Override = T.Phasing - --self.PhaseIcon = picon - - self.DebuffHighlightAlpha = 1 - self.DebuffHighlightBackdrop = true - self.DebuffHighlightFilter = true - - if C["unitframes"].showsmooth == true then - health.Smooth = true - end - - if C["unitframes"].showrange == true then - local range = {insideAlpha = 1, outsideAlpha = C["unitframes"].raidalphaoor} - self.Range = range - end - - return self -end - -oUF:RegisterStyle('TukuiDpsR40', Shared) -oUF:Factory(function(self) - oUF:SetActiveStyle("TukuiDpsR40") - - local raid = self:SpawnHeader("TukuiRaid40", nil, "custom [@raid26,exists] show;hide", - 'oUF-initialConfigFunction', [[ - local header = self:GetParent() - self:SetWidth(header:GetAttribute('initial-width')) - self:SetHeight(header:GetAttribute('initial-height')) - ]], - 'initial-width', T.Scale(100*T.raidscale), - 'initial-height', T.Scale(12*T.raidscale), - "showRaid", true, "groupFilter", "1,2,3,4,5,6,7,8", "groupingOrder", "1,2,3,4,5,6,7,8", "groupBy", "GROUP", "yOffset", T.Scale(-3) - ) - raid:SetPoint('TOPLEFT', UIParent, 15, -18) -end) \ No newline at end of file diff --git a/Tukui_Raid_Healing/Tukui_Raid_Healing.toc b/Tukui_Raid_Healing/Tukui_Raid_Healing.toc deleted file mode 100644 index 49229e9..0000000 --- a/Tukui_Raid_Healing/Tukui_Raid_Healing.toc +++ /dev/null @@ -1,10 +0,0 @@ -## Interface: 40300 -## Author: Tukz -## Title: |cffC495DDTukui Raid for healers|r -## Notes: Raid layout for party and raid, Healer mode. -## X-Email: tukz@tukui.org -## X-Category: UnitFrame -## RequiredDeps: Tukui - -oUF_hTukz_Raid01_15.lua -oUF_hTukz_Raid16_40.lua \ No newline at end of file diff --git a/Tukui_Raid_Healing/oUF_hTukz_Raid01_15.lua b/Tukui_Raid_Healing/oUF_hTukz_Raid01_15.lua deleted file mode 100644 index fc3f1a9..0000000 --- a/Tukui_Raid_Healing/oUF_hTukz_Raid01_15.lua +++ /dev/null @@ -1,260 +0,0 @@ -local ADDON_NAME, ns = ... -local oUF = oUFTukui or oUF -assert(oUF, "Tukui was unable to locate oUF install.") - -ns._Objects = {} -ns._Headers = {} - -local T, C, L = unpack(Tukui) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["unitframes"].enable == true or C["unitframes"].gridonly == true then return end - -local font2 = C["media"].uffont -local font1 = C["media"].font -local normTex = C["media"].normTex -local backdrop = { - bgFile = C["media"].blank, - insets = {top = -T.mult, left = -T.mult, bottom = -T.mult, right = -T.mult}, -} - -local function Shared(self, unit) - self.colors = T.UnitColor - self:RegisterForClicks("AnyUp") - self:SetScript('OnEnter', UnitFrame_OnEnter) - self:SetScript('OnLeave', UnitFrame_OnLeave) - - self.menu = T.SpawnMenu - - self:SetBackdrop({bgFile = C["media"].blank, insets = {top = -T.mult, left = -T.mult, bottom = -T.mult, right = -T.mult}}) - self:SetBackdropColor(0.1, 0.1, 0.1) - - local health = CreateFrame('StatusBar', nil, self) - health:SetPoint("TOPLEFT") - health:SetPoint("TOPRIGHT") - health:Height(27*T.raidscale) - health:SetStatusBarTexture(normTex) - self.Health = health - - health.bg = health:CreateTexture(nil, 'BORDER') - health.bg:SetAllPoints(health) - health.bg:SetTexture(normTex) - health.bg:SetTexture(0.3, 0.3, 0.3) - health.bg.multiplier = 0.3 - self.Health.bg = health.bg - - health.value = health:CreateFontString(nil, "OVERLAY") - health.value:SetPoint("RIGHT", health, -3, 1) - health.value:SetFont(font2, 12*T.raidscale, "THINOUTLINE") - health.value:SetTextColor(1,1,1) - health.value:SetShadowOffset(1, -1) - self.Health.value = health.value - - health.PostUpdate = T.PostUpdateHealthRaid - - health.frequentUpdates = true - - if C.unitframes.unicolor == true then - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - health.bg:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorClass = true - health.colorReaction = true - end - - local power = CreateFrame("StatusBar", nil, self) - power:Height(4*T.raidscale) - power:Point("TOPLEFT", health, "BOTTOMLEFT", 0, -1) - power:Point("TOPRIGHT", health, "BOTTOMRIGHT", 0, -1) - power:SetStatusBarTexture(normTex) - self.Power = power - - power.frequentUpdates = true - power.colorDisconnected = true - - power.bg = self.Power:CreateTexture(nil, "BORDER") - power.bg:SetAllPoints(power) - power.bg:SetTexture(normTex) - power.bg:SetAlpha(1) - power.bg.multiplier = 0.4 - self.Power.bg = power.bg - - if C.unitframes.unicolor == true then - power.colorClass = true - power.bg.multiplier = 0.1 - else - power.colorPower = true - end - - local name = health:CreateFontString(nil, "OVERLAY") - name:SetPoint("LEFT", health, 3, 0) - name:SetFont(font2, 12*T.raidscale, "THINOUTLINE") - name:SetShadowOffset(1, -1) - self:Tag(name, "[Tukui:namemedium]") - self.Name = name - - local leader = health:CreateTexture(nil, "OVERLAY") - leader:Height(12*T.raidscale) - leader:Width(12*T.raidscale) - leader:SetPoint("TOPLEFT", 0, 6) - self.Leader = leader - - local LFDRole = health:CreateTexture(nil, "OVERLAY") - LFDRole:Height(6*T.raidscale) - LFDRole:Width(6*T.raidscale) - LFDRole:Point("TOPRIGHT", -2, -2) - LFDRole:SetTexture("Interface\\AddOns\\Tukui\\medias\\textures\\lfdicons.blp") - self.LFDRole = LFDRole - - local MasterLooter = health:CreateTexture(nil, "OVERLAY") - MasterLooter:Height(12*T.raidscale) - MasterLooter:Width(12*T.raidscale) - self.MasterLooter = MasterLooter - self:RegisterEvent("PARTY_LEADER_CHANGED", T.MLAnchorUpdate) - self:RegisterEvent("PARTY_MEMBERS_CHANGED", T.MLAnchorUpdate) - - if C["unitframes"].aggro == true then - table.insert(self.__elements, T.UpdateThreat) - self:RegisterEvent('PLAYER_TARGET_CHANGED', T.UpdateThreat) - self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', T.UpdateThreat) - self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', T.UpdateThreat) - end - - if C["unitframes"].showsymbols == true then - local RaidIcon = health:CreateTexture(nil, 'OVERLAY') - RaidIcon:Height(18*T.raidscale) - RaidIcon:Width(18*T.raidscale) - RaidIcon:SetPoint('CENTER', self, 'TOP') - RaidIcon:SetTexture("Interface\\AddOns\\Tukui\\medias\\textures\\raidicons.blp") -- thx hankthetank for texture - self.RaidIcon = RaidIcon - end - - local ReadyCheck = self.Power:CreateTexture(nil, "OVERLAY") - ReadyCheck:Height(12*T.raidscale) - ReadyCheck:Width(12*T.raidscale) - ReadyCheck:SetPoint('CENTER') - self.ReadyCheck = ReadyCheck - - local debuffs = CreateFrame('Frame', nil, self) - debuffs:SetPoint('LEFT', self, 'RIGHT', 4, 0) - debuffs:SetHeight(26) - debuffs:SetWidth(200) - debuffs.size = 26 - debuffs.spacing = 2 - debuffs.initialAnchor = 'LEFT' - debuffs.num = 5 - debuffs.PostCreateIcon = T.PostCreateAura - debuffs.PostUpdateIcon = T.PostUpdateAura - self.Debuffs = debuffs - - self.DebuffHighlightAlpha = 1 - self.DebuffHighlightBackdrop = true - self.DebuffHighlightFilter = true - - --local picon = self.Health:CreateTexture(nil, 'OVERLAY') - --picon:SetPoint('CENTER', self.Health) - --picon:SetSize(16, 16) - --picon:SetTexture[[Interface\AddOns\Tukui\medias\textures\picon]] - --picon.Override = T.Phasing - --self.PhaseIcon = picon - - if C["unitframes"].showrange == true then - local range = {insideAlpha = 1, outsideAlpha = C["unitframes"].raidalphaoor} - self.Range = range - end - - if C["unitframes"].showsmooth == true then - health.Smooth = true - power.Smooth = true - end - - if C["unitframes"].healcomm then - local mhpb = CreateFrame('StatusBar', nil, self.Health) - mhpb:SetPoint('TOPLEFT', self.Health:GetStatusBarTexture(), 'TOPRIGHT', 0, 0) - mhpb:SetPoint('BOTTOMLEFT', self.Health:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0) - mhpb:SetWidth(150*T.raidscale) - mhpb:SetStatusBarTexture(normTex) - mhpb:SetStatusBarColor(0, 1, 0.5, 0.25) - - local ohpb = CreateFrame('StatusBar', nil, self.Health) - ohpb:SetPoint('TOPLEFT', mhpb:GetStatusBarTexture(), 'TOPRIGHT', 0, 0) - ohpb:SetPoint('BOTTOMLEFT', mhpb:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0) - ohpb:SetWidth(150*T.raidscale) - ohpb:SetStatusBarTexture(normTex) - ohpb:SetStatusBarColor(0, 1, 0, 0.25) - - self.HealPrediction = { - myBar = mhpb, - otherBar = ohpb, - maxOverflow = 1, - } - end - - if T.myclass == "PRIEST" and C["unitframes"].weakenedsoulbar then - local ws = CreateFrame("StatusBar", self:GetName().."_WeakenedSoul", power) - ws:SetAllPoints(power) - ws:SetStatusBarTexture(C.media.normTex) - ws:GetStatusBarTexture():SetHorizTile(false) - ws:SetBackdrop(backdrop) - ws:SetBackdropColor(unpack(C.media.backdropcolor)) - ws:SetStatusBarColor(191/255, 10/255, 10/255) - - self.WeakenedSoul = ws - end - - return self -end - -oUF:RegisterStyle('TukuiHealR01R15', Shared) -oUF:Factory(function(self) - oUF:SetActiveStyle("TukuiHealR01R15") - - local raid = self:SpawnHeader("TukuiRaidHealer15", nil, "custom [@raid16,exists] hide;show", - 'oUF-initialConfigFunction', [[ - local header = self:GetParent() - self:SetWidth(header:GetAttribute('initial-width')) - self:SetHeight(header:GetAttribute('initial-height')) - ]], - 'initial-width', T.Scale(150*T.raidscale), - 'initial-height', T.Scale(32*T.raidscale), - "showParty", true, "showPlayer", C["unitframes"].showplayerinparty, "showRaid", true, "groupFilter", "1,2,3,4,5,6,7,8", "groupingOrder", "1,2,3,4,5,6,7,8", "groupBy", "GROUP", "yOffset", T.Scale(-4)) - raid:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 15, -300*T.raidscale) - - local pets = {} - pets[1] = oUF:Spawn('partypet1', 'oUF_TukuiPartyPet1') - pets[1]:SetPoint('TOPLEFT', raid, 'TOPLEFT', 0, -240*T.raidscale) - pets[1]:Size(150*T.raidscale, 32*T.raidscale) - for i =2, 4 do - pets[i] = oUF:Spawn('partypet'..i, 'oUF_TukuiPartyPet'..i) - pets[i]:SetPoint('TOP', pets[i-1], 'BOTTOM', 0, -8) - pets[i]:Size(150*T.raidscale, 32*T.raidscale) - end - - local RaidMove = CreateFrame("Frame") - RaidMove:RegisterEvent("PLAYER_ENTERING_WORLD") - RaidMove:RegisterEvent("RAID_ROSTER_UPDATE") - RaidMove:RegisterEvent("PARTY_LEADER_CHANGED") - RaidMove:RegisterEvent("PARTY_MEMBERS_CHANGED") - RaidMove:SetScript("OnEvent", function(self) - if InCombatLockdown() then - self:RegisterEvent("PLAYER_REGEN_ENABLED") - else - self:UnregisterEvent("PLAYER_REGEN_ENABLED") - local numraid = GetNumRaidMembers() - local numparty = GetNumPartyMembers() - if numparty > 0 and numraid == 0 or numraid > 0 and numraid <= 5 then - raid:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 15, -300*T.raidscale) - for i,v in ipairs(pets) do v:Enable() end - elseif numraid > 5 and numraid <= 10 then - raid:SetPoint('TOPLEFT', UIParent, 15, -260*T.raidscale) - for i,v in ipairs(pets) do v:Disable() end - elseif numraid > 10 and numraid <= 15 then - raid:SetPoint('TOPLEFT', UIParent, 16, -170*T.raidscale) - for i,v in ipairs(pets) do v:Disable() end - elseif numraid > 15 then - for i,v in ipairs(pets) do v:Disable() end - end - end - end) -end) \ No newline at end of file diff --git a/Tukui_Raid_Healing/oUF_hTukz_Raid16_40.lua b/Tukui_Raid_Healing/oUF_hTukz_Raid16_40.lua deleted file mode 100644 index 95f453c..0000000 --- a/Tukui_Raid_Healing/oUF_hTukz_Raid16_40.lua +++ /dev/null @@ -1,356 +0,0 @@ -local ADDON_NAME, ns = ... -local oUF = oUFTukui or oUF -assert(oUF, "Tukui was unable to locate oUF install.") - -ns._Objects = {} -ns._Headers = {} - -local T, C, L = unpack(Tukui) -- Import: T - functions, constants, variables; C - config; L - locales -if not C["unitframes"].enable == true then return end - -local font2 = C["media"].uffont -local font1 = C["media"].font -local normTex = C["media"].normTex -local bdcr, bdcg, bdcb = unpack(C["media"].bordercolor) -local backdrop = { - bgFile = C["media"].blank, - insets = {top = -T.mult, left = -T.mult, bottom = -T.mult, right = -T.mult}, -} -local point = "LEFT" -local columnAnchorPoint = "TOP" - -local function Shared(self, unit) - self.colors = T.UnitColor - self:RegisterForClicks("AnyUp") - self:SetScript('OnEnter', UnitFrame_OnEnter) - self:SetScript('OnLeave', UnitFrame_OnLeave) - - self.menu = T.SpawnMenu - - self:SetBackdrop({bgFile = C["media"].blank, insets = {top = -T.mult, left = -T.mult, bottom = -T.mult, right = -T.mult}}) - self:SetBackdropColor(0.1, 0.1, 0.1) - - local health = CreateFrame('StatusBar', nil, self) - health:SetPoint("TOPLEFT") - health:SetPoint("TOPRIGHT") - health:Height(28*C["unitframes"].gridscale*T.raidscale) - health:SetStatusBarTexture(normTex) - self.Health = health - - if C["unitframes"].gridhealthvertical == true then - health:SetOrientation('VERTICAL') - end - - health.bg = health:CreateTexture(nil, 'BORDER') - health.bg:SetAllPoints(health) - health.bg:SetTexture(normTex) - health.bg:SetTexture(0.3, 0.3, 0.3) - health.bg.multiplier = (0.3) - self.Health.bg = health.bg - - health.value = health:CreateFontString(nil, "OVERLAY") - health.value:Point("CENTER", health, 1, 0) - health.value:SetFont(font2, 11*C["unitframes"].gridscale*T.raidscale, "THINOUTLINE") - health.value:SetTextColor(1,1,1) - health.value:SetShadowOffset(1, -1) - self.Health.value = health.value - - health.PostUpdate = T.PostUpdateHealthRaid - - health.frequentUpdates = true - - if C.unitframes.unicolor == true then - health.colorDisconnected = false - health.colorClass = false - health:SetStatusBarColor(.3, .3, .3, 1) - health.bg:SetVertexColor(.1, .1, .1, 1) - else - health.colorDisconnected = true - health.colorClass = true - health.colorReaction = true - end - - local power = CreateFrame("StatusBar", nil, self) - power:SetHeight(3*C["unitframes"].gridscale*T.raidscale) - power:Point("TOPLEFT", self.Health, "BOTTOMLEFT", 0, -1) - power:Point("TOPRIGHT", self.Health, "BOTTOMRIGHT", 0, -1) - power:SetStatusBarTexture(normTex) - self.Power = power - - power.frequentUpdates = true - power.colorDisconnected = true - - power.bg = power:CreateTexture(nil, "BORDER") - power.bg:SetAllPoints(power) - power.bg:SetTexture(normTex) - power.bg:SetAlpha(1) - power.bg.multiplier = 0.4 - - if C.unitframes.unicolor == true then - power.colorClass = true - power.bg.multiplier = 0.1 - else - power.colorPower = true - end - - local panel = CreateFrame("Frame", nil, self) - panel:Point("TOPLEFT", power, "BOTTOMLEFT", 0, -1) - panel:Point("TOPRIGHT", power, "BOTTOMRIGHT", 0, -1) - panel:SetPoint("BOTTOM", 0,0) - panel:SetBackdrop( { - bgFile = C["media"].blank, - edgeFile = C["media"].blank, - tile = false, tileSize = 0, edgeSize = T.mult, - insets = { left = 0, right = 0, top = 0, bottom = 0 } - }) - panel:SetBackdropColor(unpack(C["media"].backdropcolor)) - panel:SetBackdropBorderColor(bdcr * 0.7, bdcg * 0.7, bdcb * 0.7) - self.panel = panel - - local name = panel:CreateFontString(nil, "OVERLAY") - name:SetPoint("TOP") - name:SetPoint("BOTTOM") - name:SetPoint("LEFT") - name:SetPoint("RIGHT") - name:SetFont(font2, 12*C["unitframes"].gridscale*T.raidscale) - self:Tag(name, "[Tukui:getnamecolor][Tukui:nameshort]") - self.Name = name - - if C["unitframes"].aggro == true then - table.insert(self.__elements, T.UpdateThreat) - self:RegisterEvent('PLAYER_TARGET_CHANGED', T.UpdateThreat) - self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', T.UpdateThreat) - self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', T.UpdateThreat) - end - - if C["unitframes"].showsymbols == true then - local RaidIcon = health:CreateTexture(nil, 'OVERLAY') - RaidIcon:Height(18*T.raidscale) - RaidIcon:Width(18*T.raidscale) - RaidIcon:SetPoint('CENTER', self, 'TOP') - RaidIcon:SetTexture("Interface\\AddOns\\Tukui\\medias\\textures\\raidicons.blp") -- thx hankthetank for texture - self.RaidIcon = RaidIcon - end - - local ReadyCheck = power:CreateTexture(nil, "OVERLAY") - ReadyCheck:Height(12*C["unitframes"].gridscale*T.raidscale) - ReadyCheck:Width(12*C["unitframes"].gridscale*T.raidscale) - ReadyCheck:SetPoint('CENTER') - self.ReadyCheck = ReadyCheck - - --local picon = self.Health:CreateTexture(nil, 'OVERLAY') - --picon:SetPoint('CENTER', self.Health) - --picon:SetSize(16, 16) - --picon:SetTexture[[Interface\AddOns\Tukui\medias\textures\picon]] - --picon.Override = T.Phasing - --self.PhaseIcon = picon - - if not C["unitframes"].raidunitdebuffwatch == true then - self.DebuffHighlightAlpha = 1 - self.DebuffHighlightBackdrop = true - self.DebuffHighlightFilter = true - end - - if C["unitframes"].showrange == true then - local range = {insideAlpha = 1, outsideAlpha = C["unitframes"].raidalphaoor} - self.Range = range - end - - if C["unitframes"].showsmooth == true then - health.Smooth = true - power.Smooth = true - end - - if C["unitframes"].healcomm then - local mhpb = CreateFrame('StatusBar', nil, self.Health) - if C["unitframes"].gridhealthvertical then - mhpb:SetOrientation("VERTICAL") - mhpb:SetPoint('BOTTOM', self.Health:GetStatusBarTexture(), 'TOP', 0, 0) - mhpb:Width(66*C["unitframes"].gridscale*T.raidscale) - mhpb:Height(50*C["unitframes"].gridscale*T.raidscale) - else - mhpb:SetPoint('TOPLEFT', self.Health:GetStatusBarTexture(), 'TOPRIGHT', 0, 0) - mhpb:SetPoint('BOTTOMLEFT', self.Health:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0) - mhpb:Width(66*C["unitframes"].gridscale*T.raidscale) - end - mhpb:SetStatusBarTexture(normTex) - mhpb:SetStatusBarColor(0, 1, 0.5, 0.25) - - local ohpb = CreateFrame('StatusBar', nil, self.Health) - if C["unitframes"].gridhealthvertical then - ohpb:SetOrientation("VERTICAL") - ohpb:SetPoint('BOTTOM', mhpb:GetStatusBarTexture(), 'TOP', 0, 0) - ohpb:Width(66*C["unitframes"].gridscale*T.raidscale) - ohpb:Height(50*C["unitframes"].gridscale*T.raidscale) - else - ohpb:SetPoint('TOPLEFT', mhpb:GetStatusBarTexture(), 'TOPRIGHT', 0, 0) - ohpb:SetPoint('BOTTOMLEFT', mhpb:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0) - ohpb:Width(6*C["unitframes"].gridscale*T.raidscale) - end - ohpb:SetStatusBarTexture(normTex) - ohpb:SetStatusBarColor(0, 1, 0, 0.25) - - self.HealPrediction = { - myBar = mhpb, - otherBar = ohpb, - maxOverflow = 1, - } - end - - if C["unitframes"].raidunitdebuffwatch == true then - -- AuraWatch (corner icon) - T.createAuraWatch(self,unit) - - -- Raid Debuffs (big middle icon) - local RaidDebuffs = CreateFrame('Frame', nil, self) - RaidDebuffs:Height(24*C["unitframes"].gridscale) - RaidDebuffs:Width(24*C["unitframes"].gridscale) - RaidDebuffs:Point('CENTER', health, 1,0) - RaidDebuffs:SetFrameStrata(health:GetFrameStrata()) - RaidDebuffs:SetFrameLevel(health:GetFrameLevel() + 2) - - RaidDebuffs:SetTemplate("Default") - - RaidDebuffs.icon = RaidDebuffs:CreateTexture(nil, 'OVERLAY') - RaidDebuffs.icon:SetTexCoord(.1,.9,.1,.9) - RaidDebuffs.icon:Point("TOPLEFT", 2, -2) - RaidDebuffs.icon:Point("BOTTOMRIGHT", -2, 2) - - -- just in case someone want to add this feature, uncomment to enable it - --[[ - if C["unitframes"].auratimer then - RaidDebuffs.cd = CreateFrame('Cooldown', nil, RaidDebuffs) - RaidDebuffs.cd:Point("TOPLEFT", 2, -2) - RaidDebuffs.cd:Point("BOTTOMRIGHT", -2, 2) - RaidDebuffs.cd.noOCC = true -- remove this line if you want cooldown number on it - end - --]] - - RaidDebuffs.count = RaidDebuffs:CreateFontString(nil, 'OVERLAY') - RaidDebuffs.count:SetFont(C["media"].uffont, 9*C["unitframes"].gridscale, "THINOUTLINE") - RaidDebuffs.count:SetPoint('BOTTOMRIGHT', RaidDebuffs, 'BOTTOMRIGHT', 0, 2) - RaidDebuffs.count:SetTextColor(1, .9, 0) - - RaidDebuffs:FontString('time', C["media"].uffont, 9*C["unitframes"].gridscale, "THINOUTLINE") - RaidDebuffs.time:SetPoint('CENTER') - RaidDebuffs.time:SetTextColor(1, .9, 0) - - self.RaidDebuffs = RaidDebuffs - end - - if T.myclass == "PRIEST" and C["unitframes"].weakenedsoulbar then - local ws = CreateFrame("StatusBar", self:GetName().."_WeakenedSoul", power) - ws:SetAllPoints(power) - ws:SetStatusBarTexture(C.media.normTex) - ws:GetStatusBarTexture():SetHorizTile(false) - ws:SetBackdrop(backdrop) - ws:SetBackdropColor(unpack(C.media.backdropcolor)) - ws:SetStatusBarColor(191/255, 10/255, 10/255) - - self.WeakenedSoul = ws - end - - return self -end - -oUF:RegisterStyle('TukuiHealR25R40', Shared) -oUF:Factory(function(self) - oUF:SetActiveStyle("TukuiHealR25R40") - - if C.unitframes.gridvertical then - point = "TOP" - columnAnchorPoint = "LEFT" - end - - if C["unitframes"].gridonly ~= true then - local raid = self:SpawnHeader("TukuiRaidHealerGrid", nil, "custom [@raid16,exists] show;hide", - 'oUF-initialConfigFunction', [[ - local header = self:GetParent() - self:SetWidth(header:GetAttribute('initial-width')) - self:SetHeight(header:GetAttribute('initial-height')) - ]], - 'initial-width', T.Scale(66*C["unitframes"].gridscale*T.raidscale), - 'initial-height', T.Scale(50*C["unitframes"].gridscale*T.raidscale), - "showRaid", true, - "xoffset", T.Scale(3), - "yOffset", T.Scale(-3), - "point", point, - "groupFilter", "1,2,3,4,5,6,7,8", - "groupingOrder", "1,2,3,4,5,6,7,8", - "groupBy", "GROUP", - "maxColumns", 8, - "unitsPerColumn", 5, - "columnSpacing", T.Scale(3), - "columnAnchorPoint", columnAnchorPoint - ) - raid:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 18, -250*T.raidscale) - else - local raid = self:SpawnHeader("TukuiRaidHealerGrid", nil, "raid,party", - 'oUF-initialConfigFunction', [[ - local header = self:GetParent() - self:SetWidth(header:GetAttribute('initial-width')) - self:SetHeight(header:GetAttribute('initial-height')) - ]], - 'initial-width', T.Scale(66*C["unitframes"].gridscale*T.raidscale), - 'initial-height', T.Scale(50*C["unitframes"].gridscale*T.raidscale), - "showParty", true, - "showPlayer", C["unitframes"].showplayerinparty, - "showRaid", true, - "xoffset", T.Scale(3), - "yOffset", T.Scale(-3), - "point", point, - "groupFilter", "1,2,3,4,5,6,7,8", - "groupingOrder", "1,2,3,4,5,6,7,8", - "groupBy", "GROUP", - "maxColumns", 8, - "unitsPerColumn", 5, - "columnSpacing", T.Scale(3), - "columnAnchorPoint", columnAnchorPoint - ) - raid:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 18, -250*T.raidscale) - - local pets = {} - pets[1] = oUF:Spawn('partypet1', 'oUF_TukuiPartyPet1') - pets[1]:Point('TOPLEFT', raid, 'TOPLEFT', 0, -50*C["unitframes"].gridscale*T.raidscale + -3) - pets[1]:Size(66*C["unitframes"].gridscale*T.raidscale, 50*C["unitframes"].gridscale*T.raidscale) - for i =2, 4 do - pets[i] = oUF:Spawn('partypet'..i, 'oUF_TukuiPartyPet'..i) - pets[i]:Point('LEFT', pets[i-1], 'RIGHT', 3, 0) - pets[i]:Size(66*C["unitframes"].gridscale*T.raidscale, 50*C["unitframes"].gridscale*T.raidscale) - end - - local ShowPet = CreateFrame("Frame") - ShowPet:RegisterEvent("PLAYER_ENTERING_WORLD") - ShowPet:RegisterEvent("RAID_ROSTER_UPDATE") - ShowPet:RegisterEvent("PARTY_LEADER_CHANGED") - ShowPet:RegisterEvent("PARTY_MEMBERS_CHANGED") - ShowPet:SetScript("OnEvent", function(self) - if InCombatLockdown() then - self:RegisterEvent("PLAYER_REGEN_ENABLED") - else - self:UnregisterEvent("PLAYER_REGEN_ENABLED") - local numraid = GetNumRaidMembers() - local numparty = GetNumPartyMembers() - if numparty > 0 and numraid == 0 or numraid > 0 and numraid <= 5 then - for i,v in ipairs(pets) do v:Enable() end - else - for i,v in ipairs(pets) do v:Disable() end - end - end - end) - end -end) - --- only show 5 groups in raid (25 mans raid) -local MaxGroup = CreateFrame("Frame") -MaxGroup:RegisterEvent("PLAYER_ENTERING_WORLD") -MaxGroup:RegisterEvent("ZONE_CHANGED_NEW_AREA") -MaxGroup:SetScript("OnEvent", function(self) - local inInstance, instanceType = IsInInstance() - local _, _, _, _, maxPlayers, _, _ = GetInstanceInfo() - if inInstance and instanceType == "raid" and maxPlayers ~= 40 then - TukuiRaidHealerGrid:SetAttribute("groupFilter", "1,2,3,4,5") - else - TukuiRaidHealerGrid:SetAttribute("groupFilter", "1,2,3,4,5,6,7,8") - end -end) \ No newline at end of file