Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ls- committed Dec 2, 2022
2 parents 9c10056 + 2b68a08 commit 3c5139d
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 47 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## Version 100002.02

### Action Bars

- Readded the OOM indicator option back to the action bar config.
- Fixed action button lock.
- Misc bug fixes and tweaks.

## Version 100002.01

- Added 10.0.2 support.
Expand Down
14 changes: 8 additions & 6 deletions ls_UI/core/button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ local function skinButton(button)

local slotBackground = button.SlotBackground
if slotBackground then
slotBackground:Show()
slotBackground:SetDrawLayer("BACKGROUND", -7)
slotBackground:SetAlpha(1)
slotBackground:SetAllPoints()
Expand Down Expand Up @@ -310,14 +311,15 @@ local function skinButton(button)
normalTexture:SetTexture(0)
hooksecurefunc(button, "SetNormalTexture", setNormalAtlasTextureHook)
hooksecurefunc(button, "SetNormalAtlas", setNormalAtlasTextureHook)

border = E:CreateBorder(button)
border:SetTexture("Interface\\AddOns\\ls_UI\\assets\\border-thin")
border:SetSize(16)
border:SetOffset(-8)
button.Border_ = border
end

-- ExtraActionButton1 has no normal texture
border = E:CreateBorder(button)
border:SetTexture("Interface\\AddOns\\ls_UI\\assets\\border-thin")
border:SetSize(16)
border:SetOffset(-8)
button.Border_ = border

local pushedTexture = button.GetPushedTexture and button:GetPushedTexture()
if pushedTexture then
setPushedTexture(button)
Expand Down
18 changes: 3 additions & 15 deletions ls_UI/core/changelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,9 @@ local _G = getfenv(0)

-- Mine
E.CHANGELOG = [[
- 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.
- Readded the OOM indicator option back to the action bar config.
- Fixed action button lock.
- Misc bug fixes and tweaks.
]]
3 changes: 2 additions & 1 deletion ls_UI/core/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1892,11 +1892,12 @@ D.profile = {
point = {"TOPRIGHT", "UIParent", "TOPRIGHT", -4, -4},
},
bars = {
mana_indicator = "button", -- hotkey
range_indicator = "button", -- hotkey
lock = true,
rightclick_selfcast = false,
blizz_vehicle = false,
scale = 1,
lock = true,
endcaps = "BOTH", -- "LEFT", "RIGHT", "NONE"
cooldown = {
exp_threshold = 5,
Expand Down
2 changes: 0 additions & 2 deletions ls_UI/core/modernize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,6 @@ function P:Modernize(data, name, key)
--> 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
Expand Down
2 changes: 1 addition & 1 deletion ls_UI/embeds/LibActionButton-1.0
4 changes: 2 additions & 2 deletions ls_UI/ls_UI.toc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Interface: 100002
## Author: lightspark
## Version: 100002.01
## Version: 100002.02
## Title: LS: |cff1a9fc0UI|r
## Notes: Yet another UI, but this one is a bit special...
## SavedVariables: LS_UI_GLOBAL_CONFIG, LS_UI_PRIVATE_CONFIG
## OptionalDeps: AdiButtonAuras, Masque, MaxDps, MinimapButtonFrame

# taintless.xml
taintless.xml
embeds\_embeds.xml
core\_core.xml
locales\_locales.xml
Expand Down
2 changes: 2 additions & 0 deletions ls_UI/modules/bars/actionbars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ function bar_proto:UpdateButtonConfig()
self.buttonConfig.flyoutDirection = self._config.flyout_dir
self.buttonConfig.hideElements.hotkey = not self._config.hotkey.enabled
self.buttonConfig.hideElements.macro = not self._config.macro.enabled
self.buttonConfig.outOfManaColoring = self._config.mana_indicator
self.buttonConfig.outOfRangeColoring = self._config.range_indicator
self.buttonConfig.showGrid = self._config.grid

Expand All @@ -231,6 +232,7 @@ function bar1_proto:UpdateConfig()
self._config.cooldown = E:CopyTable(C.db.profile.bars.cooldown, self._config.cooldown)
self._config.desaturation = E:CopyTable(C.db.profile.bars.desaturation, self._config.desaturation)
self._config.lock = C.db.profile.bars.lock
self._config.mana_indicator = C.db.profile.bars.mana_indicator
self._config.range_indicator = C.db.profile.bars.range_indicator
self._config.rightclick_selfcast = C.db.profile.bars.rightclick_selfcast

Expand Down
1 change: 1 addition & 0 deletions ls_UI/modules/bars/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function bar_proto:UpdateConfig()
self._config = E:CopyTable(C.db.profile.bars[self._id], self._config)
self._config.height = self._config.height ~= 0 and self._config.height or self._config.width
self._config.desaturation = E:CopyTable(C.db.profile.bars.desaturation, self._config.desaturation)
self._config.lock = C.db.profile.bars.lock
self._config.mana_indicator = C.db.profile.bars.mana_indicator
self._config.range_indicator = C.db.profile.bars.range_indicator
self._config.rightclick_selfcast = C.db.profile.bars.rightclick_selfcast
Expand Down
107 changes: 87 additions & 20 deletions ls_UI/taintless.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Ui><Script><![CDATA[--[[
TaintLess [20-10-19]
TaintLess [22-11-27]
https://www.townlong-yak.com/addons/taintless
All rights reserved.
Expand All @@ -9,24 +9,35 @@ Permission is hereby granted to distribute unmodified copies of this file.
]]
local function purgeKey(t, k)
local logLevel, c = GetCVar("taintLog"), -42
if (tonumber(logLevel) or 0) > 1 then
if CVarCallbackRegistry then
CVarCallbackRegistry:UnregisterEvent("CVAR_UPDATE")
end
SetCVar("taintLog", "1")
else
logLevel = nil
end
t[k] = nil
local c = 42
repeat
if t[c] == nil then
t[c] = nil
end
c = c + 1
c = c - 1
until issecurevariable(t, k)
if logLevel then
SetCVar("taintLog", logLevel)
if CVarCallbackRegistry then
CVarCallbackRegistry:RegisterEvent("CVAR_UPDATE")
end
end
end
-- https://www.townlong-yak.com/bugs/Mx7CWN-RefreshOverread
-- https://www.townlong-yak.com/addons/taintless/fixes/RefreshOverread
if (tonumber(UIDD_REFRESH_OVERREAD_PATCH_VERSION) or 0) < 3 then
UIDD_REFRESH_OVERREAD_PATCH_VERSION = 3
hooksecurefunc("UIDropDownMenu_InitializeHelper", function()
if UIDD_REFRESH_OVERREAD_PATCH_VERSION ~= 3 then
return
end
for i=1, UIDROPDOWNMENU_MAXLEVELS do
for i=1, UIDD_REFRESH_OVERREAD_PATCH_VERSION == 3 and UIDROPDOWNMENU_MAXLEVELS or 0 do
for j=1+_G["DropDownList" .. i].numButtons, UIDROPDOWNMENU_MAXBUTTONS do
local b, _ = _G["DropDownList" .. i .. "Button" .. j]
_ = issecurevariable(b, "checked") or purgeKey(b, "checked")
Expand All @@ -36,28 +47,84 @@ if (tonumber(UIDD_REFRESH_OVERREAD_PATCH_VERSION) or 0) < 3 then
end)
end
-- https://www.townlong-yak.com/bugs/Kjq4hm-DisplayModeTaint
-- https://www.townlong-yak.com/addons/taintless/fixes/DisplayModeTaint
if (tonumber(UIDROPDOWNMENU_OPEN_PATCH_VERSION) or 0) < 1 then
UIDROPDOWNMENU_OPEN_PATCH_VERSION = 1
hooksecurefunc("UIDropDownMenu_InitializeHelper", function(frame)
if UIDROPDOWNMENU_OPEN_PATCH_VERSION ~= 1 then
return
end
if UIDROPDOWNMENU_OPEN_MENU and UIDROPDOWNMENU_OPEN_MENU ~= frame
if UIDROPDOWNMENU_OPEN_PATCH_VERSION == 1
and UIDROPDOWNMENU_OPEN_MENU and UIDROPDOWNMENU_OPEN_MENU ~= frame
and not issecurevariable(UIDROPDOWNMENU_OPEN_MENU, "displayMode") then
purgeKey(_G, "UIDROPDOWNMENU_OPEN_MENU")
purgeKey(_G, "UIDROPDOWNMENU_OPEN_MENU")
end
end)
end
-- https://www.townlong-yak.com/bugs/gXwH4P-IOFrameSelection
if (tonumber(IOFRAME_SELECTION_PATCH_VERSION) or 0) < 1 then
IOFRAME_SELECTION_PATCH_VERSION = 1
InterfaceOptionsFrame:HookScript("OnHide", function()
if IOFRAME_SELECTION_PATCH_VERSION == 1 then
InterfaceOptionsFrameCategories.selection = nil
-- https://www.townlong-yak.com/addons/taintless/fixes/IOFrameSelection
if (tonumber(IOFRAME_SELECTION_PATCH_VERSION) or 0) < 3 then
IOFRAME_SELECTION_PATCH_VERSION = 3
if InterfaceOptionsFrame then
InterfaceOptionsFrame:HookScript("OnHide", function()
if IOFRAME_SELECTION_PATCH_VERSION == 3 then
InterfaceOptionsFrameCategories.selection = nil
end
end)
end
end
-- https://www.townlong-yak.com/addons/taintless/fixes/EditModeOpenDrop
if EditModeManagerFrame and FriendsFrameStatusDropDown and (tonumber(EDITMAN_OPENDROP_PATCH_VERSION) or 0) < 1 then
EDITMAN_OPENDROP_PATCH_VERSION = 1
hooksecurefunc(EditModeManagerFrame, "GetAttribute", function(_, attr)
if attr ~= "UIPanelLayout-checkFit" or EDITMAN_OPENDROP_PATCH_VERSION ~= 1
or (issecurevariable(DropDownList1, "maxWidth") and issecurevariable("UIDROPDOWNMENU_MENU_LEVEL")) then
elseif InCombatLockdown() and FriendsFrameStatusDropDown:IsProtected() then
elseif FriendsFrameStatusDropDown:IsVisible() then
FriendsFrameStatusDropDown:Hide()
FriendsFrameStatusDropDown:Show()
else
local op = FriendsFrameStatusDropDown:GetParent()
FriendsFrameStatusDropDown:SetParent(nil)
if not FriendsFrameStatusDropDown:IsShown() then
FriendsFrameStatusDropDown:Show()
FriendsFrameStatusDropDown:Hide()
end
FriendsFrameStatusDropDown:SetParent(op)
end
end)
end
-- https://www.townlong-yak.com/addons/taintless/fixes/ObjectiveTrackerUpdate
if ObjectiveTrackerFrame and (tonumber(OBJTRACK_DELAYUPDATE_PATCH_VERSION) or 0) < 1 then
OBJTRACK_DELAYUPDATE_PATCH_VERSION = 1
local counter, didDelayUpdate, delayFrameCount = (CreateFrame("Frame", nil, ObjectiveTrackerFrame))
counter:Hide()
counter:SetScript("OnUpdate", function()
if OBJTRACK_DELAYUPDATE_PATCH_VERSION == 1 then
delayFrameCount = delayFrameCount + 1
else
counter:Hide()
end
end)
hooksecurefunc("ObjectiveTracker_Update", function()
if OBJTRACK_DELAYUPDATE_PATCH_VERSION == 1 and didDelayUpdate then
didDelayUpdate = nil
purgeKey(ObjectiveTrackerFrame, "isUpdating")
end
end)
hooksecurefunc(ObjectiveTrackerFrame.HeaderMenu.Title, "ClearAllPoints", function()
if OBJTRACK_DELAYUPDATE_PATCH_VERSION == 1 and not ObjectiveTrackerFrame.isUpdating then
if issecurevariable(ObjectiveTrackerFrame, "isOnLeftSideOfScreen") then
if delayFrameCount then
delayFrameCount = nil
counter:Hide()
end
elseif (delayFrameCount or 0) < 4 then
ObjectiveTrackerFrame.isUpdating, didDelayUpdate, delayFrameCount = 86, 1, delayFrameCount or 0
counter:Show()
else
counter:Hide()
end
end
end)
end
]]></Script></Ui>
7 changes: 7 additions & 0 deletions ls_UI_Options/bars/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,13 @@ function CONFIG:CreateActionBarsOptions(order)
values = INDICATORS,
disabled = isModuleDisabled,
},
mana_indicator = {
order = inc(1),
type = "select",
name = L["OOM_INDICATOR"],
values = INDICATORS,
disabled = isModuleDisabled,
},
spacer_3 = {
order = inc(1),
type = "description",
Expand Down

0 comments on commit 3c5139d

Please sign in to comment.