Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ls- committed Nov 28, 2022
2 parents 112605e + c6d8e33 commit 9c10056
Show file tree
Hide file tree
Showing 27 changed files with 274 additions and 95 deletions.
File renamed without changes.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# CHANGELOG

## Version 100002.01

- Added 10.0.2 support.
- Updated embeds.

### Action Bars

- The latest LAB includes custom flyouts (a bit buggy).
- Reverted the hack added in 100000.01 that locked action bars, it's no longer necessary.

### Unit Frames

- Fixed an issue where heal and power cost predictions would sometimes be displayed outside the
bounds of the unit frame.

### Known Issues

- Empowered spell casts have very basic support atm. I'm planning to rework castbars and other
progress bars later, so I chose not to do the same work twice. Soz.

## Version 100000.03

### Action Bars
Expand Down
14 changes: 10 additions & 4 deletions ls_UI/core/button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ local function button_ClearBindings(self)
end
end

local function setNormalTextureHook(self, texture)
if texture then
self:SetNormalTexture(nil)
local function addMaskTextureHook(self, texture)
self:RemoveMaskTexture(texture)
end

local function setNormalAtlasTextureHook(self, texture)
if texture and texture ~= 0 then
self:SetNormalTexture(0)
end
end

Expand Down Expand Up @@ -185,6 +189,7 @@ local function skinButton(button)
local iconMask = button.IconMask
if iconMask then
icon:RemoveMaskTexture(iconMask)
hooksecurefunc(icon, "AddMaskTexture", addMaskTextureHook)
end
end

Expand Down Expand Up @@ -303,7 +308,8 @@ local function skinButton(button)
local normalTexture = button.GetNormalTexture and button:GetNormalTexture()
if normalTexture then
normalTexture:SetTexture(0)
hooksecurefunc(button, "SetNormalTexture", setNormalTextureHook)
hooksecurefunc(button, "SetNormalTexture", setNormalAtlasTextureHook)
hooksecurefunc(button, "SetNormalAtlas", setNormalAtlasTextureHook)

border = E:CreateBorder(button)
border:SetTexture("Interface\\AddOns\\ls_UI\\assets\\border-thin")
Expand Down
26 changes: 9 additions & 17 deletions ls_UI/core/changelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,21 @@ local _G = getfenv(0)

-- Mine
E.CHANGELOG = [[
### Action Bars
- Fixed a bug where the extra action button would stay hidden despite being enabled.
- Fixed a bug where an action bar anchored to another frame would appear in a different spot from
its mover. I had to rework movers for DF, so there might be more of these, please, continue to
report them.
- Added 10.0.2 support.
- Updated embeds.
### Minimap
### Action Bars
- Added custom difficulty flags. LFR, normal, heroic, mythic, and M+ difficulties will now have
unique flags. There's also an option to show the tooltip with the difficulty info, it's disabled
by default.
- The latest LAB includes custom flyouts (a bit buggy).
- Reverted the hack added in 100000.01 that locked action bars, it's no longer necessary.
### Unit Frames
- Added an option to use Blizzard castbar. When you disable the player castbar, the new "Enable
Blizzard Castbar" option will appear next to it.
- Fixed an issue where heal and power cost predictions would sometimes be displayed outside the
bounds of the unit frame.
### Known Issues
- Spell flyouts don't work. It's not a bug in my UI, it's a Blizz bug that affects all addons.
I feel your pain, I have a mage alt, but for the time being either place frequently used spells
on your action bars or use them directly from your spellbook.
- Tooltips don't work. Just to reiterate, Blizz chose to delay the new tooltip system until 10.0.2,
the rewritten tooltip module relies on it to work, so I had to disable it for the time being.
- Empowered spell casts have very basic support atm. I'm planning to rework castbars and other
progress bars later, so I chose not to do the same work twice. Soz.
]]
60 changes: 57 additions & 3 deletions ls_UI/core/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1892,11 +1892,11 @@ D.profile = {
point = {"TOPRIGHT", "UIParent", "TOPRIGHT", -4, -4},
},
bars = {
mana_indicator = "button", -- hotkey
range_indicator = "button", -- hotkey
rightclick_selfcast = false,
blizz_vehicle = false,
scale = 1,
lock = true,
endcaps = "BOTH", -- "LEFT", "RIGHT", "NONE"
cooldown = {
exp_threshold = 5,
Expand All @@ -1909,8 +1909,6 @@ D.profile = {
},
desaturation = {
unusable = true,
mana = true,
range = true,
},
bar1 = { -- MainMenuBar
flyout_dir = "UP",
Expand All @@ -1937,14 +1935,20 @@ D.profile = {
hotkey = {
enabled = true,
size = 12,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
macro = {
enabled = true,
size = 12,
point = {"BOTTOM", 0, 0},
h_alignment = "CENTER",
},
count = {
enabled = true,
size = 12,
point = {"BOTTOMRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down Expand Up @@ -1980,14 +1984,20 @@ D.profile = {
hotkey = {
enabled = true,
size = 12,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
macro = {
enabled = true,
size = 12,
point = {"BOTTOM", 0, 0},
h_alignment = "CENTER",
},
count = {
enabled = true,
size = 12,
point = {"BOTTOMRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down Expand Up @@ -2023,14 +2033,20 @@ D.profile = {
hotkey = {
enabled = true,
size = 12,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
macro = {
enabled = true,
size = 12,
point = {"BOTTOM", 0, 0},
h_alignment = "CENTER",
},
count = {
enabled = true,
size = 12,
point = {"BOTTOMRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down Expand Up @@ -2066,14 +2082,20 @@ D.profile = {
hotkey = {
enabled = true,
size = 12,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
macro = {
enabled = true,
size = 12,
point = {"BOTTOM", 0, 0},
h_alignment = "CENTER",
},
count = {
enabled = true,
size = 12,
point = {"BOTTOMRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down Expand Up @@ -2109,14 +2131,20 @@ D.profile = {
hotkey = {
enabled = true,
size = 12,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
macro = {
enabled = true,
size = 12,
point = {"BOTTOM", 0, 0},
h_alignment = "CENTER",
},
count = {
enabled = true,
size = 12,
point = {"BOTTOMRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down Expand Up @@ -2152,14 +2180,20 @@ D.profile = {
hotkey = {
enabled = true,
size = 12,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
macro = {
enabled = true,
size = 12,
point = {"BOTTOM", 0, 0},
h_alignment = "CENTER",
},
count = {
enabled = true,
size = 12,
point = {"BOTTOMRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down Expand Up @@ -2195,14 +2229,20 @@ D.profile = {
hotkey = {
enabled = true,
size = 12,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
macro = {
enabled = true,
size = 12,
point = {"BOTTOM", 0, 0},
h_alignment = "CENTER",
},
count = {
enabled = true,
size = 12,
point = {"BOTTOMRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down Expand Up @@ -2238,14 +2278,20 @@ D.profile = {
hotkey = {
enabled = true,
size = 12,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
macro = {
enabled = true,
size = 12,
point = {"BOTTOM", 0, 0},
h_alignment = "CENTER",
},
count = {
enabled = true,
size = 12,
point = {"BOTTOMRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down Expand Up @@ -2281,6 +2327,8 @@ D.profile = {
hotkey = {
enabled = true,
size = 10,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down Expand Up @@ -2314,6 +2362,8 @@ D.profile = {
hotkey = {
enabled = true,
size = 10,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down Expand Up @@ -2346,6 +2396,8 @@ D.profile = {
hotkey = {
enabled = true,
size = 12,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
point = {"BOTTOM", "UIParent", "BOTTOM", 0, 20},
},
Expand All @@ -2368,6 +2420,8 @@ D.profile = {
hotkey = {
enabled = true,
size = 14,
point = {"TOPRIGHT", 2, 0},
h_alignment = "RIGHT",
},
cooldown = {
text = {
Expand Down
14 changes: 14 additions & 0 deletions ls_UI/core/modernize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,20 @@ function P:Modernize(data, name, key)

data.version = 10000001
end

--> 100002.01
if data.version < 10000201 then
if data.bars then
data.bars.mana_indicator = nil

if data.bars.desaturation then
data.bars.desaturation.mana = nil
data.bars.desaturation.range = nil
end
end

data.version = 10000201
end
elseif key == "private" then
--> 90001.05
if data.version < 9000105 then
Expand Down
29 changes: 13 additions & 16 deletions ls_UI/core/mover.lua
Original file line number Diff line number Diff line change
Expand Up @@ -444,30 +444,27 @@ do

nameToggle.Text = _G[nameToggle:GetName() .. "Text"]

local gridDropdown = LibStub("LibDropDown"):NewButtonStretch(settings, "$parentGridDropdown")
local gridDropdown = LibStub("LibDropDown-ls"):NewButtonStretch(settings, "$parentGridDropdown")
gridDropdown:SetPoint("TOPRIGHT", -3, -3)
gridDropdown:SetSize(120, 20)
gridDropdown:SetFrameLevel(3)
gridDropdown:SetText(L["MOVER_GRID"])
settings.GridDropdown = gridDropdown

local info = {
isRadio = true,
func = function(_, _, value)
grid:SetSize(value)
grid:Show()
end,
checked = function(self)
return grid:GetSize() == self.args[1]
end,
}

local GRID_SIZES = {4, 8, 16, 32}
for i = 1, #GRID_SIZES do
info.text = tostring(GRID_SIZES[i])
info.args = {GRID_SIZES[i]}

gridDropdown:Add(info)
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

local usageText = settings:CreateFontString(nil, "OVERLAY")
Expand Down
Loading

0 comments on commit 9c10056

Please sign in to comment.