diff --git a/.compressor.ps1 b/.compressor.ps1 index 8da73467..0225b755 100644 --- a/.compressor.ps1 +++ b/.compressor.ps1 @@ -8,15 +8,43 @@ if (-Not (Test-Path "$env:ProgramFiles\7-Zip\7z.exe")) { Set-Alias 7z "$env:ProgramFiles\7-Zip\7z.exe" +function Remove-Kaka([Parameter(Mandatory, ValueFromPipeline)] $file) { + process { + $canWrite = $true + $out = "" + + foreach ($line in Get-Content $file) { + if ($line -match "--@do-not-package@") { + $canWrite = $false + } + elseif ($line -match "--@end-do-not-package@") { + $canWrite = $true + + if (-not $foreach.MoveNext()) { + break + } + + $line = $foreach.Current + } + + if ($canWrite) { + $out += "$line`n" + } + } + + Set-Content $file -Value $out.TrimEnd() + } +} + $name = (Get-Item .).Name -if (-Not (Test-Path (".\" + $name + "\" + $name + ".toc"))) { +if (-Not (Test-Path (".\$name\$name.toc"))) { Write-Host ".toc not found" return Read-Host } -if (Get-Content (".\" + $name + "\" + $name + ".toc") | Where-Object { $_ -match "Version:\s*([a-zA-Z0-9.-]+)" }) { +if (Get-Content (".\$name\$name.toc") | Where-Object { $_ -match "Version:\s*([a-zA-Z0-9.-]+)" }) { $version = $matches[1] } else { Write-Host "Bad version format" @@ -54,5 +82,6 @@ if (Test-Path $temp) { New-Item -Path $temp -ItemType Directory | Out-Null Copy-Item $foldersToInclude -Destination $temp -Exclude $filesToExclude -Recurse Get-ChildItem $temp -Recurse | Where-Object { $_.PSIsContainer -and $_.Name -cin $foldersToRemove } | Remove-Item -Recurse -Force +Get-ChildItem $temp -Recurse | Where-Object { $_.Extension -eq ".lua"} | Remove-Kaka 7z a -tzip -mx9 "..\$name-$version.zip" (Get-ChildItem $temp) Remove-Item $temp -Recurse -Force diff --git a/.gitmodules b/.gitmodules index d98280fb..5bbf02cb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,9 +7,6 @@ [submodule "ls_UI/embeds/LibButtonGlow-1.0"] path = ls_UI/embeds/LibButtonGlow-1.0 url = https://repos.wowace.com/wow/libbuttonglow-1-0 -[submodule "ls_UI/embeds/LibDropDown"] - path = ls_UI/embeds/LibDropDown - url = git@github.com:ls-/LibDropDown.git [submodule "ls_UI/embeds/LibDualSpec-1.0"] path = ls_UI/embeds/LibDualSpec-1.0 url = https://repos.wowace.com/wow/libdualspec-1-0 \ No newline at end of file diff --git a/.luacheckrc b/.luacheckrc index a1cb50d7..effe0666 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -50,16 +50,15 @@ read_globals = { "AdiButtonAuras", "ADVENTURE_JOURNAL", "ATTACK_BUTTON_FLASH_TIME", - "AutoCastShine_AutoCastStart", - "AutoCastShine_AutoCastStop", - "BACKPACK_TOOLTIP", "BagsBar", "BLIZZARD_STORE", "BreakUpLargeNumbers", "BuffFrame", "C_AddOns", + "C_AdventureJournal", "C_AzeriteItem", "C_CurrencyInfo", + "C_DelvesUI", "C_GossipInfo", "C_Item", "C_Mail", @@ -73,6 +72,7 @@ read_globals = { "C_PvP", "C_QuestLog", "C_Reputation", + "C_Spell", "C_Timer", "C_TooltipInfo", "C_UnitAuras", @@ -81,6 +81,10 @@ read_globals = { "CanInspect", "CHARACTER_BUTTON", "CharacterBackSlot", + "CharacterBag0Slot", + "CharacterBag1Slot", + "CharacterBag2Slot", + "CharacterBag3Slot", "CharacterChestSlot", "CharacterFeetSlot", "CharacterFinger0Slot", @@ -93,6 +97,7 @@ read_globals = { "CharacterMicroButton", "CharacterModelScene", "CharacterNeckSlot", + "CharacterReagentBag0Slot", "CharacterSecondaryHandSlot", "CharacterShirtSlot", "CharacterShoulderSlot", @@ -109,6 +114,7 @@ read_globals = { "ColorMixin", "CooldownFrame_Set", "CreateFrame", + "CreateUnsecuredObjectPool", "CreateVector2D", "DeadlyDebuffFrame", "DebuffFrame", @@ -117,6 +123,7 @@ read_globals = { "DUNGEONS_BUTTON", "EJMicroButton", "ENCHANTED_TOOLTIP_LINE", + "EncounterJournalSuggestFrame", "Enum", "ExpansionLandingPageMinimapButton", "ExtraAbilityContainer", @@ -189,20 +196,15 @@ read_globals = { "GetRFDungeonInfo", "GetSavedInstanceInfo", "GetSavedWorldBossInfo", - "GetSelectedFaction", "GetShapeshiftFormCooldown", "GetShapeshiftFormInfo", "GetSpecialization", "GetSpecializationInfo", "GetSpecializationInfoByID", - "GetSpellInfo", - "GetSpellLink", - "GetSpellSubtext", "GetText", "GetTime", "GetTotemInfo", "GetValueOrCallFunction", - "GetWatchedFactionInfo", "GetWeaponEnchantInfo", "GetXPExhaustion", "GUILD_AND_COMMUNITIES", @@ -230,7 +232,6 @@ read_globals = { "ITEM_QUALITY_COLORS", "ItemRefTooltip", "KeybindFrames_InQuickKeybindMode", - "Kiosk", "LE_REALM_RELATION_VIRTUAL", "LE_TOKEN_RESULT_ERROR_DISABLED", "LFDMicroButton", @@ -242,6 +243,7 @@ read_globals = { "MainMenuBarBackpackButton", "MainMenuBarVehicleLeaveButton", "MainMenuMicroButton", + "MainStatusTrackingBarContainer", "MAX_REPUTATION_REACTION", "MAX_TOTEMS", "MaxDps", @@ -262,7 +264,6 @@ read_globals = { "MultiBarLeft", "MultiBarRight", "MultiCastActionBarFrame", - "NEWBIE_TOOLTIP_LFGPARENT", "NewPlayerExperience", "NineSliceUtil", "NotifyInspect", @@ -290,9 +291,14 @@ read_globals = { "PetCastingBarFrame", "PetHasActionBar", "PlayerCastingBarFrame", + "PLAYERSPELLS_BUTTON", + "PlayerSpellsMicroButton", "PlaySound", "PossessActionBar", + "ProfessionMicroButton", + "PROFESSIONS_BUTTON", "PVPQueueFrame", + "QUESTION_MARK_ICON", "QUESTLOG_BUTTON", "QuestLogMicroButton", "QueueStatusButton", @@ -300,12 +306,12 @@ read_globals = { "RegisterAttributeDriver", "RegisterStateDriver", "ReloadUI", - "RENOWN_LEVEL_LABEL", - "ReputationDetailMainScreenCheckBox", + "ReputationFrame", "RequestLFDPartyLockInfo", "RequestLFDPlayerLockInfo", "RequestRaidInfo", "SaveBindings", + "SecondaryStatusTrackingBarContainer", "SecondsToTime", "SecureHandlerSetFrameRef", "SetBinding", @@ -314,16 +320,11 @@ read_globals = { "SetOverrideBindingClick", "Settings", "SettingsPanel", - "SetWatchedFactionIndex", "SetWatchingHonorAsXP", - "SPELLBOOK_ABILITIES_BUTTON", - "SpellbookMicroButton", "SpellFlyout", "StanceBar", "StatusTrackingBarManager", "StoreMicroButton", - "TalentMicroButton", - "TALENTS_BUTTON", "TalkingHeadFrame", "TaxiRequestEarlyLanding", "TicketStatusFrame", diff --git a/CHANGELOG.md b/CHANGELOG.md index e5e7f059..0a56a9dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,50 @@ # CHANGELOG +## Version 110000.01 + +- Added 11.0.0 support. +- Added a set of options to adjust status bar textures. Can be found /LSUI > General > Textures. +- Updated a bunch of art assets. + +### Config + +- Removed outdated and confusing "character-specific" wording. Clarified what global and private profiles are for. + To reiterate, the global profile is for settings of various modules and submodules, these don't need a UI reload to + work, whereas the private profile includes the aura tracker settings and which modules and submodules are enabled or + disabled, these typically require a UI reload. +- Marked all private profile setting that require a UI reload to take effect with a light blue colour. +- Reworked the reload UI popup. Instead of appearing right away, it'll appear after you close the config panel. + +### Action Bars + +- Added an option to increase the number of main action bar's button slots up to 24 when the artwork is enabled. + The main action bar will take up the first 12 slots, the extra slots are empty, and they're there to create room for + additional action bars that can be moved there manually. All animations were adjusted accordingly to support this. + Can be found at /LSUI > Action Bars > Action Bar 1 > Number of Buttons. +- Split the spacing option into vertical and horizontal spacings. This will allow to create more space between the row + without affecting the gap between the buttons. +- Reduced the minimum button size to 8. Fun fact, at the height set to 14 and the number of buttons per row set to 6 + a single 12 button action bar to be as big as just 6 button slots. +- Fixed an issue where the XP bar would occasionally blink/flash. It generally should perform a lot better now. + +### Blizzard + +- Added compact variant for the Suggested Content tab of the Adventure Guide. Can be found at /LSUI > Blizzard > + Adventure Guide, enabled by default. + +### Unit Frames + +- Added adjustable gradient. Can be found at /LSUI > Unit Frames, next to the gloss slider. +- Added temporary max health reduction bar. It's a new feature in TWW, most likely will be used in raid and dungeon + encounters. Can be found at /LSUI > Unit Frames > Unit Frame > Health > Health Reduction, next to the heal prediction + toggle. +- Reworked the damage absorb shield into a widget that's displayed on top of the health bar. +- Added an option to adjust the zoom of 3D portraits. /LSUI > Unit Frames > Unit Frame > Portrait > Scale, only visible + when using 3D portraits. +- Cropped 2D portraits. They're less round now, and there's less wasted space. There's no way to completely remove the + round mask. +- Added options to enable word wrapping for health and power texts. + ## Version 100207.01 - Added 10.2.7 support. diff --git a/ls_UI/assets/border-statusbar.TGA b/ls_UI/assets/border-statusbar.TGA new file mode 100644 index 00000000..43b80536 Binary files /dev/null and b/ls_UI/assets/border-statusbar.TGA differ diff --git a/ls_UI/assets/border-thin.TGA b/ls_UI/assets/border-thin.TGA index 977ed596..bf18366d 100644 Binary files a/ls_UI/assets/border-thin.TGA and b/ls_UI/assets/border-thin.TGA differ diff --git a/ls_UI/assets/console.TGA b/ls_UI/assets/console.TGA index f454d0f8..10cd27cf 100644 Binary files a/ls_UI/assets/console.TGA and b/ls_UI/assets/console.TGA differ diff --git a/ls_UI/assets/minimap-flags-100.TGA b/ls_UI/assets/minimap-flags-100.TGA index c2373c94..46b5ebe6 100644 Binary files a/ls_UI/assets/minimap-flags-100.TGA and b/ls_UI/assets/minimap-flags-100.TGA differ diff --git a/ls_UI/assets/minimap-flags-125.TGA b/ls_UI/assets/minimap-flags-125.TGA index 79e60928..54129b96 100644 Binary files a/ls_UI/assets/minimap-flags-125.TGA and b/ls_UI/assets/minimap-flags-125.TGA differ diff --git a/ls_UI/assets/minimap-flags-150.TGA b/ls_UI/assets/minimap-flags-150.TGA index 1de46dc3..c056953b 100644 Binary files a/ls_UI/assets/minimap-flags-150.TGA and b/ls_UI/assets/minimap-flags-150.TGA differ diff --git a/ls_UI/assets/reduction.TGA b/ls_UI/assets/reduction.TGA new file mode 100644 index 00000000..5749020a Binary files /dev/null and b/ls_UI/assets/reduction.TGA differ diff --git a/ls_UI/assets/statusbar-azerite-fill.TGA b/ls_UI/assets/statusbar-azerite-fill.TGA deleted file mode 100644 index 71eb2420..00000000 Binary files a/ls_UI/assets/statusbar-azerite-fill.TGA and /dev/null differ diff --git a/ls_UI/assets/statusbar-edge.TGA b/ls_UI/assets/statusbar-edge.TGA new file mode 100644 index 00000000..d1a6cdc3 Binary files /dev/null and b/ls_UI/assets/statusbar-edge.TGA differ diff --git a/ls_UI/assets/statusbar-glass.TGA b/ls_UI/assets/statusbar-glass.TGA deleted file mode 100644 index 8c8fc6de..00000000 Binary files a/ls_UI/assets/statusbar-glass.TGA and /dev/null differ diff --git a/ls_UI/assets/statusbar-texture.TGA b/ls_UI/assets/statusbar-texture.TGA deleted file mode 100644 index f8cbd954..00000000 Binary files a/ls_UI/assets/statusbar-texture.TGA and /dev/null differ diff --git a/ls_UI/assets/statusbar.TGA b/ls_UI/assets/statusbar.TGA deleted file mode 100644 index 7da3faac..00000000 Binary files a/ls_UI/assets/statusbar.TGA and /dev/null differ diff --git a/ls_UI/core/button.lua b/ls_UI/core/button.lua index f76a784c..bfd2d23b 100644 --- a/ls_UI/core/button.lua +++ b/ls_UI/core/button.lua @@ -80,7 +80,7 @@ end local function updateHotKey(self, text) if text ~= RANGE_INDICATOR then - self:SetFormattedText("%s", self:GetParent():GetHotkey() or "") + self:SetFormattedText("%s", self.__parent:GetHotkey() or "") end end @@ -106,6 +106,8 @@ local function setIcon(button, texture, l, r, t, b) icon:SetDrawLayer("BACKGROUND", 0) end + icon:SetSnapToPixelGrid(false) + icon:SetTexelSnappingBias(0) icon:SetAllPoints() icon:SetTexCoord(l or 0.0625, r or 0.9375, t or 0.0625, b or 0.9375) @@ -180,7 +182,7 @@ local function skinButton(button) local icon = button.icon or button.Icon if icon then - setIcon(button.icon or button.Icon) + setIcon(icon) local iconMask = button.IconMask if iconMask then @@ -214,6 +216,7 @@ local function skinButton(button) hotKey:SetSize(0, 0) hotKey:SetVertexColor(1, 1, 1, 1) hotKey:Show() + hotKey.__parent = button if not button.GetHotkey then button.GetHotkey = button_GetHotkey @@ -313,7 +316,7 @@ local function skinButton(button) border = E:CreateBorder(button) border:SetTexture("Interface\\AddOns\\ls_UI\\assets\\border-thin") border:SetSize(16) - border:SetOffset(-8) + border:SetOffset(-4) button.Border_ = border local pushedTexture = button.GetPushedTexture and button:GetPushedTexture() @@ -509,7 +512,7 @@ function E:CreateButton(parent, name, hasCount, hasCooldown, isSandwich, isSecur local border = E:CreateBorder(button) border:SetTexture("Interface\\AddOns\\ls_UI\\assets\\border-thin") border:SetSize(16) - border:SetOffset(-8) + border:SetOffset(-4) button.Border = border setHighlightTexture(button) diff --git a/ls_UI/core/changelog.lua b/ls_UI/core/changelog.lua index 4e919023..20bd942c 100644 --- a/ls_UI/core/changelog.lua +++ b/ls_UI/core/changelog.lua @@ -6,22 +6,33 @@ local _G = getfenv(0) -- Mine E.CHANGELOG = [[ -- Added 10.2.7 support. -- Fixed an issue where the addon would fail to create a mover if the parent object it's supposed to be attached to was - no longer available. Now such a mover will be reset to its default state. +- Added 11.0.0 support. +- Added a set of options to adjust status bar textures. Can be found /LSUI > General > Textures. +- Updated a bunch of art assets. + +### Config + +- Removed outdated and confusing "character-specific" wording. Clarified what global and private profiles are for. To reiterate, the global profile is for settings of various modules and submodules, these don't need a UI reload to work, whereas the private profile includes the aura tracker settings and which modules and submodules are enabled or disabled, these typically require a UI reload. +- Marked all private profile setting that require a UI reload to take effect with a light blue colour. +- Reworked the reload UI popup. Instead of appearing right away, it'll appear after you close the config panel. ### Action Bars -- Added an option to wipe the list of tracked currencies to remove retired inaccessible currencies from previous - seasons. Can be found at /LSUI > Action Bars > Backpack > Restore Defaults button in the Currency panel. -- Fixed micro menu help tip hiding. Blizz keep changing how this stuff works, so it'll get broken again eventually. -- Fixed an issue where the reputation bar wouldn't display reputation gains past the renown cap. +- Added an option to increase the number of main action bar's button slots up to 24 when the artwork is enabled. The main action bar will take up the first 12 slots, the extra slots are empty, and they're there to create room for additional action bars that can be moved there manually. All animations were adjusted accordingly to support this. Can be found at /LSUI > Action Bars > Action Bar 1 > Number of Buttons. +- Split the spacing option into vertical and horizontal spacings. This will allow to create more space between the row without affecting the gap between the buttons. +- Reduced the minimum button size to 8. Fun fact, at the height set to 14 and the number of buttons per row set to 6 a single 12 button action bar to be as big as just 6 button slots. +- Fixed an issue where the XP bar would occasionally blink/flash. It generally should perform a lot better now. -### Tooltips +### Blizzard -- Fixed an issue where names would appear as blank for players in another zone. +- Added compact variant for the Suggested Content tab of the Adventure Guide. Can be found at /LSUI > Blizzard > Adventure Guide, enabled by default. ### Unit Frames -- Added proper empowered cast support. Better late than never T_T +- Added adjustable gradient. Can be found at /LSUI > Unit Frames, next to the gloss slider. +- Added temporary max health reduction bar. It's a new feature in TWW, most likely will be used in raid and dungeon encounters. Can be found at /LSUI > Unit Frames > Unit Frame > Health > Health Reduction, next to the heal prediction toggle. +- Reworked the damage absorb shield into a widget that's displayed on top of the health bar. +- Added an option to adjust the zoom of 3D portraits. /LSUI > Unit Frames > Unit Frame > Portrait > Scale, only visible when using 3D portraits. +- Cropped 2D portraits. They're less round now, and there's less wasted space. There's no way to completely remove the round mask. +- Added options to enable word wrapping for health and power texts. ]] diff --git a/ls_UI/core/defaults.lua b/ls_UI/core/defaults.lua index 908ed2b5..1432c5ee 100644 --- a/ls_UI/core/defaults.lua +++ b/ls_UI/core/defaults.lua @@ -23,6 +23,7 @@ D.global = { black = rgb(0, 0, 0), -- #000000 white = rgb(255, 255, 255), -- #FFFFFF orange = rgb(230, 118, 47), -- #E6762F (2.5YR 6/12) + context = rgb(136, 170, 255), -- #88AAFF (Blizzard Colour) class = { HUNTER = rgb(170, 211, 114), -- #AAD372 (Blizzard Colour) WARLOCK = rgb(135, 135, 237), -- #8787ED (Blizzard Colour) @@ -320,19 +321,19 @@ D.global = { }, ["ls:health:cur"] = { events = "UNIT_HEALTH UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED", - func = "function(unit)\n if not UnitIsConnected(unit) then\n return _VARS.L[\"OFFLINE\"]\n elseif UnitIsDeadOrGhost(unit) then\n return _VARS.L[\"DEAD\"]\n else\n return _VARS.E:FormatNumber(UnitHealth(unit))\n end\nend", + func = "function(unit)\n if not UnitIsConnected(unit) then\n return PLAYER_OFFLINE\n elseif UnitIsDeadOrGhost(unit) then\n return DEAD\n else\n return _VARS.E:FormatNumber(UnitHealth(unit))\n end\nend", }, ["ls:health:cur-perc"] = { events = "UNIT_HEALTH UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED", - func = "function(unit)\n if not UnitIsConnected(unit) then\n return _VARS.L[\"OFFLINE\"]\n elseif UnitIsDeadOrGhost(unit) then\n return _VARS.L[\"DEAD\"]\n else\n local cur, max = UnitHealth(unit), UnitHealthMax(unit)\n if cur == max then\n return _VARS.E:FormatNumber(cur)\n else\n return string.format(\"%s - %.1f%%\", _VARS.E:FormatNumber(cur), _VARS.E:NumberToPerc(cur, max))\n end\n end\nend", + func = "function(unit)\n if not UnitIsConnected(unit) then\n return PLAYER_OFFLINE\n elseif UnitIsDeadOrGhost(unit) then\n return DEAD\n else\n local cur, max = UnitHealth(unit), UnitHealthMax(unit)\n if cur == max then\n return _VARS.E:FormatNumber(cur)\n else\n return string.format(\"%s - %.1f%%\", _VARS.E:FormatNumber(cur), _VARS.E:NumberToPerc(cur, max))\n end\n end\nend", }, ["ls:health:deficit"] = { events = "UNIT_HEALTH UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED", - func = "function(unit)\n if not UnitIsConnected(unit) then\n return _VARS.L[\"OFFLINE\"]\n elseif UnitIsDeadOrGhost(unit) then\n return _VARS.L[\"DEAD\"]\n else\n local cur, max = UnitHealth(unit), UnitHealthMax(unit)\n if max and cur ~= max then\n return string.format(\"-%s\", _VARS.E:FormatNumber(max - cur))\n end\n end\n\n return \"\"\nend", + func = "function(unit)\n if not UnitIsConnected(unit) then\n return PLAYER_OFFLINE\n elseif UnitIsDeadOrGhost(unit) then\n return DEAD\n else\n local cur, max = UnitHealth(unit), UnitHealthMax(unit)\n if max and cur ~= max then\n return string.format(\"-%s\", _VARS.E:FormatNumber(max - cur))\n end\n end\n\n return \"\"\nend", }, ["ls:health:perc"] = { events = "UNIT_HEALTH UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED", - func = "function(unit)\n if not UnitIsConnected(unit) then\n return _VARS.L[\"OFFLINE\"]\n elseif UnitIsDeadOrGhost(unit) then\n return _VARS.L[\"DEAD\"]\n else\n return string.format(\"%.1f%%\", _VARS.E:NumberToPerc(UnitHealth(unit), UnitHealthMax(unit)))\n end\nend", + func = "function(unit)\n if not UnitIsConnected(unit) then\n return PLAYER_OFFLINE\n elseif UnitIsDeadOrGhost(unit) then\n return DEAD\n else\n return string.format(\"%.1f%%\", _VARS.E:NumberToPerc(UnitHealth(unit), UnitHealthMax(unit)))\n end\nend", }, ["ls:leadericon"] = { events = "PARTY_LEADER_CHANGED GROUP_ROSTER_UPDATE", @@ -399,7 +400,7 @@ D.global = { }, ["ls:server"] = { events = "UNIT_NAME_UPDATE", - func = "function(unit)\n local _, realm = UnitName(unit)\n if realm and realm ~= \"\" then\n local relationship = UnitRealmRelationship(unit)\n if relationship ~= LE_REALM_RELATION_VIRTUAL then\n return _VARS.L[\"FOREIGN_SERVER_LABEL\"]\n end\n end\n\n return \"\"\nend", + func = "function(unit)\n local _, realm = UnitName(unit)\n if realm and realm ~= \"\" then\n local relationship = UnitRealmRelationship(unit)\n if relationship ~= LE_REALM_RELATION_VIRTUAL then\n return FOREIGN_SERVER_LABEL\n end\n end\n\n return \"\"\nend", }, ["ls:threat"] = { events = "UNIT_THREAT_SITUATION_UPDATE UNIT_THREAT_LIST_UPDATE", @@ -533,8 +534,11 @@ D.global = { }, textures = { statusbar = { - horiz = "LS", - vert = "LS", + health = "Solid", + castbar = "Solid", + power = "Solid", + xpbar = "Solid", + other = "Solid", -- tooltips }, }, } @@ -551,7 +555,8 @@ D.profile = { }, }, inlay = { - alpha = 0.4, + gloss = 0.4, + gradient = 0.35, }, change = { smooth = true, @@ -588,6 +593,7 @@ D.profile = { size = 13, h_alignment = "LEFT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "LEFT", anchor = "Health", @@ -599,6 +605,9 @@ D.profile = { prediction = { enabled = true, }, + reduction = { + enabled = false, + }, }, power = { enabled = true, @@ -607,6 +616,7 @@ D.profile = { size = 11, h_alignment = "LEFT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "LEFT", anchor = "Power", @@ -635,7 +645,7 @@ D.profile = { latency = true, detached = true, width_override = 226, - height = 12, + height = 14, icon = { position = "LEFT", -- "RIGHT", "NONE" }, @@ -655,6 +665,7 @@ D.profile = { enabled = false, style = "2D", -- "3D", "Class" position = "Left", -- "Right" + scale = 1.35, }, name = { size = 13, @@ -806,6 +817,7 @@ D.profile = { size = 13, h_alignment = "LEFT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "LEFT", anchor = "Health", @@ -817,6 +829,9 @@ D.profile = { prediction = { enabled = true, }, + reduction = { + enabled = false, + }, }, power = { enabled = true, @@ -825,6 +840,7 @@ D.profile = { size = 11, h_alignment = "LEFT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "LEFT", anchor = "Power", @@ -844,7 +860,7 @@ D.profile = { position = "LEFT", -- "RIGHT", "NONE" }, text = { - size = 12, + size = 10, }, point1 = { p = "BOTTOM", @@ -859,6 +875,7 @@ D.profile = { enabled = false, style = "2D", -- "3D", "Class" position = "Left", -- "Right" + scale = 1.35, }, name = { size = 13, @@ -1004,6 +1021,7 @@ D.profile = { size = 13, h_alignment = "RIGHT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "RIGHT", anchor = "Health", @@ -1015,6 +1033,9 @@ D.profile = { prediction = { enabled = true, }, + reduction = { + enabled = false, + }, }, power = { enabled = true, @@ -1023,6 +1044,7 @@ D.profile = { size = 11, h_alignment = "RIGHT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "RIGHT", anchor = "Power", @@ -1037,7 +1059,7 @@ D.profile = { latency = false, detached = false, width_override = 0, - height = 12, + height = 14, icon = { position = "LEFT", -- "RIGHT", "NONE" }, @@ -1057,6 +1079,7 @@ D.profile = { enabled = false, style = "2D", -- "3D", "Class" position = "Left", -- "Right" + scale = 1.35, }, name = { size = 13, @@ -1237,6 +1260,7 @@ D.profile = { size = 13, h_alignment = "CENTER", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "CENTER", anchor = "", @@ -1248,6 +1272,9 @@ D.profile = { prediction = { enabled = true, }, + reduction = { + enabled = false, + }, }, power = { enabled = false, @@ -1256,6 +1283,7 @@ D.profile = { size = 11, h_alignment = "CENTER", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "CENTER", anchor = "", @@ -1269,6 +1297,7 @@ D.profile = { enabled = false, style = "2D", -- "3D", "Class" position = "Left", -- "Right" + scale = 1.35, }, name = { size = 13, @@ -1348,6 +1377,7 @@ D.profile = { size = 13, h_alignment = "RIGHT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "RIGHT", anchor = "Health", @@ -1359,6 +1389,9 @@ D.profile = { prediction = { enabled = true, }, + reduction = { + enabled = false, + }, }, power = { enabled = true, @@ -1367,6 +1400,7 @@ D.profile = { size = 11, h_alignment = "RIGHT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "RIGHT", anchor = "Power", @@ -1381,7 +1415,7 @@ D.profile = { latency = false, detached = false, width_override = 0, - height = 12, + height = 14, icon = { position = "LEFT", -- "RIGHT", "NONE" }, @@ -1401,6 +1435,7 @@ D.profile = { enabled = false, style = "2D", -- "3D", "Class" position = "Left", -- "Right" + scale = 1.35, }, name = { size = 13, @@ -1581,6 +1616,7 @@ D.profile = { size = 13, h_alignment = "CENTER", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "CENTER", anchor = "", @@ -1592,6 +1628,9 @@ D.profile = { prediction = { enabled = true, }, + reduction = { + enabled = false, + }, }, power = { enabled = false, @@ -1600,6 +1639,7 @@ D.profile = { size = 11, h_alignment = "CENTER", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "CENTER", anchor = "", @@ -1613,6 +1653,7 @@ D.profile = { enabled = false, style = "2D", -- "3D", "Class" position = "Left", -- "Right" + scale = 1.35, }, name = { size = 13, @@ -1695,6 +1736,7 @@ D.profile = { size = 13, h_alignment = "RIGHT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "RIGHT", anchor = "Health", @@ -1706,6 +1748,9 @@ D.profile = { prediction = { enabled = true, }, + reduction = { + enabled = false, + }, }, power = { enabled = true, @@ -1714,6 +1759,7 @@ D.profile = { size = 11, h_alignment = "RIGHT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "RIGHT", anchor = "Power", @@ -1730,6 +1776,7 @@ D.profile = { size = 11, h_alignment = "RIGHT", v_alignment = "MIDDLE", + word_wrap = false, point1 = { p = "RIGHT", anchor = "AlternativePower", @@ -1744,7 +1791,7 @@ D.profile = { latency = false, detached = false, width_override = 0, - height = 12, + height = 14, icon = { position = "LEFT", -- "RIGHT", "NONE" }, @@ -1764,6 +1811,7 @@ D.profile = { enabled = false, style = "2D", -- "3D", "Class" position = "Left", -- "Right" + scale = 1.35, }, name = { size = 13, @@ -1958,7 +2006,8 @@ D.profile = { per_row = 12, width = 32, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[petbattle] hide; show", visible = true, @@ -2009,7 +2058,8 @@ D.profile = { per_row = 12, width = 32, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[vehicleui][petbattle][overridebar][possessbar] hide; show", visible = true, @@ -2060,7 +2110,8 @@ D.profile = { per_row = 12, width = 32, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[vehicleui][petbattle][overridebar][possessbar] hide; show", visible = true, @@ -2111,7 +2162,8 @@ D.profile = { per_row = 1, width = 32, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[vehicleui][petbattle][overridebar][possessbar] hide; show", visible = true, @@ -2162,7 +2214,8 @@ D.profile = { per_row = 1, width = 32, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[vehicleui][petbattle][overridebar][possessbar] hide; show", visible = true, @@ -2213,7 +2266,8 @@ D.profile = { per_row = 12, width = 32, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[vehicleui][petbattle][overridebar][possessbar] hide; show", visible = false, @@ -2264,7 +2318,8 @@ D.profile = { per_row = 12, width = 32, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[vehicleui][petbattle][overridebar][possessbar] hide; show", visible = false, @@ -2315,7 +2370,8 @@ D.profile = { per_row = 12, width = 32, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[vehicleui][petbattle][overridebar][possessbar] hide; show", visible = false, @@ -2366,7 +2422,8 @@ D.profile = { per_row = 10, width = 24, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[pet,nopetbattle,novehicleui,nooverridebar,nopossessbar] show; hide", visible = true, @@ -2403,7 +2460,8 @@ D.profile = { per_row = 10, width = 24, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[vehicleui][petbattle][overridebar][possessbar] hide; show", visible = true, @@ -2439,7 +2497,8 @@ D.profile = { per_row = 6, width = 32, height = 0, - spacing = 4, + x_spacing = 4, + y_spacing = 4, scale = 1, visibility = "[petbattle] show; hide", visible = true, @@ -2567,7 +2626,7 @@ D.profile = { spacing = 2, x_growth = "RIGHT", y_growth = "DOWN", - helptips = true, + helptips = false, fade = { enabled = false, combat = false, @@ -2627,7 +2686,7 @@ D.profile = { xpbar = { visible = true, width = 594, - height = 12, + height = 14, text = { size = 12, format = "NUM", -- "NUM_PERC" @@ -2744,9 +2803,9 @@ D.profile = { target = true, inspect = true, health = { - height = 12, + height = 14, text = { - size = 11, + size = 12, }, }, }, @@ -2838,6 +2897,9 @@ PrD.profile = { mail = { enabled = false, }, + suggest_frame = { -- EncounterJournalSuggestFrame + enabled = true, + }, }, minimap = { enabled = true, diff --git a/ls_UI/core/layout.lua b/ls_UI/core/layout.lua index 2b95de78..92086e0b 100644 --- a/ls_UI/core/layout.lua +++ b/ls_UI/core/layout.lua @@ -21,8 +21,10 @@ function E.Layout:Update(frame, config) local num = m_min(config.num, #children) local width = config.width or config.size local widthMult = m_min(num, config.per_row) + local xSpacing = config.x_spacing or config.spacing local height = config.height or config.size local heightMult = m_ceil(num / config.per_row) + local ySpacing = config.y_spacing or config.spacing local initialAnchor if config.y_growth == "UP" then @@ -39,8 +41,8 @@ function E.Layout:Update(frame, config) end end - frame:SetSize(widthMult * width + (widthMult - 1) * config.spacing + 4, - heightMult * height + (heightMult - 1) * config.spacing + 4) + frame:SetSize(widthMult * width + (widthMult - 1) * xSpacing + 4, + heightMult * height + (heightMult - 1) * ySpacing + 4) frame:SetScale(config.scale or 1) @@ -60,8 +62,9 @@ function E.Layout:Update(frame, config) child:SetFrameLevel(childLevel) child:SetSize(width, height) child:SetPoint(initialAnchor, frame, initialAnchor, - xDir * (2 + col * (config.spacing + width)), - yDir * (2 + row * (config.spacing + height))) + xDir * (2 + col * (xSpacing + width)), + yDir * (2 + row * (ySpacing + height)) + ) else child:SetParent(E.HIDDEN_PARENT) end diff --git a/ls_UI/core/media.lua b/ls_UI/core/media.lua index 4cfbf174..1dd758ff 100644 --- a/ls_UI/core/media.lua +++ b/ls_UI/core/media.lua @@ -9,5 +9,3 @@ local LSM = LibStub("LibSharedMedia-3.0") LSM:Register("border", "LS Thick", "Interface\\AddOns\\ls_UI\\assets\\border-thick-tooltip") LSM:Register("border", "LS Thin", "Interface\\AddOns\\ls_UI\\assets\\border-thin-tooltip") - -LSM:Register("statusbar", "LS", "Interface\\AddOns\\ls_UI\\assets\\statusbar-texture") diff --git a/ls_UI/core/modernize.lua b/ls_UI/core/modernize.lua index c5be8c92..a1805bef 100644 --- a/ls_UI/core/modernize.lua +++ b/ls_UI/core/modernize.lua @@ -5,7 +5,6 @@ local E, C, PrC, M, L, P, D, PrD, oUF = ns.E, ns.C, ns.PrC, ns.M, ns.L, ns.P, ns local _G = getfenv(0) local m_min = _G.math.min local next = _G.next -local type = _G.type -- Mine function P:Modernize(data, name, key) @@ -85,6 +84,13 @@ function P:Modernize(data, name, key) data.version = 10010001 end + + --> 110000.01 + if data.version < 11000001 then + data.textures = nil + + data.version = 11000001 + end elseif key == "profile" then --> 90001.05 if data.version < 9000105 then @@ -830,6 +836,25 @@ function P:Modernize(data, name, key) data.version = 10020001 end + + --> 110000.01 + if data.version < 11000001 then + if data.units then + data.units.inlay = nil + end + + if data.bars then + for _, bar in next, {"bar1", "bar2", "bar3", "bar4", "bar5", "bar6", "bar7", "bar8", "pet", "stance", "pet_battle"} do + if data.bars[bar] then + data.bars[bar].x_spacing = data.bars[bar].spacing + data.bars[bar].y_spacing = data.bars[bar].spacing + data.bars[bar].spacing = nil + end + end + end + + data.version = 11000001 + end elseif key == "private" then --> 90001.05 if data.version < 9000105 then diff --git a/ls_UI/core/mover.lua b/ls_UI/core/mover.lua index 1058cc0a..88abc308 100644 --- a/ls_UI/core/mover.lua +++ b/ls_UI/core/mover.lua @@ -415,7 +415,7 @@ do .. L["MOVER_RELATION_CREATE_DESC"] .. "\n\n" .. L["MOVER_RELATION_DESTROY_DESC"]) - self.LockButton.Text:SetText(L["LOCK"]) + self.LockButton.Text:SetText(_G.LOCK) self:SetHeight(m_ceil(self.UsageText:GetStringHeight() + 56)) end) settings:Hide() @@ -445,28 +445,30 @@ do nameToggle.Text = _G[nameToggle:GetName() .. "Text"] - local gridDropdown = LibStub("LibDropDown-ls"):NewButtonStretch(settings, "$parentGridDropdown") - gridDropdown:SetPoint("TOPRIGHT", -3, -3) + local gridDropdown = CreateFrame("DropdownButton", "$parentGridDropdown", settings, "WowStyle2DropdownTemplate") + gridDropdown:SetPoint("TOPRIGHT", -6, -5) gridDropdown:SetSize(120, 20) gridDropdown:SetFrameLevel(3) - gridDropdown:SetText(L["MOVER_GRID"]) + gridDropdown:SetDefaultText(L["MOVER_GRID"]) settings.GridDropdown = gridDropdown local GRID_SIZES = {4, 8, 16, 32} - for i = 1, #GRID_SIZES do - gridDropdown:Add({ - isRadio = true, - func = function(_, _, value) - grid:SetSize(value) - grid:Show() - end, - checked = function(self) - return grid:GetSize() == self.args[1] - end, - text = tostring(GRID_SIZES[i]), - args = {GRID_SIZES[i]}, - }) - end + + gridDropdown:SetupMenu(function(_, rootDescription) + for i = 1, #GRID_SIZES do + rootDescription:CreateRadio( + tostring(GRID_SIZES[i]), + function(index) + return grid:GetSize() == GRID_SIZES[index] + end, + function(index) + grid:SetSize(GRID_SIZES[index]) + grid:Show() + end, + i + ) + end + end) local usageText = settings:CreateFontString(nil, "OVERLAY") usageText:SetFontObject("GameFontNormal") diff --git a/ls_UI/core/statusbar.lua b/ls_UI/core/statusbar.lua index 32f4237f..ca80b77a 100644 --- a/ls_UI/core/statusbar.lua +++ b/ls_UI/core/statusbar.lua @@ -6,13 +6,20 @@ local _G = getfenv(0) local m_abs = _G.math.abs local next = _G.next local s_match = _G.string.match -local s_split = _G.string.split -local unpack = _G.unpack -- Mine local LSM = LibStub("LibSharedMedia-3.0") -function E:HandleStatusBar(bar, isRecursive) +local module = { + health = {}, + castbar = {}, + power = {}, + xpbar = {}, + other = {}, +} +E.StatusBars = module + +function module:Handle(bar, isRecursive) if bar.handled then return end local children = {bar:GetChildren()} @@ -45,7 +52,7 @@ function E:HandleStatusBar(bar, isRecursive) for _, child in next, children do if child:IsObjectType("StatusBar") then - tbg, ttext, tsbt = self:HandleStatusBar(child, true) + tbg, ttext, tsbt = self:Handle(child, true) end end @@ -63,13 +70,18 @@ function E:HandleStatusBar(bar, isRecursive) bar.RealBar = rbar end + E.StatusBars:Capture(bar.RealBar or bar, "other") + if not bg then bg = bar:CreateTexture(nil, "BACKGROUND") end - bg:SetColorTexture(C.db.global.colors.dark_gray:GetRGB()) + bg:SetTexture("Interface\\HELPFRAME\\DarkSandstone-Tile", "REPEAT", "REPEAT") + bg:SetVertexColor(1, 1, 1, 1) + bg:SetHorizTile(true) + bg:SetVertTile(true) bg:SetAllPoints() - bar.Bg = bg + bar.Background = bg if not text then text = bar:CreateFontString(nil, "ARTWORK") @@ -85,7 +97,7 @@ function E:HandleStatusBar(bar, isRecursive) text:SetPoint("BOTTOMRIGHT", -1, 0) bar.Text = text - sbt:SetTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz)) + sbt:SetTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.other)) bar.Texture = sbt bar.handled = true @@ -96,356 +108,34 @@ function E:HandleStatusBar(bar, isRecursive) end end -function E:CreateStatusBar(parent, name, orientation) - local bar = CreateFrame("StatusBar", name, parent) - bar:SetOrientation(orientation) - bar:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8") - - local bg = bar:CreateTexture(nil, "BACKGROUND") - bg:SetColorTexture(C.db.global.colors.dark_gray:GetRGB()) - bg:SetAllPoints() - bar.Bg = bg - - local text = bar:CreateFontString("$parentText", "ARTWORK") - E.FontStrings:Capture(text, "statusbar") - text:UpdateFont(12) - text:SetWordWrap(false) - bar.Text = text - - bar.handled = true - - return bar -end - do - local LAYOUT = { - HORIZONTAL = { - ["8"] = { - [1] = { - coords = {1 / 128, 31 / 128, 14 / 512, 50 / 512}, - size = {30 / 2, 36 / 2}, - }, - [2] = { - coords = {32 / 128, 62 / 128, 14 / 512, 50 / 512}, - size = {30 / 2, 36 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 0, 0.025390625, 1, 0.001953125, 1, 0.025390625}, - size = {0, 12 / 2}, - }, - [4] = { - coords = {0, 0.025390625, 0, 0.001953125, 1, 0.025390625, 1, 0.001953125}, - size = {0, 12 / 2}, - }, - }, - ["12"] = { - [1] = { - coords = {1 / 128, 31 / 128, 51 / 512, 95 / 512}, - size = {30 / 2, 44 / 2}, - }, - [2] = { - coords = {32 / 128, 62 / 128, 51 / 512, 95 / 512}, - size = {30 / 2, 44 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 0, 0.025390625, 1, 0.001953125, 1, 0.025390625}, - size = {0, 12 / 2}, - }, - [4] = { - coords = {0, 0.025390625, 0, 0.001953125, 1, 0.025390625, 1, 0.001953125}, - size = {0, 12 / 2}, - }, - }, - ["16"] = { - [1] = { - coords = {1 / 128, 31 / 128, 96 / 512, 148 / 512}, - size = {30 / 2, 52 / 2}, - }, - [2] = { - coords = {32 / 128, 62 / 128, 96 / 512, 148 / 512}, - size = {30 / 2, 52 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 0, 0.025390625, 1, 0.001953125, 1, 0.025390625}, - size = {0, 12 / 2}, - }, - [4] = { - coords = {0, 0.025390625, 0, 0.001953125, 1, 0.025390625, 1, 0.001953125}, - size = {0, 12 / 2}, - }, - }, - ["20"] = { - [1] = { - coords = {1 / 128, 31 / 128, 149 / 512, 209 / 512}, - size = {30 / 2, 60 / 2}, - }, - [2] = { - coords = {32 / 128, 62 / 128, 149 / 512, 209 / 512}, - size = {30 / 2, 60 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 0, 0.025390625, 1, 0.001953125, 1, 0.025390625}, - size = {0, 12 / 2}, - }, - [4] = { - coords = {0, 0.025390625, 0, 0.001953125, 1, 0.025390625, 1, 0.001953125}, - size = {0, 12 / 2}, - }, - }, - ["24"] = { - [1] = { - coords = {1 / 128, 31 / 128, 210 / 512, 278 / 512}, - size = {30 / 2, 68 / 2}, - }, - [2] = { - coords = {32 / 128, 62 / 128, 210 / 512, 278 / 512}, - size = {30 / 2, 68 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 0, 0.025390625, 1, 0.001953125, 1, 0.025390625}, - size = {0, 12 / 2}, - }, - [4] = { - coords = {0, 0.025390625, 0, 0.001953125, 1, 0.025390625, 1, 0.001953125}, - size = {0, 12 / 2}, - }, - }, - ["28"] = { - [1] = { - coords = {1 / 128, 31 / 128, 279 / 512, 355 / 512}, - size = {30 / 2, 76 / 2}, - }, - [2] = { - coords = {32 / 128, 62 / 128, 279 / 512, 355 / 512}, - size = {30 / 2, 76 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 0, 0.025390625, 1, 0.001953125, 1, 0.025390625}, - size = {0, 12 / 2}, - }, - [4] = { - coords = {0, 0.025390625, 0, 0.001953125, 1, 0.025390625, 1, 0.001953125}, - size = {0, 12 / 2}, - }, - }, - ["32"] = { - [1] = { - coords = {1 / 128, 31 / 128, 356 / 512, 440 / 512}, - size = {30 / 2, 84 / 2}, - }, - [2] = { - coords = {32 / 128, 62 / 128, 356 / 512, 440 / 512}, - size = {30 / 2, 84 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 0, 0.025390625, 1, 0.001953125, 1, 0.025390625}, - size = {0, 12 / 2}, - }, - [4] = { - coords = {0, 0.025390625, 0, 0.001953125, 1, 0.025390625, 1, 0.001953125}, - size = {0, 12 / 2}, - }, - }, - }, - VERTICAL = { - ["8"] = { - [1] = { - coords = {0.0078125, 0.02734375, 0.2421875, 0.02734375, 0.0078125, 0.09765625, 0.2421875, 0.09765625}, - size = {36 / 2, 30 / 2}, - }, - [2] = { - coords = {0.25, 0.02734375, 0.484375, 0.02734375, 0.25, 0.09765625, 0.484375, 0.09765625}, - size = {36 / 2, 30 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 1, 0.001953125, 0, 0.025390625, 1, 0.025390625}, - size = {12 / 2, 0}, - }, - [4] = { - coords = {0, 0.025390625, 1, 0.025390625, 0, 0.001953125, 1, 0.001953125}, - size = {12 / 2, 0}, - }, - }, - ["12"] = { - [1] = { - coords = {0.0078125, 0.099609375, 0.2421875, 0.099609375, 0.0078125, 0.185546875, 0.2421875, 0.185546875}, - size = {44 / 2, 30 / 2}, - }, - [2] = { - coords = {0.25, 0.099609375, 0.484375, 0.099609375, 0.25, 0.185546875, 0.484375, 0.185546875}, - size = {44 / 2, 30 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 1, 0.001953125, 0, 0.025390625, 1, 0.025390625}, - size = {12 / 2, 0}, - }, - [4] = { - coords = {0, 0.025390625, 1, 0.025390625, 0, 0.001953125, 1, 0.001953125}, - size = {12 / 2, 0}, - }, - }, - ["16"] = { - [1] = { - coords = {0.0078125, 0.1875, 0.2421875, 0.1875, 0.0078125, 0.2890625, 0.2421875, 0.2890625}, - size = {52 / 2, 30 / 2}, - }, - [2] = { - coords = {0.25, 0.1875, 0.484375, 0.1875, 0.25, 0.2890625, 0.484375, 0.2890625}, - size = {52 / 2, 30 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 1, 0.001953125, 0, 0.025390625, 1, 0.025390625}, - size = {12 / 2, 0}, - }, - [4] = { - coords = {0, 0.025390625, 1, 0.025390625, 0, 0.001953125, 1, 0.001953125}, - size = {12 / 2, 0}, - }, - }, - ["20"] = { - [1] = { - coords = {0.0078125, 0.291015625, 0.2421875, 0.291015625, 0.0078125, 0.408203125, 0.2421875, 0.408203125}, - size = {60 / 2, 30 / 2}, - }, - [2] = { - coords = {0.25, 0.291015625, 0.484375, 0.291015625, 0.25, 0.408203125, 0.484375, 0.408203125}, - size = {60 / 2, 30 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 1, 0.001953125, 0, 0.025390625, 1, 0.025390625}, - size = {12 / 2, 0}, - }, - [4] = { - coords = {0, 0.025390625, 1, 0.025390625, 0, 0.001953125, 1, 0.001953125}, - size = {12 / 2, 0}, - }, - }, - ["24"] = { - [1] = { - coords = {0.0078125, 0.41015625, 0.2421875, 0.41015625, 0.0078125, 0.54296875, 0.2421875, 0.54296875}, - size = {68 / 2, 30 / 2}, - }, - [2] = { - coords = {0.25, 0.41015625, 0.484375, 0.41015625, 0.25, 0.54296875, 0.484375, 0.54296875}, - size = {68 / 2, 30 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 1, 0.001953125, 0, 0.025390625, 1, 0.025390625}, - size = {12 / 2, 0}, - }, - [4] = { - coords = {0, 0.025390625, 1, 0.025390625, 0, 0.001953125, 1, 0.001953125}, - size = {12 / 2, 0}, - }, - }, - ["28"] = { - [1] = { - coords = {0.0078125, 0.544921875, 0.2421875, 0.544921875, 0.0078125, 0.693359375, 0.2421875, 0.693359375}, - size = {76 / 2, 30 / 2}, - }, - [2] = { - coords = {0.25, 0.544921875, 0.484375, 0.544921875, 0.25, 0.693359375, 0.484375, 0.693359375}, - size = {76 / 2, 30 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 1, 0.001953125, 0, 0.025390625, 1, 0.025390625}, - size = {12 / 2, 0}, - }, - [4] = { - coords = {0, 0.025390625, 1, 0.025390625, 0, 0.001953125, 1, 0.001953125}, - size = {12 / 2, 0}, - }, - }, - ["32"] = { - [1] = { - coords = {0.0078125, 0.6953125, 0.2421875, 0.6953125, 0.0078125, 0.859375, 0.2421875, 0.859375}, - size = {84 / 2, 30 / 2}, - }, - [2] = { - coords = {0.25, 0.6953125, 0.484375, 0.6953125, 0.25, 0.859375, 0.484375, 0.859375}, - size = {84 / 2, 30 / 2}, - }, - [3] = { - coords = {0, 0.001953125, 1, 0.001953125, 0, 0.025390625, 1, 0.025390625}, - size = {12 / 2, 0}, - }, - [4] = { - coords = {0, 0.025390625, 1, 0.025390625, 0, 0.001953125, 1, 0.001953125}, - size = {12 / 2, 0}, - }, - }, - }, - } - - local function hide(self) - for i = 1, 5 do - self[i]:Hide() - end - end - - local function show(self) - for i = 1, 5 do - self[i]:Show() - end - end - - function E:SetStatusBarSkin(object, flag) - local s, v = s_split("-", flag) - - object.Tube = object.Tube or { - [1] = object:CreateTexture(nil, "ARTWORK", nil, 7), -- left/top - [2] = object:CreateTexture(nil, "ARTWORK", nil, 7), -- right/bottom - [3] = object:CreateTexture(nil, "ARTWORK", nil, 7), -- top/right - [4] = object:CreateTexture(nil, "ARTWORK", nil, 7), -- bottom/right - [5] = object:CreateTexture(nil, "ARTWORK", nil, 6), -- glass - Hide = hide, - Show = show, - } - - if s == "HORIZONTAL" or s == "VERTICAL" then - for i = 1, 4 do - if v == "GLASS" then - object.Tube[i]:SetTexture(nil) - object.Tube[i]:ClearAllPoints() - else - object.Tube[i]:SetTexture("Interface\\AddOns\\ls_UI\\assets\\statusbar") - object.Tube[i]:SetTexCoord(unpack(LAYOUT[s][v][i].coords)) - object.Tube[i]:ClearAllPoints() - object.Tube[i]:SetSize(unpack(LAYOUT[s][v][i].size)) - end - end - - object.Tube[5]:SetTexture("Interface\\AddOns\\ls_UI\\assets\\statusbar-glass") - object.Tube[5]:SetAllPoints() - - if s == "HORIZONTAL" then - object.Tube[5]:SetTexCoord(0, 0, 0, 1, 1, 0, 1, 1) - - if v ~= "GLASS" then - object.Tube[1]:SetPoint("RIGHT", object, "LEFT", 10 / 2, 0) - object.Tube[2]:SetPoint("LEFT", object, "RIGHT", -10 / 2, 0) - object.Tube[3]:SetPoint("TOPLEFT", object.Tube[1], "TOPRIGHT", 0, 0) - object.Tube[3]:SetPoint("TOPRIGHT", object.Tube[2], "TOPLEFT", 0, 0) - object.Tube[4]:SetPoint("BOTTOMLEFT", object.Tube[1], "BOTTOMRIGHT", 0, 0) - object.Tube[4]:SetPoint("BOTTOMRIGHT", object.Tube[2], "BOTTOMLEFT", 0, 0) - end - else - object.Tube[5]:SetTexCoord(1, 0, 0, 0, 1, 1, 0, 1) - - if v ~= "GLASS" then - object.Tube[1]:SetPoint("BOTTOM", object, "TOP", 0, -10 / 2) - object.Tube[2]:SetPoint("TOP", object, "BOTTOM", 0, 10 / 2) - object.Tube[3]:SetPoint("TOPLEFT", object.Tube[1], "BOTTOMLEFT", 0, 0) - object.Tube[3]:SetPoint("BOTTOMLEFT", object.Tube[2], "TOPLEFT", 0, 0) - object.Tube[4]:SetPoint("TOPRIGHT", object.Tube[1], "BOTTOMRIGHT", 0, 0) - object.Tube[4]:SetPoint("BOTTOMRIGHT", object.Tube[2], "TOPRIGHT", 0, 0) - end - end - elseif s == "NONE" then - for i = 1, 5 do - object.Tube[i]:SetTexture(nil) - object.Tube[i]:ClearAllPoints() - end + local gradientColorMin = {r = 0, g = 0, b = 0, a = 0} + local gradientColorMax = {r = 0, g = 0, b = 0, a = 0.4} + + function module:Reskin(bar) + if bar.TextureParent then return end + + local textureParent = CreateFrame("Frame", nil, bar) + textureParent:SetFrameLevel(bar:GetFrameLevel() + 2) + textureParent:SetAllPoints() + bar.TextureParent = textureParent + + local border = E:CreateBorder(textureParent, "BORDER") + border:SetTexture("Interface\\AddOns\\ls_UI\\assets\\border-statusbar") + border:SetSize(16) + border:SetOffset(-4) + textureParent.Border = border + + local gradient = textureParent:CreateTexture(nil, "BORDER", nil, -1) + gradient:SetAllPoints(textureParent) + gradient:SetSnapToPixelGrid(false) + gradient:SetTexelSnappingBias(0) + gradient:SetTexture("Interface\\BUTTONS\\WHITE8X8") + gradient:SetGradient("VERTICAL", gradientColorMin, gradientColorMax) + textureParent.Gradient = gradient + + if bar.Text then + bar.Text:SetParent(textureParent) end end end @@ -556,7 +246,7 @@ do self._max = max end - function E:SmoothBar(bar) + function module:Smooth(bar) if handledObjects[bar] then return end bar._min, bar._max = bar:GetMinMaxValues() @@ -570,7 +260,7 @@ do handledObjects[bar] = true end - function E:DesmoothBar(bar) + function module:Desmooth(bar) if not handledObjects[bar] then return end remove(bar) @@ -587,8 +277,65 @@ do handledObjects[bar] = nil end +end + +do + local objects = {} + local callbacks = {} + + local function update(obj, t) + local texture = LSM:Fetch("statusbar", C.db.global.textures.statusbar[t]) or LSM:Fetch("statusbar", "Solid") + + obj:SetStatusBarTexture(texture) + + local callback = callbacks[obj] + if callback then + callback(obj, texture) + end + end + + local statusbar_proto = {} + do + function statusbar_proto:UpdateStatusBarTexture() + local t = objects[self] + if not t then return end + + update(self, t) + end + end + + function module:Capture(obj, t, callback) + if obj:GetObjectType() ~= "StatusBar" then + return + elseif not self[t] then + return + elseif objects[obj] or self[t][obj] then + return + end + + Mixin(obj, statusbar_proto) + + self[t][obj] = true + objects[obj] = t + callbacks[obj] = callback + end - function E:SetSmoothingAmount(v) - AMOUNT = clamp(v, 0.3, 0.6) + function module:Release(obj) + for k in next, statusbar_proto do + obj[k] = nil + end + + self[objects[obj]] = true + objects[obj] = nil + callbacks[obj] = nil + end + + function module:UpdateAll(t) + if not self[t] then return end + + for obj in next, self[t] do + update(obj, t) + end end + end diff --git a/ls_UI/core/utils.lua b/ls_UI/core/utils.lua index a1c98947..bc7d18c2 100644 --- a/ls_UI/core/utils.lua +++ b/ls_UI/core/utils.lua @@ -461,7 +461,7 @@ do end end - return L["UNKNOWN"] + return _G.UNKNOWN end local function getDifficultyColor(difficulty) @@ -651,6 +651,10 @@ function E:ResolveAnchorPoint(frame, children) anchor = anchor[children[i]] end + if not anchor then + anchor = frame + end + return anchor end end diff --git a/ls_UI/embeds/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua b/ls_UI/embeds/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua index bb1e4fdf..f2a238bc 100644 --- a/ls_UI/embeds/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua +++ b/ls_UI/embeds/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- EditBox Widget -------------------------------------------------------------------------------]] -local Type, Version = "EditBox", 28 +local Type, Version = "EditBox", 29 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -10,7 +10,7 @@ local tostring, pairs = tostring, pairs -- WoW APIs local PlaySound = PlaySound -local GetCursorInfo, ClearCursor, GetSpellInfo = GetCursorInfo, ClearCursor, GetSpellInfo +local GetCursorInfo, ClearCursor = GetCursorInfo, ClearCursor local CreateFrame, UIParent = CreateFrame, UIParent local _G = _G @@ -76,12 +76,16 @@ end local function EditBox_OnReceiveDrag(frame) local self = frame.obj - local type, id, info = GetCursorInfo() + local type, id, info, extra = GetCursorInfo() local name if type == "item" then name = info elseif type == "spell" then - name = GetSpellInfo(id, info) + if C_Spell and C_Spell.GetSpellName then + name = C_Spell.GetSpellName(extra) + else + name = GetSpellInfo(id, info) + end elseif type == "macro" then name = GetMacroInfo(id) end diff --git a/ls_UI/embeds/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua b/ls_UI/embeds/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua index bacb2be8..f0095b5c 100644 --- a/ls_UI/embeds/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua +++ b/ls_UI/embeds/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua @@ -1,4 +1,4 @@ -local Type, Version = "MultiLineEditBox", 32 +local Type, Version = "MultiLineEditBox", 33 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -6,7 +6,7 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end local pairs = pairs -- WoW APIs -local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, ClearCursor +local GetCursorInfo, ClearCursor = GetCursorInfo, ClearCursor local CreateFrame, UIParent = CreateFrame, UIParent local _G = _G @@ -100,9 +100,13 @@ local function OnMouseUp(self) end local function OnReceiveDrag(self) -- EditBox / ScrollFrame - local type, id, info = GetCursorInfo() + local type, id, info, extra = GetCursorInfo() if type == "spell" then - info = GetSpellInfo(id, info) + if C_Spell and C_Spell.GetSpellName then + info = C_Spell.GetSpellName(extra) + else + info = GetSpellInfo(id, info) + end elseif type ~= "item" then return end diff --git a/ls_UI/embeds/LibActionButton-1.0 b/ls_UI/embeds/LibActionButton-1.0 index f79a2223..33ec3d22 160000 --- a/ls_UI/embeds/LibActionButton-1.0 +++ b/ls_UI/embeds/LibActionButton-1.0 @@ -1 +1 @@ -Subproject commit f79a222394c48b8d452c163cc268a6e30dc55836 +Subproject commit 33ec3d224baec81e329afe90969ec2ee24c46aa6 diff --git a/ls_UI/embeds/LibDropDown b/ls_UI/embeds/LibDropDown deleted file mode 160000 index a3b1a5ec..00000000 --- a/ls_UI/embeds/LibDropDown +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a3b1a5ec28bb73328b6d7c91fec1bc1d0d238389 diff --git a/ls_UI/embeds/LibDualSpec-1.0 b/ls_UI/embeds/LibDualSpec-1.0 index 1f311597..e0da0f71 160000 --- a/ls_UI/embeds/LibDualSpec-1.0 +++ b/ls_UI/embeds/LibDualSpec-1.0 @@ -1 +1 @@ -Subproject commit 1f311597d9a0bbcdb292877daa91ef4fb47609a7 +Subproject commit e0da0f71030bc52fd07cdaf56543c139fdc09276 diff --git a/ls_UI/embeds/TaintLess/TaintLess.toc b/ls_UI/embeds/TaintLess/TaintLess.toc index 23e0af70..6f7faa19 100644 --- a/ls_UI/embeds/TaintLess/TaintLess.toc +++ b/ls_UI/embeds/TaintLess/TaintLess.toc @@ -1,5 +1,6 @@ -## Interface: 100200 +## Interface: 11502, 40400, 100207 ## Title: TaintLess ## Notes: Eliminates certain classes of taint errors. -## Version: 23-12-09 +## Version: 24-06-02 +## IconTexture: 134125 TaintLess.xml \ No newline at end of file diff --git a/ls_UI/embeds/TaintLess/TaintLess.xml b/ls_UI/embeds/TaintLess/TaintLess.xml index 14643019..04964ec0 100644 --- a/ls_UI/embeds/TaintLess/TaintLess.xml +++ b/ls_UI/embeds/TaintLess/TaintLess.xml @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/ls_UI/embeds/TaintLess/TaintLess_Classic.toc b/ls_UI/embeds/TaintLess/TaintLess_Classic.toc deleted file mode 100644 index 3a0ab443..00000000 --- a/ls_UI/embeds/TaintLess/TaintLess_Classic.toc +++ /dev/null @@ -1,5 +0,0 @@ -## Interface: 11500 -## Title: TaintLess -## Notes: Eliminates certain classes of taint errors. -## Version: 23-12-09 -TaintLess.xml \ No newline at end of file diff --git a/ls_UI/embeds/TaintLess/TaintLess_Wrath.toc b/ls_UI/embeds/TaintLess/TaintLess_Wrath.toc deleted file mode 100644 index 6e7df161..00000000 --- a/ls_UI/embeds/TaintLess/TaintLess_Wrath.toc +++ /dev/null @@ -1,5 +0,0 @@ -## Interface: 30403 -## Title: TaintLess -## Notes: Eliminates certain classes of taint errors. -## Version: 23-12-09 -TaintLess.xml \ No newline at end of file diff --git a/ls_UI/embeds/_embeds.xml b/ls_UI/embeds/_embeds.xml index b36716da..da85529d 100644 --- a/ls_UI/embeds/_embeds.xml +++ b/ls_UI/embeds/_embeds.xml @@ -14,7 +14,6 @@