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 @@
-
diff --git a/ls_UI/embeds/oUF b/ls_UI/embeds/oUF
index 07f7153e..373b8563 160000
--- a/ls_UI/embeds/oUF
+++ b/ls_UI/embeds/oUF
@@ -1 +1 @@
-Subproject commit 07f7153ed84b1d20167a5b6f4325fa93c1821bf0
+Subproject commit 373b8563060f627dad964881c6dd0bc47cb377b1
diff --git a/ls_UI/locales/_post.lua b/ls_UI/locales/_post.lua
index 6b5609a7..95c74733 100644
--- a/ls_UI/locales/_post.lua
+++ b/ls_UI/locales/_post.lua
@@ -6,7 +6,3 @@ local _G = getfenv(0)
-- Mine
-- These rely on custom strings
-L["LATENCY_COLON"] = L["LATENCY"] .. ":"
-L["MEMORY_COLON"] = L["MEMORY"] .. ":"
-
--- Multi-liners
diff --git a/ls_UI/locales/deDE.lua b/ls_UI/locales/deDE.lua
index dd89f2c5..a566d162 100644
--- a/ls_UI/locales/deDE.lua
+++ b/ls_UI/locales/deDE.lua
@@ -8,7 +8,6 @@ local _G = getfenv(0)
if GetLocale() ~= "deDE" then return end
-L["ACTION_BARS"] = "Aktionsleisten"
L["ADVENTURE_JOURNAL_DESC"] = "Zeige Infos zu Schlachtzugszuweisungen"
L["ALTERNATIVE_POWER"] = "Spezielle Ressourcen"
L["ALWAYS_SHOW"] = "Immer anzeigen"
@@ -20,12 +19,6 @@ L["AURA"] = "Aura"
L["AURA_FILTERS"] = "Aura Filter"
L["AURA_TRACKER"] = "Aura Anzeige"
L["AURA_TYPE"] = "Aura Typ"
-L["AURAS"] = "Auren"
-L["BAR_1"] = "Leiste 1"
-L["BAR_2"] = "Leiste 2"
-L["BAR_3"] = "Leiste 3"
-L["BAR_4"] = "Leiste 4"
-L["BAR_5"] = "Leiste 5"
L["BAR_COLOR"] = "Leistenfarbe"
L["BAR_TEXT"] = "Leistentext"
L["BLACKLIST"] = "Schwarze Liste"
@@ -62,7 +55,6 @@ L["COPY_FROM_DESC"] = "Übernehme Einstellungen von diesem Ziel."
L["COST_PREDICTION"] = "Kostenvorraussage"
L["COUNT_TEXT"] = "Zähler Text"
L["CURSE"] = "Fluch"
-L["DEAD"] = "Tot"
L["DEBUFF"] = "Schwächungszauber"
L["DEBUFFS"] = "Debuffs"
L["DIFFICULT"] = "Schwierig"
@@ -74,7 +66,6 @@ L["DISEASE"] = "Krankheit"
L["DOWN"] = "Runter"
L["ENEMY_UNITS"] = "Feindliche Einheiten"
L["EVENTS"] = "Ereignisse"
-L["EXPERIENCE"] = "Erfahrung"
L["EXPERIENCE_NORMAL"] = "Normal"
L["EXPERIENCE_RESTED"] = "Ausgeruht"
L["FACTION_NEUTRAL"] = "Neutral"
@@ -84,9 +75,7 @@ L["FADE_OUT_DURATION"] = "Ausblenden Dauer"
L["FADING"] = "Ausblenden"
L["FOCUS_FRAME"] = "Fokusziel"
L["FOCUS_TOF"] = "Fokusziel und Ziel des Fokusziel"
-L["FREE_BAG_SLOTS_TOOLTIP"] = "Freier Inventarplatz: |cffffffff%s|r"
L["HEALTH"] = "Lebenspunkte"
-L["HONOR"] = "Ehre"
L["ICON"] = "Symbol"
L["LATENCY"] = "Latenz"
L["LATENCY_HOME"] = "Latenz Standort"
diff --git a/ls_UI/locales/enUS.lua b/ls_UI/locales/enUS.lua
index 02be2c49..91f5d172 100644
--- a/ls_UI/locales/enUS.lua
+++ b/ls_UI/locales/enUS.lua
@@ -13,55 +13,62 @@ L["WAGO"] = "Wago"
L["WOWINTERFACE"] = "WoWInterface"
-- These rely on Blizz strings
+-- Anything that goes to the config should be added here instead of using _G in the config code
L["ACCEPT"] = _G.ACCEPT
+L["ACTION_BARS"] = _G.ACTIONBARS_LABEL
L["ADD"] = _G.ADD
+L["ADVENTURE_GUIDE"] = _G.ADVENTURE_JOURNAL
L["ALT"] = _G.ALT_KEY_TEXT
+L["ALT_KEY"] = _G.ALT_KEY
L["ARCANE_CHARGES"] = _G.POWER_TYPE_ARCANE_CHARGES
+L["AURAS"] = _G.AURAS
L["BACKGROUND"] = _G.BACKGROUND
L["BACKPACK"] = _G.BACKPACK_TOOLTIP
-L["CALL_TO_ARMS_TOOLTIP"] = _G.LFG_CALL_TO_ARMS
-L["CANCEL"] = _G.CANCEL
+L["BAR_1"] = _G.OPTION_SHOW_ACTION_BAR:format(1)
+L["BAR_2"] = _G.OPTION_SHOW_ACTION_BAR:format(2)
+L["BAR_3"] = _G.OPTION_SHOW_ACTION_BAR:format(3)
+L["BAR_4"] = _G.OPTION_SHOW_ACTION_BAR:format(4)
+L["BAR_5"] = _G.OPTION_SHOW_ACTION_BAR:format(5)
+L["BAR_6"] = _G.OPTION_SHOW_ACTION_BAR:format(6)
+L["BAR_7"] = _G.OPTION_SHOW_ACTION_BAR:format(7)
+L["BAR_8"] = _G.OPTION_SHOW_ACTION_BAR:format(8)
L["CHI"] = _G.CHI
L["CLASS"] = _G.CLASS
L["COMBAT"] = _G.COMBAT
L["COMBO_POINTS"] = _G.COMBO_POINTS
-L["CONTESTED_TERRITORY"] = _G.CONTESTED_TERRITORY:gsub("[()]", "")
+L["CONTESTED_TERRITORY"] = _G.CONTESTED_TERRITORY:gsub("[()()]", "")
L["CTRL"] = _G.CTRL_KEY_TEXT
+L["CTRL_KEY"] = _G.CTRL_KEY
L["CURRENCY"] = _G.CURRENCY
-L["CURRENCY_COLON"] = _G.CURRENCY .. ":"
-L["DAMAGER_RED"] = E:WrapTextInColorCode(D.global.colors.red, _G.DAMAGER)
L["DELETE"] = _G.DELETE
L["DONE"] = _G.DONE .. "!"
-L["DURABILITY_COLON"] = _G.DURABILITY .. ":"
L["ENABLE"] = _G.ENABLE
L["ENCHANTS"] = _G.AUCTION_CATEGORY_ITEM_ENHANCEMENT
L["ENERGY"] = _G.ENERGY
L["ENRAGE"] = _G.ENCOUNTER_JOURNAL_SECTION_FLAG11
L["EQUIPMENT"] = _G.BAG_FILTER_EQUIPMENT
-L["ERROR_RED"] = E:WrapTextInColorCode(D.global.colors.red, _G.ERROR_CAPS)
+L["ERROR_RED"] = D.global.colors.red:WrapTextInColorCode(_G.ERROR_CAPS)
+L["EXPERIENCE"] = _G.EXPERIENCE_COLON:gsub("[::]", "")
L["FACTION"] = _G.FACTION
L["FACTION_ALLIANCE"] = _G.FACTION_ALLIANCE
L["FACTION_HORDE"] = _G.FACTION_HORDE
L["FACTION_NEUTRAL"] = _G.FACTION_NEUTRAL
-L["FEATURE_BECOMES_AVAILABLE_AT_LEVEL"] = _G.FEATURE_BECOMES_AVAILABLE_AT_LEVEL
-L["FEATURE_NOT_AVAILBLE_NEUTRAL"] = _G.FEATURE_NOT_AVAILBLE_PANDAREN
L["FOCUS"] = _G.FOCUS
L["FOCUS_CAST_KEY"] = _G.FOCUS_CAST_KEY_TEXT
-L["FOREIGN_SERVER_LABEL"] = _G.FOREIGN_SERVER_LABEL:gsub("%s", "")
L["FURY"] = _G.FURY
L["GENERAL"] = _G.GENERAL_LABEL
-L["HEALER_GREEN"] = E:WrapTextInColorCode(D.global.colors.green, _G.HEALER)
L["HIDE"] = _G.HIDE
L["HOLY_POWER"] = _G.HOLY_POWER
+L["HONOR"] = _G.HONOR
L["ILVL"] = _G.ITEM_LEVEL_ABBR
+L["INFO"] = _G.INFO
L["INSANITY"] = _G.INSANITY
L["LOCK"] = _G.LOCK
-L["LUA_ERROR"] = _G.LUA_ERROR .. ": %s"
+L["LUA_ERROR_TEMPLATE"] = _G.LUA_ERROR .. _G.HEADER_COLON .. " %s"
L["LUNAR_POWER"] = _G.LUNAR_POWER
-L["MAELSTROM_POWER"] = _G.MAELSTROM or _G.MAELSTROM_POWER -- FIXME!
+L["MAELSTROM_POWER"] = _G.MAELSTROM or _G.MAELSTROM_POWER
L["MAIL"] = _G.MAIL_LABEL
L["MANA"] = _G.MANA
-L["MAW_BUFFS"] = _G.MAW_POWER_DESCRIPTION
L["MINIMAP"] = _G.MINIMAP_LABEL
L["MINIMAP_HEADER_UNDERNEATH"] = _G.HUD_EDIT_MODE_SETTING_MINIMAP_HEADER_UNDERNEATH
L["MISC"] = _G.MISCELLANEOUS
@@ -70,36 +77,34 @@ L["MOUSEOVER_CAST_KEY"] = _G.MOUSEOVER_CAST_KEY
L["MOUSEOVER_CAST_KEY_DESC"] = _G.OPTION_TOOLTIP_ENABLE_MOUSEOVER_CAST_KEY_TEXT
L["NEW"] = _G.NEW
L["NONE"] = _G.NONE
+L["NONE_KEY"] = _G.NONE_KEY
L["NOTIFICATIONS"] = _G.COMMUNITIES_NOTIFICATION_SETTINGS_DIALOG_SETTINGS_LABEL
L["OFFLINE"] = _G.PLAYER_OFFLINE
L["OKAY"] = _G.OKAY
+L["OTHER"] = _G.OTHER
L["PAIN"] = _G.PAIN
-L["PET"] = _G.PET
L["PICKUP_ACTION_KEY"] = _G.PICKUP_ACTION_KEY_TEXT
L["RAGE"] = _G.RAGE
-L["RAID_INFO_COLON"] = _G.RAID_INFO .. ":"
L["RELOAD_UI"] = _G.RELOADUI
L["RENOWN"] = _G.LANDING_PAGE_RENOWN_LABEL
-L["REPUTATION"] = _G.REPUTATION
+L["RESET_TO_DEFAULT"] = _G.RESET_TO_DEFAULT
L["ROTATE_MINIMAP"] = _G.HUD_EDIT_MODE_SETTING_MINIMAP_ROTATE_MINIMAP
L["RUNES"] = _G.RUNES
L["RUNIC_POWER"] = _G.RUNIC_POWER
-L["SANCTUARY"] = _G.SANCTUARY_TERRITORY:gsub("[()]", "")
+L["SANCTUARY"] = _G.SANCTUARY_TERRITORY:gsub("[()()]", "")
L["SELF_CAST_KEY"] = _G.AUTO_SELF_CAST_KEY_TEXT
L["SELF_CAST_KEY_DESC"] = _G.OPTION_TOOLTIP_AUTO_SELF_CAST_KEY_TEXT
L["SHIFT"] = _G.SHIFT_KEY_TEXT
+L["SHIFT_KEY"] = _G.SHIFT_KEY
L["SHOW"] = _G.SHOW
L["SOUL_SHARDS"] = _G.SOUL_SHARDS_POWER
L["TALKING_HEAD"] = _G.HUD_EDIT_MODE_TALKING_HEAD_FRAME_LABEL
-L["TANK_BLUE"] = E:WrapTextInColorCode(D.global.colors.blue, _G.TANK)
L["TARGET"] = _G.TARGET
-L["TOTAL"] = _G.TOTAL
+L["TEXTURES"] = _G.TEXTURES_SUBHEADER
L["UNIT_FRAME"] = _G.UNITFRAME_LABEL
-L["UNKNOWN"] = _G.UNKNOWN
L["ZONE"] = _G.ZONE
-- Require translation
-L["ACTION_BARS"] = "Action Bars"
L["ADVENTURE_JOURNAL_DESC"] = "Show raid lockout information."
L["ALTERNATIVE_POWER"] = "Alternative Power"
L["ALTERNATIVE_POWER_FORMAT_DESC"] = [=[Provide a string to change the text. To disable, leave the field blank.
@@ -125,17 +130,8 @@ L["AURA"] = "Aura"
L["AURA_FILTERS"] = "Aura Filters"
L["AURA_TRACKER"] = "Aura Tracker"
L["AURA_TYPE"] = "Aura Type"
-L["AURAS"] = "Auras"
L["AUTO"] = "Auto"
L["BAG_TOOLTIP_DESC"] = "Show currency information."
-L["BAR_1"] = "Bar 1"
-L["BAR_2"] = "Bar 2"
-L["BAR_3"] = "Bar 3"
-L["BAR_4"] = "Bar 4"
-L["BAR_5"] = "Bar 5"
-L["BAR_6"] = "Bar 6"
-L["BAR_7"] = "Bar 7"
-L["BAR_8"] = "Bar 8"
L["BAR_COLOR"] = "Bar Colour"
L["BAR_TEXT"] = "Bar Text"
L["BLACKLIST"] = "Blacklist"
@@ -194,7 +190,6 @@ L["DAMAGE_ABSORB"] = "Damage Absorb"
L["DATA_FORMAT_STRING"] = "String"
L["DATA_FORMAT_TABLE"] = "Table"
L["DAYS"] = "Days"
-L["DEAD"] = "Dead"
L["DEBUFF"] = "Debuff"
L["DEBUFFS"] = "Debuffs"
L["DESATURATION"] = "Desaturation"
@@ -203,12 +198,9 @@ L["DETACH_FROM_FRAME"] = "Detach from Frame"
L["DIFFICULT"] = "Difficult"
L["DIFFICULTY"] = "Difficulty"
L["DIFFICULTY_FLAG"] = "Difficulty Flag"
-L["DIGSITE_BAR"] = "Digsite Progress Bar"
L["DISABLE_MOUSE"] = "Disable Mouse"
L["DISABLE_MOUSE_DESC"] = "Ignore mouse events."
L["DISEASE"] = "Disease"
-L["DISPELLABLE_BUFFS"] = "Dispellable Buffs"
-L["DISPELLABLE_BUFFS_DESC"] = "Show buffs you can spellsteal or purge from your target."
L["DISPELLABLE_DEBUFF_ICONS"] = "Dispellable Debuff Icons"
L["DISPELLABLE_DEBUFFS"] = "Dispellable Debuffs"
L["DISPELLABLE_DEBUFFS_DESC"] = "Show debuffs you can dispel on your target."
@@ -216,7 +208,6 @@ L["DOWN"] = "Down"
L["DOWNLOADS"] = "Downloads"
L["DRAG_KEY"] = "Drag Key"
L["DUNGEONS_BUTTON_DESC"] = "Show 'Call to Arms' information."
-L["DURABILITY_FRAME"] = "Durability Frame"
L["ENABLE_BLIZZARD_CASTBAR"] = "Enable Blizzard Castbar"
L["ENDCAPS"] = "Artwork"
L["ENDCAPS_BOTH"] = "Both"
@@ -226,7 +217,6 @@ L["ENEMY_UNITS"] = "Enemy Units"
L["ENHANCED_TOOLTIPS"] = "Enhanced Tooltips"
L["EVENTS"] = "Events"
L["EXP_THRESHOLD"] = "Expiration Threshold"
-L["EXPERIENCE"] = "Experience"
L["EXPERIENCE_NORMAL"] = "Normal"
L["EXPERIENCE_RESTED"] = "Rested"
L["EXPIRATION"] = "Expiration"
@@ -246,14 +236,13 @@ L["FOCUS_TOF"] = "Focus & ToF"
L["FONTS"] = "Fonts"
L["FORMAT"] = "Format"
L["FRAME"] = "Frame"
-L["FREE_BAG_SLOTS_TOOLTIP"] = "Free Bag Slots: |cffffffff%s|r"
L["FRIENDLY_TERRITORY"] = "Friendly Territory"
L["FRIENDLY_UNITS"] = "Friendly Units"
L["FULL_CHANGELOG"] = "Full"
L["FUNC"] = "Function"
L["GLOSS"] = "Gloss"
L["GM_FRAME"] = "Ticket Status Frame"
-L["GOLD"] = "Gold"
+L["GRADIENT"] = "Gradient"
L["GROWTH_DIR"] = "Growth Direction"
L["HEAL_ABSORB"] = "Heal Absorb"
L["HEAL_PREDICTION"] = "Heal Prediction"
@@ -277,17 +266,13 @@ Use |cffffd200[nl]|r for line breaking.]=]
L["HEALTH_TEXT"] = "Health Text"
L["HEIGHT"] = "Height"
L["HEIGHT_OVERRIDE_DESC"] = "If set to 0, the element's height will be calculated automatically."
-L["HONOR"] = "Honour"
-L["HONOR_LEVEL_TOOLTIP"] = "Honour Level: |cffffffff%d|r"
L["HOSTILE_TERRITORY"] = "Hostile Territory"
L["HOURS"] = "Hours"
L["ICON"] = "Icon"
L["IMPORT"] = "Import"
L["IMPOSSIBLE"] = "Impossible"
L["INDEX"] = "Index"
-L["INFORMATION"] = "Info"
L["INSPECT_INFO"] = "Inspect Info"
-L["INSPECT_INFO_DESC"] = "Show the current tooltip unit's specialisation and item level. This data may not be available right away."
L["INVALID_EVENTS_ERR"] = "Attempted to use invalid events: %s."
L["ITEM_COUNT"] = "Item Count"
L["ITEM_COUNT_DESC"] = "Show how many of an item you have in your bank and bags."
@@ -301,7 +286,6 @@ L["LEFT_DOWN"] = "Left and Down"
L["LEFT_UP"] = "Left and Up"
L["LEVEL_TOOLTIP"] = "Level: |cffffffff%d|r"
L["LOCK_BUTTONS"] = "Lock Buttons"
-L["LOOT_ALL"] = "Loot All"
L["M_SS_THRESHOLD"] = "M:SS Threshold"
L["M_SS_THRESHOLD_DESC"] = "The threshold (in seconds) below which the remaining time will be shown in the M:SS format. Set to 0 to disable."
L["MACRO_TEXT"] = "Macro Text"
@@ -309,6 +293,7 @@ L["MAGIC"] = "Magic"
L["MAINMENU_BUTTON_DESC"] = "Show performance information."
L["MAINMENU_BUTTON_HOLD_TOOLTIP"] = "|cffffffffHold Shift|r to show memory usage."
L["MAX_ALPHA"] = "Max Alpha"
+L["MAX_HEALTH_REDUCTION"] = "Health Reduction"
L["MEMORY"] = "Memory"
L["MICRO_BUTTONS"] = "Micro Buttons"
L["MIN_ALPHA"] = "Min Alpha"
@@ -388,8 +373,10 @@ L["POWER_TEXT"] = "Power Text"
L["PREDICTION"] = "Prediction"
L["PREVIEW"] = "Preview"
L["PROFILE_GLOBAL"] = "Global"
+L["PROFILE_GLOBAL_DESC"] = "These profiles contain settings for modules and submodules."
L["PROFILE_GLOBAL_UPDATE_WARNING"] = "Found really old data in the |cffF6C442global|r profile |cffE6762F%s|r v|cff888987%.2f|r. The profile structure will be updated to the latest version, but it's highly recommended to reset it."
L["PROFILE_PRIVATE"] = "Private"
+L["PROFILE_PRIVATE_DESC"] = "These profiles contain settings for the aura tracker and which modules and submodules are enabled or disabled."
L["PROFILE_PRIVATE_UPDATE_WARNING"] = "Found really old data in the |cffF6C442private|r profile |cffE6762F%s|r v|cff888987%.2f|r. The profile structure will be updated to the latest version, but it's highly recommended to reset it."
L["PROFILE_RELOAD_WARNING"] = "These changes will take effect after reloading the UI."
L["PROFILES"] = "Profiles"
@@ -403,9 +390,7 @@ L["REACTION"] = "Reaction"
L["RELATIVE_POINT"] = "Relative Point"
L["RELATIVE_POINT_DESC"] = "The point of the region to attach the object to."
L["RELOAD_NOW"] = "Reload Now"
-L["RELOAD_UI_ON_CHAR_SETTING_CHANGE_POPUP"] = "You've just changed a character only setting. These settings are independent of your profiles. For the changes to take effect, you must reload UI."
-L["RELOAD_UI_WARNING"] = "Reload UI after you're done setting up the addon."
-L["RESTORE_DEFAULTS"] = "Restore Defaults"
+L["RELOAD_UI_POPUP"] = "One or more of the changes you've made require a UI reload."
L["RESTRICTED_MODE_DESC"] = [=[Enables artwork, animations and dynamic resizing for the main action bar.
|cffdc4436Warning!|r Many action bar customisation options won't be available in this mode.|r]=]
@@ -495,16 +480,17 @@ L["VALIDATE"] = "Validate"
L["VALUE"] = "Value"
L["VAR"] = "Variable"
L["VEHICLE_EXIT_BUTTON"] = "Vehicle Exit Button"
-L["VEHICLE_SEAT_INDICATOR"] = "Vehicle Seat Indicator"
L["VERY_DIFFICULT"] = "Very Difficult"
L["VISIBILITY"] = "Visibility"
L["WIDTH"] = "Width"
L["WIDTH_OVERRIDE"] = "Width Override"
L["WIDTH_OVERRIDE_DESC"] = "If set to 0, the element's width will be calculated automatically."
L["WORD_WRAP"] = "Word Wrap"
-L["X_OFFSET"] = "xOffset"
+L["X_OFFSET"] = "Horizontal Offset"
+L["X_SPACING"] = "Horizontal Spacing"
L["XP_BAR"] = "XP Bar"
-L["Y_OFFSET"] = "yOffset"
+L["Y_OFFSET"] = "Vertical Offset"
+L["Y_SPACING"] = "Vertical Spacing"
L["YOUR_HEALING"] = "Your Healing"
L["YOURS_FIRST"] = "Yours First"
L["ZONE_ABILITY_BUTTON"] = "Zone Ability Button"
diff --git a/ls_UI/locales/esES.lua b/ls_UI/locales/esES.lua
index a6e78959..71fb1d51 100644
--- a/ls_UI/locales/esES.lua
+++ b/ls_UI/locales/esES.lua
@@ -8,7 +8,6 @@ local _G = getfenv(0)
if GetLocale() ~= "esES" and GetLocale() ~= "esMX" then return end
-L["ACTION_BARS"] = "Barras de acción"
L["ADVENTURE_JOURNAL_DESC"] = "Mostrar información de registros de banda."
L["ALTERNATIVE_POWER"] = "Poder alternativo"
L["ALTERNATIVE_POWER_FORMAT_DESC"] = [=[Escribe un "String" para cambiar el texto. Para desactivarlo, deja el campo en blanco.
@@ -34,12 +33,6 @@ L["AURA"] = "Aura"
L["AURA_FILTERS"] = "Filtros de Auras"
L["AURA_TRACKER"] = "Seguidor de auras"
L["AURA_TYPE"] = "Tipo de Aura"
-L["AURAS"] = "Auras"
-L["BAR_1"] = "Barra 1"
-L["BAR_2"] = "Barra 2"
-L["BAR_3"] = "Barra 3"
-L["BAR_4"] = "Barra 4"
-L["BAR_5"] = "Barra 5"
L["BAR_COLOR"] = "Color de la barra"
L["BAR_TEXT"] = "Texto de la barra"
L["BLACKLIST"] = "Lista negra"
@@ -91,7 +84,6 @@ L["CURSE"] = "Maldición"
L["DAILY_QUEST_RESET_TIME_TOOLTIP"] = "Reinicio de misión diaria: |cffffffff%s|r"
L["DAMAGE_ABSORB"] = "Absorción de daño"
L["DAYS"] = "Días"
-L["DEAD"] = "Muerto"
L["DEBUFF"] = "Perjuicio"
L["DEBUFFS"] = "Perjuicios"
L["DESATURATION"] = "Desaturación"
@@ -100,24 +92,19 @@ L["DETACH_FROM_FRAME"] = "Despegar del cuadro."
L["DIFFICULT"] = "Difícil"
L["DIFFICULTY"] = "Dificultad"
L["DIFFICULTY_FLAG"] = "Bandera de dificultad"
-L["DIGSITE_BAR"] = "Barra de progreso de excavaciones"
L["DISABLE_MOUSE"] = "Desactivar ratón"
L["DISABLE_MOUSE_DESC"] = "Ignorar eventos de ratón."
L["DISEASE"] = "Enfermedad"
-L["DISPELLABLE_BUFFS"] = "Beneficios disipables"
-L["DISPELLABLE_BUFFS_DESC"] = "Muestra los beneficios que puedes robar o purgar del objetivo."
L["DISPELLABLE_DEBUFF_ICONS"] = "Iconos de perjucios disipables."
L["DISPELLABLE_DEBUFFS"] = "Perjuicios disipables"
L["DISPELLABLE_DEBUFFS_DESC"] = "Muestra perjuicios que puedes disipar del objetivo."
L["DOWN"] = "Abajo"
L["DRAG_KEY"] = "Tecla de arrastre"
L["DUNGEONS_BUTTON_DESC"] = "Mostrar información de \"Llamada a las armas\""
-L["DURABILITY_FRAME"] = "Marco de durabilidad"
L["ENEMY_UNITS"] = "Unidades enemigas"
L["ENHANCED_TOOLTIPS"] = "Descripciones emergentes mejoradas"
L["EVENTS"] = "Eventos"
L["EXP_THRESHOLD"] = "Límite de expiración"
-L["EXPERIENCE"] = "Experiencia"
L["EXPERIENCE_NORMAL"] = "Normal"
L["EXPERIENCE_RESTED"] = "Descansado"
L["EXPIRATION"] = "Expiración"
@@ -136,13 +123,11 @@ L["FOCUS_TOF"] = "Foco & OdF"
L["FONTS"] = "Fuentes"
L["FORMAT"] = "Formato"
L["FRAME"] = "Marco"
-L["FREE_BAG_SLOTS_TOOLTIP"] = "Huecos de bolsa libres: |cffffffff%s|r"
L["FRIENDLY_TERRITORY"] = "Territorio amistoso"
L["FRIENDLY_UNITS"] = "Unidades amistosas"
L["FUNC"] = "Función"
L["GLOSS"] = "Brillo"
L["GM_FRAME"] = "Indicador del estado del tíquet."
-L["GOLD"] = "Oro"
L["GROWTH_DIR"] = "Dirección de crecimiento"
L["HEAL_ABSORB"] = "Absorción de sanación"
L["HEAL_PREDICTION"] = "Predicción de sanaciones"
@@ -164,8 +149,6 @@ Si el valor actual es igual al máximo, sólo se mostrará el valor máximo.
Utiliza |cffffd200[nl]|r para saltos de línea.]=]
L["HEALTH_TEXT"] = "Texto de salud"
L["HEIGHT"] = "Altura"
-L["HONOR"] = "Honor"
-L["HONOR_LEVEL_TOOLTIP"] = "Nivel de Honor: |cffffffff%d|r"
L["HOSTILE_TERRITORY"] = "Territorio hostil"
L["HOURS"] = "Horas"
L["ICON"] = "Icono"
@@ -173,7 +156,6 @@ L["IMPORT"] = "Importar"
L["IMPOSSIBLE"] = "Imposible"
L["INDEX"] = "Índice"
L["INSPECT_INFO"] = "Información de inspección"
-L["INSPECT_INFO_DESC"] = "Muestra la especialización y nivel de objeto del objetivo actual en la descripción emergente. La información puede tardar."
L["INVALID_EVENTS_ERR"] = "Se intentó usar eventos no válidos: %s."
L["ITEM_COUNT"] = "Cantidad"
L["ITEM_COUNT_DESC"] = "Muestra la cantidad del objeto que posees en el banco y bolsas."
@@ -187,7 +169,6 @@ L["LEFT_DOWN"] = "Izquierda y abajo"
L["LEFT_UP"] = "Izquierda y arriba"
L["LEVEL_TOOLTIP"] = "Nivel: |cffffffff%d|r"
L["LOCK_BUTTONS"] = "Bloquear botones"
-L["LOOT_ALL"] = "Despojar todo"
L["M_SS_THRESHOLD"] = "M:SS Límite"
L["M_SS_THRESHOLD_DESC"] = "El límite (en segundos) bajo el que el tiempo restante se mostrará en formato M:SS. Establecer en 0 para desactivar."
L["MACRO_TEXT"] = "Texto de macro"
@@ -276,9 +257,6 @@ L["REACTION"] = "Reacción"
L["RELATIVE_POINT"] = "Punto relativo"
L["RELATIVE_POINT_DESC"] = "Punto de la zona a la que anclar el objeto."
L["RELOAD_NOW"] = "Reiniciar interfaz ahora"
-L["RELOAD_UI_ON_CHAR_SETTING_CHANGE_POPUP"] = "Has cambiado una opción de \"sólo personaje\". Éstas opciones son independientes entre tus perfiles. Para que los cambios surtan efecto, debes reiniciar la interfaz."
-L["RELOAD_UI_WARNING"] = "Reinicia la interfaz cuando acabes de configurar el addon."
-L["RESTORE_DEFAULTS"] = "Restaurar predeterminados"
L["RESTRICTED_MODE_DESC"] = [=[Activa las ilustraciones, animaciones y tamaño dinámico de la barra principal.
|cffdc4436¡Cuidado!|r Muchas opciones de personalización de las barras no estarán disponibles en este modo.|r]=]
@@ -356,7 +334,6 @@ L["VALIDATE"] = "Validar"
L["VALUE"] = "Valor"
L["VAR"] = "Variable"
L["VEHICLE_EXIT_BUTTON"] = "Botón para salir de vehículo"
-L["VEHICLE_SEAT_INDICATOR"] = "Indicador de asiento de vehículo"
L["VERY_DIFFICULT"] = "Muy difícil"
L["VISIBILITY"] = "Visibilidad"
L["WIDTH"] = "Ancho"
diff --git a/ls_UI/locales/frFR.lua b/ls_UI/locales/frFR.lua
index b87fa65b..f8121748 100644
--- a/ls_UI/locales/frFR.lua
+++ b/ls_UI/locales/frFR.lua
@@ -8,7 +8,6 @@ local _G = getfenv(0)
if GetLocale() ~= "frFR" then return end
-L["ACTION_BARS"] = "Barres d'action"
L["ADVENTURE_JOURNAL_DESC"] = "Afficher les informations de verrouillage du raid"
L["ALTERNATIVE_POWER"] = "Puissance alternative"
L["ALTERNATIVE_POWER_FORMAT_DESC"] = [=[Fournissez une chaîne de caractères pour changer le texte. Pour désactiver, laissez le champ vide.
@@ -34,12 +33,8 @@ L["AURA"] = "Aura"
L["AURA_FILTERS"] = "Filtres d'aura"
L["AURA_TRACKER"] = "Suivi d'auras"
L["AURA_TYPE"] = "Type d'auras"
-L["AURAS"] = "Auras"
-L["BAR_1"] = "Barre 1"
-L["BAR_2"] = "Barre 2"
-L["BAR_3"] = "Barre 3"
-L["BAR_4"] = "Barre 4"
-L["BAR_5"] = "Barre 5"
+L["AUTO"] = "Auto"
+L["BAG_TOOLTIP_DESC"] = "Afficher les informations sur les monnaies."
L["BAR_COLOR"] = "Couleur de la barre"
L["BAR_TEXT"] = "Texte de la barre"
L["BLACKLIST"] = "Liste noire"
@@ -69,6 +64,7 @@ L["CASTABLE_DEBUFFS_DESC"] = "Afficher les debuffs lancés par vous."
L["CASTABLE_DEBUFFS_PERMA"] = "Debuffs permanents lançables"
L["CASTABLE_DEBUFFS_PERMA_DESC"] = "Afficher les debuffs permanents lancés par vous."
L["CASTBAR"] = "Barre d'incantation"
+L["CHANGELOG"] = "Note de patch"
L["CHARACTER_BUTTON_DESC"] = "Afficher la durabilité de l'équipement"
L["CHARACTER_FRAME"] = "Fenêtre du personnage"
L["CLASS_POWER"] = "Puissance de classe"
@@ -76,6 +72,7 @@ L["CLEAN_UP"] = "Nettoyage"
L["CLEAN_UP_MAIL_DESC"] = "Supprime tout les messages vides"
L["COLOR_BY_SPEC"] = "Colorer par Spécialisation"
L["COLORS"] = "Couleurs"
+L["COMBO_POINTS_CHARGED"] = "Points de combo chargés"
L["COMMAND_BAR"] = "Barre de commande"
L["CONFIRM_DELETE"] = "Voulez-vous supprimer \"%s\"?"
L["CONFIRM_RESET"] = "Voulez-vous réinitialiser \"%s\"?"
@@ -87,10 +84,10 @@ L["COST_PREDICTION"] = "Prédiction de coût"
L["COST_PREDICTION_DESC"] = "Afficher une barre qui représente le coût en puissance d'un sort. Ne fonctionne pas avec les techniques instantanées"
L["COUNT_TEXT"] = "Texte d'énumération"
L["CURSE"] = "Malédiction"
+L["CUSTOM_TEXTS"] = "Textes personnalisé "
L["DAILY_QUEST_RESET_TIME_TOOLTIP"] = "Réinitialisation des quêtes journalières : |cffffffff%s|r"
L["DAMAGE_ABSORB"] = "Absorption des dommages"
L["DAYS"] = "Jours"
-L["DEAD"] = "Mort"
L["DEBUFF"] = "Affaiblissement"
L["DEBUFFS"] = "Debuffs"
L["DESATURATION"] = "Désaturation"
@@ -99,23 +96,19 @@ L["DETACH_FROM_FRAME"] = "Détacher du cadre"
L["DIFFICULT"] = "Difficile"
L["DIFFICULTY"] = "Difficulté"
L["DIFFICULTY_FLAG"] = "Drapeau de difficulté"
-L["DIGSITE_BAR"] = "Barre de progression de la fouille"
L["DISABLE_MOUSE"] = "Désactiver la souris"
L["DISABLE_MOUSE_DESC"] = "Ignorer les évènements de souris."
L["DISEASE"] = "Maladie"
-L["DISPELLABLE_BUFFS"] = "Buffs désactivables"
-L["DISPELLABLE_BUFFS_DESC"] = "Afficher les buffs que vous pouvez retirer de votre cible"
L["DISPELLABLE_DEBUFF_ICONS"] = "Icônes des debuffs désactivables"
L["DISPELLABLE_DEBUFFS"] = "Debuffs désactivables"
L["DISPELLABLE_DEBUFFS_DESC"] = "Afficher les debuffs que vous pouvez soigner sur la cible."
L["DOWN"] = "Bas"
+L["DOWNLOADS"] = "Téléchargements"
L["DRAG_KEY"] = "Touche pour glisser"
L["DUNGEONS_BUTTON_DESC"] = "Afficher \"Appel aux armes\""
-L["DURABILITY_FRAME"] = "Cadre de durabilité"
L["ENEMY_UNITS"] = "Unités ennemies"
L["ENHANCED_TOOLTIPS"] = "Info-bulles améliorées"
L["EVENTS"] = "Evènements "
-L["EXPERIENCE"] = "Expérience"
L["EXPERIENCE_NORMAL"] = "Expérience normale"
L["EXPERIENCE_RESTED"] = "Expérience reposé"
L["EXPIRATION"] = "Expiration"
@@ -135,7 +128,6 @@ L["FORMAT"] = "Format"
L["FRAME"] = "Cadre"
L["FRIENDLY_UNITS"] = "Unités amies"
L["GM_FRAME"] = "Cadre des statuts des requêtes"
-L["GOLD"] = "Or"
L["GROWTH_DIR"] = "Direction de la croissance"
L["HEAL_PREDICTION"] = "Prédiction de soin"
L["HEALTH"] = "Santé"
@@ -152,12 +144,9 @@ Si la valeur actuelle est égale à la valeur maximale, seule la valeur maximale
Utilisez |cffffd200[nl]|r pour un saut de ligne.]=]
L["HEALTH_TEXT"] = "Texte de santé"
L["HEIGHT"] = "Hauteur"
-L["HONOR"] = "Honneur"
-L["HONOR_LEVEL_TOOLTIP"] = "Niveau d'honneur : |cffffffff%d|r"
L["ICON"] = "Icône"
L["INDEX"] = "Index"
L["INSPECT_INFO"] = "Inspecter les infos"
-L["INSPECT_INFO_DESC"] = "Afficher la spécialisation et niveau d'objets dans l'info-bulle de l'unité. Ces données peuvent ne pas être disponibles tout de suite."
L["ITEM_COUNT"] = "Nombre d'objet"
L["ITEM_COUNT_DESC"] = "Afficher le nombre d'exemplaire d'un objet que vous avez dans votre banque et vos sacs."
L["KEYBIND_TEXT"] = "Raccourcis"
@@ -237,9 +226,6 @@ L["REACTION"] = "Réaction"
L["RELATIVE_POINT"] = "Point relatif"
L["RELATIVE_POINT_DESC"] = "Le point auquel attacher l'objet."
L["RELOAD_NOW"] = "Recharger maintenant"
-L["RELOAD_UI_ON_CHAR_SETTING_CHANGE_POPUP"] = "Vous venez de changer un paramètre spécifique au personnage. Ces paramètres sont indépendants de vos profils. Pour que les changements fassent effet, vous devrez recharger l'IU."
-L["RELOAD_UI_WARNING"] = "Rechargez l'IU dès que vous avez fini de configurer l'add-on."
-L["RESTORE_DEFAULTS"] = "Restaurer les valeurs par défaut"
L["RESTRICTED_MODE_DESC"] = [=[Active l'illustration, les animations et le redimensionnement dynamique de la barre d'action principale.
|cffdc4436Attention !|r Certaines options de personnalisation des barres d'action ne seront pas disponibles dans ce mode.|r]=]
L["RIGHT"] = "Droite"
@@ -287,7 +273,6 @@ L["USE_BLIZZARD_VEHICLE_UI"] = "Utiliser l'IU de Blizzard pour le véhicule"
L["VALUE"] = "Valeur"
L["VAR"] = "Variable"
L["VEHICLE_EXIT_BUTTON"] = "Bouton de sortie de véhicule"
-L["VEHICLE_SEAT_INDICATOR"] = "Indicateur Siège de véhicule"
L["VERY_DIFFICULT"] = "Très difficile"
L["VISIBILITY"] = "Visibilité"
L["WIDTH"] = "Largeur"
diff --git a/ls_UI/locales/ruRU.lua b/ls_UI/locales/ruRU.lua
index dacddca6..acbbc5b7 100644
--- a/ls_UI/locales/ruRU.lua
+++ b/ls_UI/locales/ruRU.lua
@@ -8,7 +8,6 @@ local _G = getfenv(0)
if GetLocale() ~= "ruRU" then return end
-L["ACTION_BARS"] = "Панели команд"
L["ADVENTURE_JOURNAL_DESC"] = "Показывать информацию о сохраненных рейдах."
L["ALTERNATIVE_POWER"] = "Альт. энергия"
L["ALTERNATIVE_POWER_FORMAT_DESC"] = [=[Введите строку для изменения текста. Для отключения оставьте поле пустым.
@@ -34,17 +33,8 @@ L["AURA"] = "Аура"
L["AURA_FILTERS"] = "Фильтры аур"
L["AURA_TRACKER"] = "Отслеживание аур"
L["AURA_TYPE"] = "Тип ауры"
-L["AURAS"] = "Ауры"
L["AUTO"] = "Авто"
L["BAG_TOOLTIP_DESC"] = "Показывать информацию о валютах."
-L["BAR_1"] = "Панель 1"
-L["BAR_2"] = "Панель 2"
-L["BAR_3"] = "Панель 3"
-L["BAR_4"] = "Панель 4"
-L["BAR_5"] = "Панель 5"
-L["BAR_6"] = "Панель 6"
-L["BAR_7"] = "Панель 7"
-L["BAR_8"] = "Панель 8"
L["BAR_COLOR"] = "Цвет полосы"
L["BAR_TEXT"] = "Текст полосы"
L["BLACKLIST"] = "Черный список"
@@ -103,7 +93,6 @@ L["DAMAGE_ABSORB"] = "Поглощение урона"
L["DATA_FORMAT_STRING"] = "Строка"
L["DATA_FORMAT_TABLE"] = "Таблица"
L["DAYS"] = "Days"
-L["DEAD"] = "Мертвый"
L["DEBUFF"] = "Дебафф"
L["DEBUFFS"] = "Дебаффы"
L["DESATURATION"] = "Обесцвечивание"
@@ -112,12 +101,9 @@ L["DETACH_FROM_FRAME"] = "Отсоединить от рамки"
L["DIFFICULT"] = "Сложный"
L["DIFFICULTY"] = "Сложность"
L["DIFFICULTY_FLAG"] = "Флаг режима сложности"
-L["DIGSITE_BAR"] = "Полоса прогресса раскопок"
L["DISABLE_MOUSE"] = "Отключить мышь"
L["DISABLE_MOUSE_DESC"] = "Игнорировать мышь."
L["DISEASE"] = "Болезнь"
-L["DISPELLABLE_BUFFS"] = "Рассеиваемые баффы"
-L["DISPELLABLE_BUFFS_DESC"] = "Показывать баффы, которые вы можете украсть или рассеять со своей цели."
L["DISPELLABLE_DEBUFF_ICONS"] = "Иконки рассеиваемых дебаффов"
L["DISPELLABLE_DEBUFFS"] = "Рассеиваемые дебаффы"
L["DISPELLABLE_DEBUFFS_DESC"] = "Показывать дебаффы, которые вы можете рассеять со своей цели."
@@ -125,7 +111,6 @@ L["DOWN"] = "Вниз"
L["DOWNLOADS"] = "Загрузки"
L["DRAG_KEY"] = "Кнопка для перетаскивания"
L["DUNGEONS_BUTTON_DESC"] = "Показывать информацию о 'Призыве к оружию'."
-L["DURABILITY_FRAME"] = "Рамка прочности"
L["ENABLE_BLIZZARD_CASTBAR"] = "Включить полосу заклинаний от Blizzard"
L["ENDCAPS"] = "Текстуры"
L["ENDCAPS_BOTH"] = "Обе"
@@ -135,7 +120,6 @@ L["ENEMY_UNITS"] = "Вражеские юниты"
L["ENHANCED_TOOLTIPS"] = "Подробные подсказки"
L["EVENTS"] = "События"
L["EXP_THRESHOLD"] = "Порог истечения"
-L["EXPERIENCE"] = "Опыт"
L["EXPERIENCE_NORMAL"] = "Нормальный"
L["EXPERIENCE_RESTED"] = "Отдохнувший"
L["EXPIRATION"] = "Истечение"
@@ -155,14 +139,13 @@ L["FOCUS_TOF"] = "Фокус и цель фокуса"
L["FONTS"] = "Шрифты"
L["FORMAT"] = "Формат"
L["FRAME"] = "Рамка"
-L["FREE_BAG_SLOTS_TOOLTIP"] = "Свободные ячейки: |cffffffff%s|r"
L["FRIENDLY_TERRITORY"] = "Дружелюбная территория"
L["FRIENDLY_UNITS"] = "Дружественные юниты"
L["FULL_CHANGELOG"] = "Полный"
L["FUNC"] = "Функция"
L["GLOSS"] = "Глянец"
L["GM_FRAME"] = "Панель статуса запроса к ГМ"
-L["GOLD"] = "Золото"
+L["GRADIENT"] = "Градиент"
L["GROWTH_DIR"] = "Направление роста"
L["HEAL_ABSORB"] = "Поглощение исцеления"
L["HEAL_PREDICTION"] = "Поступающее исцеление"
@@ -186,17 +169,13 @@ L["HEALTH_FORMAT_DESC"] = [=[Введите строку для изменени
L["HEALTH_TEXT"] = "Текст здоровья"
L["HEIGHT"] = "Высота"
L["HEIGHT_OVERRIDE_DESC"] = "Если установлено на 0, то высота элемента будет рассчитана автоматически."
-L["HONOR"] = "Честь"
-L["HONOR_LEVEL_TOOLTIP"] = "Уровень чести: |cffffffff%d|r"
L["HOSTILE_TERRITORY"] = "Враждебная территория"
L["HOURS"] = "Часы"
L["ICON"] = "Иконка"
L["IMPORT"] = "Импортировать"
L["IMPOSSIBLE"] = "Невозможный"
L["INDEX"] = "Индекс"
-L["INFORMATION"] = "Информация"
L["INSPECT_INFO"] = "Информация осмотра"
-L["INSPECT_INFO_DESC"] = "Отображение специализации и уровня предметов игрока. Эти данные могут быть доступны не сразу."
L["INVALID_EVENTS_ERR"] = "Попытка использовать недопустимые события: %s."
L["ITEM_COUNT"] = "Кол-во предметов"
L["ITEM_COUNT_DESC"] = "Отображать количество предметов в вашем банке и сумках."
@@ -210,7 +189,6 @@ L["LEFT_DOWN"] = "Влево и вниз"
L["LEFT_UP"] = "Влево и вверх"
L["LEVEL_TOOLTIP"] = "Уровень: |cffffffff%d|r"
L["LOCK_BUTTONS"] = "Заблокировать кнопки"
-L["LOOT_ALL"] = "Забрать всю добычу"
L["M_SS_THRESHOLD"] = "Порог М:СС"
L["M_SS_THRESHOLD_DESC"] = "Если оставшееся время восстановления ниже данного значения (в секундах), то оно будет показано в формате М:СС. Установите на 0, чтобы отключить."
L["MACRO_TEXT"] = "Текст макросов"
@@ -218,6 +196,7 @@ L["MAGIC"] = "Магия"
L["MAINMENU_BUTTON_DESC"] = "Показывать информацию о производительности."
L["MAINMENU_BUTTON_HOLD_TOOLTIP"] = "|cffffffffЗажмите Shift|r, чтобы показать статистику используемой памяти."
L["MAX_ALPHA"] = "Макс. прозрачность"
+L["MAX_HEALTH_REDUCTION"] = "Уменьшение здоровья"
L["MEMORY"] = "Память"
L["MICRO_BUTTONS"] = "Микроменю"
L["MIN_ALPHA"] = "Мин. прозрачность"
@@ -297,8 +276,10 @@ L["POWER_TEXT"] = "Текст ресурса"
L["PREDICTION"] = "Прогноз"
L["PREVIEW"] = "Предпросмотр"
L["PROFILE_GLOBAL"] = "Глобальный"
+L["PROFILE_GLOBAL_DESC"] = "Эти профили хранят настройки для модулей и подмодулей."
L["PROFILE_GLOBAL_UPDATE_WARNING"] = "Найдены сильно устаревшие данные в |cffF6C442глобальном|r профиле |cffE6762F%s|r v|cff888987%.2f|r. Структура профиля будет обновлена до последней версии, но тем не менее настоятельно рекомендуется сбросить этот профиль на умолчания."
L["PROFILE_PRIVATE"] = "Личный"
+L["PROFILE_PRIVATE_DESC"] = "Эти профили хранят настройки для отслеживания аур и того, какие модули и подмодули включены или выключены."
L["PROFILE_PRIVATE_UPDATE_WARNING"] = "Найдены сильно устаревшие данные в |cffF6C442личном|r профиле |cffE6762F%s|r v|cff888987%.2f|r. Структура профиля будет обновлена до последней версии, но тем не менее настоятельно рекомендуется сбросить этот профиль на умолчания."
L["PROFILE_RELOAD_WARNING"] = "Эти изменения вступят в силу после перезагрузки интерфейса."
L["PROFILES"] = "Профили"
@@ -312,9 +293,7 @@ L["REACTION"] = "Реакция"
L["RELATIVE_POINT"] = "Относительная точка"
L["RELATIVE_POINT_DESC"] = "Точка, к которой объект будет присоединён."
L["RELOAD_NOW"] = "Перезагрузить сейчас"
-L["RELOAD_UI_ON_CHAR_SETTING_CHANGE_POPUP"] = "Вы только что изменили настройку, используемую только этим персонажем. Эти параметры независимы от ваших профилей. Чтобы изменения вступили в силу, необходимо перезагрузить интерфейс."
-L["RELOAD_UI_WARNING"] = "Перезагрузите интерфейс после завершения настройки аддона."
-L["RESTORE_DEFAULTS"] = "Сбросить настройки"
+L["RELOAD_UI_POPUP"] = "Одно или более изменений требуют перезагрузки интерфейса."
L["RESTRICTED_MODE_DESC"] = [=[Включает оформление, анимацию и динамическое изменение размера главной панели команд.
|cffdc4436Внимание!|r Многие настройки панелей команд будут не доступны в этом режиме.|r]=]
@@ -404,16 +383,17 @@ L["VALIDATE"] = "Проверить"
L["VALUE"] = "Значение"
L["VAR"] = "Переменная"
L["VEHICLE_EXIT_BUTTON"] = "Кнопка спешивания"
-L["VEHICLE_SEAT_INDICATOR"] = "Индикатор сидений транспорта"
L["VERY_DIFFICULT"] = "Очень сложный"
L["VISIBILITY"] = "Видимость"
L["WIDTH"] = "Ширина"
L["WIDTH_OVERRIDE"] = "Регулировка ширины"
L["WIDTH_OVERRIDE_DESC"] = "Если установлено на 0, то ширина элемента будет рассчитана автоматически."
L["WORD_WRAP"] = "Перенос слов"
-L["X_OFFSET"] = "Смещение по X"
+L["X_OFFSET"] = "Гориз. смещение"
+L["X_SPACING"] = "Горз. отступ"
L["XP_BAR"] = "Полоса опыта"
-L["Y_OFFSET"] = "Смещение по Y"
+L["Y_OFFSET"] = "Верт. смещение"
+L["Y_SPACING"] = "Верт. отступ"
L["YOUR_HEALING"] = "Ваше исцеление"
L["YOURS_FIRST"] = "Ваши в первую очередь"
L["ZONE_ABILITY_BUTTON"] = "Кнопка доп. способности в зоне"
diff --git a/ls_UI/locales/zhCN.lua b/ls_UI/locales/zhCN.lua
index 96920084..5565e2fc 100644
--- a/ls_UI/locales/zhCN.lua
+++ b/ls_UI/locales/zhCN.lua
@@ -31,7 +31,6 @@ do
end
end
-L["ACTION_BARS"] = "动作条"
L["ADVENTURE_JOURNAL_DESC"] = "显示团队副本锁定信息"
L["ALTERNATIVE_POWER"] = "第二资源"
L["ALTERNATIVE_POWER_FORMAT_DESC"] = [=[通过格式化字符串来修改文本显示,留空表示禁用此功能
@@ -57,12 +56,6 @@ L["AURA"] = "光环"
L["AURA_FILTERS"] = "光环过滤器"
L["AURA_TRACKER"] = "光环追踪器"
L["AURA_TYPE"] = "光环类型"
-L["AURAS"] = "光环"
-L["BAR_1"] = "动作条 1"
-L["BAR_2"] = "动作条 2"
-L["BAR_3"] = "动作条 3"
-L["BAR_4"] = "动作条 4"
-L["BAR_5"] = "动作条 5"
L["BAR_COLOR"] = "生命条颜色"
L["BAR_TEXT"] = "动作条文字"
L["BLACKLIST"] = "黑名单"
@@ -118,7 +111,6 @@ L["DAMAGE_ABSORB"] = "伤害吸收"
L["DATA_FORMAT_STRING"] = "字符串"
L["DATA_FORMAT_TABLE"] = "表格"
L["DAYS"] = "天"
-L["DEAD"] = "死亡"
L["DEBUFF"] = "减益效果"
L["DEBUFFS"] = "减益效果"
L["DESATURATION"] = "褪色"
@@ -127,24 +119,19 @@ L["DETACH_FROM_FRAME"] = "从框架脱离"
L["DIFFICULT"] = "困难"
L["DIFFICULTY"] = "难度"
L["DIFFICULTY_FLAG"] = "难度标记"
-L["DIGSITE_BAR"] = "考古进度条"
L["DISABLE_MOUSE"] = "禁用鼠标"
L["DISABLE_MOUSE_DESC"] = "忽略鼠标事件"
L["DISEASE"] = "疾病"
-L["DISPELLABLE_BUFFS"] = "可驱散的增益效果"
-L["DISPELLABLE_BUFFS_DESC"] = "显示目标身上你可以偷取或是驱散的增益效果"
L["DISPELLABLE_DEBUFF_ICONS"] = "可驱散的减益效果图标"
L["DISPELLABLE_DEBUFFS"] = "可驱散的减益效果"
L["DISPELLABLE_DEBUFFS_DESC"] = "显示目标身上你可以驱散的减益效果"
L["DOWN"] = "下"
L["DRAG_KEY"] = "拖动键"
L["DUNGEONS_BUTTON_DESC"] = "显示随机稀缺职业奖励信息"
-L["DURABILITY_FRAME"] = "耐久度框架"
L["ENEMY_UNITS"] = "敌对单位"
L["ENHANCED_TOOLTIPS"] = "鼠标提示增强"
L["EVENTS"] = "事件"
L["EXP_THRESHOLD"] = "小数显示阈值"
-L["EXPERIENCE"] = "经验值"
L["EXPERIENCE_NORMAL"] = "正常经验收益"
L["EXPERIENCE_RESTED"] = "精力充沛收益"
L["EXPIRATION"] = "即将结束"
@@ -164,13 +151,11 @@ L["FOCUS_TOF"] = "焦点目标 & 焦点目标的目标"
L["FONTS"] = "字体"
L["FORMAT"] = "格式"
L["FRAME"] = "框架"
-L["FREE_BAG_SLOTS_TOOLTIP"] = "剩余背包空间:|cffffffff%s|r"
L["FRIENDLY_TERRITORY"] = "友方区域"
L["FRIENDLY_UNITS"] = "友好单位"
L["FUNC"] = "功能"
L["GLOSS"] = "高光"
L["GM_FRAME"] = "申请状态框架"
-L["GOLD"] = "金币"
L["GROWTH_DIR"] = "增长方向"
L["HEAL_ABSORB"] = "吸收治疗"
L["HEAL_PREDICTION"] = "治疗预测"
@@ -193,8 +178,6 @@ L["HEALTH_FORMAT_DESC"] = [=[通过格式化字符串来修改文本显示,留
L["HEALTH_TEXT"] = "生命值文本"
L["HEIGHT"] = "高度"
L["HEIGHT_OVERRIDE_DESC"] = "当设置为 0 时,将会自动计算高度。"
-L["HONOR"] = "荣誉"
-L["HONOR_LEVEL_TOOLTIP"] = "荣誉等级:|cffffffff%d|r"
L["HOSTILE_TERRITORY"] = "敌方区域"
L["HOURS"] = "小时"
L["ICON"] = "图标"
@@ -202,7 +185,6 @@ L["IMPORT"] = "导入"
L["IMPOSSIBLE"] = "不可能"
L["INDEX"] = "索引"
L["INSPECT_INFO"] = "玩家信息"
-L["INSPECT_INFO_DESC"] = "显示当前单位的专精和装备等级,这些数据可能不是马上就能显示"
L["INVALID_EVENTS_ERR"] = "尝试使用无效事件:%s。"
L["ITEM_COUNT"] = "物品计数"
L["ITEM_COUNT_DESC"] = "显示银行和背包中该物品的总数"
@@ -216,7 +198,6 @@ L["LEFT_DOWN"] = "左下"
L["LEFT_UP"] = "左上"
L["LEVEL_TOOLTIP"] = "等级:|cffffffff%d|r"
L["LOCK_BUTTONS"] = "锁定按钮"
-L["LOOT_ALL"] = "全部拾取"
L["M_SS_THRESHOLD"] = "M:SS 显示阈值"
L["M_SS_THRESHOLD_DESC"] = "低于此秒数的时间将会以 4:01 的格式显示,设置成 0 表示禁用此格式"
L["MACRO_TEXT"] = "宏文字"
@@ -316,9 +297,6 @@ L["REACTION"] = "关系"
L["RELATIVE_POINT"] = "相对锚点"
L["RELATIVE_POINT_DESC"] = "对象依附的区域的锚点"
L["RELOAD_NOW"] = "立刻重载"
-L["RELOAD_UI_ON_CHAR_SETTING_CHANGE_POPUP"] = "你刚刚修改了特定角色的设置,这些设置独立于你账号的设置,想让这些设置生效你需要重载界面"
-L["RELOAD_UI_WARNING"] = "设置完插件后重载 UI"
-L["RESTORE_DEFAULTS"] = "恢复默认"
L["RESTRICTED_MODE_DESC"] = [=[启用主动作条的装饰,动画和动态缩放功能
|cffdc4436注意|r,一些动作条自定义选项将在此模式下不可用!|r]=]
@@ -398,7 +376,6 @@ L["VALIDATE"] = "验证"
L["VALUE"] = "值"
L["VAR"] = "变量"
L["VEHICLE_EXIT_BUTTON"] = "离开载具按钮"
-L["VEHICLE_SEAT_INDICATOR"] = "载具座位指示器"
L["VERY_DIFFICULT"] = "非常困难"
L["VISIBILITY"] = "可见性"
L["WIDTH"] = "宽度"
diff --git a/ls_UI/ls_UI.toc b/ls_UI/ls_UI.toc
index 0658119d..5bb0692f 100644
--- a/ls_UI/ls_UI.toc
+++ b/ls_UI/ls_UI.toc
@@ -1,6 +1,6 @@
-## Interface: 100207
+## Interface: 110000, 110002
## Author: lightspark
-## Version: 100207.01
+## Version: 110000.01
## Title: LS: |cff1a9fc0UI|r
## Notes: Yet another UI, but this one is a bit special...
## IconTexture: Interface\AddOns\ls_UI\assets\logo-64
diff --git a/ls_UI/modules/auras/auras.lua b/ls_UI/modules/auras/auras.lua
index a9852cae..42c11a47 100644
--- a/ls_UI/modules/auras/auras.lua
+++ b/ls_UI/modules/auras/auras.lua
@@ -156,12 +156,12 @@ local function handleButton(button, header)
button:SetScript("OnSizeChanged", button.OnSizeChanged)
button:RegisterForClicks("RightButtonDown", "RightButtonUp")
- button.Icon = E:SetIcon(button, [[Interface\ICONS\INV_Misc_QuestionMark]])
+ button.Icon = E:SetIcon(button, QUESTION_MARK_ICON)
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
button.Cooldown = E.Cooldowns.Create(button)
diff --git a/ls_UI/modules/auratracker/auratracker.lua b/ls_UI/modules/auratracker/auratracker.lua
index 3a56cb49..e23efc28 100644
--- a/ls_UI/modules/auratracker/auratracker.lua
+++ b/ls_UI/modules/auratracker/auratracker.lua
@@ -19,7 +19,7 @@ local function verifyFilter(filter)
local toRemove = {}
for k in next, auraList do
- if not GetSpellInfo(k) then
+ if not C_Spell.GetSpellInfo(k) then
toRemove[k] = true
end
end
diff --git a/ls_UI/modules/bars/actionbars.lua b/ls_UI/modules/bars/actionbars.lua
index d7abbc79..5d1272ac 100644
--- a/ls_UI/modules/bars/actionbars.lua
+++ b/ls_UI/modules/bars/actionbars.lua
@@ -21,7 +21,8 @@ local CFG = {
per_row = 12,
width = 32,
height = 0,
- spacing = 4,
+ x_spacing = 4,
+ y_spacing = 4,
-- scale = 1,
visibility = "[petbattle] hide; show",
visible = true,
@@ -219,11 +220,12 @@ function bar1_proto:UpdateConfig()
self._config.hotkey = E:CopyTable(C.db.profile.bars.bar1.hotkey, self._config.hotkey)
self._config.macro = E:CopyTable(C.db.profile.bars.bar1.macro, self._config.macro)
- self:SetAttribute("maxbuttons", self._config.num)
- MODULE:UpdateMainBarMaxButtons(self._config.num)
-
- self:SetAttribute("scale", C.db.profile.bars.bar1.scale)
+ MODULE:UpdateMainBarMaxButtons(C.db.profile.bars.bar1.num)
MODULE:UpdateScale(C.db.profile.bars.bar1.scale)
+ else
+ if C.db.profile.bars.bar1.num > 12 then
+ C.db.profile.bars.bar1.num = 12
+ end
end
end
diff --git a/ls_UI/modules/bars/bag.lua b/ls_UI/modules/bars/bag.lua
index 93b4008e..fcbe4a9f 100644
--- a/ls_UI/modules/bars/bag.lua
+++ b/ls_UI/modules/bars/bag.lua
@@ -4,6 +4,7 @@ local MODULE = P:GetModule("Bars")
-- Lua
local _G = getfenv(0)
+local hooksecurefunc = _G.hooksecurefunc
local next = _G.next
local t_insert = _G.table.insert
local t_sort = _G.table.sort
@@ -12,10 +13,20 @@ local t_wipe = _G.table.wipe
-- Mine
local isInit = false
-local button_proto = {}
+local bags = {
+ CharacterBag0Slot,
+ CharacterBag1Slot,
+ CharacterBag2Slot,
+ CharacterBag3Slot,
+ CharacterReagentBag0Slot,
+}
+
+local backpack_proto = {}
do
- local CURRENCY_TEMPLATE = "%s |T%s:0|t"
+ local CURRENCY_COLON = _G.CURRENCY .. _G.HEADER_COLON
local CURRENCY_DETAILED_TEMPLATE = "%s / %s|T%s:0|t"
+ local CURRENCY_TEMPLATE = "%s |T%s:0|t"
+ local GOLD = _G.BONUS_ROLL_REWARD_MONEY
local _, TOKEN_NAME = C_Item.GetItemInfoInstant(WOW_TOKEN_ITEM_ID)
local TOKEN_COLOR = ITEM_QUALITY_COLORS[8]
@@ -26,20 +37,16 @@ do
local currencyList = {}
local lastTokenUpdate = 0
- function button_proto:OnEnter()
- if KeybindFrames_InQuickKeybindMode() then
- self:QuickKeybindButtonOnEnter()
- else
+ function backpack_proto:OnEnterHook()
+ if not KeybindFrames_InQuickKeybindMode() then
local p, rP, x, y = E:GetTooltipPoint(self)
- GameTooltip:SetOwner(self, "ANCHOR_NONE")
+ GameTooltip:SetAnchorType("ANCHOR_NONE")
GameTooltip:SetPoint(p, self, rP, x, y)
- GameTooltip:SetText(self.tooltipText, 1, 1, 1, 1)
- GameTooltip:AddLine(L["FREE_BAG_SLOTS_TOOLTIP"]:format(self.freeSlots))
if C.db.profile.bars.bag.tooltip then
GameTooltip:AddLine(" ")
- GameTooltip:AddLine(L["CURRENCY_COLON"])
+ GameTooltip:AddLine(CURRENCY_COLON)
t_wipe(currencyList)
@@ -65,7 +72,7 @@ do
end
end
- GameTooltip:AddDoubleLine(L["GOLD"], GetMoneyString(GetMoney(), true), 1, 1, 1, 1, 1, 1)
+ GameTooltip:AddDoubleLine(GOLD, GetMoneyString(GetMoney(), true), 1, 1, 1, 1, 1, 1)
local tokenPrice = C_WowTokenPublic.GetCurrentMarketPrice()
if tokenPrice and tokenPrice > 0 then
@@ -79,11 +86,8 @@ do
end
end
- function button_proto:OnEventHook(event, ...)
- if event == "UPDATE_BINDINGS" then
- -- that's not how it's supposed to be used, but it works
- self.tooltipText = MicroButtonTooltipText(BACKPACK_TOOLTIP, "TOGGLEBACKPACK")
- elseif event == "TOKEN_MARKET_PRICE_UPDATED" then
+ function backpack_proto:OnEventHook(event, ...)
+ if event == "TOKEN_MARKET_PRICE_UPDATED" then
lastTokenUpdate = GetTime()
if ... == LE_TOKEN_RESULT_ERROR_DISABLED then
@@ -93,25 +97,42 @@ do
if GameTooltip:IsOwned(self) then
GameTooltip:Hide()
- self:OnEnter()
+ self:GetScript("OnEnter")(self)
end
end
end
end
+local bag_proto = {}
+do
+ function bag_proto:OnEnterHook()
+ if not KeybindFrames_InQuickKeybindMode() then
+ local p, rP, x, y = E:GetTooltipPoint(self)
+
+ GameTooltip:SetAnchorType("ANCHOR_NONE")
+ GameTooltip:SetPoint(p, self, rP, x, y)
+ end
+ end
+end
+
function MODULE:HasBag()
return isInit
end
function MODULE:CreateBag()
if not isInit then
- Mixin(MainMenuBarBackpackButton, button_proto)
- MainMenuBarBackpackButton:SetScript("OnEnter", MainMenuBarBackpackButton.OnEnter)
+ Mixin(MainMenuBarBackpackButton, backpack_proto)
+
+ MainMenuBarBackpackButton:HookScript("OnEnter", MainMenuBarBackpackButton.OnEnterHook)
MainMenuBarBackpackButton:HookScript("OnEvent", MainMenuBarBackpackButton.OnEventHook)
- MainMenuBarBackpackButton:RegisterEvent("UPDATE_BINDINGS")
MainMenuBarBackpackButton:RegisterEvent("TOKEN_MARKET_PRICE_UPDATED")
- MainMenuBarBackpackButton.tooltipText = MicroButtonTooltipText(BACKPACK_TOOLTIP, "TOGGLEBACKPACK")
+ for _, bag in next, bags do
+ Mixin(bag, bag_proto)
+
+ bag:HookScript("OnEnter", bag.OnEnterHook)
+ hooksecurefunc(bag, "UpdateTooltip", bag.OnEnterHook)
+ end
E:SetUpFading(BagsBar)
diff --git a/ls_UI/modules/bars/controller.lua b/ls_UI/modules/bars/controller.lua
index ca996148..7601aaa6 100644
--- a/ls_UI/modules/bars/controller.lua
+++ b/ls_UI/modules/bars/controller.lua
@@ -14,6 +14,9 @@ local isFinilized = false
local barController
local animController
+local NUM_STATIC_BUTTONS = 6
+local NUM_PER_SEGMENT = 6
+
local ENDCAPS = {
[1] = {
["ALLIANCE"] = "Interface\\AddOns\\ls_UI\\assets\\endcap-gryphon",
@@ -30,7 +33,7 @@ local ENDCAPS = {
local WIDGETS = {
["ACTION_BAR"] = {
frame_level_offset = 2,
- point = {"BOTTOM", "LSActionBarControllerBottom", "BOTTOM", 0, 15},
+ point = {"BOTTOMLEFT", "LSActionBarControllerBottom", "BOTTOMLEFT", -108, 15}, -- 36 * 3
children = {
"LSActionBar2",
"LSActionBar3",
@@ -44,6 +47,10 @@ local WIDGETS = {
},
attributes = {
["_childupdate-numbuttons"] = [[
+ if message > 12 then
+ message = 12
+ end
+
self:Hide()
self:SetWidth(36 * message)
self:Show()
@@ -67,8 +74,8 @@ local WIDGETS = {
["XP_BAR"] = {
frame_level_offset = 3,
point = {"BOTTOM", "LSActionBarControllerBottom", "BOTTOM", 0, 0},
- on_play = function(frame, newstate)
- frame:UpdateSize(756 / 2 + 36 * (newstate - 6), 12)
+ on_play = function(frame, totalButtons)
+ frame:UpdateSize(756 / 2 + 36 * (totalButtons - NUM_STATIC_BUTTONS), 12)
end,
},
}
@@ -97,6 +104,50 @@ function MODULE:IsRestricted()
return isInit
end
+local function adjustTopTextures(totalButtons)
+ local numButtons = totalButtons - NUM_STATIC_BUTTONS
+ local numFull = numButtons / NUM_PER_SEGMENT
+ local numActive = numFull + 0.9
+
+ animController.Top:SetWidth(totalButtons == 6 and 0.001 or 36 * numButtons)
+
+ for i = 1, 3 do
+ if i > numFull then
+ if i > numActive then
+ animController.Top["Mid" .. i]:SetWidth(0.0001)
+ else
+ animController.Top["Mid" .. i]:SetWidth(36 * (numButtons % NUM_PER_SEGMENT))
+ animController.Top["Mid" .. i]:SetTexCoord(233 / 2048, (233 + 72 * (numButtons % NUM_PER_SEGMENT)) / 2048, 1 / 256, 91 / 256)
+ end
+ else
+ animController.Top["Mid" .. i]:SetWidth(36 * NUM_PER_SEGMENT)
+ animController.Top["Mid" .. i]:SetTexCoord(233 / 2048, (233 + 72 * NUM_PER_SEGMENT) / 2048, 1 / 256, 91 / 256)
+ end
+ end
+end
+
+local function adjustBottomTextures(totalButtons)
+ local numButtons = totalButtons - NUM_STATIC_BUTTONS
+ local numFull = numButtons / NUM_PER_SEGMENT
+ local numActive = numFull + 0.9
+
+ animController.Bottom:SetWidth(totalButtons == 6 and 0.001 or 36 * numButtons)
+
+ for i = 1, 3 do
+ if i > numFull then
+ if i > numActive then
+ animController.Bottom["Mid" .. i]:SetWidth(0.0001)
+ else
+ animController.Bottom["Mid" .. i]:SetWidth(36 * (numButtons % NUM_PER_SEGMENT))
+ animController.Bottom["Mid" .. i]:SetTexCoord(569 / 2048, (569 + 72 * (numButtons % NUM_PER_SEGMENT)) / 2048, 92 / 256, 138 / 256)
+ end
+ else
+ animController.Bottom["Mid" .. i]:SetWidth(36 * NUM_PER_SEGMENT)
+ animController.Bottom["Mid" .. i]:SetTexCoord(569 / 2048, (569 + 72 * NUM_PER_SEGMENT) / 2048, 92 / 256, 138 / 256)
+ end
+ end
+end
+
function MODULE:SetupActionBarController()
if not isInit and PrC.db.profile.bars.restricted then
barController = CreateFrame("Frame", "LSActionBarController", UIParent, "SecureHandlerStateTemplate")
@@ -110,18 +161,15 @@ function MODULE:SetupActionBarController()
barController.Shuffle:Play()
end
- barController.UpdateSimple = function(_, newstate)
+ barController.UpdateInsecure = function(_, totalButtons)
for _, widget in next, WIDGETS do
if widget.frame and widget.on_play then
- widget.on_play(widget.frame, newstate)
+ widget.on_play(widget.frame, totalButtons)
end
end
- animController.Top:SetWidth(newstate == 6 and 0.001 or 36 * (newstate - 6))
- animController.Top.Mid:SetTexCoord(233 / 2048, (233 + 72 * (newstate - 6)) / 2048, 1 / 256, 91 / 256)
-
- animController.Bottom:SetWidth(newstate == 6 and 0.001 or 36 * (newstate - 6))
- animController.Bottom.Mid:SetTexCoord(569 / 2048, (569 + 72 * (newstate - 6)) / 2048, 92 / 256, 138 / 256)
+ adjustTopTextures(totalButtons)
+ adjustBottomTextures(totalButtons)
end
-- These frames are used as anchors/parents for secure/protected frames
@@ -145,69 +193,101 @@ function MODULE:SetupActionBarController()
animController:SetFrameLevel(barController:GetFrameLevel())
animController:SetAllPoints(barController)
- top = CreateFrame("Frame", nil, animController)
- top:SetFrameLevel(animController:GetFrameLevel() + 1)
- top:SetPoint("BOTTOM", 0, 28 / 2)
- top:SetSize(432 / 2, 90 / 2)
- animController.Top = top
-
- local texture = top:CreateTexture(nil, "ARTWORK")
- texture:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
- texture:SetTexCoord(1 / 2048, 233 / 2048, 1 / 256, 91 / 256)
- texture:SetPoint("BOTTOMRIGHT", top, "BOTTOMLEFT", 0, 0)
- texture:SetSize(232 / 2, 90 / 2)
- top.Left = texture
-
- texture = top:CreateTexture(nil, "ARTWORK")
- texture:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
- texture:SetTexCoord(233 / 2048, 665 / 2048, 1 / 256, 91 / 256)
- texture:SetAllPoints()
- top.Mid = texture
-
- texture = top:CreateTexture(nil, "ARTWORK")
- texture:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
- texture:SetTexCoord(665 / 2048, 897 / 2048, 1 / 256, 91 / 256)
- texture:SetPoint("BOTTOMLEFT", top, "BOTTOMRIGHT", 0, 0)
- texture:SetSize(232 / 2, 90 / 2)
- top.Right = texture
-
- bottom = CreateFrame("Frame", nil, animController)
- bottom:SetFrameLevel(animController:GetFrameLevel() + 7)
- bottom:SetPoint("BOTTOM", 0, 0)
- bottom:SetSize(432 / 2, 46 / 2)
- animController.Bottom = bottom
-
- texture = bottom:CreateTexture(nil, "ARTWORK")
- texture:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
- texture:SetTexCoord(1 / 2048, 569 / 2048, 92 / 256, 138 / 256)
- texture:SetPoint("BOTTOMRIGHT", bottom, "BOTTOMLEFT", 0, 0)
- texture:SetSize(568 / 2, 46 / 2)
- bottom.Left = texture
-
- texture = bottom:CreateTexture(nil, "ARTWORK")
- texture:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
- texture:SetTexCoord(569 / 2048, 1001 / 2048, 92 / 256, 138 / 256)
- texture:SetAllPoints()
- bottom.Mid = texture
-
- texture = bottom:CreateTexture(nil, "ARTWORK")
- texture:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
- texture:SetTexCoord(1001 / 2048, 1569 / 2048, 92 / 256, 138 / 256)
- texture:SetPoint("BOTTOMLEFT", bottom, "BOTTOMRIGHT", 0, 0)
- texture:SetSize(568 / 2, 46 / 2)
- bottom.Right = texture
-
- texture = bottom:CreateTexture(nil, "ARTWORK", nil, -1)
- texture:SetTexCoord(1 / 256, 189 / 256, 1 / 128, 125 / 128)
- texture:SetPoint("BOTTOMRIGHT", bottom, "BOTTOMLEFT", -92, 14)
- texture:SetSize(188 / 2, 124 / 2)
- animController.LeftCap = texture
-
- texture = bottom:CreateTexture(nil, "ARTWORK", nil, -1)
- texture:SetTexCoord(189 / 256, 1 / 256, 1 / 128, 125 / 128)
- texture:SetPoint("BOTTOMLEFT", bottom, "BOTTOMRIGHT", 92, 14)
- texture:SetSize(188 / 2, 124 / 2)
- animController.RightCap = texture
+ local topInsecure = CreateFrame("Frame", nil, animController)
+ topInsecure:SetFrameLevel(animController:GetFrameLevel() + 1)
+ topInsecure:SetPoint("BOTTOM", 0, 28 / 2)
+ topInsecure:SetSize(432 / 2, 90 / 2)
+ animController.Top = topInsecure
+
+ local topLeft = topInsecure:CreateTexture(nil, "ARTWORK")
+ topLeft:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
+ topLeft:SetTexCoord(1 / 2048, 233 / 2048, 1 / 256, 91 / 256)
+ topLeft:SetPoint("BOTTOMRIGHT", topInsecure, "BOTTOMLEFT", 0, 0)
+ topLeft:SetSize(232 / 2, 90 / 2)
+ topInsecure.Left = topLeft
+
+ local topMidLeft = topInsecure:CreateTexture(nil, "ARTWORK")
+ topMidLeft:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
+ topMidLeft:SetTexCoord(233 / 2048, 665 / 2048, 1 / 256, 91 / 256)
+ topMidLeft:SetPoint("BOTTOMLEFT", topInsecure, "BOTTOMLEFT", 0, 0)
+ topMidLeft:SetSize(0.001, 90 / 2)
+ topInsecure.Mid1 = topMidLeft
+
+ local topMidRight = topInsecure:CreateTexture(nil, "ARTWORK")
+ topMidRight:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
+ topMidRight:SetTexCoord(233 / 2048, 665 / 2048, 1 / 256, 91 / 256)
+ topMidRight:SetPoint("BOTTOMRIGHT", topInsecure, "BOTTOMRIGHT", 0, 0)
+ topMidRight:SetSize(0.001, 90 / 2)
+ topInsecure.Mid3 = topMidRight
+
+ local topMidCenter = topInsecure:CreateTexture(nil, "ARTWORK")
+ topMidCenter:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
+ topMidCenter:SetTexCoord(233 / 2048, 665 / 2048, 1 / 256, 91 / 256)
+ topMidCenter:SetPoint("BOTTOMLEFT", topMidLeft, "BOTTOMRIGHT", 0, 0)
+ topMidCenter:SetPoint("BOTTOMRIGHT", topMidRight, "BOTTOMLEFT", 0, 0)
+ topMidCenter:SetSize(0.001, 90 / 2)
+ topInsecure.Mid2 = topMidCenter
+
+ local topRight = topInsecure:CreateTexture(nil, "ARTWORK")
+ topRight:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
+ topRight:SetTexCoord(665 / 2048, 897 / 2048, 1 / 256, 91 / 256)
+ topRight:SetPoint("BOTTOMLEFT", topInsecure, "BOTTOMRIGHT", 0, 0)
+ topRight:SetSize(232 / 2, 90 / 2)
+ topInsecure.Right = topRight
+
+ local bottomInsecure = CreateFrame("Frame", nil, animController)
+ bottomInsecure:SetFrameLevel(animController:GetFrameLevel() + 7)
+ bottomInsecure:SetPoint("BOTTOM", 0, 0)
+ bottomInsecure:SetSize(432 / 2, 46 / 2)
+ animController.Bottom = bottomInsecure
+
+ local bottomLeft = bottomInsecure:CreateTexture(nil, "ARTWORK")
+ bottomLeft:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
+ bottomLeft:SetTexCoord(1 / 2048, 569 / 2048, 92 / 256, 138 / 256)
+ bottomLeft:SetPoint("BOTTOMRIGHT", bottomInsecure, "BOTTOMLEFT", 0, 0)
+ bottomLeft:SetSize(568 / 2, 46 / 2)
+ bottomInsecure.Left = bottomLeft
+
+ local bottomMidLeft = bottomInsecure:CreateTexture(nil, "ARTWORK")
+ bottomMidLeft:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
+ bottomMidLeft:SetTexCoord(569 / 2048, 1001 / 2048, 92 / 256, 138 / 256)
+ bottomMidLeft:SetPoint("BOTTOMLEFT", bottomInsecure, "BOTTOMLEFT", 0, 0)
+ bottomMidLeft:SetSize(0.001, 46 / 2)
+ bottomInsecure.Mid1 = bottomMidLeft
+
+ local bottomMidRight = bottomInsecure:CreateTexture(nil, "ARTWORK")
+ bottomMidRight:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
+ bottomMidRight:SetTexCoord(569 / 2048, 1001 / 2048, 92 / 256, 138 / 256)
+ bottomMidRight:SetPoint("BOTTOMRIGHT", bottomInsecure, "BOTTOMRIGHT", 0, 0)
+ bottomMidRight:SetSize(0.001, 46 / 2)
+ bottomInsecure.Mid3 = bottomMidRight
+
+ local bottomMidCenter = bottomInsecure:CreateTexture(nil, "ARTWORK")
+ bottomMidCenter:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
+ bottomMidCenter:SetTexCoord(569 / 2048, 1001 / 2048, 92 / 256, 138 / 256)
+ bottomMidCenter:SetPoint("BOTTOMLEFT", bottomMidLeft, "BOTTOMRIGHT", 0, 0)
+ bottomMidCenter:SetPoint("BOTTOMRIGHT", bottomMidRight, "BOTTOMLEFT", 0, 0)
+ bottomMidCenter:SetSize(0.001, 46 / 2)
+ bottomInsecure.Mid2 = bottomMidCenter
+
+ local bottomRight = bottomInsecure:CreateTexture(nil, "ARTWORK")
+ bottomRight:SetTexture("Interface\\AddOns\\ls_UI\\assets\\console")
+ bottomRight:SetTexCoord(1001 / 2048, 1569 / 2048, 92 / 256, 138 / 256)
+ bottomRight:SetPoint("BOTTOMLEFT", bottomInsecure, "BOTTOMRIGHT", 0, 0)
+ bottomRight:SetSize(568 / 2, 46 / 2)
+ bottomInsecure.Right = bottomRight
+
+ local leftCap = bottomInsecure:CreateTexture(nil, "ARTWORK", nil, -1)
+ leftCap:SetTexCoord(1 / 256, 189 / 256, 1 / 128, 125 / 128)
+ leftCap:SetPoint("BOTTOMRIGHT", bottomInsecure, "BOTTOMLEFT", -92, 14)
+ leftCap:SetSize(188 / 2, 124 / 2)
+ animController.LeftCap = leftCap
+
+ local rightCap = bottomInsecure:CreateTexture(nil, "ARTWORK", nil, -1)
+ rightCap:SetTexCoord(189 / 256, 1 / 256, 1 / 128, 125 / 128)
+ rightCap:SetPoint("BOTTOMLEFT", bottomInsecure, "BOTTOMRIGHT", 92, 14)
+ rightCap:SetSize(188 / 2, 124 / 2)
+ animController.RightCap = rightCap
local ag = animController:CreateAnimationGroup()
ag:SetScript("OnPlay", function()
@@ -219,7 +299,13 @@ function MODULE:SetupActionBarController()
if widget.children then
for _, child in next, widget.children do
- E:FadeOut(_G[child], nil, nil, nil, _G[child]:GetAlpha())
+ child = _G[child]
+
+ if newstate == 6 then
+ E:FadeOut(child, nil, nil, nil, child:GetAlpha())
+ else
+ child:SetAlpha(0)
+ end
end
end
end
@@ -234,11 +320,8 @@ function MODULE:SetupActionBarController()
end)
C_Timer.After(0.4, function()
- animController.Top:SetWidth(newstate == 6 and 0.001 or 36 * (newstate - 6))
- animController.Top.Mid:SetTexCoord(233 / 2048, (233 + 72 * (newstate - 6)) / 2048, 1 / 256, 91 / 256)
-
- animController.Bottom:SetWidth(newstate == 6 and 0.001 or 36 * (newstate - 6))
- animController.Bottom.Mid:SetTexCoord(569 / 2048, (569 + 72 * (newstate - 6)) / 2048, 92 / 256, 138 / 256)
+ adjustTopTextures(newstate)
+ adjustBottomTextures(newstate)
end)
end)
ag:SetScript("OnFinished", function()
@@ -352,8 +435,8 @@ function MODULE:FinalizeActionBarController()
isFinilized = true
- self:UpdateMainBarMaxButtons(LSActionBar1:GetAttribute("maxbuttons"))
- self:UpdateScale(LSActionBar1:GetAttribute("scale"))
+ self:UpdateMainBarMaxButtons(C.db.profile.bars.bar1.num)
+ self:UpdateScale(C.db.profile.bars.bar1.scale)
end
end
@@ -398,7 +481,7 @@ function MODULE:UpdateMainBarMaxButtons(num)
barController:Execute(([[
self:SetAttribute("numbuttons", %1$d)
self:ChildUpdate("numbuttons", %1$d)
- self:CallMethod("UpdateSimple", %1$d)
+ self:CallMethod("UpdateInsecure", %1$d)
top:SetWidth(%1$d == 6 and 0.001 or 36 * (%1$d - 6))
bottom:SetWidth(%1$d == 6 and 0.001 or 36 * (%1$d - 6))
diff --git a/ls_UI/modules/bars/core.lua b/ls_UI/modules/bars/core.lua
index f0df2e56..1fcbf1c5 100644
--- a/ls_UI/modules/bars/core.lua
+++ b/ls_UI/modules/bars/core.lua
@@ -93,6 +93,7 @@ end
function MODULE:Create(id, name, isInsecure)
local bar = Mixin(CreateFrame("Frame", name, UIParent, not isInsecure and "SecureHandlerStateTemplate" or nil) , bar_proto)
+ bar:SetFrameLevel(3) -- to make sure that it's above the controller
bar:SetSize(0, 0)
bar._id = id
bar._buttons = {}
diff --git a/ls_UI/modules/bars/junk.lua b/ls_UI/modules/bars/junk.lua
index a6f58b16..1accaf4a 100644
--- a/ls_UI/modules/bars/junk.lua
+++ b/ls_UI/modules/bars/junk.lua
@@ -70,6 +70,8 @@ function MODULE:CleanUp()
end
hideBar(StatusTrackingBarManager)
+ hideBar(MainStatusTrackingBarContainer)
+ hideBar(SecondaryStatusTrackingBarContainer)
if NewPlayerExperience then
disableNPE()
diff --git a/ls_UI/modules/bars/micromenu.lua b/ls_UI/modules/bars/micromenu.lua
index d9028482..929ea220 100644
--- a/ls_UI/modules/bars/micromenu.lua
+++ b/ls_UI/modules/bars/micromenu.lua
@@ -29,12 +29,12 @@ local BUTTONS = {
},
},
spellbook = {
- name = "SpellbookMicroButton",
+ name = "ProfessionMicroButton",
icon = "SPELLBOOK",
events = {},
},
talent = {
- name = "TalentMicroButton",
+ name = "PlayerSpellsMicroButton",
icon = "TALENT",
events = {
HONOR_LEVEL_UPDATE = true,
@@ -129,7 +129,7 @@ local ALERTS = {
"CollectionsMicroButton",
"EJMicroButton",
"GuildMicroButton",
- "TalentMicroButton",
+ "PlayerSpellsMicroButton",
}
local TEXTURE_COORDS = {
@@ -245,7 +245,7 @@ end
local button_proto = {}
-function button_proto:OnEnter()
+function button_proto:OnEnterOverride()
if not KeybindFrames_InQuickKeybindMode() then
local p, rP, x, y = E:GetTooltipPoint(self._parent)
@@ -257,9 +257,9 @@ function button_proto:OnEnter()
local r, g, b = C.db.global.colors.red:GetRGB()
if self.factionGroup == "Neutral" then
- GameTooltip:AddLine(L["FEATURE_NOT_AVAILBLE_NEUTRAL"], r, g, b, true)
+ GameTooltip:AddLine(_G.FEATURE_NOT_AVAILBLE_NEUTRAL, r, g, b, true)
elseif self.minLevel then
- GameTooltip:AddLine(L["FEATURE_BECOMES_AVAILABLE_AT_LEVEL"]:format(self.minLevel), r, g, b, true)
+ GameTooltip:AddLine(_G.FEATURE_BECOMES_AVAILABLE_AT_LEVEL:format(self.minLevel), r, g, b, true)
elseif self.disabledTooltip then
GameTooltip:AddLine(GetValueOrCallFunction(self, "disabledTooltip"), r, g, b, true)
end
@@ -313,7 +313,7 @@ local function handleMicroButton(button, useBlizz)
button:RegisterForClicks("LeftButtonUp", "RightButtonUp")
button:UnregisterAllEvents()
- button:SetScript("OnEnter", button.OnEnter)
+ button:SetScript("OnEnter", button.OnEnterOverride)
button:SetScript("OnUpdate", nil)
if useBlizz then
@@ -377,6 +377,8 @@ end
local char_button_proto = {}
do
+ local DURABILITY_COLON = _G.DURABILITY .. _G.HEADER_COLON
+
local slots = {
[ 1] = _G["HEADSLOT"],
[ 3] = _G["SHOULDERSLOT"],
@@ -392,34 +394,40 @@ do
local durabilities = {}
local minDurability = 100
- function char_button_proto:OnEnter()
- button_proto.OnEnter(self)
+ function char_button_proto:OnEnterOverride()
+ button_proto.OnEnterOverride(self)
if self:IsEnabled() then
- GameTooltip:AddLine(" ")
- GameTooltip:AddLine(L["DURABILITY_COLON"])
+ if #durabilities > 0 then
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddLine(DURABILITY_COLON)
- for i = 1, 17 do
- local cur = durabilities[i]
- if cur then
- GameTooltip:AddDoubleLine(slots[i], ("%d%%"):format(cur), 1, 1, 1, E:GetGradientAsRGB(cur / 100, C.db.global.colors.ryg))
+ for i = 1, 17 do
+ local cur = durabilities[i]
+ if cur then
+ GameTooltip:AddDoubleLine(slots[i], ("%d%%"):format(cur), 1, 1, 1, E:GetGradientAsRGB(cur / 100, C.db.global.colors.ryg))
+ end
end
- end
- GameTooltip:Show()
+ GameTooltip:Show()
+ end
end
end
+ local deferredUpdate, timer
+
function char_button_proto:OnEventHook(event)
if event == "UPDATE_INVENTORY_DURABILITY" then
- local t = GetTime()
-
- if t - (self.recentUpdate or 0 ) >= 1 then
- C_Timer.After(1, function()
+ if not deferredUpdate then
+ deferredUpdate = function()
self:UpdateIndicator()
- end)
- self.recentUpdate = t
+ timer = nil
+ end
+ end
+
+ if not timer then
+ timer = C_Timer.NewTimer(1, deferredUpdate)
end
end
end
@@ -428,9 +436,9 @@ do
button_proto.Update(self)
if self._config.tooltip then
- self:SetScript("OnEnter", self.OnEnter)
+ self:SetScript("OnEnter", self.OnEnterOverride)
else
- self:SetScript("OnEnter", button_proto.OnEnter)
+ self:SetScript("OnEnter", button_proto.OnEnterOverride)
end
self:UpdateIndicator()
@@ -461,24 +469,15 @@ do
if GameTooltip:IsOwned(self) then
GameTooltip:Hide()
- self:OnEnter()
- end
- end
-end
-
-local spellbook_button_proto = {}
-do
- function spellbook_button_proto:OnEvent(event)
- if event == "UPDATE_BINDINGS" then
- self.tooltipText = MicroButtonTooltipText(SPELLBOOK_ABILITIES_BUTTON, "TOGGLESPELLBOOK")
+ self:OnEnterOverride()
end
end
end
local quest_button_proto = {}
do
- function quest_button_proto:OnEnter()
- button_proto.OnEnter(self)
+ function quest_button_proto:OnEnterOverride()
+ button_proto.OnEnterOverride(self)
if self:IsEnabled() then
GameTooltip:AddLine(L["DAILY_QUEST_RESET_TIME_TOOLTIP"]:format(SecondsToTime(GetQuestResetTime())))
@@ -490,15 +489,20 @@ do
button_proto.Update(self)
if self._config.tooltip then
- self:SetScript("OnEnter", self.OnEnter)
+ self:SetScript("OnEnter", self.OnEnterOverride)
else
- self:SetScript("OnEnter", button_proto.OnEnter)
+ self:SetScript("OnEnter", button_proto.OnEnterOverride)
end
end
end
local lfd_button_proto = {}
do
+ -- C.db isn't available yet, but these are static colours, so whatevs..
+ local DAMAGER = D.global.colors.red:WrapTextInColorCode(_G.DAMAGER)
+ local HEALER = D.global.colors.green:WrapTextInColorCode(_G.HEALER)
+ local TANK = D.global.colors.blue:WrapTextInColorCode(_G.TANK)
+
local cta = {
tank = {},
healer = {},
@@ -507,9 +511,9 @@ do
}
local ROLES = {"tank", "healer", "damager"}
local ROLE_NAMES = {
- tank = L["TANK_BLUE"],
- healer = L["HEALER_GREEN"],
- damager = L["DAMAGER_RED"],
+ damager = DAMAGER,
+ healer = HEALER,
+ tank = TANK,
}
local function fetchCTAData(dungeonID, dungeonName, shortageRole, shortageIndex, numRewards)
@@ -520,8 +524,8 @@ do
local name, texture, quantity = GetLFGDungeonShortageRewardInfo(dungeonID, shortageIndex, rewardIndex)
if not name or name == "" then
- name = L["UNKNOWN"]
- texture = texture or "Interface\\Icons\\INV_Misc_QuestionMark"
+ name = _G.UNKNOWN
+ texture = texture or QUESTION_MARK_ICON
end
cta[shortageRole][dungeonID][rewardIndex] = {
@@ -557,8 +561,8 @@ do
end
end
- function lfd_button_proto:OnEnter()
- button_proto.OnEnter(self)
+ function lfd_button_proto:OnEnterOverride()
+ button_proto.OnEnterOverride(self)
if self:IsEnabled() then
local gray = C.db.global.colors.gray
@@ -570,7 +574,7 @@ do
if v then
if not hasTitle then
GameTooltip:AddLine(" ")
- GameTooltip:AddLine(L["CALL_TO_ARMS_TOOLTIP"]:format(ROLE_NAMES[role]))
+ GameTooltip:AddLine(_G.LFG_CALL_TO_ARMS:format(ROLE_NAMES[role]))
hasTitle = true
end
@@ -588,19 +592,12 @@ do
end
end
- function lfd_button_proto:OnEvent(event)
+ function lfd_button_proto:OnEventHook(event)
if event == "LFG_LOCK_INFO_RECEIVED" then
if GetTime() - (self.lastUpdate or 0) > 9 then
self:UpdateIndicator()
self.lastUpdate = GetTime()
end
- else
- if Kiosk.IsEnabled() then
- return
- end
-
- self.tooltipText = MicroButtonTooltipText(DUNGEONS_BUTTON, "TOGGLEGROUPFINDER")
- self.newbieText = NEWBIE_TOOLTIP_LFGPARENT
end
end
@@ -608,14 +605,14 @@ do
button_proto.Update(self)
if self._config.enabled and self._config.tooltip then
- self:SetScript("OnEnter", self.OnEnter)
+ self:SetScript("OnEnter", self.OnEnterOverride)
self.Ticker = C_Timer.NewTicker(15, function()
RequestLFDPlayerLockInfo()
RequestLFDPartyLockInfo()
end)
else
- self:SetScript("OnEnter", button_proto.OnEnter)
+ self:SetScript("OnEnter", button_proto.OnEnterOverride)
if self.Ticker then
self.Ticker:Cancel()
@@ -649,7 +646,7 @@ do
if GameTooltip:IsOwned(self) then
GameTooltip:Hide()
- self:OnEnter()
+ self:OnEnterOverride()
end
end
end
@@ -662,7 +659,7 @@ do
local instanceNames = {}
local instanceResets = {}
- local EXPIRATION_FORMAT = _G.RAID_INSTANCE_EXPIRES .. ":"
+ local EXPIRATION_FORMAT = _G.RAID_INSTANCE_EXPIRES .. _G.HEADER_COLON
local WORLD_BOSS = _G.RAID_INFO_WORLD_BOSS
local WORLD_BOSS_ID = 172
local WORLD_BOSS_PROGRESS = "1 / 1"
@@ -671,8 +668,8 @@ do
return a[1] < b[1]
end
- function ej_button_proto:OnEnter()
- button_proto.OnEnter(self)
+ function ej_button_proto:OnEnterOverride()
+ button_proto.OnEnterOverride(self)
if self:IsEnabled() then
if not isInfoRequested then
@@ -787,7 +784,7 @@ do
end
if GameTooltip:IsOwned(self) then
- self:OnEnter()
+ self:OnEnterOverride()
end
end
end
@@ -800,9 +797,9 @@ do
button_proto.Update(self)
if self._config.tooltip then
- self:SetScript("OnEnter", self.OnEnter)
+ self:SetScript("OnEnter", self.OnEnterOverride)
else
- self:SetScript("OnEnter", button_proto.OnEnter)
+ self:SetScript("OnEnter", button_proto.OnEnterOverride)
end
end
end
@@ -814,7 +811,9 @@ do
local memUsage = 0
local latencyHome, latencyWorld = 0, 0
local MED_LATENCY = 600
+ local LATENCY_COLON = L["LATENCY"] .. _G.HEADER_COLON
local LATENCY_TEMPLATE = "|c%s%s|r " .. _G.MILLISECONDS_ABBR
+ local MEMORY_COLON = L["MEMORY"] .. _G.HEADER_COLON
local MEMORY_TEMPLATE = "%.2f MiB"
local _
@@ -822,18 +821,18 @@ do
return a[2] > b[2]
end
- function main_button_proto:OnEnter()
- button_proto.OnEnter(self)
+ function main_button_proto:OnEnterOverride()
+ button_proto.OnEnterOverride(self)
if self:IsEnabled() then
GameTooltip:AddLine(" ")
- GameTooltip:AddLine(L["LATENCY_COLON"])
+ GameTooltip:AddLine(LATENCY_COLON)
GameTooltip:AddDoubleLine(L["LATENCY_HOME"], LATENCY_TEMPLATE:format(E:GetGradientAsHex(latencyHome / MED_LATENCY, C.db.global.colors.gyr), latencyHome), 1, 1, 1)
GameTooltip:AddDoubleLine(L["LATENCY_WORLD"], LATENCY_TEMPLATE:format(E:GetGradientAsHex(latencyWorld / MED_LATENCY, C.db.global.colors.gyr), latencyWorld), 1, 1, 1)
if IsShiftKeyDown() then
GameTooltip:AddLine(" ")
- GameTooltip:AddLine(L["MEMORY_COLON"])
+ GameTooltip:AddLine(MEMORY_COLON)
UpdateAddOnMemoryUsage()
@@ -867,7 +866,7 @@ do
GameTooltip:AddDoubleLine(cache[addOns[i][1]][1], MEMORY_TEMPLATE:format(m / 1024), 1, 1, 1, E:GetGradientAsRGB(m / (memUsage == m and 1 or (memUsage - m)), C.db.global.colors.gyr))
end
- GameTooltip:AddDoubleLine(L["TOTAL"], MEMORY_TEMPLATE:format(memUsage / 1024))
+ GameTooltip:AddDoubleLine(_G.TOTAL, MEMORY_TEMPLATE:format(memUsage / 1024))
end
else
GameTooltip:AddLine(" ")
@@ -878,12 +877,12 @@ do
end
end
- function main_button_proto:OnEvent(event)
+ function main_button_proto:OnEventOverride(event)
if event == "MODIFIER_STATE_CHANGED" then
if GameTooltip:IsOwned(self) then
GameTooltip:Hide()
- self:OnEnter()
+ self:OnEnterOverride()
end
elseif event == "UPDATE_BINDINGS" then
self.tooltipText = MicroButtonTooltipText(MAINMENU_BUTTON, "TOGGLEGAMEMENU")
@@ -894,13 +893,13 @@ do
button_proto.Update(self)
if self._config.enabled and self._config.tooltip then
- self:SetScript("OnEnter", self.OnEnter)
+ self:SetScript("OnEnter", self.OnEnterOverride)
self.Ticker = C_Timer.NewTicker(30, function()
self:UpdateIndicator()
end)
else
- self:SetScript("OnEnter", button_proto.OnEnter)
+ self:SetScript("OnEnter", button_proto.OnEnterOverride)
if self.Ticker then
self.Ticker:Cancel()
@@ -993,10 +992,10 @@ local MICRO_BUTTONS = {
[HelpMicroButton] = true,
[LFDMicroButton] = true,
[MainMenuMicroButton] = true,
+ [PlayerSpellsMicroButton] = true,
+ [ProfessionMicroButton] = true,
[QuestLogMicroButton] = true,
- [SpellbookMicroButton] = true,
[StoreMicroButton] = true,
- [TalentMicroButton] = true,
}
local function hideHelpTips(self)
@@ -1038,15 +1037,8 @@ function MODULE:CreateMicroMenu()
Mixin(button, char_button_proto)
button:HookScript("OnEvent", button.OnEventHook)
- -- keep it, tooltipText is broken in the default UI
- button.tooltipText = MicroButtonTooltipText(CHARACTER_BUTTON, "TOGGLECHARACTER0")
button.Indicator = createButtonIndicator(button)
- elseif id == "spellbook" then
- Mixin(button, spellbook_button_proto)
- button:SetScript("OnEnter", button.OnEnter)
- button:SetScript("OnEvent", button.OnEvent)
-
- button.tooltipText = MicroButtonTooltipText(SPELLBOOK_ABILITIES_BUTTON, "TOGGLESPELLBOOK")
+ -- elseif id == "spellbook" then
-- elseif id == "talent" then
-- elseif id == "achievement" then
elseif id == "quest" then
@@ -1054,10 +1046,7 @@ function MODULE:CreateMicroMenu()
-- elseif id == "guild" then
elseif id == "lfd" then
Mixin(button, lfd_button_proto)
- button:SetScript("OnEvent", button.OnEvent)
-
- button.tooltipText = MicroButtonTooltipText(DUNGEONS_BUTTON, "TOGGLEGROUPFINDER")
- button.newbieText = NEWBIE_TOOLTIP_LFGPARENT
+ button:HookScript("OnEvent", button.OnEventHook)
-- elseif id == "collection" then
elseif id == "ej" then
Mixin(button, ej_button_proto)
@@ -1066,7 +1055,7 @@ function MODULE:CreateMicroMenu()
-- -- elseif id == "store" then
elseif id == "main" then
Mixin(button, main_button_proto)
- button:SetScript("OnEvent", button.OnEvent)
+ button:SetScript("OnEvent", button.OnEventOverride)
button.tooltipText = MicroButtonTooltipText(MAINMENU_BUTTON, "TOGGLEGAMEMENU")
button.Indicator = createButtonIndicator(button, button.MainMenuBarPerformanceBar)
diff --git a/ls_UI/modules/bars/petbar.lua b/ls_UI/modules/bars/petbar.lua
index ae0e6717..ef38a211 100644
--- a/ls_UI/modules/bars/petbar.lua
+++ b/ls_UI/modules/bars/petbar.lua
@@ -185,7 +185,7 @@ function button_proto:Update()
self.isToken = isToken
if spellID then
- self.tooltipSubtext = GetSpellSubtext(spellID)
+ self.tooltipSubtext = C_Spell.GetSpellSubtext(spellID)
end
if PetHasActionBar() and isActive then
@@ -204,16 +204,8 @@ function button_proto:Update()
self:SetChecked(false)
end
- if autoCastAllowed and not autoCastEnabled then
- self.AutoCastable:Show()
- AutoCastShine_AutoCastStop(self.AutoCastShine)
- elseif autoCastAllowed then
- self.AutoCastable:Hide()
- AutoCastShine_AutoCastStart(self.AutoCastShine)
- else
- self.AutoCastable:Hide()
- AutoCastShine_AutoCastStop(self.AutoCastShine)
- end
+ self.AutoCastOverlay:SetShown(autoCastAllowed)
+ self.AutoCastOverlay:ShowAutoCastEnabled(autoCastEnabled)
if texture then
self:UpdateUsable()
diff --git a/ls_UI/modules/bars/xpbar.lua b/ls_UI/modules/bars/xpbar.lua
index d1d15d49..ba0355ca 100644
--- a/ls_UI/modules/bars/xpbar.lua
+++ b/ls_UI/modules/bars/xpbar.lua
@@ -13,12 +13,11 @@ local isInit = false
local barValueTemplate
local MAX_SEGMENTS = 4
-local REPUTATION_TEMPLATE = "%s: %s"
-local CUR_MAX_VALUE_TEMPLATE = "%s / %s"
local CUR_MAX_PERC_VALUE_TEMPLATE = "%s / %s (%.1f%%)"
-local DEFAULT_TEXTURE = "Interface\\BUTTONS\\WHITE8X8"
-local AZERITE_TEXTURE = "Interface\\AddOns\\ls_UI\\assets\\statusbar-azerite-fill"
-local RENOWN_PLUS = s_trim(RENOWN_LEVEL_LABEL) .. "+"
+local CUR_MAX_VALUE_TEMPLATE = "%s / %s"
+local HONOR_TEMPLATE = _G.LFG_LIST_HONOR_LEVEL_CURRENT_PVP:gsub("%%d", "|cffffffff%%d|r")
+local RENOWN_PLUS = s_trim(_G.RENOWN_LEVEL_LABEL) .. "+"
+local REPUTATION_TEMPLATE = "%s: %s"
local CFG = {
visible = true,
@@ -46,397 +45,416 @@ local LAYOUT = {
local bar_proto = {
UpdateCooldownConfig = E.NOOP,
}
-
-function bar_proto:ForEach(method, ...)
- for i = 1, MAX_SEGMENTS do
- if self[i][method] then
- self[i][method](self[i], ...)
+do
+ function bar_proto:ForEach(method, ...)
+ for i = 1, MAX_SEGMENTS do
+ if self[i][method] then
+ self[i][method](self[i], ...)
+ end
end
end
-end
-function bar_proto:Update()
- self:UpdateConfig()
- self:UpdateFont()
- self:UpdateTextFormat()
- self:UpdateTextVisibility()
- self:UpdateSize(self._config.width, self._config.height)
- self:UpdateFading()
-end
+ function bar_proto:Update()
+ self:UpdateConfig()
+ self:UpdateFont()
+ self:UpdateTextFormat()
+ self:UpdateTextVisibility()
+ self:UpdateSize(self._config.width, self._config.height)
+ self:UpdateFading()
+ end
-function bar_proto:UpdateConfig()
- self._config = E:CopyTable(BARS:IsRestricted() and CFG or C.db.profile.bars.xpbar, self._config)
+ function bar_proto:UpdateConfig()
+ self._config = E:CopyTable(BARS:IsRestricted() and CFG or C.db.profile.bars.xpbar, self._config)
- if BARS:IsRestricted() then
- self._config.text = E:CopyTable(C.db.profile.bars.xpbar.text, self._config.text)
+ if BARS:IsRestricted() then
+ self._config.text = E:CopyTable(C.db.profile.bars.xpbar.text, self._config.text)
+ end
end
-end
-function bar_proto:UpdateFont()
- for i = 1, MAX_SEGMENTS do
- self[i].Text:UpdateFont(self._config.text.size)
+ function bar_proto:UpdateFont()
+ for i = 1, MAX_SEGMENTS do
+ self[i].Text:UpdateFont(self._config.text.size)
+ end
end
-end
-function bar_proto:UpdateTextFormat()
- if self._config.text.format == "NUM" then
- barValueTemplate = CUR_MAX_VALUE_TEMPLATE
- elseif self._config.text.format == "NUM_PERC" then
- barValueTemplate = CUR_MAX_PERC_VALUE_TEMPLATE
+ function bar_proto:UpdateTextFormat()
+ if self._config.text.format == "NUM" then
+ barValueTemplate = CUR_MAX_VALUE_TEMPLATE
+ elseif self._config.text.format == "NUM_PERC" then
+ barValueTemplate = CUR_MAX_PERC_VALUE_TEMPLATE
+ end
end
-end
-function bar_proto:UpdateTextVisibility()
- for i = 1, MAX_SEGMENTS do
- self[i]:LockText(self._config.text.visibility == 1)
+ function bar_proto:UpdateTextVisibility()
+ for i = 1, MAX_SEGMENTS do
+ self[i]:LockText(self._config.text.visibility == 1)
+ end
end
-end
-function bar_proto:UpdateSize(width, height)
- width = width or self._config.width
- height = height or self._config.height
+ function bar_proto:UpdateSize(width, height)
+ width = width or self._config.width
+ height = height or self._config.height
- for i = 1, MAX_SEGMENTS do
- local layout = E:CalcSegmentsSizes(width, 2, i)
+ for i = 1, MAX_SEGMENTS do
+ local layout = E:CalcSegmentsSizes(width, 2, i)
- for j = 1, i do
- LAYOUT[i][j].size = {layout[j], height}
+ for j = 1, i do
+ LAYOUT[i][j].size = {layout[j], height}
+ end
end
- end
- self:SetSize(width, height)
+ self:SetSize(width, height)
- if not BARS:IsRestricted() then
- E.Movers:Get(self):UpdateSize(width, height)
- end
+ if not BARS:IsRestricted() then
+ E.Movers:Get(self):UpdateSize(width, height)
+ end
- if not BARS:IsRestricted() then
- E:SetStatusBarSkin(self.TexParent, "HORIZONTAL-" .. height)
+ self.total = nil
+
+ self:UpdateSegments()
end
- self._total = nil
+ function bar_proto:UpdateSegments()
+ local index = 0
- self:UpdateSegments()
-end
+ if C_PetBattles.IsInBattle() then
+ local i = C_PetBattles.GetActivePet(Enum.BattlePetOwner.Ally)
+ local level = C_PetBattles.GetLevel(Enum.BattlePetOwner.Ally, i)
+ if level and level < 25 then
+ index = index + 1
-function bar_proto:UpdateSegments()
- local index = 0
+ self[index]:UpdatePetXP(i, level)
+ end
+ else
+ -- Azerite
+ if not C_AzeriteItem.IsAzeriteItemAtMaxLevel() then
+ local azeriteItem = C_AzeriteItem.FindActiveAzeriteItem()
+ if azeriteItem and azeriteItem:IsEquipmentSlot() and C_AzeriteItem.IsAzeriteItemEnabled(azeriteItem) then
+ index = index + 1
- if C_PetBattles.IsInBattle() then
- local i = C_PetBattles.GetActivePet(Enum.BattlePetOwner.Ally)
- local level = C_PetBattles.GetLevel(Enum.BattlePetOwner.Ally, i)
- if level and level < 25 then
- index = index + 1
+ self[index]:UpdateAzerite(azeriteItem)
+ end
+ end
- self[index]:UpdatePetXP(i, level)
- end
- else
- -- Azerite
- if not C_AzeriteItem.IsAzeriteItemAtMaxLevel() then
- local azeriteItem = C_AzeriteItem.FindActiveAzeriteItem()
- if azeriteItem and azeriteItem:IsEquipmentSlot() and C_AzeriteItem.IsAzeriteItemEnabled(azeriteItem) then
+ -- XP
+ if not IsXPUserDisabled() and not IsPlayerAtEffectiveMaxLevel() then
index = index + 1
- self[index]:UpdateAzerite(azeriteItem)
+ self[index]:UpdateXP()
end
- end
- -- XP
- if not IsXPUserDisabled() and not IsPlayerAtEffectiveMaxLevel() then
- index = index + 1
+ -- Honour
+ if IsWatchingHonorAsXP() or C_PvP.IsActiveBattlefield() or IsInActiveWorldPVP() then
+ index = index + 1
- self[index]:UpdateXP()
- end
+ self[index]:UpdateHonor()
+ end
- -- Honour
- if IsWatchingHonorAsXP() or C_PvP.IsActiveBattlefield() or IsInActiveWorldPVP() then
- index = index + 1
+ -- Reputation
+ local data = C_Reputation.GetWatchedFactionData()
+ if data then
+ index = index + 1
- self[index]:UpdateHonor()
+ self[index]:UpdateReputation(data.name, data.reaction, data.currentReactionThreshold, data.nextReactionThreshold, data.currentStanding, data.factionID)
+ end
end
- -- Reputation
- local name, standing, repMin, repMax, repCur, factionID = GetWatchedFactionInfo()
- if name then
- index = index + 1
-
- self[index]:UpdateReputation(name, standing, repMin, repMax, repCur, factionID)
- end
- end
+ if self.total ~= index then
+ for i = 1, MAX_SEGMENTS do
+ if i <= index then
+ self[i]:SetWidth(LAYOUT[index][i].size[1])
- if self._total ~= index then
- for i = 1, MAX_SEGMENTS do
- if i <= index then
- self[i]:SetSize(unpack(LAYOUT[index][i].size))
- self[i]:Show()
+ self[i].Extension:SetWidth(LAYOUT[index][i].size[1])
+ else
+ if index == 0 and i == 1 then
+ self[i]:SetWidth(LAYOUT[1][1].size[1])
+ self[i]:Update(1, 1, 0, C.db.global.colors.class[E.PLAYER_CLASS])
+ else
+ self[i]:SetWidth(0.0001)
+ self[i]:SetValue(0)
+
+ self[i].Extension:SetWidth(0.0001)
+ self[i].Extension:SetValue(0)
+ end
+
+ self[i].cur = nil
+ self[i].max = nil
+ self[i].bonus = nil
+ self[i].tooltipInfo = nil
+ end
+ end
- if i == 1 then
- self[i]:SetPoint("TOPLEFT", self, "TOPLEFT", 0, 0)
+ for i = 1, MAX_SEGMENTS - 1 do
+ if i <= index - 1 then
+ self[i].Sep:Show()
else
- self[i]:SetPoint("TOPLEFT", self[i - 1], "TOPRIGHT", 2, 0)
+ self[i].Sep:Hide()
end
+ end
- self[i].Extension:SetSize(unpack(LAYOUT[index][i].size))
- else
- self[i]:SetMinMaxValues(0, 1)
- self[i]:SetValue(0)
- self[i]:ClearAllPoints()
- self[i]:Hide()
+ self.total = index
+ end
+ end
- self[i].Extension:SetMinMaxValues(0, 1)
- self[i].Extension:SetValue(0)
+ local deferredUpdate, timer
- self[i].tooltipInfo = nil
- end
- end
+ function bar_proto:OnEvent(event, ...)
+ if not deferredUpdate then
+ deferredUpdate = function()
+ self:UpdateSegments()
- for i = 1, MAX_SEGMENTS - 1 do
- if i <= index - 1 then
- self[i].Sep:Show()
- else
- self[i].Sep:Hide()
+ timer = nil
end
end
- if index == 0 then
- self[1]:SetPoint("TOPLEFT", self, "TOPLEFT", 0, 0)
- self[1]:SetSize(unpack(LAYOUT[1][1].size))
- self[1]:SetMinMaxValues(0, 1)
- self[1]:SetValue(1)
- self[1]:Show()
- self[1]:UpdateText(1, 1)
- self[1]:SetStatusBarTexture(DEFAULT_TEXTURE)
- self[1].Texture:SetVertexColor(C.db.global.colors.class[E.PLAYER_CLASS]:GetRGB())
+ if event == "UNIT_INVENTORY_CHANGED" then
+ local unit = ...
+ if unit == "player" then
+ if not timer then
+ timer = C_Timer.NewTimer(0.1, deferredUpdate)
+ end
+ end
+ elseif event == "PLAYER_EQUIPMENT_CHANGED" then
+ local slot = ...
+ if slot == Enum.InventoryType.IndexNeckType then
+ if not timer then
+ timer = C_Timer.NewTimer(0.1, deferredUpdate)
+ end
+ end
+ else
+ if not timer then
+ timer = C_Timer.NewTimer(0.1, deferredUpdate)
+ end
end
-
- self._total = index
end
end
-function bar_proto:OnEvent(event, ...)
- if event == "UNIT_INVENTORY_CHANGED" then
- local unit = ...
- if unit == "player" then
- self:UpdateSegments()
- end
- elseif event == "PLAYER_EQUIPMENT_CHANGED" then
- local slot = ...
- if slot == Enum.InventoryType.IndexNeckType then
- self:UpdateSegments()
- end
- else
- self:UpdateSegments()
+local segment_base_proto = {}
+do
+ function segment_base_proto:SetSmoothStatusBarColor(r, g, b, a)
+ local color = self.ColorAnim.color
+ a = a or 1
+
+ if color.r == r and color.g == g and color.b == b and color.a == a then return end
+
+ color.r, color.g, color.b, color.a = self:GetStatusBarColor()
+ self.ColorAnim.Anim:SetStartColor(color)
+
+ color.r, color.g, color.b, color.a = r, g, b, a
+ self.ColorAnim.Anim:SetEndColor(color)
+
+ self.ColorAnim:Play()
end
end
-local segment_proto = {}
+local segment_ext_proto = {}
+do
+ function segment_ext_proto:OnEnter()
+ if self.tooltipInfo then
+ local quadrant = E:GetScreenQuadrant(self)
+ local p, rP, sign = "BOTTOMLEFT", "TOPLEFT", 1
-function segment_proto:OnEnter()
- if self.tooltipInfo then
- local quadrant = E:GetScreenQuadrant(self)
- local p, rP, sign = "BOTTOMLEFT", "TOPLEFT", 1
+ if quadrant == "TOPLEFT" or quadrant == "TOP" or quadrant == "TOPRIGHT" then
+ p, rP, sign = "TOPLEFT", "BOTTOMLEFT", -1
+ end
- if quadrant == "TOPLEFT" or quadrant == "TOP" or quadrant == "TOPRIGHT" then
- p, rP, sign = "TOPLEFT", "BOTTOMLEFT", -1
- end
+ GameTooltip:SetOwner(self, "ANCHOR_NONE")
+ GameTooltip:SetPoint(p, self, rP, 0, sign * 2)
+ GameTooltip:AddLine(self.tooltipInfo.header, 1, 1, 1)
+ GameTooltip:AddLine(self.tooltipInfo.line1)
- GameTooltip:SetOwner(self, "ANCHOR_NONE")
- GameTooltip:SetPoint(p, self, rP, 0, sign * 2)
- GameTooltip:AddLine(self.tooltipInfo.header, 1, 1, 1)
- GameTooltip:AddLine(self.tooltipInfo.line1)
+ if self.tooltipInfo.line2 then
+ GameTooltip:AddLine(self.tooltipInfo.line2)
+ end
- if self.tooltipInfo.line2 then
- GameTooltip:AddLine(self.tooltipInfo.line2)
- end
+ if self.tooltipInfo.line3 then
+ GameTooltip:AddLine(self.tooltipInfo.line3)
+ end
- if self.tooltipInfo.line3 then
- GameTooltip:AddLine(self.tooltipInfo.line3)
+ GameTooltip:Show()
end
- GameTooltip:Show()
+ if not self:IsTextLocked() then
+ self.Text:Show()
+ end
end
- if not self:IsTextLocked() then
- self.Text:Show()
+ function segment_ext_proto:OnLeave()
+ GameTooltip:Hide()
+
+ if not self:IsTextLocked() then
+ self.Text:Hide()
+ end
end
-end
-function segment_proto:OnLeave()
- GameTooltip:Hide()
+ function segment_ext_proto:Update(cur, max, bonus, color)
+ self:SetSmoothStatusBarColor(color:GetRGBA(1))
- if not self:IsTextLocked() then
- self.Text:Hide()
- end
-end
+ self.Extension:SetSmoothStatusBarColor(color:GetRGBA(0.4))
-function segment_proto:Update(cur, max, bonus, color, texture)
- self:SetStatusBarTexture(texture or DEFAULT_TEXTURE)
- self.Texture:SetVertexColor(color:GetRGBA(1))
+ if self.cur ~= cur or self.max ~= max then
+ self:SetValue(cur / max)
+ self:UpdateText(cur, max)
- self.Extension:SetStatusBarTexture(texture or DEFAULT_TEXTURE)
- self.Extension.Texture:SetVertexColor(color:GetRGBA(0.4))
+ self.cur = cur
+ self.max = max
+ end
- if self._value ~= cur or self._max ~= max then
- self:SetMinMaxValues(0, max)
- self:SetValue(cur)
- self:UpdateText(cur, max)
- end
+ if self.bonus ~= bonus then
+ if bonus and bonus > 0 then
+ if cur + bonus > max then
+ bonus = max - cur
+ end
- if self._bonus ~= bonus then
- if bonus and bonus > 0 then
- if cur + bonus > max then
- bonus = max - cur
+ self.Extension:SetValue(bonus / max)
+ else
+ self.Extension:SetValue(0)
end
- self.Extension:SetMinMaxValues(0, max)
- self.Extension:SetValue(bonus)
- else
- self.Extension:SetMinMaxValues(0, 1)
- self.Extension:SetValue(0)
- end
- self._bonus = bonus
+ self.bonus = bonus
+ end
end
-end
-function segment_proto:UpdateAzerite(item)
- local cur, max = C_AzeriteItem.GetAzeriteItemXPInfo(item)
- local level = C_AzeriteItem.GetPowerLevel(item)
+ function segment_ext_proto:UpdateAzerite(item)
+ local cur, max = C_AzeriteItem.GetAzeriteItemXPInfo(item)
+ local level = C_AzeriteItem.GetPowerLevel(item)
- self.tooltipInfo = {
- header = L["ARTIFACT_POWER"],
- line1 = L["ARTIFACT_LEVEL_TOOLTIP"]:format(level),
- }
+ self.tooltipInfo = {
+ header = L["ARTIFACT_POWER"],
+ line1 = L["ARTIFACT_LEVEL_TOOLTIP"]:format(level),
+ }
- self:Update(cur, max, 0, C.db.global.colors.white, AZERITE_TEXTURE)
-end
+ self:Update(cur, max, 0, C.db.global.colors.quality[6])
+ end
+
+ function segment_ext_proto:UpdateXP()
+ local cur, max = UnitXP("player"), UnitXPMax("player")
+ local bonus = GetXPExhaustion() or 0
-function segment_proto:UpdateXP()
- local cur, max = UnitXP("player"), UnitXPMax("player")
- local bonus = GetXPExhaustion() or 0
+ self.tooltipInfo = {
+ header = L["EXPERIENCE"],
+ line1 = L["LEVEL_TOOLTIP"]:format(UnitLevel("player")),
+ }
- self.tooltipInfo = {
- header = L["EXPERIENCE"],
- line1 = L["LEVEL_TOOLTIP"]:format(UnitLevel("player")),
- }
+ if bonus > 0 then
+ self.tooltipInfo.line2 = L["BONUS_XP_TOOLTIP"]:format(BreakUpLargeNumbers(bonus))
+ else
+ self.tooltipInfo.line2 = nil
+ end
- if bonus > 0 then
- self.tooltipInfo.line2 = L["BONUS_XP_TOOLTIP"]:format(BreakUpLargeNumbers(bonus))
- else
- self.tooltipInfo.line2 = nil
+ self:Update(cur, max, bonus, bonus > 0 and C.db.global.colors.xp[1] or C.db.global.colors.xp[2])
end
- self:Update(cur, max, bonus, bonus > 0 and C.db.global.colors.xp[1] or C.db.global.colors.xp[2])
-end
+ function segment_ext_proto:UpdateHonor()
+ local cur, max = UnitHonor("player"), UnitHonorMax("player")
-function segment_proto:UpdateHonor()
- local cur, max = UnitHonor("player"), UnitHonorMax("player")
+ self.tooltipInfo = {
+ header = _G.HONOR,
+ line1 = HONOR_TEMPLATE:format(UnitHonorLevel("player")),
+ }
- self.tooltipInfo = {
- header = L["HONOR"],
- line1 = L["HONOR_LEVEL_TOOLTIP"]:format(UnitHonorLevel("player")),
- }
+ self:Update(cur, max, 0, C.db.global.colors.faction[UnitFactionGroup("player")])
+ end
- self:Update(cur, max, 0, C.db.global.colors.faction[UnitFactionGroup("player")])
-end
+ function segment_ext_proto:UpdateReputation(name, standing, repMin, repMax, repCur, factionID)
+ local repTextLevel = GetText("FACTION_STANDING_LABEL" .. standing, UnitSex("player"))
+ local rewardQuestID, hasRewardPending
+ local cur, max
-function segment_proto:UpdateReputation(name, standing, repMin, repMax, repCur, factionID)
- local repTextLevel = GetText("FACTION_STANDING_LABEL" .. standing, UnitSex("player"))
- local rewardQuestID, hasRewardPending
- local cur, max
+ local repInfo = C_GossipInfo.GetFriendshipReputation(factionID)
+ if repInfo and repInfo.friendshipFactionID > 0 then
+ if repInfo.nextThreshold then
+ max, cur = repInfo.nextThreshold - repInfo.reactionThreshold, repInfo.standing - repInfo.reactionThreshold
+ else
+ max, cur = 1, 1
+ end
- local repInfo = C_GossipInfo.GetFriendshipReputation(factionID)
- if repInfo and repInfo.friendshipFactionID > 0 then
- if repInfo.nextThreshold then
- max, cur = repInfo.nextThreshold - repInfo.reactionThreshold, repInfo.standing - repInfo.reactionThreshold
- else
- max, cur = 1, 1
- end
+ standing = 5
+ repTextLevel = repInfo.reaction
+ elseif C_Reputation.IsFactionParagon(factionID) then
+ cur, max, rewardQuestID, hasRewardPending = C_Reputation.GetFactionParagonInfo(factionID)
+ cur = cur % max
+ repTextLevel = repTextLevel .. "+"
- standing = 5
- repTextLevel = repInfo.reaction
- elseif C_Reputation.IsFactionParagon(factionID) then
- cur, max, rewardQuestID, hasRewardPending = C_Reputation.GetFactionParagonInfo(factionID)
- cur = cur % max
- repTextLevel = repTextLevel .. "+"
+ if hasRewardPending then
+ cur = cur + max
+ end
- if hasRewardPending then
- cur = cur + max
- end
+ -- DF factions become both paragon and major after they're maxxed out
+ if C_Reputation.IsMajorFaction(factionID) then
+ standing = 9
+ repTextLevel = RENOWN_PLUS
+ end
+ elseif C_Reputation.IsMajorFaction(factionID) then
+ repInfo = C_MajorFactions.GetMajorFactionData(factionID)
- -- DF factions become both paragon and major after they're maxxed out
- if C_Reputation.IsMajorFaction(factionID) then
- standing = 9
- repTextLevel = RENOWN_PLUS
- end
- elseif C_Reputation.IsMajorFaction(factionID) then
- repInfo = C_MajorFactions.GetMajorFactionData(factionID)
+ if C_MajorFactions.HasMaximumRenown(factionID) then
+ max, cur = 1, 1
+ else
+ max, cur = repInfo.renownLevelThreshold, repInfo.renownReputationEarned
+ end
- if C_MajorFactions.HasMaximumRenown(factionID) then
- max, cur = 1, 1
+ standing = 9
+ repTextLevel = _G.RENOWN_LEVEL_LABEL .. repInfo.renownLevel
else
- max, cur = repInfo.renownLevelThreshold, repInfo.renownReputationEarned
+ if standing ~= MAX_REPUTATION_REACTION then
+ max, cur = repMax - repMin, repCur - repMin
+ else
+ max, cur = 1, 1
+ end
end
- standing = 9
- repTextLevel = RENOWN_LEVEL_LABEL .. repInfo.renownLevel
- else
- if standing ~= MAX_REPUTATION_REACTION then
- max, cur = repMax - repMin, repCur - repMin
+ self.tooltipInfo = {
+ header = _G.REPUTATION,
+ line1 = REPUTATION_TEMPLATE:format(name, C.db.global.colors.reaction[standing]:WrapTextInColorCode(repTextLevel)),
+ }
+
+ if hasRewardPending then
+ local text = GetQuestLogCompletionText(C_QuestLog.GetLogIndexForQuestID(rewardQuestID))
+ if text and text ~= "" then
+ self.tooltipInfo.line3 = text
+ end
else
- max, cur = 1, 1
+ self.tooltipInfo.line3 = nil
end
- end
-
- self.tooltipInfo = {
- header = L["REPUTATION"],
- line1 = REPUTATION_TEMPLATE:format(name, C.db.global.colors.reaction[standing]:WrapTextInColorCode(repTextLevel)),
- }
- if hasRewardPending then
- local text = GetQuestLogCompletionText(C_QuestLog.GetLogIndexForQuestID(rewardQuestID))
- if text and text ~= "" then
- self.tooltipInfo.line3 = text
- end
- else
- self.tooltipInfo.line3 = nil
+ self:Update(cur, max, 0, C.db.global.colors.reaction[standing])
end
- self:Update(cur, max, 0, C.db.global.colors.reaction[standing])
-end
-
-function segment_proto:UpdatePetXP(i, level)
- local name = C_PetBattles.GetName(1, i)
- local rarity = C_PetBattles.GetBreedQuality(1, i)
- local cur, max = C_PetBattles.GetXP(1, i)
+ function segment_ext_proto:UpdatePetXP(i, level)
+ local name = C_PetBattles.GetName(1, i)
+ local rarity = C_PetBattles.GetBreedQuality(1, i)
+ local cur, max = C_PetBattles.GetXP(1, i)
- self.tooltipInfo = {
- header = C.db.global.colors.quality[rarity - 1]:WrapTextInColorCode(name),
- line1 = L["LEVEL_TOOLTIP"]:format(level),
- }
+ self.tooltipInfo = {
+ header = C.db.global.colors.quality[rarity - 1]:WrapTextInColorCode(name),
+ line1 = L["LEVEL_TOOLTIP"]:format(level),
+ }
- self:Update(cur, max, 0, C.db.global.colors.xp[2])
-end
+ self:Update(cur, max, 0, C.db.global.colors.xp[2])
+ end
-function segment_proto:UpdateText(cur, max)
- cur = cur or self._value or 1
- max = max or self._max or 1
+ function segment_ext_proto:UpdateText(cur, max)
+ cur = cur or self.cur or 1
+ max = max or self.max or 1
- if cur == 1 and max == 1 then
- self.Text:SetText(nil)
- else
- self.Text:SetFormattedText(barValueTemplate, E:FormatNumber(cur), E:FormatNumber(max), E:NumberToPerc(cur, max))
+ if cur == 1 and max == 1 then
+ self.Text:SetText(nil)
+ else
+ self.Text:SetFormattedText(barValueTemplate, E:FormatNumber(cur), E:FormatNumber(max), E:NumberToPerc(cur, max))
+ end
end
-end
-function segment_proto:LockText(isLocked)
- if self.textLocked ~= isLocked then
- self.textLocked = isLocked
- self.Text:SetShown(isLocked)
+ function segment_ext_proto:LockText(isLocked)
+ if self.textLocked ~= isLocked then
+ self.textLocked = isLocked
+ self.Text:SetShown(isLocked)
+ end
end
-end
-function segment_proto:IsTextLocked()
- return self.textLocked
+ function segment_ext_proto:IsTextLocked()
+ return self.textLocked
+ end
end
function BARS:HasXPBar()
@@ -450,11 +468,12 @@ function BARS:CreateXPBar()
local texParent = CreateFrame("Frame", nil, bar)
texParent:SetAllPoints()
texParent:SetFrameLevel(bar:GetFrameLevel() + 3)
- bar.TexParent = texParent
+ bar.TextureParent = texParent
local textParent = CreateFrame("Frame", nil, bar)
textParent:SetAllPoints()
textParent:SetFrameLevel(bar:GetFrameLevel() + 5)
+ bar.TextParent = textParent
local bg = bar:CreateTexture(nil, "ARTWORK")
bg:SetTexture("Interface\\HELPFRAME\\DarkSandstone-Tile", "REPEAT", "REPEAT")
@@ -462,31 +481,74 @@ function BARS:CreateXPBar()
bg:SetVertTile(true)
bg:SetAllPoints()
+ local gradient = texParent:CreateTexture(nil, "BORDER")
+ gradient:SetAllPoints(texParent)
+ gradient:SetSnapToPixelGrid(false)
+ gradient:SetTexelSnappingBias(0)
+ gradient:SetTexture("Interface\\BUTTONS\\WHITE8X8")
+ gradient:SetGradient("VERTICAL", {r = 0, g = 0, b = 0, a = 0}, {r = 0, g = 0, b = 0, a = 0.4})
+ texParent.Gradient = gradient
+
+ if not BARS:IsRestricted() then
+ local border = E:CreateBorder(texParent)
+ border:SetTexture("Interface\\AddOns\\ls_UI\\assets\\border-statusbar")
+ border:SetSize(16)
+ border:SetOffset(-4)
+ texParent.Border = border
+ end
+
for i = 1, MAX_SEGMENTS do
- local segment = Mixin(CreateFrame("StatusBar", "$parentSegment" .. i, bar), segment_proto)
+ local segment = Mixin(CreateFrame("StatusBar", "$parentSegment" .. i, bar), segment_base_proto, segment_ext_proto)
segment:SetFrameLevel(bar:GetFrameLevel() + 1)
- segment:SetStatusBarTexture(DEFAULT_TEXTURE)
+ segment:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(segment, "xpbar", segment.UpdateTextureCallback)
+ segment:SetStatusBarColor(1, 1, 1, 0)
+ segment:SetMinMaxValues(0, 1)
segment:SetHitRectInsets(0, 0, -4, -4)
+ segment:SetPoint("TOP", 0, 0)
+ segment:SetPoint("BOTTOM", 0, 0)
segment:SetClipsChildren(true)
segment:SetScript("OnEnter", segment.OnEnter)
segment:SetScript("OnLeave", segment.OnLeave)
- segment:Hide()
- E:SmoothBar(segment)
+ E.StatusBars:Smooth(segment)
bar[i] = segment
+ if i == 1 then
+ segment:SetPoint("LEFT", bar, "LEFT", 0, 0)
+ else
+ segment:SetPoint("LEFT", bar[i - 1], "RIGHT", 2, 0)
+ end
+
segment.Texture = segment:GetStatusBarTexture()
- E:SmoothColor(segment.Texture)
- local ext = CreateFrame("StatusBar", nil, segment)
+ local ag = segment.Texture:CreateAnimationGroup()
+ segment.ColorAnim = ag
+
+ local anim = ag:CreateAnimation("VertexColor")
+ anim:SetDuration(0.125)
+ ag.color = {a = 1}
+ ag.Anim = anim
+
+ local ext = Mixin(CreateFrame("StatusBar", nil, segment), segment_base_proto)
ext:SetFrameLevel(segment:GetFrameLevel())
- ext:SetStatusBarTexture(DEFAULT_TEXTURE)
+ ext:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(segment, "ext", segment.UpdateTextureCallback)
+ ext:SetStatusBarColor(1, 1, 1, 0)
+ ext:SetMinMaxValues(0, 1)
ext:SetPoint("TOPLEFT", segment.Texture, "TOPRIGHT")
ext:SetPoint("BOTTOMLEFT", segment.Texture, "BOTTOMRIGHT")
- E:SmoothBar(ext)
+ E.StatusBars:Smooth(ext)
segment.Extension = ext
ext.Texture = ext:GetStatusBarTexture()
- E:SmoothColor(ext.Texture)
+
+ ag = ext.Texture:CreateAnimationGroup()
+ ext.ColorAnim = ag
+
+ anim = ag:CreateAnimation("VertexColor")
+ anim:SetDuration(0.125)
+ ag.color = {a = 1}
+ ag.Anim = anim
local text = textParent:CreateFontString(nil, "OVERLAY")
E.FontStrings:Capture(text, "statusbar")
@@ -494,21 +556,22 @@ function BARS:CreateXPBar()
text:SetAllPoints(segment)
text:Hide()
segment.Text = text
- end
- for i = 1, MAX_SEGMENTS - 1 do
- local sep = texParent:CreateTexture(nil, "ARTWORK", nil, -7)
- sep:SetTexture("Interface\\AddOns\\ls_UI\\assets\\statusbar-sep", "REPEAT", "REPEAT")
- sep:SetVertTile(true)
- sep:SetTexCoord(2 / 16, 14 / 16, 0 / 8, 8 / 8)
- sep:SetSize(12 / 2, 0)
- sep:SetPoint("TOP", 0, 0)
- sep:SetPoint("BOTTOM", 0, 0)
- sep:SetPoint("LEFT", bar[i], "RIGHT", -2, 0)
- sep:SetSnapToPixelGrid(false)
- sep:SetTexelSnappingBias(0)
- sep:Hide()
- bar[i].Sep = sep
+ if i < MAX_SEGMENTS then
+ local sep = texParent:CreateTexture(nil, "ARTWORK", nil, -7)
+ sep:SetTexture("Interface\\AddOns\\ls_UI\\assets\\statusbar-sep", "REPEAT", "REPEAT")
+ sep:SetVertTile(true)
+ sep:SetTexCoord(2 / 16, 14 / 16, 0 / 8, 8 / 8)
+ sep:SetVertexColor(1, 0.6, 0)
+ sep:SetSize(12 / 2, 0)
+ sep:SetPoint("TOP", 0, 0)
+ sep:SetPoint("BOTTOM", 0, 0)
+ sep:SetPoint("LEFT", bar[i], "RIGHT", -2, 0)
+ sep:SetSnapToPixelGrid(false)
+ sep:SetTexelSnappingBias(0)
+ sep:Hide()
+ bar[i].Sep = sep
+ end
end
bar:SetScript("OnEvent", bar.OnEvent)
@@ -550,46 +613,53 @@ function BARS:CreateXPBar()
-- Honour & Rep Hooks
-- This way I'm able to show honour and reputation bars simultaneously
local isHonorBarHooked = false
-
- hooksecurefunc("UIParentLoadAddOn", function(addOnName)
- if addOnName == "Blizzard_PVPUI" then
- if not isHonorBarHooked then
- PVPQueueFrame.HonorInset.CasualPanel.HonorLevelDisplay:SetScript("OnMouseUp", function()
- if IsShiftKeyDown() then
- if IsWatchingHonorAsXP() then
- PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
- SetWatchingHonorAsXP(false)
- else
- PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
- SetWatchingHonorAsXP(true)
- end
-
- bar:UpdateSegments()
+ local function hookHonor()
+ if not isHonorBarHooked then
+ PVPQueueFrame.HonorInset.CasualPanel.HonorLevelDisplay:SetScript("OnMouseUp", function()
+ if IsShiftKeyDown() then
+ if IsWatchingHonorAsXP() then
+ PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
+ SetWatchingHonorAsXP(false)
+ else
+ PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
+ SetWatchingHonorAsXP(true)
end
- end)
- PVPQueueFrame.HonorInset.CasualPanel.HonorLevelDisplay:HookScript("OnEnter", function()
- GameTooltip:AddLine(" ")
- GameTooltip:AddLine(L["SHIFT_CLICK_TO_SHOW_AS_XP"])
- GameTooltip:Show()
- end)
+ bar:UpdateSegments()
+ end
+ end)
- PVPQueueFrame.HonorInset.CasualPanel.HonorLevelDisplay:HookScript("OnLeave", function()
- GameTooltip:Hide()
- end)
+ PVPQueueFrame.HonorInset.CasualPanel.HonorLevelDisplay:HookScript("OnEnter", function()
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddLine(L["SHIFT_CLICK_TO_SHOW_AS_XP"])
+ GameTooltip:Show()
+ end)
- isHonorBarHooked = true
- end
+ PVPQueueFrame.HonorInset.CasualPanel.HonorLevelDisplay:HookScript("OnLeave", function()
+ GameTooltip:Hide()
+ end)
+
+ isHonorBarHooked = true
end
- end)
+ end
+
+ if C_AddOns.IsAddOnLoaded("Blizzard_PVPUI") then
+ hookHonor()
+ else
+ hooksecurefunc("UIParentLoadAddOn", function(addOnName)
+ if addOnName == "Blizzard_PVPUI" then
+ hookHonor()
+ end
+ end)
+ end
- ReputationDetailMainScreenCheckBox:SetScript("OnClick", function(self)
+ ReputationFrame.ReputationDetailFrame.WatchFactionCheckbox:SetScript("OnClick", function(self)
if self:GetChecked() then
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
- SetWatchedFactionIndex(GetSelectedFaction())
+ C_Reputation.SetWatchedFactionByIndex(C_Reputation.GetSelectedFaction())
else
PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
- SetWatchedFactionIndex(0)
+ C_Reputation.SetWatchedFactionByIndex(0)
end
bar:UpdateSegments()
diff --git a/ls_UI/modules/bars/zone.lua b/ls_UI/modules/bars/zone.lua
index a43f3195..4e723a6a 100644
--- a/ls_UI/modules/bars/zone.lua
+++ b/ls_UI/modules/bars/zone.lua
@@ -27,7 +27,7 @@ function bar_proto:Update()
local width, height = ZoneAbilityFrame.SpellButtonContainer:GetSize()
if width < 1 then
- local num = ZoneAbilityFrame.SpellButtonContainer.contentFramePool.numActiveObjects
+ local num = ZoneAbilityFrame.SpellButtonContainer.contentFramePool:GetNumActive()
num = num > 0 and num or 1
local spacing = ZoneAbilityFrame.SpellButtonContainer.spacing
width = height * num + spacing * (num - 1)
diff --git a/ls_UI/modules/blizzard/_blizzard.xml b/ls_UI/modules/blizzard/_blizzard.xml
index 93ac75fb..4b9f9de0 100644
--- a/ls_UI/modules/blizzard/_blizzard.xml
+++ b/ls_UI/modules/blizzard/_blizzard.xml
@@ -4,5 +4,6 @@
+
diff --git a/ls_UI/modules/blizzard/characterframe.lua b/ls_UI/modules/blizzard/characterframe.lua
index f5ecc7f1..5a5a99b1 100644
--- a/ls_UI/modules/blizzard/characterframe.lua
+++ b/ls_UI/modules/blizzard/characterframe.lua
@@ -287,26 +287,22 @@ function MODULE:SetUpCharacterFrame()
button.BgBottom:Hide()
end)
- hooksecurefunc("CharacterFrame_Expand", function()
- CharacterFrame:SetSize(640, 431) -- 540 + 100, 424 + 7
- CharacterFrame.Inset:SetPoint("BOTTOMRIGHT", CharacterFrame, "BOTTOMLEFT", 432, 4)
+ hooksecurefunc(CharacterFrame, "UpdateSize", function()
+ if CharacterFrame.activeSubframe == "PaperDollFrame" then
+ CharacterFrame:SetSize(640, 431) -- 540 + 100, 424 + 7
+ CharacterFrame.Inset:SetPoint("BOTTOMRIGHT", CharacterFrame, "BOTTOMLEFT", 432, 4)
- CharacterFrame.Inset.Bg:SetTexture("Interface\\DressUpFrame\\DressingRoom" .. E.PLAYER_CLASS)
- CharacterFrame.Inset.Bg:SetTexCoord(1 / 512, 479 / 512, 46 / 512, 455 / 512)
- CharacterFrame.Inset.Bg:SetHorizTile(false)
- CharacterFrame.Inset.Bg:SetVertTile(false)
+ CharacterFrame.Inset.Bg:SetTexture("Interface\\DressUpFrame\\DressingRoom" .. E.PLAYER_CLASS)
+ CharacterFrame.Inset.Bg:SetTexCoord(1 / 512, 479 / 512, 46 / 512, 455 / 512)
+ CharacterFrame.Inset.Bg:SetHorizTile(false)
+ CharacterFrame.Inset.Bg:SetVertTile(false)
- updateAllSlots()
- end)
-
- hooksecurefunc("CharacterFrame_Collapse", function()
- CharacterFrame:SetHeight(424)
- CharacterFrame.Inset:SetPoint("BOTTOMRIGHT", CharacterFrame, "BOTTOMLEFT", 332, 4)
+ CharacterFrame.Background:Hide()
- CharacterFrame.Inset.Bg:SetTexture("Interface\\FrameGeneral\\UI-Background-Marble", "REPEAT", "REPEAT")
- CharacterFrame.Inset.Bg:SetTexCoord(0, 1, 0, 1)
- CharacterFrame.Inset.Bg:SetHorizTile(true)
- CharacterFrame.Inset.Bg:SetVertTile(true)
+ updateAllSlots()
+ else
+ CharacterFrame.Background:Show()
+ end
end)
E:RegisterEvent("ITEM_LOCK_CHANGED", function(bagOrSlotID, slotID)
diff --git a/ls_UI/modules/blizzard/core.lua b/ls_UI/modules/blizzard/core.lua
index 9f08bacb..2a0d831e 100644
--- a/ls_UI/modules/blizzard/core.lua
+++ b/ls_UI/modules/blizzard/core.lua
@@ -15,6 +15,7 @@ function BLIZZARD:Init()
self:SetUpCommandBar()
self:SetUpGMFrame()
self:SetUpMail()
+ self:SetUpSuggestFrame()
self:SetUpTalkingHead()
isInit = true
diff --git a/ls_UI/modules/blizzard/suggestframe.lua b/ls_UI/modules/blizzard/suggestframe.lua
new file mode 100644
index 00000000..979cb411
--- /dev/null
+++ b/ls_UI/modules/blizzard/suggestframe.lua
@@ -0,0 +1,235 @@
+local _, ns = ...
+local E, C, PrC, M, L, P, D, PrD, oUF = ns.E, ns.C, ns.PrC, ns.M, ns.L, ns.P, ns.D, ns.PrD, ns.oUF
+local MODULE = P:GetModule("Blizzard")
+
+-- Lua
+local _G = getfenv(0)
+local m_ceil = _G.math.ceil
+local m_floor = _G.math.floor
+local m_min = _G.math.min
+local t_insert = _G.table.insert
+local t_wipe = _G.table.wipe
+local m_rad = _G.math.rad
+
+local pages = 1
+local page = 1
+local compactFrame
+
+local button_proto = {}
+do
+ function button_proto:OnClick()
+ C_AdventureJournal.SetPrimaryOffset(self.id)
+ C_AdventureJournal.ActivateEntry(1)
+ end
+
+ function button_proto:OnEnter()
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
+ GameTooltip:SetText(self.title, 1, 1, 1, 1, true)
+ GameTooltip:AddLine(self.description, nil, nil, nil, true)
+
+ if self.buttonText then
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddLine(self.buttonText, 0.1, 1, 0.1, true)
+ end
+
+ GameTooltip:Show()
+ end
+
+ function button_proto:OnLeave()
+ GameTooltip:Hide()
+ end
+end
+
+local pool = CreateUnsecuredObjectPool(
+ function()
+ local button = Mixin(CreateFrame("Button", nil, compactFrame), button_proto)
+ button:SetSize(64, 64)
+ button:SetScript("OnClick", button.OnClick)
+ button:SetScript("OnEnter", button.OnEnter)
+ button:SetScript("OnLeave", button.OnLeave)
+
+ local icon = button:CreateTexture(nil, "ARTWORK")
+ icon:SetAllPoints()
+ icon:SetMask("Interface\\CharacterFrame\\TempPortraitAlphaMask")
+ button.Icon = icon
+
+ local iconRing = button:CreateTexture(nil, "OVERLAY")
+ iconRing:SetPoint("CENTER")
+ iconRing:SetTexelSnappingBias(0)
+ iconRing:SetSnapToPixelGrid(false)
+ iconRing:SetAtlas("adventureguide-ring")
+ iconRing:SetSize(94, 95)
+ button.IconRing = iconRing
+
+ return button
+ end,
+ function(_, obj)
+ obj.id = nil
+ obj.title = nil
+ obj.description = nil
+ obj.buttonText = nil
+
+ obj.Icon:SetTexture(QUESTION_MARK_ICON)
+
+ obj:SetMouseClickEnabled(false)
+ obj:ClearAllPoints()
+ obj:Hide()
+ end
+)
+
+local suggestions = {}
+local data = {}
+
+local function fetchData()
+ local numSuggestions = C_AdventureJournal.GetNumAvailableSuggestions()
+ if numSuggestions > 0 then
+ t_wipe(suggestions)
+ t_wipe(data)
+
+ for offset = 0, numSuggestions - 1 do
+ C_AdventureJournal.SetPrimaryOffset(offset)
+ C_AdventureJournal.GetSuggestions(suggestions)
+
+ t_insert(data, {offset, suggestions[1].title, suggestions[1].description, suggestions[1].iconPath, suggestions[1].buttonText})
+ end
+
+ pages = m_ceil(#data / 16)
+ end
+end
+
+local function refresh()
+ pool:ReleaseAll()
+
+ local index = 0
+ for i = 1 + (16 * (page - 1)), m_min(#data, 16 * page) do
+ local button = pool:Acquire()
+ index = index + 1
+
+ local col = (index - 1) % 4
+ local row = m_floor((index - 1) / 4)
+
+ button:SetPoint("TOPLEFT", 28 + col * (64 + 8), -28 + -row * (64 + 8))
+ button:Show()
+
+ button.id = data[i][1]
+ button.title = data[i][2]
+ button.description = data[i][3]
+
+ button.Icon:SetTexture(data[i][4])
+
+ local buttonText = data[i][5]
+ if buttonText and #buttonText > 0 then
+ button.buttonText = buttonText
+
+ button:SetMouseClickEnabled(true)
+ end
+ end
+
+ compactFrame.PrevButton:SetEnabled(page > 1)
+ compactFrame.NextButton:SetEnabled(page < pages)
+end
+
+local timer = nil
+local function delayedUpdate()
+ fetchData()
+ refresh()
+
+ timer = nil
+end
+
+local isInit = false
+
+local function init()
+ if not isInit then
+ EncounterJournalSuggestFrame:UnregisterEvent("AJ_REFRESH_DISPLAY")
+ EncounterJournalSuggestFrame:EnableMouseWheel(false)
+ EncounterJournalSuggestFrame.Suggestion1:Hide()
+
+ -- EJSuggestFrame_RefreshDisplay and C_AdventureJournal.UpdateSuggestions are called from inside EJSuggestFrame_OnShow
+
+ compactFrame = CreateFrame("Frame", nil, UIParent)
+ compactFrame:SetSize(335, 337)
+ compactFrame:SetParent(EncounterJournalSuggestFrame)
+ compactFrame:SetPoint("TOPLEFT", 28, -18)
+ compactFrame:SetScript("OnMouseWheel", function(_, delta)
+ -- -1 is down
+ page = page - delta
+ if page > pages then
+ page = pages
+ elseif page < 1 then
+ page = 1
+ end
+
+ refresh()
+ end)
+
+ local bg = compactFrame:CreateTexture(nil, "BACKGROUND")
+ bg:SetAllPoints()
+ bg:SetAtlas("adventureguide-pane-large")
+
+ local prevButton = CreateFrame("Button", nil, compactFrame)
+ prevButton:SetPoint("BOTTOMLEFT", 2, -6)
+ prevButton:SetSize(29, 40)
+ prevButton:SetNormalTexture("CovenantSanctum-Renown-Arrow")
+ prevButton:SetPushedTexture("CovenantSanctum-Renown-Arrow-Depressed")
+ prevButton:SetDisabledTexture("CovenantSanctum-Renown-Arrow-Disabled")
+ prevButton:SetHighlightTexture("CovenantSanctum-Renown-Arrow-Hover", "ADD")
+ prevButton:RotateTextures(m_rad(45))
+ prevButton:SetScript("OnClick", function()
+ page = page - 1
+ if page > pages then
+ page = pages
+ elseif page < 1 then
+ page = 1
+ end
+
+ refresh()
+ end)
+ compactFrame.PrevButton = prevButton
+
+ local nextButton = CreateFrame("Button", nil, compactFrame)
+ nextButton:SetPoint("BOTTOMRIGHT", -2, -6)
+ nextButton:SetSize(29, 40)
+ nextButton:SetNormalTexture("CovenantSanctum-Renown-Arrow")
+ nextButton:SetPushedTexture("CovenantSanctum-Renown-Arrow-Depressed")
+ nextButton:SetDisabledTexture("CovenantSanctum-Renown-Arrow-Disabled")
+ nextButton:SetHighlightTexture("CovenantSanctum-Renown-Arrow-Hover", "ADD")
+ nextButton:RotateTextures(m_rad(135))
+ nextButton:SetScript("OnClick", function()
+ page = page + 1
+ if page > pages then
+ page = pages
+ elseif page < 1 then
+ page = 1
+ end
+
+ refresh()
+ end)
+ compactFrame.NextButton = nextButton
+
+ E:RegisterEvent("AJ_REFRESH_DISPLAY", function()
+ if not timer then
+ timer = C_Timer.NewTimer(0.25, delayedUpdate)
+ end
+ end)
+
+ fetchData()
+ refresh()
+
+ isInit = true
+ end
+end
+
+function MODULE:HasSuggestFrame()
+ return isInit
+end
+
+function MODULE:SetUpSuggestFrame()
+ if not isInit and PrC.db.profile.blizzard.suggest_frame.enabled then
+ if not EncounterJournalSuggestFrame then
+ E:AddOnLoadTask("Blizzard_EncounterJournal", init)
+ else
+ init()
+ end
+ end
+end
diff --git a/ls_UI/modules/minimap/minimap.lua b/ls_UI/modules/minimap/minimap.lua
index 786fd19d..7a730762 100644
--- a/ls_UI/modules/minimap/minimap.lua
+++ b/ls_UI/modules/minimap/minimap.lua
@@ -26,11 +26,26 @@ do
["sanctuary"] = "sanctuary",
}
+ function minimap_proto:SetSmoothVertexColor(r, g, b, a)
+ local color = self.ColorAnim.color
+ a = a or 1
+
+ if color.r == r and color.g == g and color.b == b and color.a == a then return end
+
+ color.r, color.g, color.b, color.a = self.Border:GetVertexColor()
+ self.ColorAnim.Anim:SetStartColor(color)
+
+ color.r, color.g, color.b, color.a = r, g, b, a
+ self.ColorAnim.Anim:SetEndColor(color)
+
+ self.ColorAnim:Play()
+ end
+
function minimap_proto:UpdateBorderColor()
if self._config.color.border then
- self.Border:SetVertexColor((C.db.global.colors.zone[zoneTypeToColor[C_PvP.GetZonePVPInfo() or "contested"]]):GetRGB())
+ self:SetSmoothVertexColor((C.db.global.colors.zone[zoneTypeToColor[C_PvP.GetZonePVPInfo() or "contested"]]):GetRGB())
else
- self.Border:SetVertexColor(C.db.global.colors.light_gray:GetRGB())
+ self:SetSmoothVertexColor(C.db.global.colors.light_gray:GetRGB())
end
end
@@ -176,7 +191,7 @@ do
MinimapCluster.BorderTop:SetPoint("BOTTOM", MinimapCluster, "BOTTOM", 0, 1)
MinimapCluster.IndicatorFrame:ClearAllPoints()
- MinimapCluster.IndicatorFrame:SetPoint("BOTTOMLEFT", MinimapCluster.TrackingFrame, "TOPLEFT", -1, 2)
+ MinimapCluster.IndicatorFrame:SetPoint("BOTTOMLEFT", MinimapCluster.Tracking, "TOPLEFT", -1, 2)
Minimap.DifficultyFlag:SetPoint("TOPRIGHT", MinimapCluster, "TOPRIGHT", -23, -16)
else
@@ -185,7 +200,7 @@ do
MinimapCluster.BorderTop:SetPoint("TOP", MinimapCluster, "TOP", 0, -1)
MinimapCluster.IndicatorFrame:ClearAllPoints()
- MinimapCluster.IndicatorFrame:SetPoint("TOPLEFT", MinimapCluster.TrackingFrame, "BOTTOMLEFT", -1, -2)
+ MinimapCluster.IndicatorFrame:SetPoint("TOPLEFT", MinimapCluster.Tracking, "BOTTOMLEFT", -1, -2)
Minimap.DifficultyFlag:SetPoint("TOPRIGHT", MinimapCluster, "TOPRIGHT", -23, -32)
end
@@ -260,6 +275,7 @@ do
["heroic"] = {321 / 512, 385 / 512, 1 / 256, 65 / 256},
["mythic"] = {385 / 512, 449 / 512, 1 / 256, 65 / 256},
["challenge"] = {193 / 512, 257 / 512, 65 / 256, 129 / 256},
+ ["delve"] = {257 / 512, 321 / 512, 65 / 256, 129 / 256},
},
[125] = {
["lfr"] = {273 / 1024, 375 / 1024, 1 / 256, 103 / 256},
@@ -267,6 +283,7 @@ do
["heroic"] = {477 / 1024, 579 / 1024, 1 / 256, 103 / 256},
["mythic"] = {579 / 1024, 681 / 1024, 1 / 256, 103 / 256},
["challenge"] = {681 / 1024, 783 / 1024, 1 / 256, 103 / 256},
+ ["delve"] = {783 / 1024, 885 / 1024, 1 / 256, 103 / 256},
},
[150] = {
["lfr"] = {353 / 1024, 491 / 1024, 1 / 512, 139 / 512},
@@ -274,9 +291,24 @@ do
["heroic"] = {629 / 1024, 767 / 1024, 1 / 512, 139 / 512},
["mythic"] = {767 / 1024, 905 / 1024, 1 / 512, 139 / 512 },
["challenge"] = {353 / 1024, 491 / 1024, 139 / 512, 277 / 512},
+ ["delve"] = {491 / 1024, 629 / 1024, 139 / 512, 277 / 512},
},
}
+ local function scenarioIsDelve()
+ local _, _, _, mapID = UnitPosition("player")
+ return C_DelvesUI.HasActiveDelve(mapID)
+ end
+
+ local DIFFICULTY_NAMES = {
+ [208] = _G.DELVE_LABEL,
+ }
+
+ -- Blizz don't fully support delves atm
+ local function getDifficultyName(ID)
+ return DifficultyUtil.GetDifficultyName(ID) or DIFFICULTY_NAMES[ID]
+ end
+
function flag_proto:RegisterForEvents()
for _, event in next, self.events do
self:RegisterEvent(event)
@@ -289,16 +321,26 @@ do
self:SetMouseClickEnabled(false)
end
+ local deferredUpdate, timer
+
function flag_proto:OnEvent()
- self:Update()
- end
+ if not deferredUpdate then
+ -- it's static, so avoid creating it again and again
+ deferredUpdate = function()
+ self:Update()
- function flag_proto:OnEnter()
- if self.difficultyID then
- if not DifficultyUtil.GetDifficultyName(self.difficultyID) then
- return
+ timer = nil
end
+ end
+ if not timer then
+ -- depending on the kind of an instance you enter it can fire 5+ times
+ timer = C_Timer.NewTimer(1, deferredUpdate)
+ end
+ end
+
+ function flag_proto:OnEnter()
+ if self.difficultyID and self.difficultyName then
local p, rP, x, y = E:GetTooltipPoint(self)
if p == "TOPRIGHT" then
x, y = 24, 24
@@ -336,11 +378,11 @@ do
local instanceName, instanceType, difficultyID, _, maxPlayers = GetInstanceInfo()
if instanceType == "raid" or instanceType == "party" then
- local difficultyName, _, isHeroic, isChallengeMode, displayHeroic, displayMythic, _, isLFR = GetDifficultyInfo(difficultyID)
+ local _, _, isHeroic, isChallengeMode, displayHeroic, displayMythic, _, isLFR = GetDifficultyInfo(difficultyID)
self.instanceName = instanceName
self.difficultyID = difficultyID
- self.difficultyName = difficultyName
+ self.difficultyName = getDifficultyName(difficultyID)
self.maxPlayers = maxPlayers
if isChallengeMode then
@@ -357,18 +399,21 @@ do
self:Show()
elseif instanceType == "scenario" then
- local difficultyName, _, isHeroic, _, displayHeroic, displayMythic = GetDifficultyInfo(difficultyID)
- if not (isHeroic or displayHeroic or displayMythic) then return end
+ local _, _, isHeroic, _, displayHeroic, displayMythic = GetDifficultyInfo(difficultyID)
+ local isDelve = scenarioIsDelve()
+ if not (isHeroic or displayHeroic or displayMythic or isDelve) then return end
self.instanceName = instanceName
self.difficultyID = difficultyID
- self.difficultyName = difficultyName
+ self.difficultyName = getDifficultyName(difficultyID)
self.maxPlayers = maxPlayers
if displayMythic then
self:UpdateFlag("mythic")
elseif isHeroic or displayHeroic then
self:UpdateFlag("heroic")
+ elseif isDelve then
+ self:UpdateFlag("delve")
end
self:Show()
@@ -431,9 +476,17 @@ function MODULE:Init()
local border = textureParent:CreateTexture(nil, "BORDER", nil, 1)
border:SetPoint("CENTER", 0, 0)
- E:SmoothColor(border)
+ border:SetVertexColor(C.db.global.colors.light_gray:GetRGB())
Minimap.Border = border
+ local ag = border:CreateAnimationGroup()
+ Minimap.ColorAnim = ag
+
+ local anim = ag:CreateAnimation("VertexColor")
+ anim:SetDuration(0.125)
+ ag.color = {a = 1}
+ ag.Anim = anim
+
local foreground = textureParent:CreateTexture(nil, "BORDER", nil, 3)
foreground:SetPoint("CENTER", 0, 0)
Minimap.Foreground = foreground
@@ -577,10 +630,10 @@ function MODULE:Init()
MinimapCluster.BorderTop:SetWidth(0)
MinimapCluster.BorderTop:SetHeight(17)
- MinimapCluster.TrackingFrame:SetSize(18, 17)
- MinimapCluster.TrackingFrame.Button:SetSize(14, 14)
- MinimapCluster.TrackingFrame.Button:ClearAllPoints()
- MinimapCluster.TrackingFrame.Button:SetPoint("TOPLEFT", 1, -1)
+ MinimapCluster.Tracking:SetSize(18, 17)
+ MinimapCluster.Tracking.Button:SetSize(14, 14)
+ MinimapCluster.Tracking.Button:ClearAllPoints()
+ MinimapCluster.Tracking.Button:SetPoint("TOPLEFT", 1, -1)
MinimapCluster.ZoneTextButton:SetSize(0, 16)
MinimapCluster.ZoneTextButton:ClearAllPoints()
diff --git a/ls_UI/modules/tooltips/tooltips.lua b/ls_UI/modules/tooltips/tooltips.lua
index 098781a5..92bd5235 100644
--- a/ls_UI/modules/tooltips/tooltips.lua
+++ b/ls_UI/modules/tooltips/tooltips.lua
@@ -16,15 +16,15 @@ local isInit = false
local AFK = "[" .. _G.AFK .. "] "
local DND = "[" .. _G.DND .. "] "
-local EXPANSION = "|cffffd100" .. _G.EXPANSION_FILTER_TEXT .. ":|r %s"
+local EXPANSION = "|cffffd100" .. _G.EXPANSION_FILTER_TEXT .. _G.HEADER_COLON .. "|r %s"
local GUILD_TEMPLATE = _G.GUILD_TEMPLATE
-local ID = "|cffffd100" .. _G.ID .. ":|r %d"
+local ID = "|cffffd100" .. _G.ID .. _G.HEADER_COLON .. "|r %d"
local NAME_FORMAT = "%s%s"
local LEVEL_FORMAT = "%s %s"
local ILVL_SPEC_FORMAT = "|cffffd100%s|r %s"
local PLAYER_TARGET_FORMAT = "%s (|c%s" .. _G.PLAYER .. "|r)"
-local TARGET = "|cffffd100" .. _G.TARGET .. ":|r %s"
-local TOTAL = "|cffffd100" .. _G.TOTAL .. ":|r %d"
+local TARGET = "|cffffd100" .. _G.TARGET .. _G.HEADER_COLON .. "|r %s"
+local TOTAL = "|cffffd100" .. _G.TOTAL .. _G.HEADER_COLON .. "|r %d"
local PHASE_ICONS = {
[Enum.PhaseReason.Phasing] = M.textures.icons_inline.PHASE,
@@ -101,28 +101,6 @@ local function findLine(tooltip, start, pattern)
end
end
-local function tooltipBarHook(self)
- if self:IsForbidden() or self:GetParent():IsForbidden() then return end
-
- self.Text:Hide()
- self:SetStatusBarColor(C.db.global.colors.health:GetRGB())
-
- local _, unit = self:GetParent():GetUnit()
- if not unit then
- self:GetParent():SetMinimumWidth(0)
-
- return
- end
-
- local max = UnitHealthMax(unit)
- if max > 1 then
- self.Text:Show()
- self.Text:SetFormattedText("%s / %s", E:FormatNumber(UnitHealth(unit)), E:FormatNumber(max))
-
- self:GetParent():SetMinimumWidth(m_floor(self.Text:GetStringWidth() + 32))
- end
-end
-
function MODULE:IsInit()
return isInit
end
@@ -303,7 +281,7 @@ function MODULE:Init()
if isShiftKeyDown then
name = NAME_FORMAT:format(name, C.db.global.colors.gray:WrapTextInColorCode("-" .. realm))
elseif UnitRealmRelationship(unit) ~= LE_REALM_RELATION_VIRTUAL then
- name = NAME_FORMAT:format(name, C.db.global.colors.gray:WrapTextInColorCode(L["FOREIGN_SERVER_LABEL"]))
+ name = NAME_FORMAT:format(name, C.db.global.colors.gray:WrapTextInColorCode(_G.FOREIGN_SERVER_LABEL))
end
end
@@ -389,7 +367,7 @@ function MODULE:Init()
end
end
elseif UnitIsWildBattlePet(unit) or UnitIsBattlePetCompanion(unit) then
- GameTooltipTextLeft1:SetText(UnitName(unit) or L["UNKNOWN"])
+ GameTooltipTextLeft1:SetText(UnitName(unit) or _G.UNKNOWN)
GameTooltipTextLeft1:SetTextColor(E:GetUnitColor_(unit, false, true):GetRGB())
scaledLevel = UnitBattlePetLevel(unit)
@@ -406,11 +384,11 @@ function MODULE:Init()
levelLine:SetFormattedText(
LEVEL_FORMAT,
difficultyColor:WrapTextInColorCode(scaledLevel > 0 and scaledLevel or "??"),
- (UnitCreatureType(unit) or L["PET"]) .. (petType and ", " .. petType or "")
+ (UnitCreatureType(unit) or _G.PET) .. (petType and ", " .. petType or "")
)
end
else
- GameTooltipTextLeft1:SetText(UnitName(unit) or L["UNKNOWN"])
+ GameTooltipTextLeft1:SetText(UnitName(unit) or _G.UNKNOWN)
GameTooltipTextLeft1:SetTextColor(E:GetUnitColor_(unit, false, true):GetRGB())
local status = ""
@@ -458,6 +436,7 @@ function MODULE:Init()
end
end)
+ -- Status Bars
local function hideHealthBar(tooltip, tooltipData)
if tooltip.StatusBar then
if not tooltipData.healthGUID then
@@ -469,11 +448,33 @@ function MODULE:Init()
TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Corpse, hideHealthBar)
TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.MinimapMouseover, hideHealthBar)
- -- Status Bars
- E:HandleStatusBar(GameTooltipStatusBar)
+ local function tooltipBarHook(self)
+ if self:IsForbidden() or self:GetParent():IsForbidden() then return end
+
+ self.Text:Hide()
+ self:SetStatusBarColor(C.db.global.colors.health:GetRGB())
+
+ local _, unit = self:GetParent():GetUnit()
+ if not unit then
+ self:GetParent():SetMinimumWidth(0)
+
+ return
+ end
+
+ local max = UnitHealthMax(unit)
+ if max > 1 then
+ self.Text:Show()
+ self.Text:SetFormattedText("%s / %s", E:FormatNumber(UnitHealth(unit)), E:FormatNumber(max))
+
+ self:GetParent():SetMinimumWidth(m_floor(self.Text:GetStringWidth() + 32))
+ end
+ end
+
+ E.StatusBars:Reskin(E.StatusBars:Handle(GameTooltipStatusBar))
+
GameTooltipStatusBar:ClearAllPoints()
- GameTooltipStatusBar:SetPoint("TOPLEFT", GameTooltip, "BOTTOMLEFT", 8, -2)
- GameTooltipStatusBar:SetPoint("TOPRIGHT", GameTooltip, "BOTTOMRIGHT", -8, -2)
+ GameTooltipStatusBar:SetPoint("TOPLEFT", GameTooltip, "BOTTOMLEFT", 3, -2)
+ GameTooltipStatusBar:SetPoint("TOPRIGHT", GameTooltip, "BOTTOMRIGHT", -3, -2)
GameTooltipStatusBar:HookScript("OnShow", tooltipBarHook)
GameTooltipStatusBar:HookScript("OnValueChanged", tooltipBarHook)
@@ -483,8 +484,8 @@ function MODULE:Init()
for _, child in next, {self:GetChildren()} do
if child ~= GameTooltipStatusBar and child:GetObjectType() == "StatusBar" then
if not child.handled then
- E:HandleStatusBar(child)
- E:SetStatusBarSkin(child, "HORIZONTAL-GLASS")
+ E.StatusBars:Reskin(E.StatusBars:Handle(child))
+
child:SetHeight(10)
end
@@ -515,8 +516,6 @@ end
function MODULE:Update()
if isInit then
GameTooltipStatusBar:SetHeight(C.db.profile.tooltips.health.height)
- E:SetStatusBarSkin(GameTooltipStatusBar, "HORIZONTAL-" .. C.db.profile.tooltips.health.height)
-
GameTooltipStatusBar.Text:UpdateFont(C.db.profile.tooltips.health.text.size)
end
end
diff --git a/ls_UI/modules/unitframes/elements/castbar.lua b/ls_UI/modules/unitframes/elements/castbar.lua
index abe2fa78..94615b3e 100644
--- a/ls_UI/modules/unitframes/elements/castbar.lua
+++ b/ls_UI/modules/unitframes/elements/castbar.lua
@@ -135,15 +135,18 @@ function element_proto:CustomDelayText(duration)
end
end
-function element_proto:SetSmoothStatusBarColor(...)
+function element_proto:SetSmoothStatusBarColor(r, g, b, a)
local color = self.ColorAnim.color
+ a = a or 1
- color.r, color.g, color.b = ...
- self.ColorAnim.Anim:SetEndColor(color)
+ if color.r == r and color.g == g and color.b == b and color.a == a then return end
- color.r, color.g, color.b = self:GetStatusBarColor()
+ color.r, color.g, color.b, color.a = self:GetStatusBarColor()
self.ColorAnim.Anim:SetStartColor(color)
+ color.r, color.g, color.b, color.a = r, g, b, a
+ self.ColorAnim.Anim:SetEndColor(color)
+
self.ColorAnim:Play()
end
@@ -163,8 +166,7 @@ function element_proto:UpdateFonts()
end
function element_proto:UpdateTextures()
- self:SetStatusBarTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz))
- self.SafeZone_:SetTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz))
+ self:UpdateStatusBarTexture()
end
function element_proto:UpdateColors()
@@ -196,8 +198,8 @@ function element_proto:UpdateIcon()
self.LeftSep:SetSize(12 / 2, 0)
self.RightSep:SetSize(0.0001, 0.0001)
- self:SetPoint("TOPLEFT", 6 + height * 1.5, 0) -- 4 + 2, offset + sep width
- self:SetPoint("BOTTOMRIGHT", -4, 0)
+ self:SetPoint("TOPLEFT", 2 + height * 1.5, 0) -- 4 + 2, offset + sep width
+ self:SetPoint("BOTTOMRIGHT", 0, 0)
elseif config.icon.position == "RIGHT" then
self.Icon = self.RightIcon
@@ -207,8 +209,8 @@ function element_proto:UpdateIcon()
self.LeftSep:SetSize(0.0001, 0.0001)
self.RightSep:SetSize(12 / 2, 0)
- self:SetPoint("TOPLEFT", 4, 0)
- self:SetPoint("BOTTOMRIGHT", -6 - height * 1.5, 0) -- 4 + 2, offset + sep width
+ self:SetPoint("TOPLEFT", 0, 0)
+ self:SetPoint("BOTTOMRIGHT", -2 - height * 1.5, 0) -- 4 + 2, offset + sep width
else
self.Icon = nil
@@ -218,8 +220,8 @@ function element_proto:UpdateIcon()
self.LeftSep:SetSize(0.0001, 0.0001)
self.RightSep:SetSize(0.0001, 0.0001)
- self:SetPoint("TOPLEFT", 4, 0)
- self:SetPoint("BOTTOMRIGHT", -4, 0)
+ self:SetPoint("TOPLEFT", 0, 0)
+ self:SetPoint("BOTTOMRIGHT", 0, 0)
end
end
@@ -277,8 +279,10 @@ function element_proto:UpdateSize()
holder:SetParent(frame)
end
end
+end
- E:SetStatusBarSkin(self.TexParent, "HORIZONTAL-" .. height)
+function element_proto:UpdateTextureCallback(texture)
+ self.SafeZone_:SetTexture(texture)
end
local frame_proto = {}
@@ -311,6 +315,9 @@ function frame_proto:UpdateCastbar()
end
end
+local gradientColorMin = {r = 0, g = 0, b = 0, a = 0}
+local gradientColorMax = {r = 0, g = 0, b = 0, a = 0.4}
+
function UF:CreateCastbar(frame)
Mixin(frame, frame_proto)
@@ -318,6 +325,7 @@ function UF:CreateCastbar(frame)
local element = Mixin(CreateFrame("StatusBar", nil, holder), element_proto)
element:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(element, "castbar", element.UpdateTextureCallback)
element:SetFrameLevel(holder:GetFrameLevel())
element.Holder = holder
@@ -331,10 +339,12 @@ function UF:CreateCastbar(frame)
local bg = element:CreateTexture(nil, "BACKGROUND", nil, -7)
bg:SetAllPoints(holder)
- bg:SetColorTexture(C.db.global.colors.dark_gray:GetRGB())
+ bg:SetTexture("Interface\\HELPFRAME\\DarkSandstone-Tile", "REPEAT", "REPEAT")
+ bg:SetHorizTile(true)
+ bg:SetVertTile(true)
local icon = element:CreateTexture(nil, "BACKGROUND", nil, 0)
- icon:SetPoint("TOPLEFT", holder, "TOPLEFT", 4, 0)
+ icon:SetPoint("TOPLEFT", holder, "TOPLEFT", 0, 0)
icon:SetTexCoord(8 / 64, 56 / 64, 9 / 64, 41 / 64)
element.LeftIcon = icon
@@ -342,6 +352,7 @@ function UF:CreateCastbar(frame)
sep:SetTexture("Interface\\AddOns\\ls_UI\\assets\\statusbar-sep", "REPEAT", "REPEAT")
sep:SetVertTile(true)
sep:SetTexCoord(2 / 16, 14 / 16, 0 / 8, 8 / 8)
+ sep:SetVertexColor(1, 0.6, 0)
sep:SetSize(12 / 2, 0)
sep:SetPoint("TOP", 0, 0)
sep:SetPoint("BOTTOM", 0, 0)
@@ -352,13 +363,14 @@ function UF:CreateCastbar(frame)
icon = element:CreateTexture(nil, "BACKGROUND", nil, 0)
icon:SetTexCoord(8 / 64, 56 / 64, 9 / 64, 41 / 64)
- icon:SetPoint("TOPRIGHT", holder, "TOPRIGHT", -4, 0)
+ icon:SetPoint("TOPRIGHT", holder, "TOPRIGHT", 0, 0)
element.RightIcon = icon
sep = element:CreateTexture(nil, "OVERLAY")
sep:SetTexture("Interface\\AddOns\\ls_UI\\assets\\statusbar-sep", "REPEAT", "REPEAT")
sep:SetVertTile(true)
sep:SetTexCoord(2 / 16, 14 / 16, 0 / 8, 8 / 8)
+ sep:SetVertexColor(1, 0.6, 0)
sep:SetSize(12 / 2, 0)
sep:SetPoint("TOP", 0, 0)
sep:SetPoint("BOTTOM", 0, 0)
@@ -374,9 +386,9 @@ function UF:CreateCastbar(frame)
local texParent = CreateFrame("Frame", nil, element)
texParent:SetFrameLevel(element:GetFrameLevel() + 2)
- texParent:SetPoint("TOPLEFT", holder, "TOPLEFT", 4, 0)
- texParent:SetPoint("BOTTOMRIGHT", holder, "BOTTOMRIGHT", -4, 0)
- element.TexParent = texParent
+ texParent:SetPoint("TOPLEFT", holder, "TOPLEFT", 0, 0)
+ texParent:SetPoint("BOTTOMRIGHT", holder, "BOTTOMRIGHT", 0, 0)
+ element.TextureParent = texParent
local time = texParent:CreateFontString(nil, "ARTWORK")
E.FontStrings:Capture(time, "statusbar")
@@ -396,6 +408,20 @@ function UF:CreateCastbar(frame)
text:SetPoint("RIGHT", time, "LEFT", -2, 0)
element.Text = text
+ local border = E:CreateBorder(texParent, "BORDER")
+ border:SetTexture("Interface\\AddOns\\ls_UI\\assets\\border-statusbar")
+ border:SetSize(16)
+ border:SetOffset(-4)
+ element.Border = border
+
+ local gradient = texParent:CreateTexture(nil, "BORDER", nil, -1)
+ gradient:SetAllPoints(texParent)
+ gradient:SetSnapToPixelGrid(false)
+ gradient:SetTexelSnappingBias(0)
+ gradient:SetTexture("Interface\\BUTTONS\\WHITE8X8")
+ gradient:SetGradient("VERTICAL", gradientColorMin, gradientColorMax)
+ element.Gradient = gradient
+
element.stageColors = {
[3] = {},
[4] = {},
diff --git a/ls_UI/modules/unitframes/elements/classpower.lua b/ls_UI/modules/unitframes/elements/classpower.lua
index bfcb0d9b..91365027 100644
--- a/ls_UI/modules/unitframes/elements/classpower.lua
+++ b/ls_UI/modules/unitframes/elements/classpower.lua
@@ -42,6 +42,7 @@ local function createElement(parent, num, name, ...)
local bar = CreateFrame("StatusBar", "$parent" .. name .. i, element)
bar:SetFrameLevel(element:GetFrameLevel())
bar:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(bar, "power")
bar:SetScript("OnValueChanged", onValueChanged)
bar:SetPoint("TOP", 0, 0)
bar:SetPoint("BOTTOM", 0, 0)
@@ -119,7 +120,7 @@ end
function element_proto:UpdateTextures()
for i = 1, #self do
- self[i]:SetStatusBarTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz))
+ self[i]:UpdateStatusBarTexture()
end
end
@@ -318,14 +319,14 @@ do
end
function stagger_proto:UpdateTextures()
- self:SetStatusBarTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz))
+ self:UpdateStatusBarTexture()
end
function stagger_proto:UpdateSmoothing()
if C.db.profile.units.change.smooth then
- E:SmoothBar(self)
+ E.StatusBars:Smooth(self)
else
- E:DesmoothBar(self)
+ E.StatusBars:Desmooth(self)
end
end
@@ -357,6 +358,7 @@ do
local element = Mixin(CreateFrame("StatusBar", nil, frame), stagger_proto)
element:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(element, "power")
element:SetFrameLevel(frame:GetFrameLevel() + 1)
element:Hide()
diff --git a/ls_UI/modules/unitframes/elements/health.lua b/ls_UI/modules/unitframes/elements/health.lua
index c9386789..a52b1119 100644
--- a/ls_UI/modules/unitframes/elements/health.lua
+++ b/ls_UI/modules/unitframes/elements/health.lua
@@ -12,6 +12,7 @@ local function updateFont(fontString, config)
fontString:UpdateFont(config.size)
fontString:SetJustifyH(config.h_alignment)
fontString:SetJustifyV(config.v_alignment)
+ fontString:SetWordWrap(config.word_wrap)
end
local function updateTextPoint(frame, fontString, config)
@@ -68,17 +69,30 @@ do
end
function element_proto:UpdateTextures()
- self:SetStatusBarTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz))
+ self:UpdateStatusBarTexture()
end
function element_proto:UpdateSmoothing()
if C.db.profile.units.change.smooth then
- E:SmoothBar(self)
+ E.StatusBars:Smooth(self)
+ E.StatusBars:Smooth(self.TempLoss_)
else
- E:DesmoothBar(self)
+ E.StatusBars:Desmooth(self)
+ E.StatusBars:Desmooth(self.TempLoss_)
end
end
+ function element_proto:UpdateMaxHealthReduction()
+ if self._config.reduction.enabled then
+ self.TempLoss = self.TempLoss_
+ else
+ self.TempLoss = nil
+ end
+
+ self.TempLoss_:SetValue(0)
+ self.TempLoss_:Show()
+ end
+
local frame_proto = {}
function frame_proto:UpdateHealth()
@@ -90,6 +104,7 @@ do
element:UpdateTextPoints()
element:UpdateSmoothing()
element:UpdateTags()
+ element:UpdateMaxHealthReduction()
element:ForceUpdate()
end
@@ -98,13 +113,40 @@ do
local element = Mixin(CreateFrame("StatusBar", nil, frame), element_proto)
element:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(element, "health")
element:SetFrameLevel(frame:GetFrameLevel() + 1)
element:SetClipsChildren(true)
element._texture = element:GetStatusBarTexture()
+ local tempLoss = CreateFrame("StatusBar", nil, frame)
+ tempLoss:SetReverseFill(true)
+ tempLoss:SetMinMaxValues(0, 1)
+ tempLoss:SetClipsChildren(true)
+ tempLoss:SetFrameLevel(frame:GetFrameLevel() + 1)
+ element.TempLoss_ = tempLoss
+
+ tempLoss:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ tempLoss._texture = tempLoss:GetStatusBarTexture()
+ tempLoss._texture:SetTexture("Interface\\AddOns\\ls_UI\\assets\\reduction", "REPEAT", "REPEAT")
+ tempLoss._texture:SetHorizTile(true)
+ tempLoss._texture:SetVertTile(true)
+
+ local edge = tempLoss:CreateTexture(nil, "OVERLAY")
+ edge:SetTexture("Interface\\AddOns\\ls_UI\\assets\\statusbar-edge", "REPEAT", "REPEAT")
+ edge:SetVertTile(true)
+ edge:SetTexCoord(0, 14 / 16, 0, 1)
+ edge:SetSize(14 / 2, 0)
+ edge:SetPoint("TOP", 0, 0)
+ edge:SetPoint("BOTTOM", 0, 0)
+ edge:SetPoint("LEFT", tempLoss:GetStatusBarTexture(), "LEFT", 0, 0)
+ edge:SetSnapToPixelGrid(false)
+ edge:SetTexelSnappingBias(0)
+ edge:SetVertexColor(0.1, 0.1, 0.1)
+ edge:SetAlpha(0.8)
+ tempLoss.Edge = edge
+
local text = (textParent or element):CreateFontString(nil, "ARTWORK")
E.FontStrings:Capture(text, "unit")
- text:SetWordWrap(false)
element.Text = text
return element
@@ -115,6 +157,7 @@ end
do
local element_proto = {
maxOverflow = 1,
+ showRawAbsorb = true,
}
function element_proto:UpdateConfig()
@@ -129,22 +172,22 @@ do
end
function element_proto:UpdateTextures()
- self.myBar:SetStatusBarTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz))
- self.otherBar:SetStatusBarTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz))
- self.healAbsorbBar:SetStatusBarTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz))
+ self.myBar:UpdateStatusBarTexture()
+ self.otherBar:UpdateStatusBarTexture()
+ self.healAbsorbBar:UpdateStatusBarTexture()
end
function element_proto:UpdateSmoothing()
if C.db.profile.units.change.smooth then
- E:SmoothBar(self.myBar)
- E:SmoothBar(self.otherBar)
- E:SmoothBar(self.absorbBar)
- E:SmoothBar(self.healAbsorbBar)
+ E.StatusBars:Smooth(self.myBar)
+ E.StatusBars:Smooth(self.otherBar)
+ E.StatusBars:Smooth(self.absorbBar)
+ E.StatusBars:Smooth(self.healAbsorbBar)
else
- E:DesmoothBar(self.myBar)
- E:DesmoothBar(self.otherBar)
- E:DesmoothBar(self.absorbBar)
- E:DesmoothBar(self.healAbsorbBar)
+ E.StatusBars:Desmooth(self.myBar)
+ E.StatusBars:Desmooth(self.otherBar)
+ E.StatusBars:Desmooth(self.absorbBar)
+ E.StatusBars:Desmooth(self.healAbsorbBar)
end
end
@@ -192,6 +235,7 @@ do
parent.MyHeal = myBar
myBar:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(myBar, "health")
myBar._texture = myBar:GetStatusBarTexture()
local otherBar = CreateFrame("StatusBar", nil, parent)
@@ -202,13 +246,16 @@ do
parent.OtherHeal = otherBar
otherBar:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(otherBar, "health")
otherBar._texture = otherBar:GetStatusBarTexture()
local absorbBar = CreateFrame("StatusBar", nil, parent)
- absorbBar:SetFrameLevel(level + 1)
+ absorbBar:SetClipsChildren(true)
+ absorbBar:SetFrameLevel(level + 2)
absorbBar:SetPoint("TOP")
absorbBar:SetPoint("BOTTOM")
- absorbBar:SetPoint("LEFT", otherBar:GetStatusBarTexture(), "RIGHT")
+ absorbBar:SetReverseFill(true)
+ absorbBar:SetPoint("RIGHT", frame.Health.TempLoss_:GetStatusBarTexture(), "LEFT")
parent.DamageAbsorb = absorbBar
absorbBar:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
@@ -216,6 +263,7 @@ do
absorbBar._texture:SetTexture("Interface\\AddOns\\ls_UI\\assets\\absorb", "REPEAT", "REPEAT")
absorbBar._texture:SetHorizTile(true)
absorbBar._texture:SetVertTile(true)
+ absorbBar._texture:SetAlpha(0.4)
local healAbsorbBar = CreateFrame("StatusBar", nil, parent)
healAbsorbBar:SetReverseFill(true)
@@ -226,6 +274,7 @@ do
parent.HealAbsorb = healAbsorbBar
healAbsorbBar:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(healAbsorbBar, "health")
healAbsorbBar._texture = healAbsorbBar:GetStatusBarTexture()
return Mixin({
diff --git a/ls_UI/modules/unitframes/elements/layout.lua b/ls_UI/modules/unitframes/elements/layout.lua
index 52e9d4d9..17e800b5 100644
--- a/ls_UI/modules/unitframes/elements/layout.lua
+++ b/ls_UI/modules/unitframes/elements/layout.lua
@@ -39,7 +39,21 @@ function frame_proto:UpdateLayout()
end
function frame_proto:UpdateInlay()
- self.Inlay:SetAlpha(C.db.profile.units.inlay.alpha)
+ self.Inlay:SetAlpha(C.db.profile.units.inlay.gloss)
+end
+
+local gradientColorMin = {r = 0, g = 0, b = 0, a = 0}
+local gradientColorMax = {r = 0, g = 0, b = 0, a = 0.35}
+
+function frame_proto:UpdateGradient()
+ gradientColorMax.a = C.db.profile.units.inlay.gradient
+
+ self.Insets.Left[4]:SetGradient("VERTICAL", gradientColorMin, gradientColorMax)
+ self.Insets.Right[4]:SetGradient("VERTICAL", gradientColorMin, gradientColorMax)
+ self.Insets.Top[4]:SetGradient("VERTICAL", gradientColorMin, gradientColorMax)
+ self.Insets.Bottom[4]:SetGradient("VERTICAL", gradientColorMin, gradientColorMax)
+
+ self.Inlay.Gradient:SetGradient("VERTICAL", gradientColorMin, gradientColorMax)
end
local insets_proto = {}
@@ -137,6 +151,7 @@ function vert_inset_proto:Collapse()
self[1]:Hide()
self[2]:Hide()
self[3]:Hide()
+ self[4]:Hide()
self.__expanded = false
@@ -151,6 +166,7 @@ function vert_inset_proto:Expand()
self[1]:Show()
self[2]:Show()
self[3]:Show()
+ self[4]:Show()
self.__expanded = true
@@ -184,6 +200,7 @@ function horiz_inset_proto:Collapse()
self[1]:Hide()
self[2]:Hide()
self[3]:Hide()
+ self[4]:Hide()
self.__expanded = false
@@ -198,6 +215,7 @@ function horiz_inset_proto:Expand()
self[1]:Show()
self[2]:Show()
self[3]:Show()
+ self[4]:Show()
self.__expanded = true
@@ -449,6 +467,15 @@ function UF:CreateLayout(frame, level)
tex2:SetTexelSnappingBias(0)
inset[2] = tex2
+ -- it needs to appear under the inlay glass
+ local gradient = inlayParent:CreateTexture(nil, "OVERLAY", nil, 0)
+ gradient:SetPoint("TOPLEFT", inset, "TOPLEFT", 0, -1)
+ gradient:SetPoint("BOTTOMRIGHT", inset, "BOTTOMRIGHT", 0, 1)
+ gradient:SetSnapToPixelGrid(false)
+ gradient:SetTexelSnappingBias(0)
+ gradient:SetTexture("Interface\\BUTTONS\\WHITE8X8")
+ inset[4] = gradient
+
inset:Collapse()
insets[v] = inset
@@ -501,6 +528,16 @@ function UF:CreateLayout(frame, level)
inlayParent:SetPoint("TOPLEFT", insets.Left, "TOPRIGHT", 0, 0)
inlayParent:SetPoint("BOTTOMRIGHT", insets.Right, "BOTTOMLEFT", 0, 0)
+ local gradient = textureParent:CreateTexture(nil, "OVERLAY", nil, 0)
+ gradient:SetPoint("LEFT", insets.Left, "RIGHT", 0, 0)
+ gradient:SetPoint("RIGHT", insets.Right, "LEFT", 0, 0)
+ gradient:SetPoint("TOP", insets.Top, "BOTTOM", 0, 0)
+ gradient:SetPoint("BOTTOM", insets.Bottom, "TOP", 0, 0)
+ gradient:SetSnapToPixelGrid(false)
+ gradient:SetTexelSnappingBias(0)
+ gradient:SetTexture("Interface\\BUTTONS\\WHITE8X8")
+ inlay.Gradient = gradient -- it's not, but it is now
+
local border = E:CreateBorder(textureParent)
border:SetTexture("Interface\\AddOns\\ls_UI\\assets\\border-thick")
frame.Border = border
diff --git a/ls_UI/modules/unitframes/elements/portrait.lua b/ls_UI/modules/unitframes/elements/portrait.lua
index 7b19142c..b3a6b219 100644
--- a/ls_UI/modules/unitframes/elements/portrait.lua
+++ b/ls_UI/modules/unitframes/elements/portrait.lua
@@ -13,6 +13,12 @@ function element_proto:UpdateConfig()
self._config = E:CopyTable(C.db.profile.units[unit].portrait, self._config)
end
+function element_proto:PostUpdate(_, hasStateChanged)
+ if self:IsObjectType("PlayerModel") and hasStateChanged then
+ self:SetCamDistanceScale(1 / self._config.scale)
+ end
+end
+
local frame_proto = {}
function frame_proto:UpdatePortrait()
@@ -25,6 +31,12 @@ function frame_proto:UpdatePortrait()
self.Portrait = self.Portrait2D
self.Portrait3D:ClearAllPoints()
self.Portrait3D:Hide()
+
+ if style == "2D" then
+ self.Portrait:SetTexCoord(0.125, 0.875, 0.125, 0.875)
+ else
+ self.Portrait:SetTexCoord(0, 1, 0, 1)
+ end
end
self.Portrait3D.__owner = self.Portrait2D.__owner
diff --git a/ls_UI/modules/unitframes/elements/power.lua b/ls_UI/modules/unitframes/elements/power.lua
index f0b658ee..459dac7f 100644
--- a/ls_UI/modules/unitframes/elements/power.lua
+++ b/ls_UI/modules/unitframes/elements/power.lua
@@ -17,6 +17,7 @@ local function updateFont(fontString, config)
fontString:UpdateFont(config.size)
fontString:SetJustifyH(config.h_alignment)
fontString:SetJustifyV(config.v_alignment)
+ fontString:SetWordWrap(config.word_wrap)
end
local function updateTextPoint(frame, fontString, config)
@@ -60,14 +61,14 @@ function element_proto:UpdateColors()
end
function element_proto:UpdateTextures()
- self:SetStatusBarTexture(LSM:Fetch("statusbar", C.db.global.textures.statusbar.horiz))
+ self:UpdateStatusBarTexture()
end
function element_proto:UpdateSmoothing()
if C.db.profile.units.change.smooth then
- E:SmoothBar(self)
+ E.StatusBars:Smooth(self)
else
- E:DesmoothBar(self)
+ E.StatusBars:Desmooth(self)
end
end
@@ -129,13 +130,13 @@ do
local element = Mixin(CreateFrame("StatusBar", nil, frame), element_proto, power_proto)
element:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(element, "power")
element:SetFrameLevel(frame:GetFrameLevel() + 1)
element:SetClipsChildren(true)
element:Hide()
local text = (textParent or element):CreateFontString(nil, "ARTWORK")
E.FontStrings:Capture(text, "unit")
- text:SetWordWrap(false)
element.Text = text
return element
@@ -180,6 +181,7 @@ do
local element = Mixin(CreateFrame("StatusBar", nil, frame), element_proto, power_proto)
element:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(element, "power")
element:SetFrameLevel(frame:GetFrameLevel() + 1)
element:Hide()
@@ -236,12 +238,12 @@ do
local element = Mixin(CreateFrame("StatusBar", nil, frame), element_proto, power_proto)
element:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(element, "power")
element:SetClipsChildren(true)
element:Hide()
local text = (textParent or element):CreateFontString(nil, "ARTWORK")
E.FontStrings:Capture(text, "unit")
- text:SetWordWrap(false)
element.Text = text
return element
@@ -270,13 +272,18 @@ do
self.altBar_:SetStatusBarColor(C.db.global.colors.prediction.power_cost:GetRGB())
end
+ function power_proto:UpdateTextures()
+ self.mainBar_:UpdateStatusBarTexture()
+ self.altBar_:UpdateStatusBarTexture()
+ end
+
function power_proto:UpdateSmoothing()
if C.db.profile.units.change.smooth then
- E:SmoothBar(self.mainBar_)
- E:SmoothBar(self.altBar_)
+ E.StatusBars:Smooth(self.mainBar_)
+ E.StatusBars:Smooth(self.altBar_)
else
- E:DesmoothBar(self.mainBar_)
- E:DesmoothBar(self.altBar_)
+ E.StatusBars:Desmooth(self.mainBar_)
+ E.StatusBars:Desmooth(self.altBar_)
end
end
@@ -315,6 +322,7 @@ do
end
element:UpdateColors()
+ element:UpdateTextures()
local isEnabled = config1.enabled or config2.enabled
if isEnabled and not self:IsElementEnabled("PowerPrediction") then
@@ -333,6 +341,7 @@ do
local mainBar = CreateFrame("StatusBar", nil, parent1)
mainBar:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(mainBar, "power")
mainBar:SetReverseFill(true)
mainBar:SetPoint("TOP")
mainBar:SetPoint("BOTTOM")
@@ -341,6 +350,7 @@ do
local altBar = CreateFrame("StatusBar", nil, parent2)
altBar:SetStatusBarTexture("Interface\\BUTTONS\\WHITE8X8")
+ E.StatusBars:Capture(altBar, "power")
altBar:SetReverseFill(true)
altBar:SetPoint("TOP")
altBar:SetPoint("BOTTOM")
diff --git a/ls_UI/modules/unitframes/units/unit.lua b/ls_UI/modules/unitframes/units/unit.lua
index f651f313..f776f5a3 100644
--- a/ls_UI/modules/unitframes/units/unit.lua
+++ b/ls_UI/modules/unitframes/units/unit.lua
@@ -21,6 +21,7 @@ function small_proto:Update()
self:UpdateFading()
self:UpdateLayout()
self:UpdateInlay()
+ self:UpdateGradient()
self:UpdateHealth()
self:UpdateHealthPrediction()
self:UpdatePower()
@@ -55,11 +56,15 @@ function UF:CreateSmallUnitFrame(frame)
local health = self:CreateHealth(frame, frame.TextParent)
health:SetPoint("LEFT", frame.Insets.Left, "RIGHT", 0, 0)
- health:SetPoint("RIGHT", frame.Insets.Right, "LEFT", 0, 0)
- health:SetPoint("TOP", frame.Insets.Top, "BOTTOM", 0, 0)
- health:SetPoint("BOTTOM", frame.Insets.Bottom, "TOP", 0, 0)
+ health:SetPoint("TOPRIGHT", health.TempLoss_:GetStatusBarTexture(), "TOPLEFT", 0, 0)
+ health:SetPoint("BOTTOMRIGHT", health.TempLoss_:GetStatusBarTexture(), "BOTTOMLEFT", 0, 0)
frame.Health = health
+ health.TempLoss_:SetPoint("LEFT", frame.Insets.Left, "RIGHT", 0, 0)
+ health.TempLoss_:SetPoint("RIGHT", frame.Insets.Right, "LEFT", 0, 0)
+ health.TempLoss_:SetPoint("TOP", frame.Insets.Top, "BOTTOM", 0, 0)
+ health.TempLoss_:SetPoint("BOTTOM", frame.Insets.Bottom, "TOP", 0, 0)
+
frame.HealthPrediction = self:CreateHealthPrediction(frame, health)
frame.Power = self:CreatePower(frame, frame.TextParent)
frame.Name = self:CreateName(frame, frame.TextParent)
diff --git a/ls_UI_Options/about.lua b/ls_UI_Options/about.lua
index d8cb847e..d753e8c6 100644
--- a/ls_UI_Options/about.lua
+++ b/ls_UI_Options/about.lua
@@ -23,7 +23,7 @@ function CONFIG:CreateAboutPanel(order)
local options = {
order = order,
type = "group",
- name = "|cff1a9fc0" .. L["INFORMATION"] .. "|r",
+ name = "|cff1a9fc0" .. L["INFO"] .. "|r",
args = {
desc = {
order = reset(1),
@@ -32,12 +32,7 @@ function CONFIG:CreateAboutPanel(order)
width = "full",
fontSize = "medium",
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- width = "full",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
support = {
order = inc(1),
type = "group",
@@ -62,12 +57,7 @@ function CONFIG:CreateAboutPanel(order)
},
},
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- width = "full",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
downloads = {
order = inc(1),
type = "group",
@@ -100,12 +90,7 @@ function CONFIG:CreateAboutPanel(order)
},
},
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- width = "full",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
CHANGELOG = {
order = inc(1),
type = "group",
@@ -119,12 +104,7 @@ function CONFIG:CreateAboutPanel(order)
width = "full",
fontSize = "medium",
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- width = "full",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
cf = {
order = inc(2),
type = "execute",
diff --git a/ls_UI_Options/auras.lua b/ls_UI_Options/auras.lua
index 11020259..9687adc6 100644
--- a/ls_UI_Options/auras.lua
+++ b/ls_UI_Options/auras.lua
@@ -71,8 +71,8 @@ local function isModuleDisabled()
return not AURAS:IsInit()
end
-local function isOCCEnabled()
- return E.OMNICC
+local function isModuleDisabledOrOCCEnabled()
+ return isModuleDisabled() or E.OMNICC
end
local function getAuraOptions(order, name, filter)
@@ -94,8 +94,8 @@ local function getAuraOptions(order, name, filter)
args = {
reset = {
type = "execute",
- order = reset(1),
- name = L["RESTORE_DEFAULTS"],
+ order = reset(2),
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.auras[filter], C.db.profile.auras[filter], {point = true})
@@ -103,43 +103,39 @@ local function getAuraOptions(order, name, filter)
AURAS:For(filter, "Update")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
num_rows = {
- order = inc(1),
+ order = inc(2),
type = "range",
name = L["ROWS"],
min = 1, max = 40, step = 1,
},
num = {
- order = inc(1),
+ order = inc(2),
type = "range",
name = L["NUM_BUTTONS"],
min = 1, max = 4, step = 1,
},
per_row = {
- order = inc(1),
+ order = inc(2),
type = "range",
name = L["PER_ROW"],
min = 1, max = 40, step = 1,
},
spacing = {
- order = inc(1),
+ order = inc(2),
type = "range",
name = L["SPACING"],
min = 4, max = 24, step = 1,
},
width = {
- order = inc(1),
+ order = inc(2),
type = "range",
name = L["WIDTH"],
min = 16, max = 64, step = 1,
},
height = {
- order = inc(1),
+ order = inc(2),
type = "range",
name = L["HEIGHT"],
desc = L["HEIGHT_OVERRIDE_DESC"],
@@ -158,7 +154,7 @@ local function getAuraOptions(order, name, filter)
end,
},
growth_dir = {
- order = inc(1),
+ order = inc(2),
type = "select",
name = L["GROWTH_DIR"],
values = GROWTH_DIRS,
@@ -172,30 +168,26 @@ local function getAuraOptions(order, name, filter)
end,
},
sort_method = {
- order = inc(1),
+ order = inc(2),
type = "select",
name = L["SORT_METHOD"],
values = SORT_METHODS,
},
sort_dir = {
- order = inc(1),
+ order = inc(2),
type = "select",
name = L["SORT_DIR"],
values = SORT_DIRS,
},
sep_own = {
- order = inc(1),
+ order = inc(2),
type = "select",
name = L["SEPARATION"],
values = SEP_TYPES
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
type = {
- order = inc(1),
+ order = inc(2),
type = "group",
name = L["AURA_TYPE"],
inline = true,
@@ -212,31 +204,27 @@ local function getAuraOptions(order, name, filter)
end,
args = {
enabled = {
- order = reset(2),
+ order = reset(3),
type = "toggle",
name = L["SHOW"],
},
size = {
- order = inc(2),
+ order = inc(3),
type = "range",
name = L["SIZE"],
min = 10, max = 32, step = 2,
},
position = {
- order = inc(2),
+ order = inc(3),
type = "select",
name = L["POINT"],
values = POINTS,
},
},
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(2)),
count = {
- order = inc(1),
+ order = inc(2),
type = "group",
name = L["COUNT_TEXT"],
inline = true,
@@ -253,36 +241,32 @@ local function getAuraOptions(order, name, filter)
end,
args = {
size = {
- order = reset(2),
+ order = reset(3),
type = "range",
name = L["SIZE"],
min = 8, max = 48, step = 1,
},
h_alignment = {
- order = inc(2),
+ order = inc(3),
type = "select",
name = L["TEXT_HORIZ_ALIGNMENT"],
values = H_ALIGNMENTS,
},
v_alignment = {
- order = inc(2),
+ order = inc(3),
type = "select",
name = L["TEXT_VERT_ALIGNMENT"],
values = V_ALIGNMENTS,
},
},
},
- spacer_4 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_4 = CONFIG:CreateSpacer(inc(2)),
cooldown = {
- order = inc(1),
+ order = inc(2),
type = "group",
name = L["COOLDOWN_TEXT"],
inline = true,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
get = function(info)
return C.db.profile.auras[filter].cooldown.text[info[#info]]
end,
@@ -296,18 +280,18 @@ local function getAuraOptions(order, name, filter)
end,
args = {
enabled = {
- order = reset(2),
+ order = reset(3),
type = "toggle",
name = L["SHOW"],
},
size = {
- order = inc(2),
+ order = inc(3),
type = "range",
name = L["SIZE"],
min = 8, max = 48, step = 1,
},
v_alignment = {
- order = inc(2),
+ order = inc(3),
type = "select",
name = L["TEXT_VERT_ALIGNMENT"],
values = V_ALIGNMENTS,
@@ -338,7 +322,7 @@ local function getAuraOptions(order, name, filter)
return temp
end
-function CONFIG.CreateAurasOptions(_, order)
+function CONFIG:CreateAurasOptions(order)
CONFIG.options.args.auras = {
order = order,
type = "group",
@@ -346,9 +330,9 @@ function CONFIG.CreateAurasOptions(_, order)
childGroups = "tab",
args = {
enabled = {
- order = 1,
+ order = reset(1),
type = "toggle",
- name = L["ENABLE"],
+ name = CONFIG:ColorPrivateSetting(L["ENABLE"]),
get = function()
return PrC.db.profile.auras.enabled
end,
@@ -356,9 +340,7 @@ function CONFIG.CreateAurasOptions(_, order)
PrC.db.profile.auras.enabled = value
if AURAS:IsInit() then
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
+ CONFIG:AskToReloadUI("auras.enabled", value)
else
if value then
P:Call(AURAS.Init, AURAS)
@@ -368,8 +350,8 @@ function CONFIG.CreateAurasOptions(_, order)
},
reset = {
type = "execute",
- order = 2,
- name = L["RESTORE_DEFAULTS"],
+ order = inc(1),
+ name = L["RESET_TO_DEFAULT"],
disabled = isModuleDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
@@ -378,13 +360,9 @@ function CONFIG.CreateAurasOptions(_, order)
AURAS:ForEach("Update")
end,
},
- spacer_1 = {
- order = 9,
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
cooldown = {
- order = 10,
+ order = inc(1),
type = "group",
name = L["COOLDOWN"],
inline = true,
@@ -403,8 +381,8 @@ function CONFIG.CreateAurasOptions(_, order)
args = {
reset = {
type = "execute",
- order = 1,
- name = L["RESTORE_DEFAULTS"],
+ order = reset(2),
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.auras.cooldown, C.db.profile.auras.cooldown)
@@ -413,26 +391,22 @@ function CONFIG.CreateAurasOptions(_, order)
AURAS:ForEach("UpdateCooldownConfig")
end,
},
- spacer_1 = {
- order = 9,
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
exp_threshold = {
- order = 10,
+ order = inc(2),
type = "range",
name = L["EXP_THRESHOLD"],
min = 1, max = 10, step = 1,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
},
m_ss_threshold = {
- order = 11,
+ order = inc(2),
type = "range",
name = L["M_SS_THRESHOLD"],
desc = L["M_SS_THRESHOLD_DESC"],
min = 0, max = 3599, step = 1,
softMin = 91,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
set = function(info, value)
if C.db.profile.auras.cooldown[info[#info]] ~= value then
if value < info.option.softMin then
@@ -447,20 +421,16 @@ function CONFIG.CreateAurasOptions(_, order)
end,
},
s_ms_threshold = {
- order = 12,
+ order = inc(2),
type = "range",
name = L["S_MS_THRESHOLD"],
desc = L["S_MS_THRESHOLD_DESC"],
min = 1, max = 10, step = 1,
- disabled = isOCCEnabled,
- },
- spacer_2 = {
- order = 19,
- type = "description",
- name = " ",
+ disabled = isModuleDisabledOrOCCEnabled,
},
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
swipe = {
- order = 20,
+ order = inc(2),
type = "group",
name = L["COOLDOWN_SWIPE"],
inline = true,
@@ -477,15 +447,15 @@ function CONFIG.CreateAurasOptions(_, order)
end,
args = {
enabled = {
- order = 1,
+ order = reset(3),
type = "toggle",
name = L["SHOW"],
},
reversed = {
- order = 2,
+ order = inc(3),
type = "toggle",
disabled = function()
- return not C.db.profile.auras.cooldown.swipe.enabled
+ return isModuleDisabledOrOCCEnabled() or not C.db.profile.auras.cooldown.swipe.enabled
end,
name = L["REVERSE"],
},
@@ -493,14 +463,10 @@ function CONFIG.CreateAurasOptions(_, order)
},
},
},
- spacer_2 = {
- order = 19,
- type = "description",
- name = " ",
- },
- buffs = getAuraOptions(20, L["BUFFS"], "HELPFUL"),
- debuffs = getAuraOptions(30, L["DEBUFFS"], "HARMFUL"),
- totems = getAuraOptions(40, L["TOTEMS"], "TOTEM"),
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
+ buffs = getAuraOptions(inc(1), L["BUFFS"], "HELPFUL"),
+ debuffs = getAuraOptions(inc(1), L["DEBUFFS"], "HARMFUL"),
+ totems = getAuraOptions(inc(1), L["TOTEMS"], "TOTEM"),
},
}
end
diff --git a/ls_UI_Options/auratracker.lua b/ls_UI_Options/auratracker.lua
index 02764751..65b51d8b 100644
--- a/ls_UI_Options/auratracker.lua
+++ b/ls_UI_Options/auratracker.lua
@@ -30,10 +30,10 @@ local GROWTH_DIRS = {
}
local DRAG_KEYS = {
- [1] = _G.ALT_KEY,
- [2] = _G.CTRL_KEY,
- [3] = _G.SHIFT_KEY,
- [4] = _G.NONE_KEY,
+ [1] = L["ALT_KEY"],
+ [2] = L["CTRL_KEY"],
+ [3] = L["SHIFT_KEY"],
+ [4] = L["NONE_KEY"],
}
local DRAG_KEY_VALUES = {
@@ -60,8 +60,8 @@ local function isModuleDisabled()
return not AURATRACKER:IsInit()
end
-local function isOCCEnabled()
- return E.OMNICC
+local function isModuleDisabledOrOCCEnabled()
+ return isModuleDisabled() or E.OMNICC
end
local function callback()
@@ -85,6 +85,7 @@ function CONFIG:CreateAuraTrackerOptions(order)
set = function(info, value)
if PrC.db.profile.auratracker[info[#info]] ~= value then
PrC.db.profile.auratracker[info[#info]] = value
+
AURATRACKER:GetTracker():UpdateConfig()
AURATRACKER:GetTracker():UpdateLayout()
end
@@ -93,7 +94,7 @@ function CONFIG:CreateAuraTrackerOptions(order)
enabled = {
order = reset(1),
type = "toggle",
- name = L["ENABLE"],
+ name = CONFIG:ColorPrivateSetting(L["ENABLE"]),
get = function()
return PrC.db.profile.auratracker.enabled
end,
@@ -101,9 +102,7 @@ function CONFIG:CreateAuraTrackerOptions(order)
PrC.db.profile.auratracker.enabled = value
if AURATRACKER:IsInit() then
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
+ CONFIG:AskToReloadUI("auratracker.enabled", value)
else
if value then
P:Call(AURATRACKER.Init, AURATRACKER)
@@ -140,7 +139,7 @@ function CONFIG:CreateAuraTrackerOptions(order)
reset = {
type = "execute",
order = inc(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
disabled = isModuleDisabled,
func = function()
@@ -149,11 +148,7 @@ function CONFIG:CreateAuraTrackerOptions(order)
AURATRACKER:Update()
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
num = {
order = inc(1),
type = "range",
@@ -188,19 +183,19 @@ function CONFIG:CreateAuraTrackerOptions(order)
name = L["HEIGHT"],
desc = L["HEIGHT_OVERRIDE_DESC"],
min = 0, max = 64, step = 1,
- softMin = 16,
+ softMin = 8,
disabled = isModuleDisabled,
set = function(info, value)
if PrC.db.profile.auratracker.height ~= value then
if value < info.option.softMin then
value = info.option.min
end
- end
- PrC.db.profile.auratracker.height = value
+ PrC.db.profile.auratracker.height = value
- AURATRACKER:GetTracker():UpdateConfig()
- AURATRACKER:GetTracker():UpdateLayout()
+ AURATRACKER:GetTracker():UpdateConfig()
+ AURATRACKER:GetTracker():UpdateLayout()
+ end
end,
},
growth_dir = {
@@ -232,11 +227,7 @@ function CONFIG:CreateAuraTrackerOptions(order)
PrC.db.profile.auratracker.drag_key = DRAG_KEY_VALUES[value]
end,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
type = {
order = inc(1),
type = "group",
@@ -274,11 +265,7 @@ function CONFIG:CreateAuraTrackerOptions(order)
},
},
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
count = {
order = inc(1),
type = "group",
@@ -317,11 +304,7 @@ function CONFIG:CreateAuraTrackerOptions(order)
},
},
},
- spacer_4 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_4 = CONFIG:CreateSpacer(inc(1)),
cooldown = {
order = inc(1),
type = "group",
@@ -343,7 +326,7 @@ function CONFIG:CreateAuraTrackerOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(PrD.profile.auratracker.cooldown, PrC.db.profile.auratracker.cooldown)
@@ -352,17 +335,13 @@ function CONFIG:CreateAuraTrackerOptions(order)
AURATRACKER:GetTracker():UpdateCooldownConfig()
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
exp_threshold = {
order = inc(2),
type = "range",
name = L["EXP_THRESHOLD"],
min = 1, max = 10, step = 1,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
},
m_ss_threshold = {
order = inc(2),
@@ -371,7 +350,7 @@ function CONFIG:CreateAuraTrackerOptions(order)
desc = L["M_SS_THRESHOLD_DESC"],
min = 0, max = 3599, step = 1,
softMin = 91,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
set = function(info, value)
if PrC.db.profile.auratracker.cooldown.m_ss_threshold ~= value then
if value < info.option.softMin then
@@ -391,13 +370,9 @@ function CONFIG:CreateAuraTrackerOptions(order)
name = L["S_MS_THRESHOLD"],
desc = L["S_MS_THRESHOLD_DESC"],
min = 1, max = 10, step = 1,
- disabled = isOCCEnabled,
- },
- spacer_2 = {
- order = inc(2),
- type = "description",
- name = " ",
+ disabled = isModuleDisabledOrOCCEnabled,
},
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
swipe = {
order = inc(2),
type = "group",
@@ -424,23 +399,19 @@ function CONFIG:CreateAuraTrackerOptions(order)
order = inc(3),
type = "toggle",
disabled = function()
- return not AURATRACKER:IsInit() or (AURATRACKER:IsInit() and not PrC.db.profile.auratracker.cooldown.swipe.enabled)
+ return isModuleDisabledOrOCCEnabled() or not PrC.db.profile.auratracker.cooldown.swipe.enabled
end,
name = L["REVERSE"],
},
},
},
- spacer_3 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(2)),
text = {
order = inc(2),
type = "group",
name = L["TEXT"],
inline = true,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
get = function(info)
return PrC.db.profile.auratracker.cooldown.text[info[#info]]
end,
diff --git a/ls_UI_Options/bars/bag.lua b/ls_UI_Options/bars/bag.lua
index 31f64c98..fa32ffad 100644
--- a/ls_UI_Options/bars/bag.lua
+++ b/ls_UI_Options/bars/bag.lua
@@ -2,6 +2,7 @@
local _G = getfenv(0)
local t_wipe = _G.table.wipe
local tonumber = _G.tonumber
+local tostring = _G.tostring
local unpack = _G.unpack
-- Mine
@@ -24,17 +25,13 @@ local currencyOptionTables = {
reset = {
type = "execute",
order = 1,
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
t_wipe(C.db.profile.bars.bag.currency)
end,
},
- spacer_1 = {
- order = 2,
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(2),
error = {
order = 1,
type = "description",
@@ -42,19 +39,45 @@ local currencyOptionTables = {
},
}
-local function updateCurrencyOptions()
- local options = CONFIG.options.args.bars.args.bag.args.currency.args
+local expandAndCache, updateCurrencyOptions
+local cachedList = {}
+
+function expandAndCache()
+ local shouldExpandAgain = false
+
local listSize = C_CurrencyInfo.GetCurrencyListSize()
- local info, id, link
+ if listSize > 0 and listSize ~= cachedList then
+ for i = listSize, 1, -1 do
+ local info = C_CurrencyInfo.GetCurrencyListInfo(i)
+ if info.isHeader and not info.isHeaderExpanded then
+ C_CurrencyInfo.ExpandCurrencyList(i, true)
+
+ shouldExpandAgain = true
+ else
+ cachedList[i] = info
+ end
+ end
+ end
+
+ if shouldExpandAgain then
+ expandAndCache()
+ end
+end
+
+function updateCurrencyOptions()
+ expandAndCache()
+
+ local options = CONFIG.options.args.bars.args.bag.args.currency.args
+ local info, id
t_wipe(options)
- if listSize > 0 then
+ if #cachedList > 0 then
options.reset = currencyOptionTables.reset
options.spacer_1 = currencyOptionTables.spacer_1
- for i = 1, listSize do
- info = C_CurrencyInfo.GetCurrencyListInfo(i)
+ for i = 1, #cachedList do
+ info = cachedList[i]
if info.isHeader then
id = info.name:gsub("%s", ""):lower()
if not currencyOptionTables[id] then
@@ -65,17 +88,14 @@ local function updateCurrencyOptions()
}
end
else
- link = C_CurrencyInfo.GetCurrencyListLink(i)
- if link then
- id = link:match("currency:(%d+)")
- if id then
- if not currencyOptionTables[id] then
- currencyOptionTables[id] = {
- type = "toggle",
- name = info.name,
- image = info.iconFileID,
- }
- end
+ id = tostring(info.currencyID)
+ if id then
+ if not currencyOptionTables[id] then
+ currencyOptionTables[id] = {
+ type = "toggle",
+ name = info.name,
+ image = info.iconFileID,
+ }
end
end
end
@@ -111,18 +131,15 @@ function CONFIG:CreateBagOptions(order)
reset = {
type = "execute",
order = reset(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.bars.bag, C.db.profile.bars.bag, {currency = true, point = true})
+
BARS:UpdateBag()
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
tooltip = {
order = inc(1),
type = "toggle",
@@ -135,11 +152,7 @@ function CONFIG:CreateBagOptions(order)
C.db.profile.bars.bag.tooltip = value
end,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
currency = {
order = inc(1),
type = "group",
@@ -153,11 +166,7 @@ function CONFIG:CreateBagOptions(order)
end,
args = {},
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
fading = {
order = inc(1),
type = "group",
@@ -184,18 +193,15 @@ function CONFIG:CreateBagOptions(order)
reset = {
order = inc(2),
type = "execute",
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.bars.bag.fade, C.db.profile.bars.bag.fade, {enabled = true})
+
BARS:UpdateBag()
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
combat = {
order = inc(2),
type = "toggle",
diff --git a/ls_UI_Options/bars/bar.lua b/ls_UI_Options/bars/bar.lua
index 8a02096d..5670d17e 100644
--- a/ls_UI_Options/bars/bar.lua
+++ b/ls_UI_Options/bars/bar.lua
@@ -72,18 +72,15 @@ function CONFIG:CreateBarOptions(order, barID, name)
reset = {
type = "execute",
order = reset(1, 2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.bars[barID], C.db.profile.bars[barID], {visible = true, point = true})
+
BARS:For(barID, "Update")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
visible = {
order = inc(1),
type = "toggle",
@@ -94,7 +91,7 @@ function CONFIG:CreateBarOptions(order, barID, name)
BARS:For(barID, "UpdateConfig")
BARS:For(barID, "UpdateFading")
BARS:For(barID, "UpdateVisibility")
- end
+ end,
},
grid = {
order = inc(1),
@@ -126,17 +123,23 @@ function CONFIG:CreateBarOptions(order, barID, name)
name = L["PER_ROW"],
min = 1, max = 12, step = 1,
},
- spacing = {
+ x_spacing = {
order = inc(1),
type = "range",
- name = L["SPACING"],
+ name = L["X_SPACING"],
+ min = 4, max = 24, step = 1,
+ },
+ y_spacing = {
+ order = inc(1),
+ type = "range",
+ name = L["Y_SPACING"],
min = 4, max = 24, step = 1,
},
width = {
order = inc(1),
type = "range",
name = L["WIDTH"],
- min = 16, max = 64, step = 1,
+ min = 8, max = 64, step = 1,
},
height = {
order = inc(1),
@@ -144,17 +147,17 @@ function CONFIG:CreateBarOptions(order, barID, name)
name = L["HEIGHT"],
desc = L["HEIGHT_OVERRIDE_DESC"],
min = 0, max = 64, step = 1,
- softMin = 16,
+ softMin = 8,
set = function(info, value)
if C.db.profile.bars[barID].height ~= value then
if value < info.option.softMin then
value = info.option.min
end
- end
- C.db.profile.bars[barID].height = value
+ C.db.profile.bars[barID].height = value
- BARS:For(barID, "Update")
+ BARS:For(barID, "Update")
+ end
end,
},
growth_dir = {
@@ -183,11 +186,7 @@ function CONFIG:CreateBarOptions(order, barID, name)
BARS:For(barID, "UpdateButtonConfig")
end,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
hotkey = {
order = inc(1),
type = "group",
@@ -225,11 +224,7 @@ function CONFIG:CreateBarOptions(order, barID, name)
},
},
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
macro = {
order = inc(1),
type = "group",
@@ -266,11 +261,7 @@ function CONFIG:CreateBarOptions(order, barID, name)
},
},
},
- spacer_4 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_4 = CONFIG:CreateSpacer(inc(1)),
count = {
order = inc(1),
type = "group",
@@ -296,11 +287,7 @@ function CONFIG:CreateBarOptions(order, barID, name)
},
},
},
- spacer_5 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_5 = CONFIG:CreateSpacer(inc(1)),
cooldown = {
order = inc(1),
type = "group",
@@ -337,11 +324,7 @@ function CONFIG:CreateBarOptions(order, barID, name)
},
},
},
- spacer_6 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_6 = CONFIG:CreateSpacer(inc(1)),
fading = CONFIG:CreateBarFadingOptions(inc(1), barID),
},
}
@@ -351,9 +334,11 @@ function CONFIG:CreateBarOptions(order, barID, name)
temp.args.visible.disabled = isModuleDisabledOrRestricted
if BARS:IsRestricted() then
temp.args.num.min = 6
+ temp.args.num.max = 24
end
temp.args.per_row.disabled = isModuleDisabledOrRestricted
- temp.args.spacing.disabled = isModuleDisabledOrRestricted
+ temp.args.x_spacing.disabled = isModuleDisabledOrRestricted
+ temp.args.y_spacing.disabled = isModuleDisabledOrRestricted
temp.args.width.disabled = isModuleDisabledOrRestricted
temp.args.height.disabled = isModuleDisabledOrRestricted
temp.args.growth_dir.disabled = isModuleDisabledOrRestricted
@@ -386,7 +371,7 @@ function CONFIG:CreateBarOptions(order, barID, name)
temp.args.enabled = {
order = 1,
type = "toggle",
- name = L["ENABLE"],
+ name = CONFIG:ColorPrivateSetting(L["ENABLE"]),
disabled = function() return BARS:IsRestricted() end,
get = function()
return PrC.db.profile.bars[barID].enabled
@@ -394,19 +379,11 @@ function CONFIG:CreateBarOptions(order, barID, name)
set = function(_, value)
PrC.db.profile.bars[barID].enabled = value
- if BARS:IsInit() then
- if BARS:HasPetBattleBar() then
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
- else
- if BARS:IsRestricted() then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- else
- if value then
- BARS:CreatePetBattleBar()
- end
- end
+ if BARS:HasPetBattleBar() then
+ CONFIG:AskToReloadUI("pet_battle.enabled", value)
+ else
+ if value then
+ P:Call(BARS.CreatePetBattleBar, BARS)
end
end
end,
@@ -419,12 +396,13 @@ function CONFIG:CreateBarOptions(order, barID, name)
temp.args.num.disabled = isPetBattleBarDisabledOrRestricted
temp.args.per_row.max = 6
temp.args.per_row.disabled = isPetBattleBarDisabledOrRestricted
- temp.args.spacing.disabled = isPetBattleBarDisabledOrRestricted
+ temp.args.x_spacing.disabled = isPetBattleBarDisabledOrRestricted
+ temp.args.y_spacing.disabled = isPetBattleBarDisabledOrRestricted
temp.args.width.disabled = isPetBattleBarDisabledOrRestricted
temp.args.height.disabled = isPetBattleBarDisabledOrRestricted
temp.args.growth_dir.disabled = isPetBattleBarDisabledOrRestricted
temp.args.flyout_dir = nil
- temp.args.hotkey.disabled = function() return not BARS:HasPetBattleBar() end
+ temp.args.hotkey.disabled = isPetBattleBarDisabledOrRestricted
temp.args.macro = nil
temp.args.spacer_4 = nil
temp.args.count = nil
diff --git a/ls_UI_Options/bars/core.lua b/ls_UI_Options/bars/core.lua
index 430b8452..5f81e1a3 100644
--- a/ls_UI_Options/bars/core.lua
+++ b/ls_UI_Options/bars/core.lua
@@ -112,8 +112,8 @@ local function isModuleDisabledOrRestricted()
return BARS:IsRestricted() or not BARS:IsInit()
end
-local function isOCCEnabled()
- return E.OMNICC
+local function isModuleDisabledOrOCCEnabled()
+ return isModuleDisabled() or E.OMNICC
end
function CONFIG:CreateActionBarsOptions(order)
@@ -137,7 +137,7 @@ function CONFIG:CreateActionBarsOptions(order)
enabled = {
order = reset(1),
type = "toggle",
- name = L["ENABLE"],
+ name = CONFIG:ColorPrivateSetting(L["ENABLE"]),
get = function()
return PrC.db.profile.bars.enabled
end,
@@ -145,9 +145,7 @@ function CONFIG:CreateActionBarsOptions(order)
PrC.db.profile.bars.enabled = value
if BARS:IsInit() then
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
+ CONFIG:AskToReloadUI("bars.enabled", value)
else
if value then
P:Call(BARS.Init, BARS)
@@ -158,7 +156,7 @@ function CONFIG:CreateActionBarsOptions(order)
restricted = {
order = inc(1),
type = "toggle",
- name = L["SHOW_ARTWORK"],
+ name = CONFIG:ColorPrivateSetting(L["SHOW_ARTWORK"]),
desc = L["RESTRICTED_MODE_DESC"],
get = function()
return PrC.db.profile.bars.restricted
@@ -167,7 +165,7 @@ function CONFIG:CreateActionBarsOptions(order)
PrC.db.profile.bars.restricted = value
if BARS:IsInit() then
- CONFIG:ShowStaticPopup("RELOAD_UI")
+ CONFIG:AskToReloadUI("bars.restricted")
end
end,
},
@@ -218,11 +216,7 @@ function CONFIG:CreateActionBarsOptions(order)
end
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
mouseover = {
order = inc(1),
type = "toggle",
@@ -317,11 +311,7 @@ function CONFIG:CreateActionBarsOptions(order)
end,
values = CAST_KEYS,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
range_indicator = {
order = inc(1),
type = "select",
@@ -336,11 +326,7 @@ function CONFIG:CreateActionBarsOptions(order)
values = INDICATORS,
disabled = isModuleDisabled,
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
desaturation = {
order = inc(1),
type = "group",
@@ -366,11 +352,7 @@ function CONFIG:CreateActionBarsOptions(order)
},
},
},
- spacer_4 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_4 = CONFIG:CreateSpacer(inc(1)),
cooldown = {
order = inc(1),
type = "group",
@@ -383,6 +365,7 @@ function CONFIG:CreateActionBarsOptions(order)
set = function(info, value)
if C.db.profile.bars.cooldown[info[#info]] ~= value then
C.db.profile.bars.cooldown[info[#info]] = value
+
BARS:ForEach("UpdateConfig")
BARS:ForEach("UpdateCooldownConfig")
end
@@ -391,25 +374,22 @@ function CONFIG:CreateActionBarsOptions(order)
reset = {
type = "execute",
order = reset(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.bars.cooldown, C.db.profile.bars.cooldown)
+
BARS:ForEach("UpdateConfig")
BARS:ForEach("UpdateCooldownConfig")
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
exp_threshold = {
order = inc(2),
type = "range",
name = L["EXP_THRESHOLD"],
min = 1, max = 10, step = 1,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
},
m_ss_threshold = {
order = inc(2),
@@ -418,7 +398,7 @@ function CONFIG:CreateActionBarsOptions(order)
desc = L["M_SS_THRESHOLD_DESC"],
min = 0, max = 3599, step = 1,
softMin = 91,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
set = function(info, value)
if C.db.profile.bars.cooldown[info[#info]] ~= value then
if value < info.option.softMin then
@@ -426,6 +406,7 @@ function CONFIG:CreateActionBarsOptions(order)
end
C.db.profile.bars.cooldown[info[#info]] = value
+
BARS:ForEach("UpdateConfig")
BARS:ForEach("UpdateCooldownConfig")
end
@@ -437,20 +418,17 @@ function CONFIG:CreateActionBarsOptions(order)
name = L["S_MS_THRESHOLD"],
desc = L["S_MS_THRESHOLD_DESC"],
min = 1, max = 10, step = 1,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
set = function(info, value)
if C.db.profile.bars.cooldown[info[#info]] ~= value then
C.db.profile.bars.cooldown[info[#info]] = value
+
BARS:ForEach("UpdateConfig")
BARS:ForEach("UpdateCooldownConfig")
end
end,
},
- spacer_2 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
swipe = {
order = inc(2),
type = "group",
@@ -462,6 +440,7 @@ function CONFIG:CreateActionBarsOptions(order)
set = function(info, value)
if C.db.profile.bars.cooldown.swipe[info[#info]] ~= value then
C.db.profile.bars.cooldown.swipe[info[#info]] = value
+
BARS:ForEach("UpdateConfig")
BARS:ForEach("UpdateCooldownConfig")
end
@@ -476,7 +455,7 @@ function CONFIG:CreateActionBarsOptions(order)
order = inc(3),
type = "toggle",
disabled = function()
- return isModuleDisabled() or not C.db.profile.bars.cooldown.swipe.enabled
+ return isModuleDisabledOrOCCEnabled() or not C.db.profile.bars.cooldown.swipe.enabled
end,
name = L["REVERSE"],
},
@@ -484,14 +463,14 @@ function CONFIG:CreateActionBarsOptions(order)
},
},
},
- bar_1 = CONFIG:CreateBarOptions(inc(1), "bar1", L["BAR_1"]),
- bar_2 = CONFIG:CreateBarOptions(inc(1), "bar2", L["BAR_2"]),
- bar_3 = CONFIG:CreateBarOptions(inc(1), "bar3", L["BAR_3"]),
- bar_4 = CONFIG:CreateBarOptions(inc(1), "bar4", L["BAR_4"]),
- bar_5 = CONFIG:CreateBarOptions(inc(1), "bar5", L["BAR_5"]),
- bar_6 = CONFIG:CreateBarOptions(inc(1), "bar6", L["BAR_6"]),
- bar_7 = CONFIG:CreateBarOptions(inc(1), "bar7", L["BAR_7"]),
- bar_8 = CONFIG:CreateBarOptions(inc(1), "bar8", L["BAR_8"]),
+ bar1 = CONFIG:CreateBarOptions(inc(1), "bar1", L["BAR_1"]),
+ bar2 = CONFIG:CreateBarOptions(inc(1), "bar2", L["BAR_2"]),
+ bar3 = CONFIG:CreateBarOptions(inc(1), "bar3", L["BAR_3"]),
+ bar4 = CONFIG:CreateBarOptions(inc(1), "bar4", L["BAR_4"]),
+ bar5 = CONFIG:CreateBarOptions(inc(1), "bar5", L["BAR_5"]),
+ bar6 = CONFIG:CreateBarOptions(inc(1), "bar6", L["BAR_6"]),
+ bar7 = CONFIG:CreateBarOptions(inc(1), "bar7", L["BAR_7"]),
+ bar8 = CONFIG:CreateBarOptions(inc(1), "bar8", L["BAR_8"]),
pet = CONFIG:CreateBarOptions(inc(1), "pet", L["PET_BAR"]),
stance = CONFIG:CreateBarOptions(inc(1), "stance", L["STANCE_BAR"]),
pet_battle = CONFIG:CreateBarOptions(inc(1), "pet_battle", L["PET_BATTLE_BAR"]),
@@ -517,18 +496,15 @@ function CONFIG:CreateActionBarsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.bars.vehicle, C.db.profile.bars.vehicle, {visible = true, point = true})
+
BARS:For("vehicle", "Update")
end,
},
- spacer_1 = {
- order =inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
visible = {
order = inc(2),
type = "toggle",
@@ -539,7 +515,7 @@ function CONFIG:CreateActionBarsOptions(order)
BARS:For("vehicle", "UpdateConfig")
BARS:For("vehicle", "UpdateFading")
BARS:For("vehicle", "UpdateVisibility")
- end
+ end,
},
width = {
order = inc(2),
@@ -566,11 +542,7 @@ function CONFIG:CreateActionBarsOptions(order)
BARS:For("vehicle", "Update")
end,
},
- spacer_2 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
fading = CONFIG:CreateBarFadingOptions(inc(2), "vehicle"),
},
},
@@ -589,7 +561,7 @@ function CONFIG:CreateActionBarsOptions(order)
enabled = {
order = reset(2),
type = "toggle",
- name = L["ENABLE"],
+ name = CONFIG:ColorPrivateSetting(L["ENABLE"]),
disabled = isModuleDisabledOrRestricted,
get = function()
return PrC.db.profile.bars.xpbar.enabled
@@ -597,15 +569,11 @@ function CONFIG:CreateActionBarsOptions(order)
set = function(_, value)
PrC.db.profile.bars.xpbar.enabled = value
- if BARS:IsInit() then
- if BARS:HasXPBar() then
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
- else
- if value then
- BARS:CreateXPBar()
- end
+ if BARS:HasXPBar() then
+ CONFIG:AskToReloadUI("xpbar.enabled", value)
+ else
+ if value then
+ P:Call(BARS.CreateXPBar, BARS)
end
end
end,
@@ -613,19 +581,16 @@ function CONFIG:CreateActionBarsOptions(order)
reset = {
type = "execute",
order = inc(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
disabled = isXPBarDisabledOrRestricted,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.bars.xpbar, C.db.profile.bars.xpbar, {point = true})
+
BARS:For("xpbar", "Update")
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
width = {
order = inc(2),
type = "range",
@@ -645,7 +610,7 @@ function CONFIG:CreateActionBarsOptions(order)
order = inc(2),
type = "range",
name = L["HEIGHT"],
- min = 8, max = 32, step = 4,
+ min = 8, max = 32, step = 1, bigStep = 2,
disabled = isXPBarDisabledOrRestricted,
set = function(info, value)
if C.db.profile.bars.xpbar[info[#info]] ~= value then
@@ -656,11 +621,7 @@ function CONFIG:CreateActionBarsOptions(order)
end
end,
},
- spacer_2 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
text = {
order = inc(2),
type = "group",
@@ -716,11 +677,7 @@ function CONFIG:CreateActionBarsOptions(order)
},
},
},
- spacer_3 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(2)),
fading = CONFIG:CreateBarFadingOptions(inc(2), "xpbar"),
},
},
diff --git a/ls_UI_Options/bars/extra.lua b/ls_UI_Options/bars/extra.lua
index d607b513..49df1b33 100644
--- a/ls_UI_Options/bars/extra.lua
+++ b/ls_UI_Options/bars/extra.lua
@@ -49,18 +49,15 @@ function CONFIG:CreateExtraBarOptions(order, barID, name)
reset = {
type = "execute",
order = reset(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.bars[barID], C.db.profile.bars[barID], {visible = true, point = true})
+
BARS:For(barID, "Update")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
visible = {
order = inc(1),
type = "toggle",
@@ -71,7 +68,7 @@ function CONFIG:CreateExtraBarOptions(order, barID, name)
BARS:For(barID, "UpdateConfig")
BARS:For(barID, "UpdateFading")
BARS:For(barID, "UpdateVisibility")
- end
+ end,
},
artwork = {
order = inc(1),
@@ -91,11 +88,7 @@ function CONFIG:CreateExtraBarOptions(order, barID, name)
isPercent = true,
min = 0.5, max = 1.5, step = 0.01, bigStep = 0.05,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
hotkey = {
order = inc(1),
type = "group",
@@ -133,11 +126,7 @@ function CONFIG:CreateExtraBarOptions(order, barID, name)
},
},
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
cooldown = {
order = inc(1),
type = "group",
@@ -174,11 +163,7 @@ function CONFIG:CreateExtraBarOptions(order, barID, name)
},
},
},
- spacer_4 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_4 = CONFIG:CreateSpacer(inc(1)),
fading = CONFIG:CreateBarFadingOptions(inc(1), barID),
},
}
diff --git a/ls_UI_Options/bars/fading.lua b/ls_UI_Options/bars/fading.lua
index 674224f2..dabddc2c 100644
--- a/ls_UI_Options/bars/fading.lua
+++ b/ls_UI_Options/bars/fading.lua
@@ -30,15 +30,16 @@ local function isXPBarDisabledOrRestricted()
return BARS:IsRestricted() or not BARS:HasXPBar()
end
+local function isFadingDisabled(info)
+ return not (BARS:IsInit() and C.db.profile.bars[info[#info - 2]].fade.enabled)
+end
+
function CONFIG:CreateBarFadingOptions(order, barID)
local temp = {
order = order,
type = "group",
name = L["FADING"],
inline = true,
- disabled = function()
- return not C.db.profile.bars[barID].fade.enabled
- end,
get = function(info)
return C.db.profile.bars[barID].fade[info[#info]]
end,
@@ -53,12 +54,12 @@ function CONFIG:CreateBarFadingOptions(order, barID)
order = reset(1),
type = "toggle",
name = L["ENABLE"],
- disabled = false,
},
reset = {
order = inc(1),
type = "execute",
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
+ disabled = isFadingDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.bars[barID].fade, C.db.profile.bars[barID].fade, {enabled = true})
@@ -67,69 +68,70 @@ function CONFIG:CreateBarFadingOptions(order, barID)
BARS:For(barID, "UpdateFading")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
combat = {
order = inc(1),
type = "toggle",
name = L["COMBAT"],
+ disabled = isFadingDisabled,
},
target = {
order = inc(1),
type = "toggle",
name = L["TARGET"],
+ disabled = isFadingDisabled,
},
health = {
order = inc(1),
type = "toggle",
name = L["HEALTH"],
desc = L["HEALTH_FADING_DESC"],
+ disabled = isFadingDisabled,
},
in_duration = {
order = inc(1),
type = "range",
name = L["FADE_IN_DURATION"],
min = 0.05, max = 1, step = 0.05,
+ disabled = isFadingDisabled,
},
out_delay = {
order = inc(1),
type = "range",
name = L["FADE_OUT_DELAY"],
min = 0, max = 2, step = 0.05,
+ disabled = isFadingDisabled,
},
out_duration = {
order = inc(1),
type = "range",
name = L["FADE_OUT_DURATION"],
min = 0.05, max = 1, step = 0.05,
+ disabled = isFadingDisabled,
},
min_alpha = {
order = inc(1),
type = "range",
name = L["MIN_ALPHA"],
min = 0, max = 1, step = 0.05,
+ disabled = isFadingDisabled,
},
max_alpha = {
order = inc(1),
type = "range",
name = L["MAX_ALPHA"],
- min = 0, max = 1, step = 0.05
+ min = 0, max = 1, step = 0.05,
+ disabled = isFadingDisabled,
},
},
}
if barID == "bar1" then
temp.disabled = isModuleDisabledOrRestricted
- temp.args.enabled.disabled = nil
elseif barID == "pet_battle" then
temp.disabled = isPetBattleBarDisabledOrRestricted
- temp.args.enabled.disabled = nil
elseif barID == "xpbar" then
temp.disabled = isXPBarDisabledOrRestricted
- temp.args.enabled.disabled = nil
end
return temp
diff --git a/ls_UI_Options/bars/micromenu.lua b/ls_UI_Options/bars/micromenu.lua
index 6dbf30eb..dc0e442f 100644
--- a/ls_UI_Options/bars/micromenu.lua
+++ b/ls_UI_Options/bars/micromenu.lua
@@ -109,22 +109,19 @@ function CONFIG:CreateMicroMenuOptions(order)
reset = {
type = "execute",
order = reset(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.bars.micromenu, C.db.profile.bars.micromenu, {point = true})
+
BARS:UpdateMicroMenu()
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
restricted = {
order = inc(1),
type = "toggle",
- name = L["USE_BLIZZARD_MICRO_MENU"],
+ name = CONFIG:ColorPrivateSetting(L["USE_BLIZZARD_MICRO_MENU"]),
get = function()
return PrC.db.profile.bars.micromenu.blizz_enabled
end,
@@ -132,15 +129,11 @@ function CONFIG:CreateMicroMenuOptions(order)
PrC.db.profile.bars.micromenu.blizz_enabled = value
if BARS:IsInit() then
- CONFIG:ShowStaticPopup("RELOAD_UI")
+ CONFIG:AskToReloadUI("micromenu.blizz_enabled")
end
end,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
per_row = {
order = inc(1),
type = "range",
@@ -186,15 +179,11 @@ function CONFIG:CreateMicroMenuOptions(order)
end
end,
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
fading = CONFIG:CreateBarFadingOptions(inc(1), "micromenu"),
character = getMicroButtonOptions(inc(1), "character", CHARACTER_BUTTON),
- spellbook = getMicroButtonOptions(inc(1), "spellbook", SPELLBOOK_ABILITIES_BUTTON),
- talent = getMicroButtonOptions(inc(1), "talent", TALENTS_BUTTON),
+ spellbook = getMicroButtonOptions(inc(1), "spellbook", PROFESSIONS_BUTTON),
+ talent = getMicroButtonOptions(inc(1), "talent", PLAYERSPELLS_BUTTON),
achievement = getMicroButtonOptions(inc(1), "achievement", ACHIEVEMENT_BUTTON),
quest = getMicroButtonOptions(inc(1), "quest", QUESTLOG_BUTTON),
guild = getMicroButtonOptions(inc(1), "guild", GUILD_AND_COMMUNITIES),
diff --git a/ls_UI_Options/blizzard.lua b/ls_UI_Options/blizzard.lua
index 652e6ae8..34fc57f6 100644
--- a/ls_UI_Options/blizzard.lua
+++ b/ls_UI_Options/blizzard.lua
@@ -35,83 +35,87 @@ function CONFIG:CreateBlizzardOptions(order)
enabled = {
order = reset(1),
type = "toggle",
- name = L["ENABLE"],
+ name = CONFIG:ColorPrivateSetting(L["ENABLE"]),
get = function()
return PrC.db.profile.blizzard.enabled
end,
set = function(_, value)
PrC.db.profile.blizzard.enabled = value
- if not BLIZZARD:IsInit() then
+ if BLIZZARD:IsInit() then
+ CONFIG:AskToReloadUI("blizzard.enabled", value)
+ else
if value then
P:Call(BLIZZARD.Init, BLIZZARD)
end
- else
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
end
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- width = "full",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
command_bar = {
order = inc(1),
type = "toggle",
- name = L["COMMAND_BAR"],
+ name = CONFIG:ColorPrivateSetting(L["COMMAND_BAR"]),
disabled = isModuleDisabled,
set = function(_, value)
PrC.db.profile.blizzard.command_bar.enabled = value
- if not BLIZZARD:HasCommandBar() then
+ if BLIZZARD:HasCommandBar() then
+ CONFIG:AskToReloadUI("command_bar.enabled", value)
+ else
if value then
BLIZZARD:SetUpCommandBar()
end
- else
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
end
end,
},
gm = {
order = inc(1),
type = "toggle",
- name = L["GM_FRAME"],
+ name = CONFIG:ColorPrivateSetting(L["GM_FRAME"]),
disabled = isModuleDisabled,
set = function(_, value)
PrC.db.profile.blizzard.gm.enabled = value
- if not BLIZZARD:HasGMFrame() then
+ if BLIZZARD:HasGMFrame() then
+ CONFIG:AskToReloadUI("gm.enabled", value)
+ else
if value then
BLIZZARD:SetUpGMFrame()
end
- else
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
end
end,
},
mail = {
order = inc(1),
type = "toggle",
- name = L["MAIL"],
+ name = CONFIG:ColorPrivateSetting(L["MAIL"]),
disabled = isModuleDisabled,
set = function(_, value)
PrC.db.profile.blizzard.mail.enabled = value
- if not BLIZZARD:HasMail() then
+ if BLIZZARD:HasMail() then
+ CONFIG:AskToReloadUI("mail.enabled", value)
+ else
if value then
BLIZZARD:SetUpMail()
end
+ end
+ end,
+ },
+ suggest_frame = {
+ order = inc(1),
+ type = "toggle",
+ name = CONFIG:ColorPrivateSetting(L["ADVENTURE_GUIDE"]),
+ disabled = isModuleDisabled,
+ set = function(_, value)
+ PrC.db.profile.blizzard.suggest_frame.enabled = value
+
+ if BLIZZARD:HasMail() then
+ CONFIG:AskToReloadUI("suggest_frame.enabled", value)
else
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
+ if value then
+ BLIZZARD:SetUpSuggestFrame()
end
end
end,
@@ -135,28 +139,26 @@ function CONFIG:CreateBlizzardOptions(order)
enabled = {
order = reset(2),
type = "toggle",
- name = L["ENABLE"],
+ name = CONFIG:ColorPrivateSetting(L["ENABLE"]),
get = function()
return PrC.db.profile.blizzard.character_frame.enabled
end,
set = function(_, value)
PrC.db.profile.blizzard.character_frame.enabled = value
- if not BLIZZARD:HasCharacterFrame() then
+ if BLIZZARD:HasCharacterFrame() then
+ CONFIG:AskToReloadUI("character_frame.enabled", value)
+ else
if value then
BLIZZARD:SetUpCharacterFrame()
end
- else
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
end
end,
},
reset = {
type = "execute",
order = inc(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.blizzard.character_frame, C.db.profile.blizzard.character_frame)
@@ -164,11 +166,7 @@ function CONFIG:CreateBlizzardOptions(order)
BLIZZARD:UpadteCharacterFrame()
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
ilvl = {
order = inc(2),
type = "toggle",
diff --git a/ls_UI_Options/core.lua b/ls_UI_Options/core.lua
index 531e5cc8..828b58f8 100644
--- a/ls_UI_Options/core.lua
+++ b/ls_UI_Options/core.lua
@@ -71,49 +71,6 @@ CONFIG.GROWTH_DIRS = {
["RIGHT_UP"] = L["RIGHT_UP"],
}
--- CONFIG:ShowStaticPopup(which)
-do
- local POPUPS = {
- ["RELOAD_UI"] = {
- text = L["RELOAD_UI_ON_CHAR_SETTING_CHANGE_POPUP"],
- accept = L["RELOAD_NOW"],
- cancel = L["LATER"],
- OnAccept = function() ReloadUI() end,
- OnCancel = function(self)
- AceConfigDialog.popup:Hide()
-
- AceConfigDialog.popup.accept:SetScript("OnClick", nil)
- AceConfigDialog.popup.accept:SetText(L["ACCEPT"] )
-
- self:SetScript("OnClick", nil)
- self:SetText(L["CANCEL"])
-
- CONFIG:SetStatusText(L["RELOAD_UI_WARNING"])
- end,
- },
- }
-
- function CONFIG:ShowStaticPopup(which)
- if not POPUPS[which] then
- return
- end
-
- local frame = AceConfigDialog.popup
- frame:Show()
- frame.text:SetText(POPUPS[which].text)
- frame:SetHeight(61 + frame.text:GetHeight())
-
- frame.accept:ClearAllPoints()
- frame.accept:SetPoint("BOTTOMRIGHT", frame, "BOTTOM", -6, 16)
- frame.accept:SetScript("OnClick", POPUPS[which].OnAccept)
- frame.accept:SetText(POPUPS[which].accept)
-
- frame.cancel:Show()
- frame.cancel:SetScript("OnClick", POPUPS[which].OnCancel)
- frame.cancel:SetText(POPUPS[which].cancel)
- end
-end
-
-- CONFIG:ShowLinkCopyPopup(text)
do
local link = ""
@@ -188,11 +145,60 @@ function CONFIG.ConfirmReset(info)
return L["CONFIRM_RESET"]:format(option.name)
end
+function CONFIG:CreateSpacer(order)
+ return {
+ order = order,
+ type = "description",
+ name = " ",
+ }
+end
+
+function CONFIG:ColorPrivateSetting(text)
+ return C.db.global.colors.context:WrapTextInColorCode(text)
+end
+
+do
+ local pendingChanges = {}
+
+ function CONFIG:AskToReloadUI(sender, shouldRemove)
+ if shouldRemove then
+ pendingChanges[sender] = nil
+ else
+ pendingChanges[sender] = true
+ end
+
+ self:SetStatusText(next(pendingChanges) and L["RELOAD_UI_POPUP"] or "")
+ end
+
+ function CONFIG:ShouldReloadUI()
+ if not next(pendingChanges) then return end
+
+ local frame = AceConfigDialog.popup
+ frame:Show()
+ frame.text:SetText(L["RELOAD_UI_POPUP"])
+ frame:SetHeight(61 + frame.text:GetHeight())
+
+ frame.accept:ClearAllPoints()
+ frame.accept:SetPoint("BOTTOMRIGHT", frame, "BOTTOM", -6, 16)
+ frame.accept:SetText(L["RELOAD_NOW"])
+ frame.accept:SetScript("OnClick", ReloadUI)
+
+ frame.cancel:Show()
+ frame.cancel:SetText(L["LATER"])
+ frame.cancel:SetScript("OnClick", function()
+ frame:Hide()
+ frame.accept:SetScript("OnClick", nil)
+ frame.cancel:SetScript("OnClick", nil)
+ end)
+ end
+end
+
function CONFIG:GetRegionAnchors(anchorsToRemove, anchorsToAdd)
local temp = {
[""] = L["FRAME"],
["Health"] = L["HEALTH"],
["Health.Text"] = L["HEALTH_TEXT"],
+ ["Health.TempLoss_"] = L["MAX_HEALTH_REDUCTION"],
["Power"] = L["POWER"],
["Power.Text"] = L["POWER_TEXT"],
}
@@ -231,15 +237,15 @@ do
local function prepAuraList(list)
t_wipe(sortedData)
- local name, icon, _
+ local info
for id in next, list do
if type(id) == "number" then
- name, _, icon = GetSpellInfo(id)
- if name then
+ info = C_Spell.GetSpellInfo(id)
+ if info then
t_insert(sortedData, {
id = id,
- name = name,
- icon = icon,
+ name = info.name,
+ icon = info.iconID,
})
end
end
@@ -385,7 +391,7 @@ do
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true, tileSize = 16, edgeSize = 16,
- insets = { left = 4, right = 4, top = 4, bottom = 4 }
+ insets = { left = 4, right = 4, top = 4, bottom = 4 },
})
previewFrameBG:SetBackdropBorderColor(0.6, 0.6, 0.6)
@@ -478,7 +484,7 @@ do
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true, tileSize = 16, edgeSize = 16,
- insets = { left = 4, right = 4, top = 4, bottom = 4 }
+ insets = { left = 4, right = 4, top = 4, bottom = 4 },
})
auraListFrame:SetBackdropBorderColor(0.6, 0.6, 0.6)
auraListFrame:SetHeight(426)
@@ -631,7 +637,7 @@ do
if spellID > INT_LIMIT then
output = output .. spellID .. " > " .. L["ERROR_RED"] .. "\n"
else
- local link = GetSpellLink(spellID)
+ local link = C_Spell.GetSpellLink(spellID)
if link then
output = output .. spellID .. " > " .. link .. "\n"
else
@@ -660,7 +666,7 @@ do
if text ~= "" then
for spellID in text:gmatch("%d+") do
spellID = tonumber(spellID)
- if spellID <= INT_LIMIT and not activeData[spellID] and GetSpellLink(spellID) then
+ if spellID <= INT_LIMIT and not activeData[spellID] and C_Spell.GetSpellLink(spellID) then
activeData[spellID] = true
end
end
diff --git a/ls_UI_Options/general/_general.xml b/ls_UI_Options/general/_general.xml
index 0898ef10..dddc5cd8 100644
--- a/ls_UI_Options/general/_general.xml
+++ b/ls_UI_Options/general/_general.xml
@@ -5,4 +5,5 @@
+
diff --git a/ls_UI_Options/general/colors.lua b/ls_UI_Options/general/colors.lua
index 7268d85a..a33e94bb 100644
--- a/ls_UI_Options/general/colors.lua
+++ b/ls_UI_Options/general/colors.lua
@@ -56,7 +56,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
C.db.global.colors.health:SetRGB(D.global.colors.health:GetRGB())
@@ -68,11 +68,7 @@ function CONFIG:GetColorsOptions(order)
UNITFRAMES:ForEach("For", "Health", "UpdateTags")
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
health = {
order = inc(2),
type = "color",
@@ -137,7 +133,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.power do
@@ -167,11 +163,7 @@ function CONFIG:GetColorsOptions(order)
UNITFRAMES:ForEach("For", "Power", "UpdateTags")
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
MANA = {
order = inc(2),
type = "color",
@@ -334,7 +326,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.prediction do
@@ -345,11 +337,7 @@ function CONFIG:GetColorsOptions(order)
UNITFRAMES:ForEach("For", "PowerPrediction", "UpdateColors")
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
my_heal = {
order = inc(2),
type = "color",
@@ -407,7 +395,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.reaction do
@@ -421,11 +409,7 @@ function CONFIG:GetColorsOptions(order)
BARS:For("xpbar", "UpdateSegments")
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
["1"] = {
order = inc(2),
type = "color",
@@ -496,7 +480,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.faction do
@@ -508,11 +492,7 @@ function CONFIG:GetColorsOptions(order)
end
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
Alliance = {
order = inc(2),
type = "color",
@@ -553,7 +533,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.xp do
@@ -567,11 +547,7 @@ function CONFIG:GetColorsOptions(order)
end
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
["1"] = {
order = inc(2),
type = "color",
@@ -625,7 +601,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.difficulty do
@@ -635,11 +611,7 @@ function CONFIG:GetColorsOptions(order)
UNITFRAMES:ForEach("For", "Name", "UpdateTags")
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
trivial = {
order = inc(2),
type = "color",
@@ -665,7 +637,7 @@ function CONFIG:GetColorsOptions(order)
type = "color",
name = L["IMPOSSIBLE"],
},
- }
+ },
},
castbar = {
order = inc(1),
@@ -688,7 +660,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.castbar do
@@ -698,11 +670,7 @@ function CONFIG:GetColorsOptions(order)
UNITFRAMES:ForEach("For", "Castbar", "UpdateColors")
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
casting = {
order = inc(2),
type = "color",
@@ -756,7 +724,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.debuff do
@@ -770,11 +738,7 @@ function CONFIG:GetColorsOptions(order)
UNITFRAMES:ForEach("For", "Auras", "UpdateColors")
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
None = {
order = inc(2),
type = "color",
@@ -855,7 +819,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.button do
@@ -865,11 +829,7 @@ function CONFIG:GetColorsOptions(order)
BARS:ForEach("UpdateButtonConfig")
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
normal = {
order = inc(2),
type = "color",
@@ -916,7 +876,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.cooldown do
@@ -924,11 +884,7 @@ function CONFIG:GetColorsOptions(order)
end
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
expiration = {
order = inc(2),
type = "color",
@@ -979,7 +935,7 @@ function CONFIG:GetColorsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
for k, v in next, D.global.colors.zone do
@@ -991,11 +947,7 @@ function CONFIG:GetColorsOptions(order)
end
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
contested = {
order = inc(2),
type = "color",
diff --git a/ls_UI_Options/general/core.lua b/ls_UI_Options/general/core.lua
index 07148021..14979e14 100644
--- a/ls_UI_Options/general/core.lua
+++ b/ls_UI_Options/general/core.lua
@@ -16,7 +16,8 @@ function CONFIG:GetGeneralOptions(order)
self:GetColorsOptions(1)
self:GetFontsOptions(2)
- self:GetTagsOptions(3)
- self:GetTagVarsOptions(4)
- self:GetAuraFiltersOptions(5)
+ self:GetTexturesOptions(3)
+ self:GetTagsOptions(4)
+ self:GetTagVarsOptions(5)
+ self:GetAuraFiltersOptions(6)
end
diff --git a/ls_UI_Options/general/fonts.lua b/ls_UI_Options/general/fonts.lua
index ca102e28..efe86756 100644
--- a/ls_UI_Options/general/fonts.lua
+++ b/ls_UI_Options/general/fonts.lua
@@ -72,8 +72,11 @@ function CONFIG:GetFontsOptions(order)
end,
args = {
cooldown = getOptions(reset(1), L["COOLDOWNS"]),
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
button = getOptions(inc(1), L["BUTTONS"]),
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
unit = getOptions(inc(1), L["UNIT_FRAME"]),
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
statusbar = getOptions(inc(1), L["PROGRESS_BARS"]),
},
}
diff --git a/ls_UI_Options/general/tags.lua b/ls_UI_Options/general/tags.lua
index c54055b7..319cba47 100644
--- a/ls_UI_Options/general/tags.lua
+++ b/ls_UI_Options/general/tags.lua
@@ -58,7 +58,7 @@ local function isVarStringValid(varString)
return true
else
local _, err = loadstring("return " .. varString)
- return err and L["LUA_ERROR"]:format("|cffffffff" .. err .. "|r") or true
+ return err and L["LUA_ERROR_TEMPLATE"]:format("|cffffffff" .. err .. "|r") or true
end
end
@@ -69,7 +69,7 @@ end
local function isFuncStringValid(funcString)
local _, err = loadstring("return " .. funcString)
- return err and L["LUA_ERROR"]:format("|cffffffff" .. err .. "|r") or true
+ return err and L["LUA_ERROR_TEMPLATE"]:format("|cffffffff" .. err .. "|r") or true
end
local function validateFunc(_, value)
@@ -203,7 +203,7 @@ local curTagOptions = {
reset = {
type = "execute",
order = inc(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
width = "full",
confirm = CONFIG.ConfirmReset,
hidden = function(info)
diff --git a/ls_UI_Options/general/tagvars.lua b/ls_UI_Options/general/tagvars.lua
index 4d18ada0..15b1de62 100644
--- a/ls_UI_Options/general/tagvars.lua
+++ b/ls_UI_Options/general/tagvars.lua
@@ -1,5 +1,6 @@
-- Lua
local _G = getfenv(0)
+local loadstring = _G.loadstring
local next = _G.next
local rawset = _G.rawset
local s_trim = _G.string.trim
@@ -32,9 +33,18 @@ local function isDefaultVar(info)
return D.global.tag_vars[info[#info - 1]]
end
+local function isVarStringValid(varString)
+ if tonumber(varString) then
+ return true
+ else
+ local _, err = loadstring("return " .. varString)
+ return err and L["LUA_ERROR_TEMPLATE"]:format("|cffffffff" .. err .. "|r") or true
+ end
+end
+
local function validateVar(_, value)
CONFIG:SetStatusText("")
- return CONFIG:IsVarStringValid(value)
+ return isVarStringValid(value)
end
local updateVarsOptions
diff --git a/ls_UI_Options/general/textures.lua b/ls_UI_Options/general/textures.lua
new file mode 100644
index 00000000..ead64987
--- /dev/null
+++ b/ls_UI_Options/general/textures.lua
@@ -0,0 +1,62 @@
+-- Lua
+local _G = getfenv(0)
+local unpack = _G.unpack
+
+-- Libs
+local LSM = LibStub("LibSharedMedia-3.0")
+
+-- Mine
+local E, M, L, C, D, PrC, PrD, P, oUF, CONFIG = unpack(ls_UI)
+
+local orders = {0, 0, 0}
+
+local function reset(order)
+ orders[order] = 1
+ return orders[order]
+end
+
+local function inc(order)
+ orders[order] = orders[order] + 1
+ return orders[order]
+end
+
+local function getOptions(order, name)
+ return {
+ order = order,
+ type = "select",
+ name = name,
+ width = 1.25,
+ dialogControl = "LSM30_Statusbar",
+ values = LSM:HashTable("statusbar"),
+ }
+end
+
+function CONFIG:GetTexturesOptions(order)
+ self.options.args.general.args.textures = {
+ order = order,
+ type = "group",
+ name = L["TEXTURES"],
+ get = function(info)
+ return LSM:IsValid("statusbar", C.db.global.textures.statusbar[info[#info]])
+ and C.db.global.textures.statusbar[info[#info]] or LSM:GetDefault("statusbar")
+ end,
+ set = function(info, value)
+ if C.db.global.textures.statusbar[info[#info]] ~= value then
+ C.db.global.textures.statusbar[info[#info]] = value
+
+ E.StatusBars:UpdateAll(info[#info])
+ end
+ end,
+ args = {
+ health = getOptions(reset(1), L["HEALTH"]),
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
+ castbar = getOptions(inc(1), L["CASTBAR"]),
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
+ power = getOptions(inc(1), L["POWER"]),
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
+ xpbar = getOptions(inc(1), L["XP_BAR"]),
+ spacer_4 = CONFIG:CreateSpacer(inc(1)),
+ other = getOptions(inc(1), L["OTHER"]),
+ },
+ }
+end
diff --git a/ls_UI_Options/init.lua b/ls_UI_Options/init.lua
index fc5e2e4d..04fef8d5 100644
--- a/ls_UI_Options/init.lua
+++ b/ls_UI_Options/init.lua
@@ -8,7 +8,7 @@ local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local LibKeyBound = LibStub("LibKeyBound-1.0")
-- Mine
-local E, M, L, C, D, PrC, PrD, P, oUF, CONFIG, PROFILER = unpack(ls_UI)
+local E, M, L, C, D, PrC, PrD, P, oUF, CONFIG = unpack(ls_UI)
local isInit = false
@@ -83,6 +83,11 @@ function CONFIG:Open()
end
AceConfigDialog:Open("ls_UI")
+
+ local frame = AceConfigDialog.OpenFrames.ls_UI
+ if frame then
+ frame:SetCallback("OnRelease", CONFIG.ShouldReloadUI)
+ end
end
function CONFIG:IsLoaded()
diff --git a/ls_UI_Options/ls_UI_Options.toc b/ls_UI_Options/ls_UI_Options.toc
index 3dca9c60..33126b21 100644
--- a/ls_UI_Options/ls_UI_Options.toc
+++ b/ls_UI_Options/ls_UI_Options.toc
@@ -1,4 +1,4 @@
-## Interface: 100207
+## Interface: 110000, 110002
## Author: lightspark
## Title: LS: |cff1a9fc0UI|r |cff888987OptionsUI|r
## Notes: Options for LS: |cff1a9fc0UI|r.
diff --git a/ls_UI_Options/minimap.lua b/ls_UI_Options/minimap.lua
index 186b3c07..9ef4bf66 100644
--- a/ls_UI_Options/minimap.lua
+++ b/ls_UI_Options/minimap.lua
@@ -27,6 +27,10 @@ local function isFadingDisabled()
return not (MINIMAP:IsInit() and C.db.profile.minimap.fade.enabled)
end
+local function isCoordsDisabled()
+ return not (MINIMAP:IsInit() and C.db.profile.minimap.coords.enabled)
+end
+
function CONFIG:CreateMinimapOptions(order)
self.options.args.minimap = {
order = order,
@@ -36,28 +40,26 @@ function CONFIG:CreateMinimapOptions(order)
enabled = {
order = reset(1),
type = "toggle",
- name = L["ENABLE"],
+ name = CONFIG:ColorPrivateSetting(L["ENABLE"]),
get = function()
return PrC.db.profile.minimap.enabled
end,
set = function(_, value)
PrC.db.profile.minimap.enabled = value
- if not MINIMAP:IsInit() then
+ if MINIMAP:IsInit() then
+ CONFIG:AskToReloadUI("minimap.enabled", value)
+ else
if value then
P:Call(MINIMAP.Init, MINIMAP)
end
- else
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
end
end,
},
reset = {
type = "execute",
order = inc(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
disabled = isModuleDisabled,
func = function()
@@ -67,11 +69,7 @@ function CONFIG:CreateMinimapOptions(order)
MINIMAP:Update()
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
shape = {
order = inc(1),
type = "select",
@@ -162,11 +160,7 @@ function CONFIG:CreateMinimapOptions(order)
end,
disabled = isModuleDisabled,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
colors = {
order = inc(1),
type = "group",
@@ -190,11 +184,7 @@ function CONFIG:CreateMinimapOptions(order)
},
},
},
- spacer_6 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_6 = CONFIG:CreateSpacer(inc(1)),
flag = {
order = inc(1),
type = "group",
@@ -222,15 +212,11 @@ function CONFIG:CreateMinimapOptions(order)
name = L["TOOLTIP"],
disabled = function()
return isModuleDisabled() or not C.db.profile.minimap.flag.enabled
- end
+ end,
},
},
},
- spacer_7 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_7 = CONFIG:CreateSpacer(inc(1)),
coords = {
order = inc(1),
type = "group",
@@ -256,12 +242,9 @@ function CONFIG:CreateMinimapOptions(order)
order = inc(2),
type = "toggle",
name = L["BACKGROUND"],
+ disabled = isCoordsDisabled,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
point = {
order = inc(2),
type = "group",
@@ -278,6 +261,7 @@ function CONFIG:CreateMinimapOptions(order)
Minimap:UpdateCoords()
end
end,
+ disabled = isCoordsDisabled,
args = {
["1"] = {
order = reset(2),
@@ -309,11 +293,7 @@ function CONFIG:CreateMinimapOptions(order)
},
},
},
- spacer_8 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_8 = CONFIG:CreateSpacer(inc(1)),
fading = {
order = inc(1),
type = "group",
@@ -338,7 +318,7 @@ function CONFIG:CreateMinimapOptions(order)
reset = {
order = inc(2),
type = "execute",
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
disabled = isFadingDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
@@ -348,11 +328,7 @@ function CONFIG:CreateMinimapOptions(order)
MinimapCluster:UpdateFading()
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
combat = {
order = inc(2),
type = "toggle",
diff --git a/ls_UI_Options/profiles.lua b/ls_UI_Options/profiles.lua
index 046da6be..5553486e 100644
--- a/ls_UI_Options/profiles.lua
+++ b/ls_UI_Options/profiles.lua
@@ -276,35 +276,47 @@ function CONFIG:CreateProfilesPanel(order)
childGroups = "tab",
args = {
export = {
- type = "execute",
order = 1,
+ type = "execute",
name = L["EXPORT"],
func = openExportImportFrame,
},
import = {
- type = "execute",
order = 2,
+ type = "execute",
name = L["IMPORT"],
func = openExportImportFrame,
},
- spacer_1 = {
- order = 3,
- type = "description",
- name = "",
- width = "full",
- },
+ spacer_1 = CONFIG:CreateSpacer(3),
},
}
options.args.global = AceDBOptions:GetOptionsTable(C.db, true)
options.args.global.order = 4
options.args.global.name = L["PROFILE_GLOBAL"]
+ options.args.global.desc = L["PROFILE_GLOBAL_DESC"]
LibDualSpec:EnhanceOptions(options.args.global, C.db)
+ if not options.args.global.plugins then
+ options.args.global.plugins = {}
+ end
+
+ options.args.global.plugins.ls_UI = {
+ warning = {
+ order = 0.1,
+ type = "description",
+ fontSize = "medium",
+ name = L["PROFILE_GLOBAL_DESC"],
+ image = "Interface\\DialogFrame\\UI-Dialog-Icon-AlertNew",
+ },
+ spacer = CONFIG:CreateSpacer(0.2),
+ }
+
options.args.private = AceDBOptions:GetOptionsTable(PrC.db, true)
options.args.private.order = 5
- options.args.private.name = L["PROFILE_PRIVATE"]
+ options.args.private.name = CONFIG:ColorPrivateSetting(L["PROFILE_PRIVATE"])
+ options.args.private.desc = L["PROFILE_PRIVATE_DESC"]
if not options.args.private.plugins then
options.args.private.plugins = {}
@@ -312,14 +324,13 @@ function CONFIG:CreateProfilesPanel(order)
options.args.private.plugins.ls_UI = {
warning = {
- order = 0,
+ order = 0.1,
type = "description",
- fontSize = "large",
- name = L["PROFILE_RELOAD_WARNING"] .. "\n\n",
- image = "Interface\\OPTIONSFRAME\\UI-OptionsFrame-NewFeatureIcon",
- imageWidth = 16,
- imageHeight = 16,
+ fontSize = "medium",
+ name = L["PROFILE_PRIVATE_DESC"] .. "\n" .. L["PROFILE_RELOAD_WARNING"],
+ image = "Interface\\DialogFrame\\UI-Dialog-Icon-AlertNew",
},
+ spacer = CONFIG:CreateSpacer(0.2),
}
return options
diff --git a/ls_UI_Options/tooltips.lua b/ls_UI_Options/tooltips.lua
index 1492b42e..b51ef68f 100644
--- a/ls_UI_Options/tooltips.lua
+++ b/ls_UI_Options/tooltips.lua
@@ -37,28 +37,26 @@ function CONFIG:GetTooltipsOptions(order)
enabled = {
order = reset(1),
type = "toggle",
- name = L["ENABLE"],
+ name = CONFIG:ColorPrivateSetting(L["ENABLE"]),
get = function()
return PrC.db.profile.tooltips.enabled
end,
set = function(_, value)
PrC.db.profile.tooltips.enabled = value
- if not TOOLTIPS:IsInit() then
+ if TOOLTIPS:IsInit() then
+ CONFIG:AskToReloadUI("tooltips.enabled", value)
+ else
if value then
P:Call(TOOLTIPS.Init, TOOLTIPS)
end
- else
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
end
end,
},
reset = {
type = "execute",
order = inc(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
disabled = isModuleDisabled,
func = function()
@@ -67,12 +65,7 @@ function CONFIG:GetTooltipsOptions(order)
TOOLTIPS:Update()
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = "",
- width = "full",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
title = {
order = inc(1),
type = "toggle",
@@ -90,7 +83,6 @@ function CONFIG:GetTooltipsOptions(order)
order = inc(1),
type = "toggle",
name = L["INSPECT_INFO"],
- desc = L["INSPECT_INFO_DESC"],
disabled = isModuleDisabled,
set = function(_, value)
C.db.profile.tooltips.inspect = value
@@ -111,18 +103,8 @@ function CONFIG:GetTooltipsOptions(order)
desc = L["ITEM_COUNT_DESC"],
disabled = isModuleDisabled,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = "",
- width = "full",
- },
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = "",
- width = "full",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
health = {
order = inc(1),
type = "group",
@@ -143,7 +125,7 @@ function CONFIG:GetTooltipsOptions(order)
reset = {
type = "execute",
order = reset(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.tooltips.health, C.db.profile.tooltips.health)
@@ -151,24 +133,14 @@ function CONFIG:GetTooltipsOptions(order)
TOOLTIPS:Update()
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = "",
- width = "full",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
height = {
order = inc(2),
type = "range",
name = L["HEIGHT"],
- min = 8, max = 32, step = 4,
- },
- spacer_2 = {
- order = inc(2),
- type = "description",
- name = "",
- width = "full",
+ min = 8, max = 32, step = 1, bigStep = 2,
},
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
text = {
order = inc(2),
type = "group",
diff --git a/ls_UI_Options/unitframes/auras.lua b/ls_UI_Options/unitframes/auras.lua
index c8290e69..72aea0e7 100644
--- a/ls_UI_Options/unitframes/auras.lua
+++ b/ls_UI_Options/unitframes/auras.lua
@@ -48,10 +48,10 @@ end
local FILTERS = {
friendly = {
- name = function() return C.db.global.colors.green:WrapTextInColorCode(L["FRIENDLY_UNITS"]) end,
+ name = C.db.global.colors.green:WrapTextInColorCode(L["FRIENDLY_UNITS"]),
},
enemy = {
- name = function() return C.db.global.colors.red:WrapTextInColorCode(L["ENEMY_UNITS"]) end,
+ name = C.db.global.colors.red:WrapTextInColorCode(L["ENEMY_UNITS"]),
},
buff = {
boss = {
@@ -90,7 +90,7 @@ local FILTERS = {
name = L["SELF_BUFFS_PERMA"],
desc = L["SELF_BUFFS_PERMA_DESC"],
disabled = function(info)
- return not C.db.profile.units[info[#info - 5]].auras.filter[info[#info - 2]][info[#info - 1]].selfcast
+ return not (C.db.profile.units[info[#info - 5]].auras.enabled and C.db.profile.units[info[#info - 5]].auras.filter[info[#info - 2]][info[#info - 1]].selfcast)
end,
},
player = {
@@ -105,7 +105,7 @@ local FILTERS = {
name = L["CASTABLE_BUFFS_PERMA"],
desc = L["CASTABLE_BUFFS_PERMA_DESC"],
disabled = function(info)
- return not C.db.profile.units[info[#info - 5]].auras.filter[info[#info - 2]][info[#info - 1]].player
+ return not (C.db.profile.units[info[#info - 5]].auras.enabled and C.db.profile.units[info[#info - 5]].auras.filter[info[#info - 2]][info[#info - 1]].player)
end,
},
misc = {
@@ -145,7 +145,7 @@ local FILTERS = {
name = L["SELF_DEBUFFS_PERMA"],
desc = L["SELF_DEBUFFS_PERMA_DESC"],
disabled = function(info)
- return not C.db.profile.units[info[#info - 5]].auras.filter[info[#info - 2]][info[#info - 1]].selfcast
+ return not (C.db.profile.units[info[#info - 5]].auras.enabled and C.db.profile.units[info[#info - 5]].auras.filter[info[#info - 2]][info[#info - 1]].selfcast)
end,
},
player = {
@@ -160,7 +160,7 @@ local FILTERS = {
name = L["CASTABLE_DEBUFFS_PERMA"],
desc = L["CASTABLE_DEBUFFS_PERMA_DESC"],
disabled = function(info)
- return not C.db.profile.units[info[#info - 5]].auras.filter[info[#info - 2]][info[#info - 1]].player
+ return not (C.db.profile.units[info[#info - 5]].auras.enabled and C.db.profile.units[info[#info - 5]].auras.filter[info[#info - 2]][info[#info - 1]].player)
end,
},
dispellable = {
@@ -203,11 +203,7 @@ local function getFilters(order, unit, type)
end
if C.db.profile.units[unit].auras.filter[type].debuff then
- temp.args.spacer_1 = {
- order = inc(3),
- type = "description",
- name = " ",
- }
+ temp.args.spacer_1 = CONFIG:CreateSpacer(inc(3))
end
end
@@ -244,6 +240,10 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
[unit] = true,
}
+ local function areAurasDisabled()
+ return not C.db.profile.units[unit].auras.enabled
+ end
+
return {
order = order,
type = "group",
@@ -272,43 +272,41 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
values = function()
return UNITFRAMES:GetUnits(ignoredUnits)
end,
+ disabled = areAurasDisabled,
get = function() end,
set = function(_, value)
CONFIG:CopySettings(C.db.profile.units[value].auras, C.db.profile.units[unit].auras, copyIgnoredKeys)
+
UNITFRAMES:For(unit, "UpdateAuras")
end,
},
reset = {
type = "execute",
order = inc(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
+ disabled = areAurasDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].auras, C.db.profile.units[unit].auras, resetIgnoredKeys)
+
UNITFRAMES:For(unit, "UpdateAuras")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
disable_mouse = {
order = inc(1),
type = "toggle",
name = L["DISABLE_MOUSE"],
desc = L["DISABLE_MOUSE_DESC"],
+ disabled = areAurasDisabled,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
rows = {
order = inc(1),
type = "range",
name = L["NUM_ROWS"],
min = 1, max = 4, step = 1,
+ disabled = areAurasDisabled,
set = function(_, value)
if C.db.profile.units[unit].auras.rows ~= value then
C.db.profile.units[unit].auras.rows = value
@@ -324,6 +322,7 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
type = "range",
name = L["PER_ROW"],
min = 1, max = 10, step = 1,
+ disabled = areAurasDisabled,
set = function(_, value)
if C.db.profile.units[unit].auras.per_row ~= value then
C.db.profile.units[unit].auras.per_row = value
@@ -341,6 +340,7 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
desc = L["WIDTH_OVERRIDE_DESC"],
min = 0, max = 64, step = 1,
softMin = 16,
+ disabled = areAurasDisabled,
set = function(info, value)
if C.db.profile.units[unit].auras.width ~= value then
if value < info.option.softMin then
@@ -362,6 +362,7 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
desc = L["HEIGHT_OVERRIDE_DESC"],
min = 0, max = 64, step = 1,
softMin = 16,
+ disabled = areAurasDisabled,
set = function(info, value)
if C.db.profile.units[unit].auras.height ~= value then
if value < info.option.softMin then
@@ -381,6 +382,7 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
type = "select",
name = L["GROWTH_DIR"],
values = CONFIG.GROWTH_DIRS,
+ disabled = areAurasDisabled,
get = function()
return C.db.profile.units[unit].auras.x_growth .. "_" .. C.db.profile.units[unit].auras.y_growth
end,
@@ -391,16 +393,13 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
UNITFRAMES:For(unit, "For", "Auras", "UpdateGrowthDirection")
end,
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
point = {
order = inc(1),
type = "group",
name = "",
inline = true,
+ disabled = areAurasDisabled,
get = function(info)
return C.db.profile.units[unit].auras.point1[info[#info]]
end,
@@ -441,16 +440,13 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
},
},
},
- spacer_4 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_4 = CONFIG:CreateSpacer(inc(1)),
type = {
order = inc(1),
type = "group",
name = L["AURA_TYPE"],
inline = true,
+ disabled = areAurasDisabled,
get = function(info)
return C.db.profile.units[unit].auras.type[info[#info]]
end,
@@ -483,16 +479,13 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
},
},
},
- spacer_5 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_5 = CONFIG:CreateSpacer(inc(1)),
count = {
order = inc(1),
type = "group",
name = L["COUNT_TEXT"],
inline = true,
+ disabled = areAurasDisabled,
get = function(info)
return C.db.profile.units[unit].auras.count[info[#info]]
end,
@@ -525,16 +518,13 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
},
},
},
- spacer_6 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_6 = CONFIG:CreateSpacer(inc(1)),
cooldown = {
order = inc(1),
type = "group",
name = L["COOLDOWN_TEXT"],
inline = true,
+ disabled = areAurasDisabled,
get = function(info)
return C.db.profile.units[unit].auras.cooldown.text[info[#info]]
end,
@@ -566,16 +556,13 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
},
},
},
- spacer_7 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_7 = CONFIG:CreateSpacer(inc(1)),
filter = {
order = inc(1),
type = "group",
name = L["FILTERS"],
inline = true,
+ disabled = areAurasDisabled,
get = function(info)
return C.db.profile.units[unit].auras.filter[info[#info - 2]][info[#info - 1]][info[#info]]
end,
@@ -599,6 +586,7 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
get = function() end,
set = function(_, value)
CONFIG:CopySettings(C.db.profile.units[value].auras.filter, C.db.profile.units[unit].auras.filter)
+
UNITFRAMES:For(unit, "For", "Auras", "UpdateConfig")
UNITFRAMES:For(unit, "For", "Auras", "ForceUpdate")
end,
@@ -606,10 +594,11 @@ function CONFIG:CreateUnitFrameAurasOptions(order, unit)
reset = {
type = "execute",
order = inc(2),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].auras.filter, C.db.profile.units[unit].auras.filter)
+
UNITFRAMES:For(unit, "For", "Auras", "UpdateConfig")
UNITFRAMES:For(unit, "For", "Auras", "ForceUpdate")
end,
diff --git a/ls_UI_Options/unitframes/castbar.lua b/ls_UI_Options/unitframes/castbar.lua
index fbca8929..eb4d899b 100644
--- a/ls_UI_Options/unitframes/castbar.lua
+++ b/ls_UI_Options/unitframes/castbar.lua
@@ -25,6 +25,10 @@ local ICON_POSITIONS = {
}
function CONFIG:CreateUnitFrameCastbarOptions(order, unit)
+ local function isCastbarDisabled()
+ return not C.db.profile.units[unit].castbar.enabled
+ end
+
local temp = {
order = order,
type = "group",
@@ -52,7 +56,7 @@ function CONFIG:CreateUnitFrameCastbarOptions(order, unit)
UNITFRAMES:UpdateBlizzCastbars()
end,
- hidden = function()
+ disabled = function()
return C.db.profile.units[unit].castbar.enabled
end,
},
@@ -64,22 +68,21 @@ function CONFIG:CreateUnitFrameCastbarOptions(order, unit)
reset = {
type = "execute",
order = inc(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
+ disabled = isCastbarDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].castbar, C.db.profile.units[unit].castbar)
+
UNITFRAMES:For(unit, "UpdateCastbar")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
latency = {
order = inc(1),
type = "toggle",
name = L["LATENCY"],
+ disabled = isCastbarDisabled,
set = function(_, value)
if C.db.profile.units[unit].castbar.latency ~= value then
C.db.profile.units[unit].castbar.latency = value
@@ -89,15 +92,12 @@ function CONFIG:CreateUnitFrameCastbarOptions(order, unit)
end
end,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
detached = {
order = inc(1),
type = "toggle",
name = L["DETACH_FROM_FRAME"],
+ disabled = isCastbarDisabled,
},
width_override = {
order = inc(1),
@@ -107,7 +107,7 @@ function CONFIG:CreateUnitFrameCastbarOptions(order, unit)
min = 0, max = 1024, step = 2,
softMin = 96,
disabled = function()
- return not C.db.profile.units[unit].castbar.detached
+ return not (C.db.profile.units[unit].castbar.enabled and C.db.profile.units[unit].castbar.detached)
end,
set = function(info, value)
if C.db.profile.units[unit].castbar.width_override ~= value then
@@ -126,7 +126,8 @@ function CONFIG:CreateUnitFrameCastbarOptions(order, unit)
order = inc(1),
type = "range",
name = L["HEIGHT"],
- min = 8, max = 32, step = 4,
+ min = 8, max = 32, step = 1, bigStep = 2,
+ disabled = isCastbarDisabled,
set = function(_, value)
if C.db.profile.units[unit].castbar.height ~= value then
C.db.profile.units[unit].castbar.height = value
@@ -142,6 +143,7 @@ function CONFIG:CreateUnitFrameCastbarOptions(order, unit)
type = "select",
name = L["ICON"],
values = ICON_POSITIONS,
+ disabled = isCastbarDisabled,
get = function()
return C.db.profile.units[unit].castbar.icon.position
end,
@@ -159,6 +161,7 @@ function CONFIG:CreateUnitFrameCastbarOptions(order, unit)
type = "range",
name = L["BAR_TEXT"],
min = 8, max = 32, step = 1,
+ disabled = isCastbarDisabled,
get = function()
return C.db.profile.units[unit].castbar.text.size
end,
diff --git a/ls_UI_Options/unitframes/core.lua b/ls_UI_Options/unitframes/core.lua
index 54089b40..2c73661b 100644
--- a/ls_UI_Options/unitframes/core.lua
+++ b/ls_UI_Options/unitframes/core.lua
@@ -27,8 +27,8 @@ local function isBossFrameDisabled()
return not UNITFRAMES:HasBossFrame()
end
-local function isOCCEnabled()
- return E.OMNICC
+local function isModuleDisabledOrOCCEnabled()
+ return isModuleDisabled() or E.OMNICC
end
local function getUnitFrameOptions(order, unit, name)
@@ -66,29 +66,27 @@ local function getUnitFrameOptions(order, unit, name)
get = function() end,
set = function(_, value)
CONFIG:CopySettings(C.db.profile.units[value], C.db.profile.units[unit], {["blizz_enabled"] = true})
+
UNITFRAMES:For(unit, "Update")
end,
}, -- 2
reset = {
order = 3,
type = "execute",
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit], C.db.profile.units[unit])
+
UNITFRAMES:For(unit, "Update")
end,
}, -- 3
- spacer_1 = {
- order = 4,
- type = "description",
- name = " ",
- }, -- 4
+ spacer_1 = CONFIG:CreateSpacer(4), -- 4
width = {
order = 5,
type = "range",
name = L["WIDTH"],
- min = 96, max = 512, step = 2,
+ min = 96, max = 512, step = 1, bigStep = 2,
get = function()
return C.db.profile.units[unit].width
end,
@@ -104,7 +102,7 @@ local function getUnitFrameOptions(order, unit, name)
order = 6,
type = "range",
name = L["HEIGHT"],
- min = 28, max = 256, step = 2,
+ min = 28, max = 256, step = 1, bigStep = 2,
get = function()
return C.db.profile.units[unit].height
end,
@@ -210,11 +208,7 @@ local function getUnitFrameOptions(order, unit, name)
UNITFRAMES:For(unit, "AlignWidgets")
end,
}, -- 16
- spacer_2 = {
- order = 20,
- type = "description",
- name = " ",
- }, -- 20
+ spacer_2 = CONFIG:CreateSpacer(20), -- 20
border = {
order = 21,
type = "group",
@@ -241,11 +235,7 @@ local function getUnitFrameOptions(order, unit, name)
},
},
}, -- 21
- spacer_4 = {
- order = 30,
- type = "description",
- name = " ",
- }, -- 30
+ spacer_4 = CONFIG:CreateSpacer(30), -- 30
health = CONFIG:CreateUnitFrameHealthOptions(31, unit),
power = CONFIG:CreateUnitFramePowerOptions(32, unit),
-- alt_power = {}, -- 33
@@ -368,7 +358,7 @@ function CONFIG:CreateUnitFramesOptions(order)
enabled = {
order = 1,
type = "toggle",
- name = L["ENABLE"],
+ name = CONFIG:ColorPrivateSetting(L["ENABLE"]),
get = function()
return PrC.db.profile.units.enabled
end,
@@ -376,9 +366,7 @@ function CONFIG:CreateUnitFramesOptions(order)
PrC.db.profile.units.enabled = value
if UNITFRAMES:IsInit() then
- if not value then
- CONFIG:ShowStaticPopup("RELOAD_UI")
- end
+ CONFIG:AskToReloadUI("units.enabled", value)
else
if value then
P:Call(UNITFRAMES.Init, UNITFRAMES)
@@ -386,13 +374,9 @@ function CONFIG:CreateUnitFramesOptions(order)
end
end,
}, -- 1
- spacer_1 = {
- order = 2,
- type = "description",
- name = " ",
- }, -- 2
+ spacer_1 = CONFIG:CreateSpacer(9), -- 9
units = {
- order = 3,
+ order = 10,
type = "group",
name = L["UNITS"],
inline = true,
@@ -403,88 +387,96 @@ function CONFIG:CreateUnitFramesOptions(order)
set = function(info, value)
PrC.db.profile.units[info[#info]].enabled = value
- if UNITFRAMES:IsInit() then
- if value then
- if info[#info] == "player" then
- UNITFRAMES:Create("player")
- UNITFRAMES:For("player", "Update")
-
- UNITFRAMES:Create("pet")
- UNITFRAMES:For("pet", "Update")
- elseif info[#info] == "target" then
- UNITFRAMES:Create("target")
- UNITFRAMES:For("target", "Update")
-
- UNITFRAMES:Create("targettarget")
- UNITFRAMES:For("targettarget", "Update")
- elseif info[#info] == "focus" then
- UNITFRAMES:Create("focus")
- UNITFRAMES:For("focus", "Update")
-
- UNITFRAMES:Create("focustarget")
- UNITFRAMES:For("focustarget", "Update")
- else
- UNITFRAMES:Create("boss")
- UNITFRAMES:For("boss", "Update")
- end
+ if value then
+ if info[#info] == "player" then
+ UNITFRAMES:Create("player")
+ UNITFRAMES:For("player", "Update")
+
+ UNITFRAMES:Create("pet")
+ UNITFRAMES:For("pet", "Update")
+ elseif info[#info] == "target" then
+ UNITFRAMES:Create("target")
+ UNITFRAMES:For("target", "Update")
+
+ UNITFRAMES:Create("targettarget")
+ UNITFRAMES:For("targettarget", "Update")
+ elseif info[#info] == "focus" then
+ UNITFRAMES:Create("focus")
+ UNITFRAMES:For("focus", "Update")
+
+ UNITFRAMES:Create("focustarget")
+ UNITFRAMES:For("focustarget", "Update")
else
- CONFIG:ShowStaticPopup("RELOAD_UI")
+ UNITFRAMES:Create("boss")
+ UNITFRAMES:For("boss", "Update")
end
end
+
+ CONFIG:AskToReloadUI(info[#info] .. ".enabled", value)
end,
args = {
player = {
order = 1,
type = "toggle",
- name = L["PLAYER_PET"],
+ name = CONFIG:ColorPrivateSetting(L["PLAYER_PET"]),
},
target = {
order = 2,
type = "toggle",
- name = L["TARGET_TOT"],
+ name = CONFIG:ColorPrivateSetting(L["TARGET_TOT"]),
},
focus = {
order = 3,
type = "toggle",
- name = L["FOCUS_TOF"],
+ name = CONFIG:ColorPrivateSetting(L["FOCUS_TOF"]),
},
boss = {
order = 4,
type = "toggle",
- name = L["BOSS"],
+ name = CONFIG:ColorPrivateSetting(L["BOSS"]),
},
},
- }, -- 3
- spacer_2 = {
- order = 4,
- type = "description",
- name = " ",
- }, -- 4
+ }, -- 10
+ spacer_2 = CONFIG:CreateSpacer(19), -- 19
gloss = {
- order = 5,
+ order = 20,
type = "range",
name = L["GLOSS"],
disabled = isModuleDisabled,
- min = 0, max = 1, step = 0.05,
+ min = 0, max = 1, step = 0.01, bigStep = 0.05,
isPercent = true,
get = function()
- return C.db.profile.units.inlay.alpha
+ return C.db.profile.units.inlay.gloss
end,
set = function(_, value)
- if C.db.profile.units.inlay.alpha ~= value then
- C.db.profile.units.inlay.alpha = value
+ if C.db.profile.units.inlay.gloss ~= value then
+ C.db.profile.units.inlay.gloss = value
UNITFRAMES:ForEach("UpdateInlay")
end
end,
- }, -- 5
- spacer_3 = {
- order = 6,
- type = "description",
- name = " ",
- }, -- 6
+ }, -- 20
+ gradient = {
+ order = 21,
+ type = "range",
+ name = L["GRADIENT"],
+ disabled = isModuleDisabled,
+ min = 0, max = 1, step = 0.01, bigStep = 0.05,
+ isPercent = true,
+ get = function()
+ return C.db.profile.units.inlay.gradient
+ end,
+ set = function(_, value)
+ if C.db.profile.units.inlay.gradient ~= value then
+ C.db.profile.units.inlay.gradient = value
+
+ UNITFRAMES:ForEach("UpdateGradient")
+ end
+ end,
+ }, -- 21
+ spacer_3 = CONFIG:CreateSpacer(29), -- 29
change = {
- order = 7,
+ order = 30,
type = "group",
name = L["PROGRESS_BARS"],
inline = true,
@@ -522,14 +514,10 @@ function CONFIG:CreateUnitFramesOptions(order)
name = L["PROGRESS_BAR_SMOOTH"],
},
},
- }, -- 7
- spacer_4 = {
- order = 8,
- type = "description",
- name = " ",
- }, -- 8
+ }, -- 30
+ spacer_4 = CONFIG:CreateSpacer(39), -- 39
cooldown = {
- order = 9,
+ order = 40,
type = "group",
name = L["COOLDOWN_TEXT"],
inline = true,
@@ -549,25 +537,22 @@ function CONFIG:CreateUnitFramesOptions(order)
reset = {
type = "execute",
order = 1,
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units.cooldown, C.db.profile.units.cooldown)
+
UNITFRAMES:ForEach("For", "Auras", "UpdateConfig")
UNITFRAMES:ForEach("For", "Auras", "UpdateCooldownConfig")
end,
},
- spacer_1 = {
- order = 9,
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(9),
exp_threshold = {
order = 10,
type = "range",
name = L["EXP_THRESHOLD"],
min = 1, max = 10, step = 1,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
},
m_ss_threshold = {
order = 11,
@@ -576,7 +561,7 @@ function CONFIG:CreateUnitFramesOptions(order)
desc = L["M_SS_THRESHOLD_DESC"],
min = 0, max = 3599, step = 1,
softMin = 91,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
set = function(info, value)
if C.db.profile.units.cooldown[info[#info]] ~= value then
if value < info.option.softMin then
@@ -596,7 +581,7 @@ function CONFIG:CreateUnitFramesOptions(order)
name = L["S_MS_THRESHOLD"],
desc = L["S_MS_THRESHOLD_DESC"],
min = 1, max = 10, step = 1,
- disabled = isOCCEnabled,
+ disabled = isModuleDisabledOrOCCEnabled,
set = function(info, value)
if C.db.profile.units.cooldown[info[#info]] ~= value then
C.db.profile.units.cooldown[info[#info]] = value
@@ -606,11 +591,7 @@ function CONFIG:CreateUnitFramesOptions(order)
end
end,
},
- spacer_2 = {
- order = 19,
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(19),
swipe = {
order = 20,
type = "group",
@@ -637,21 +618,21 @@ function CONFIG:CreateUnitFramesOptions(order)
order = 2,
type = "toggle",
disabled = function()
- return not C.db.profile.units.cooldown.swipe.enabled
+ return isModuleDisabledOrOCCEnabled() or not C.db.profile.units.cooldown.swipe.enabled
end,
name = L["REVERSE"],
},
},
},
},
- }, -- 9
- player = getUnitFrameOptions(10, "player", L["PLAYER_FRAME"]),
- pet = getUnitFrameOptions(11, "pet", L["PET_FRAME"]),
- target = getUnitFrameOptions(12, "target", L["TARGET_FRAME"]),
- targettarget = getUnitFrameOptions(13, "targettarget", L["TOT_FRAME"]),
- focus = getUnitFrameOptions(14, "focus", L["FOCUS_FRAME"]),
- focustarget = getUnitFrameOptions(15, "focustarget", L["TOF_FRAME"]),
- boss = getUnitFrameOptions(16, "boss", L["BOSS_FRAMES"]),
+ }, -- 40
+ player = getUnitFrameOptions(50, "player", L["PLAYER_FRAME"]),
+ pet = getUnitFrameOptions(51, "pet", L["PET_FRAME"]),
+ target = getUnitFrameOptions(52, "target", L["TARGET_FRAME"]),
+ targettarget = getUnitFrameOptions(53, "targettarget", L["TOT_FRAME"]),
+ focus = getUnitFrameOptions(54, "focus", L["FOCUS_FRAME"]),
+ focustarget = getUnitFrameOptions(55, "focustarget", L["TOF_FRAME"]),
+ boss = getUnitFrameOptions(56, "boss", L["BOSS_FRAMES"]),
},
}
diff --git a/ls_UI_Options/unitframes/customtexts.lua b/ls_UI_Options/unitframes/customtexts.lua
index 6d46b43c..15e6f63f 100644
--- a/ls_UI_Options/unitframes/customtexts.lua
+++ b/ls_UI_Options/unitframes/customtexts.lua
@@ -50,11 +50,7 @@ do
end
end,
},
- spacer_1 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
size = {
order = inc(2),
type = "range",
@@ -67,11 +63,7 @@ do
name = L["TEXT_HORIZ_ALIGNMENT"],
values = CONFIG.H_ALIGNMENTS,
},
- spacer_2 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
point1 = {
order = inc(2),
type = "group",
@@ -123,11 +115,7 @@ do
},
},
},
- spacer_3 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(2)),
tag = {
order = inc(2),
type = "input",
@@ -146,11 +134,7 @@ do
end
end,
},
- spacer_4 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_4 = CONFIG:CreateSpacer(inc(2)),
delete = {
order = inc(2),
type = "execute",
diff --git a/ls_UI_Options/unitframes/fading.lua b/ls_UI_Options/unitframes/fading.lua
index 935f3390..1a111e70 100644
--- a/ls_UI_Options/unitframes/fading.lua
+++ b/ls_UI_Options/unitframes/fading.lua
@@ -45,20 +45,17 @@ function CONFIG:CreateUnitFrameFadingOptions(order, unit)
reset = {
order = inc(1),
type = "execute",
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
disabled = isFadingDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].fade, C.db.profile.units[unit].fade, {enabled = true})
+
UNITFRAMES:For(unit, "UpdateConfig")
UNITFRAMES:For(unit, "UpdateFading")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
combat = {
order = inc(1),
type = "toggle",
diff --git a/ls_UI_Options/unitframes/health.lua b/ls_UI_Options/unitframes/health.lua
index 6ab72650..6aee1c88 100644
--- a/ls_UI_Options/unitframes/health.lua
+++ b/ls_UI_Options/unitframes/health.lua
@@ -31,19 +31,16 @@ function CONFIG:CreateUnitFrameHealthOptions(order, unit)
reset = {
type = "execute",
order = reset(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].health, C.db.profile.units[unit].health)
+
UNITFRAMES:For(unit, "UpdateHealth")
UNITFRAMES:For(unit, "UpdateHealthPrediction")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
prediction = {
order = inc(1),
type = "toggle",
@@ -57,11 +54,21 @@ function CONFIG:CreateUnitFrameHealthOptions(order, unit)
UNITFRAMES:For(unit, "UpdateHealthPrediction")
end,
},
- spacer_2 = {
+ reduction = {
order = inc(1),
- type = "description",
- name = " ",
+ type = "toggle",
+ name = L["MAX_HEALTH_REDUCTION"],
+ get = function()
+ return C.db.profile.units[unit].health.reduction.enabled
+ end,
+ set = function(_, value)
+ C.db.profile.units[unit].health.reduction.enabled = value
+
+ UNITFRAMES:For(unit, "UpdateHealth")
+ UNITFRAMES:For(unit, "UpdateHealthPrediction")
+ end,
},
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
color = {
order = inc(1),
type = "group",
@@ -91,11 +98,7 @@ function CONFIG:CreateUnitFrameHealthOptions(order, unit)
},
},
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
text = {
order = inc(1),
type = "group",
@@ -125,11 +128,12 @@ function CONFIG:CreateUnitFrameHealthOptions(order, unit)
name = L["TEXT_HORIZ_ALIGNMENT"],
values = CONFIG.H_ALIGNMENTS,
},
- spacer_1 = {
+ word_wrap = {
order = inc(2),
- type = "description",
- name = " ",
+ type = "toggle",
+ name = L["WORD_WRAP"],
},
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
point = {
order = inc(2),
type = "group",
@@ -181,11 +185,7 @@ function CONFIG:CreateUnitFrameHealthOptions(order, unit)
},
},
},
- spacer_2 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
tag = {
order = inc(2),
type = "input",
diff --git a/ls_UI_Options/unitframes/misc.lua b/ls_UI_Options/unitframes/misc.lua
index 3143b01a..fa635989 100644
--- a/ls_UI_Options/unitframes/misc.lua
+++ b/ls_UI_Options/unitframes/misc.lua
@@ -19,6 +19,10 @@ local function inc(order)
end
function CONFIG:CreateUnitFrameRaidTargetOptions(order, unit)
+ local function isRaidTargetDisabled()
+ return not C.db.profile.units[unit].raid_target.enabled
+ end
+
return {
order = order,
type = "group",
@@ -42,23 +46,22 @@ function CONFIG:CreateUnitFrameRaidTargetOptions(order, unit)
reset = {
type = "execute",
order = inc(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
+ disabled = isRaidTargetDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].raid_target, C.db.profile.units[unit].raid_target)
+
UNITFRAMES:For(unit, "UpdateRaidTargetIndicator")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
size = {
order = inc(1),
type = "range",
name = L["SIZE"],
min = 8, max = 64, step = 1,
+ disabled = isRaidTargetDisabled,
set = function(info, value)
if C.db.profile.units[unit].raid_target[info[#info]] ~= value then
C.db.profile.units[unit].raid_target[info[#info]] = value
@@ -68,16 +71,13 @@ function CONFIG:CreateUnitFrameRaidTargetOptions(order, unit)
end
end,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
point = {
order = inc(1),
type = "group",
name = "",
inline = true,
+ disabled = isRaidTargetDisabled,
get = function(info)
return C.db.profile.units[unit].raid_target.point1[info[#info]]
end,
@@ -129,13 +129,17 @@ function CONFIG:CreateUnitFrameDebuffIconsOptions(order, unit)
["Power.Text"] = true,
}
+ local function areDebuffIconsDisabled()
+ return not C.db.profile.units[unit].debuff.enabled
+ end
+
return {
order = order,
type = "group",
name = L["DISPELLABLE_DEBUFF_ICONS"],
args = {
enabled = {
- order = 1,
+ order = reset(1),
type = "toggle",
name = L["ENABLE"],
get = function()
@@ -151,32 +155,32 @@ function CONFIG:CreateUnitFrameDebuffIconsOptions(order, unit)
},
reset = {
type = "execute",
- order = 2,
- name = L["RESTORE_DEFAULTS"],
+ order = inc(1),
+ name = L["RESET_TO_DEFAULT"],
+ disabled = areDebuffIconsDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].debuff, C.db.profile.units[unit].debuff)
+
UNITFRAMES:For(unit, "UpdateDebuffIndicator")
end,
},
preview = {
type = "execute",
- order = 3,
+ order = inc(1),
name = L["PREVIEW"],
+ disabled = areDebuffIconsDisabled,
func = function()
UNITFRAMES:For(unit, "For", "DebuffIndicator", "Preview")
end,
},
- spacer_1 = {
- order = 9,
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
point = {
- order = 10,
+ order = inc(1),
type = "group",
name = "",
inline = true,
+ disabled = areDebuffIconsDisabled,
get = function(info)
return C.db.profile.units[unit].debuff.point1[info[#info]]
end,
@@ -190,33 +194,33 @@ function CONFIG:CreateUnitFrameDebuffIconsOptions(order, unit)
end,
args = {
p = {
- order = 1,
+ order = reset(2),
type = "select",
name = L["POINT"],
desc = L["POINT_DESC"],
values = CONFIG.POINTS,
},
anchor = {
- order = 2,
+ order = inc(2),
type = "select",
name = L["ANCHOR"],
values = CONFIG:GetRegionAnchors(ignoredAnchors),
},
rP = {
- order = 3,
+ order = inc(2),
type = "select",
name = L["RELATIVE_POINT"],
desc = L["RELATIVE_POINT_DESC"],
values = CONFIG.POINTS,
},
x = {
- order = 4,
+ order = inc(2),
type = "range",
name = L["X_OFFSET"],
min = -128, max = 128, step = 1,
},
y = {
- order = 5,
+ order = inc(2),
type = "range",
name = L["Y_OFFSET"],
min = -128, max = 128, step = 1,
@@ -239,6 +243,10 @@ local PORTRAIT_POSITIONS = {
}
function CONFIG:CreateUnitFramePortraitOptions(order, unit)
+ local function isPortraitDisabled()
+ return not C.db.profile.units[unit].portrait.enabled
+ end
+
return {
order = order,
type = "group",
@@ -264,31 +272,41 @@ function CONFIG:CreateUnitFramePortraitOptions(order, unit)
reset = {
order = inc(1),
type = "execute",
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
+ disabled = isPortraitDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].portrait, C.db.profile.units[unit].portrait)
+
UNITFRAMES:For(unit, "UpdatePortrait")
UNITFRAMES:For(unit, "UpdateClassPower")
UNITFRAMES:For(unit, "UpdateRunes")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
style = {
order = inc(1),
type = "select",
name = L["STYLE"],
values = PORTRAIT_STYLES,
+ disabled = isPortraitDisabled,
},
position = {
order = inc(1),
type = "select",
name = L["POSITION"],
values = PORTRAIT_POSITIONS,
+ disabled = isPortraitDisabled,
+ },
+ scale = {
+ type = "range",
+ name = L["SCALE"],
+ min = 1, max = 4, step = 0.01, bigStep = 0.1,
+ isPercent = true,
+ disabled = isPortraitDisabled,
+ hidden = function()
+ return C.db.profile.units[unit].portrait.style ~= "3D"
+ end,
},
},
}
diff --git a/ls_UI_Options/unitframes/name.lua b/ls_UI_Options/unitframes/name.lua
index a1b5b3e4..5b6b332d 100644
--- a/ls_UI_Options/unitframes/name.lua
+++ b/ls_UI_Options/unitframes/name.lua
@@ -42,18 +42,15 @@ function CONFIG:CreateUnitFrameNameOptions(order, unit)
reset = {
type = "execute",
order = reset(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].name, C.db.profile.units[unit].name)
+
UNITFRAMES:For(unit, "UpdateName")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
size = {
order = inc(1),
type = "range",
@@ -77,13 +74,8 @@ function CONFIG:CreateUnitFrameNameOptions(order, unit)
order = inc(1),
type = "toggle",
name = L["WORD_WRAP"],
- disabled = isSecondaryAnchorDisabled,
- },
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
},
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
point1 = {
order = inc(1),
type = "group",
@@ -135,11 +127,7 @@ function CONFIG:CreateUnitFrameNameOptions(order, unit)
},
},
},
- spacer_3 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_3 = CONFIG:CreateSpacer(inc(1)),
point2 = {
order = inc(1),
type = "group",
@@ -195,11 +183,7 @@ function CONFIG:CreateUnitFrameNameOptions(order, unit)
},
},
},
- spacer_4 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_4 = CONFIG:CreateSpacer(inc(1)),
tag = {
order = inc(1),
type = "input",
diff --git a/ls_UI_Options/unitframes/power.lua b/ls_UI_Options/unitframes/power.lua
index ce95299c..eb9c7cbc 100644
--- a/ls_UI_Options/unitframes/power.lua
+++ b/ls_UI_Options/unitframes/power.lua
@@ -23,6 +23,10 @@ local powerIgnoredAnchors = {
}
function CONFIG:CreateUnitFramePowerOptions(order, unit)
+ local function isPowerDisabled()
+ return not C.db.profile.units[unit].power.enabled
+ end
+
local temp = {
order = order,
type = "group",
@@ -45,24 +49,23 @@ function CONFIG:CreateUnitFramePowerOptions(order, unit)
reset = {
type = "execute",
order = inc(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
+ disabled = isPowerDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].power, C.db.profile.units[unit].power)
+
UNITFRAMES:For(unit, "UpdatePower")
UNITFRAMES:For(unit, "UpdatePowerPrediction")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
prediction = {
order = inc(1),
type = "toggle",
name = L["COST_PREDICTION"],
desc = L["COST_PREDICTION_DESC"],
+ disabled = isPowerDisabled,
get = function()
return C.db.profile.units[unit].power.prediction.enabled
end,
@@ -72,16 +75,13 @@ function CONFIG:CreateUnitFramePowerOptions(order, unit)
UNITFRAMES:For(unit, "UpdatePowerPrediction")
end,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
text = {
order = inc(1),
type = "group",
name = L["BAR_TEXT"],
inline = true,
+ disabled = isPowerDisabled,
get = function(info)
return C.db.profile.units[unit].power.text[info[#info]]
end,
@@ -106,11 +106,12 @@ function CONFIG:CreateUnitFramePowerOptions(order, unit)
name = L["TEXT_HORIZ_ALIGNMENT"],
values = CONFIG.H_ALIGNMENTS,
},
- spacer_1 = {
+ word_wrap = {
order = inc(2),
- type = "description",
- name = " ",
+ type = "toggle",
+ name = L["WORD_WRAP"],
},
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
point = {
order = inc(2),
type = "group",
@@ -162,11 +163,7 @@ function CONFIG:CreateUnitFramePowerOptions(order, unit)
},
},
},
- spacer_2 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
tag = {
order = inc(2),
type = "input",
@@ -204,6 +201,10 @@ local altPowerExtraAnchors = {
}
function CONFIG:CreateUnitFrameAltPowerOptions(order, unit)
+ local function isAltPowerDisabled()
+ return not C.db.profile.units[unit].alt_power.enabled
+ end
+
return {
order = order,
type = "group",
@@ -225,23 +226,22 @@ function CONFIG:CreateUnitFrameAltPowerOptions(order, unit)
reset = {
type = "execute",
order = inc(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
+ disabled = isAltPowerDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].alt_power, C.db.profile.units[unit].alt_power)
+
UNITFRAMES:For(unit, "UpdateAlternativePower")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
text = {
order = inc(1),
type = "group",
name = L["BAR_TEXT"],
inline = true,
+ disabled = isAltPowerDisabled,
get = function(info)
return C.db.profile.units[unit].alt_power.text[info[#info]]
end,
@@ -266,11 +266,12 @@ function CONFIG:CreateUnitFrameAltPowerOptions(order, unit)
name = L["TEXT_HORIZ_ALIGNMENT"],
values = CONFIG.H_ALIGNMENTS,
},
- spacer_1 = {
+ word_wrap = {
order = inc(2),
- type = "description",
- name = " ",
+ type = "toggle",
+ name = L["WORD_WRAP"],
},
+ spacer_1 = CONFIG:CreateSpacer(inc(2)),
point = {
order = inc(2),
type = "group",
@@ -322,17 +323,13 @@ function CONFIG:CreateUnitFrameAltPowerOptions(order, unit)
},
},
},
- spacer_2 = {
- order = inc(2),
- type = "description",
- name = " ",
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(2)),
tag = {
order = inc(2),
type = "input",
width = "full",
name = L["FORMAT"],
- desc = L["ALT_POWER_FORMAT_DESC"],
+ desc = L["ALTERNATIVE_POWER_FORMAT_DESC"],
get = function()
return C.db.profile.units[unit].alt_power.text.tag:gsub("\124", "\124\124")
end,
@@ -340,6 +337,7 @@ function CONFIG:CreateUnitFrameAltPowerOptions(order, unit)
value = value:gsub("\124\124+", "\124")
if C.db.profile.units[unit].alt_power.text.tag ~= value then
C.db.profile.units[unit].alt_power.text.tag = value
+
UNITFRAMES:For(unit, "For", "AlternativePower", "UpdateConfig")
UNITFRAMES:For(unit, "For", "AlternativePower", "UpdateTags")
end
@@ -360,6 +358,10 @@ local function hidePowerCost()
end
function CONFIG:CreateUnitFrameClassPowerOptions(order, unit)
+ local function isClassPowerDisabled()
+ return not C.db.profile.units[unit].class_power.enabled
+ end
+
return {
order = order,
type = "group",
@@ -385,10 +387,12 @@ function CONFIG:CreateUnitFrameClassPowerOptions(order, unit)
reset = {
type = "execute",
order = inc(1),
- name = L["RESTORE_DEFAULTS"],
+ name = L["RESET_TO_DEFAULT"],
+ disabled = isClassPowerDisabled,
confirm = CONFIG.ConfirmReset,
func = function()
CONFIG:CopySettings(D.profile.units[unit].class_power, C.db.profile.units[unit].class_power)
+
UNITFRAMES:For(unit, "UpdateAdditionalPower")
UNITFRAMES:For(unit, "UpdatePowerPrediction")
UNITFRAMES:For(unit, "UpdateClassPower")
@@ -396,16 +400,13 @@ function CONFIG:CreateUnitFrameClassPowerOptions(order, unit)
UNITFRAMES:For(unit, "UpdateStagger")
end,
},
- spacer_1 = {
- order = inc(1),
- type = "description",
- name = " ",
- },
+ spacer_1 = CONFIG:CreateSpacer(inc(1)),
prediction = {
order = inc(1),
type = "toggle",
name = L["COST_PREDICTION"],
desc = L["COST_PREDICTION_DESC"],
+ disabled = isClassPowerDisabled,
hidden = hidePowerCost,
get = function()
return C.db.profile.units[unit].class_power.prediction.enabled
@@ -416,16 +417,12 @@ function CONFIG:CreateUnitFrameClassPowerOptions(order, unit)
UNITFRAMES:For(unit, "UpdatePowerPrediction")
end,
},
- spacer_2 = {
- order = inc(1),
- type = "description",
- name = " ",
- hidden = isPlayerDeathKnight,
- },
+ spacer_2 = CONFIG:CreateSpacer(inc(1)),
runes = {
order = inc(1),
type = "group",
name = L["RUNES"],
+ disabled = isClassPowerDisabled,
hidden = isPlayerDeathKnight,
inline = true,
get = function(info)