Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ls- committed Jul 26, 2024
2 parents d6ad5e9 + e5fa8de commit e139c6c
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 13 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ read_globals = {
"CreateFrame",
"CreateUnsecuredObjectPool",
"DEFAULT_TAB_SELECTED_COLOR_TABLE",
"ElvUI",
"GameFontNormalSmall",
"GameTooltip",
"GeneralDockManager",
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# CHANGELOG

## Version 110000.02

- Improved compatibility with ElvUI. Now the addon will stop loading if it detects that ElvUI chat is enabled, and
you'll be greeted by the addon incompatibility popup from ElvUI. Just to make things clear, it's safe to use LS: Glass
with ElvUI, you just want to disable its chat module because both addons will try to modify chat in rather extensive
ways which nowadays may result in game freezes.
- Fixed an issue where the addon would struggle to scroll through messages that are taller than the chat frame itself.
- Fixed an issue where the "Copy from" menu in the chat settings would fail to fetch the list of other chat windows.
- Updated Traditional Chinese translation. Translated by RainbowUI@Curse.

## Version 110000.01

- Added 11.0.0 support.
Expand Down
10 changes: 4 additions & 6 deletions ls_Glass/core/changelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ local _G = getfenv(0)

-- Mine
E.CHANGELOG = [[
- Added 11.0.0 support.
- Rewrote the addon. Only font-related settings will be carried over.
- Added smooth scrolling through the chat history. Most fading and sliding options are gone because the new system relies on rather tight timings.
- Added proper "Social" button handling.
- Replaced the fade in on mouseover option with show on click. It's causing way too many false positives, too much headache.
- Most chat options are now tab-specific.
- Improved compatibility with ElvUI. Now the addon will stop loading if it detects that ElvUI chat is enabled, and you'll be greeted by the addon incompatibility popup from ElvUI. Just to make things clear, it's safe to use LS: Glass with ElvUI, you just want to disable its chat module because both addons will try to modify chat in rather extensive ways which nowadays may result in game freezes.
- Fixed an issue where the addon would struggle to scroll through messages that are taller than the chat frame itself.
- Fixed an issue where the "Copy from" menu in the chat settings would fail to fetch the list of other chat windows.
- Updated Traditional Chinese translation. Translated by RainbowUI@Curse.
]]
9 changes: 5 additions & 4 deletions ls_Glass/core/components/slidingmessageframe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ function object_proto:ResetState(doNotRefresh)
self:SetFirstActiveMessageID(id)

self:SetAtBottom(id == 0 or (id == 1 and offset == 0))
self:SetAtTop(id == self:GetNumHistoryElements() and offset == 0)
self:SetAtTop(id == self:GetNumHistoryElements() and self:GetLastActiveMessageOffset() < self:GetMessageLineHeight())

if not doNotRefresh then
self:UpdateFading()
Expand Down Expand Up @@ -576,7 +576,7 @@ end

function object_proto:SetLastActiveMessageInfo(id, offset)
self.lastActiveMessageID = id
self.lastActiveMessageOffset = offset
self.lastActiveMessageOffset = m_max(offset, 0)
end

-- TODO: Remove
Expand Down Expand Up @@ -794,7 +794,8 @@ function object_proto:RefreshActive(startIndex, maxPixels)
end

if lineIndex > 0 then
self:SetLastActiveMessageInfo(messageID, self.activeMessages[lineIndex]:GetBottom() - self:GetBottom())
-- 2 is kinda arbitrary, I just want to make sure that only the first line of the last message is visible at the top
self:SetLastActiveMessageInfo(messageID, self.activeMessages[lineIndex]:GetTop() - self:GetBottom() - self:GetMessageLineHeight() + 2)
end

-- just hide the excess, releasing and removing them here is expensive, they'll be taken care of when the frame gets
Expand Down Expand Up @@ -859,7 +860,7 @@ function object_proto:OnMouseWheel(delta)

self:ResetFadingTimer()

if (delta == UP and self:IsAtBottom()) then
if delta == UP and self:IsAtBottom() then
self:RefreshActive(self:GetFirstActiveMessageID())
self:UpdateFading()

Expand Down
5 changes: 3 additions & 2 deletions ls_Glass/core/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ local function getChatOptionsForCopy(id)
if i ~= id and i ~= 2 then
if isChatFrameShown(i) then
tabs[i] = GetChatWindowInfo(i)
else
break
end
end
end
Expand Down Expand Up @@ -170,6 +168,9 @@ local function createChatFrameConfig(id, order)
values = function()
return getChatOptionsForCopy(id)
end,
disabled = function()
return not next(getChatOptionsForCopy(id))
end,
get = function() end,
set = function(_, value)
copyOptions(C.db.profile.chat[value], C.db.profile.chat[id])
Expand Down
8 changes: 8 additions & 0 deletions ls_Glass/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ end
E:RegisterEvent("ADDON_LOADED", function(arg1)
if arg1 ~= addonName then return end

-- stop loading if ElvUI with enabled chat is detected
local elvUI = ElvUI and ElvUI[1]
if elvUI and elvUI.private.chat.enable then
elvUI:AddIncompatible("Chat", addonName)

return
end

if LS_GLASS_GLOBAL_CONFIG then
if LS_GLASS_GLOBAL_CONFIG.profiles then
for profile, data in next, LS_GLASS_GLOBAL_CONFIG.profiles do
Expand Down
7 changes: 7 additions & 0 deletions ls_Glass/locales/zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,24 @@ L["BOTTOM"] = "下方"
L["CHANGELOG"] = "更新資訊"
L["CHANGELOG_FULL"] = "完整內容"
L["CONFIG_WARNING"] = "強烈建議在設定完成後,甚至只是打開這個設定視窗都要 |cffffd200重新載入介面 /reload|r,以避免在戰鬥中發生任何錯誤。"
L["CONFIRM_RESET"] = "是否要重置 \"%s\"?"
L["COPY_FROM"] = "複製,從"
L["DOCK"] = "標籤頁 & 按鈕"
L["DOWNLOADS"] = "下載"
L["EDITBOX"] = "文字輸入框"
L["FADE_OUT_DELAY"] = "淡出延遲時間"
L["FADING"] = "淡出"
L["FONT"] = "字體"
L["MOUSEOVER_TOOLTIPS"] = "滑鼠指向顯示資訊"
L["OFFSET"] = "位置偏移"
L["OPEN_CONFIG"] = "開啟設定"
L["OUTLINE"] = "外框"
L["POSITION"] = "位置"
L["SCROLL_BUTTONS"] = "捲動按鈕"
L["SHADOW"] = "陰影"
L["SHOW_ON_CLICK"] = "滑鼠點擊時顯示"
L["SIZE"] = "大小"
L["SMOOTH_SCROLLING"] = "平滑捲動"
L["SUPPORT"] = "支援"
L["TOP"] = "上方"
L["X_PADDING"] = "水平內邊界"
Expand Down
3 changes: 2 additions & 1 deletion ls_Glass/ls_Glass.toc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
## Interface: 110000, 110002
## Author: lightspark
## Version: 110000.01
## Version: 110000.02
## Title: LS: |cffe0bc5bGlass|r
## Notes: Smooth as glass.
## IconTexture: Interface\AddOns\ls_Glass\assets\logo-64
## SavedVariables: LS_GLASS_GLOBAL_CONFIG
## OptionalDeps: ElvUI

embeds\_embeds.xml
locales\_locales.xml
Expand Down

0 comments on commit e139c6c

Please sign in to comment.