Skip to content

Commit

Permalink
🚀 RELEASE: 6.1.7 (#49)
Browse files Browse the repository at this point in the history
* fix scaling at 5k resolution (#46)

* FIX: use correct WoW API variable for weapon item class (#47)

* FIX: use virtual frames to use elvui datatexts (#48)
  • Loading branch information
Toxicom authored May 6, 2023
1 parent cac0540 commit cfbf20d
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 23 deletions.
11 changes: 11 additions & 0 deletions Core/Changelog/6.1.7.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
local TXUI, F, E, I, V, P, G = unpack(select(2, ...))

TXUI.Changelog["6.1.7"] = {
HOTFIX = true,
CHANGES = {
"* ToxiUI",
"Fix scaling at 5k resolution. Credits to " .. F.String.Class("Nikipe", "MAGE"),
"Armory: Update API variable used for weapon item class. Credits to " .. F.String.Beta("Stiimo"),
"WunderBar: Fix DataText's tooltips by creating virtual frames. Credits to " .. F.String.Beta("Stiimo") .. " & " .. F.String.Class("ElvUI WindTools", "SHAMAN"),
},
}
1 change: 1 addition & 0 deletions Core/Changelog/Changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@
<Script file='6.1.4.lua' />
<Script file='6.1.5.lua' />
<Script file='6.1.6.lua' />
<Script file='6.1.7.lua' />
</Ui>
2 changes: 1 addition & 1 deletion Core/Functions/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ end

function F.PixelPerfect()
local perfectScale = 768 / E.physicalHeight
if E.physicalHeight == 2160 then perfectScale = perfectScale * 2 end
if E.physicalHeight == 2160 or E.physicalHeight == 2880 then perfectScale = perfectScale * 2 end
return perfectScale
end

Expand Down
8 changes: 4 additions & 4 deletions ElvUI_ToxiUI.toc
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
## Title: |cff1784d1ElvUI|r |cffffffffToxi|r|cff00e4f5UI|r
## Notes: Minimalistic ElvUI Edit by |cff00e4f5Toxi|r
## Author: Toxi (Toxicom#2957)
## Version: 6.1.6
## Version: 6.1.7
## RequiredDeps: ElvUI, ElvUI_WindTools
## OptionalDeps: Details, Plater
## DefaultState: Enabled
## Interface: 100005
## X-Interface: 100005
## Interface: 100100
## X-Interface: 100100
## X-Flavor: Mainline
## X-WoWI-ID: 25770
## X-Curse-Project-ID: 676447
## X-Tukui-ProjectID: 199
## X-Tukui-ProjectFolders: ElvUI_ToxiUI
## X-ElvUIVersion: 13.23
## X-ElvUIVersion: 13.31
## X-Wago-ID: XrNk5lKa
## X-GitHash: @project-version@

Expand Down
4 changes: 2 additions & 2 deletions ElvUI_ToxiUI_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Title: |cff1784d1ElvUI|r |cffffffffToxi|r|cff00e4f5UI|r
## Notes: Minimalistic ElvUI Edit by |cff00e4f5Toxi|r
## Author: Toxi (Toxicom#2957)
## Version: 6.1.6
## Version: 6.1.7
## RequiredDeps: ElvUI
## OptionalDeps: Details, Plater
## DefaultState: Enabled
Expand All @@ -12,7 +12,7 @@
## X-Curse-Project-ID: 676447
## X-Tukui-ProjectID: 199
## X-Tukui-ProjectFolders: ElvUI_ToxiUI
## X-ElvUIVersion: 13.23
## X-ElvUIVersion: 13.31
## X-Wago-ID: XrNk5lKa
## X-GitHash: @project-version@

Expand Down
4 changes: 2 additions & 2 deletions Modules/Plugins/Armory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ local GetSpecializationRole = GetSpecializationRole
local GetTitleName = GetTitleName
local InCombatLockdown = InCombatLockdown
local ipairs = ipairs
local LE_ITEM_CLASS_WEAPON = _G.LE_ITEM_CLASS_WEAPON
local ENUM_ITEM_CLASS_WEAPON = _G.Enum.ItemClass.Weapon
local LE_UNIT_STAT_AGILITY = _G.LE_UNIT_STAT_AGILITY
local LE_UNIT_STAT_INTELLECT = _G.LE_UNIT_STAT_INTELLECT
local LE_UNIT_STAT_STRENGTH = _G.LE_UNIT_STAT_STRENGTH
Expand Down Expand Up @@ -179,7 +179,7 @@ A.characterSlots = {
id = 17,
needsEnchant = true,
warningCondition = {
itemType = LE_ITEM_CLASS_WEAPON,
itemType = ENUM_ITEM_CLASS_WEAPON,
level = 70,
},
needsSocket = false,
Expand Down
9 changes: 9 additions & 0 deletions Modules/WunderBar/ElvUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ function WB:RegisterElvUIDatatexts()
local constructed = WB:NewModule(name)
self:ConstructElvUIDataText(constructed, dt)
self:RegisterSubModule(constructed, dt.events)

-- Create virtual frame and connect it to datatext
constructed.virtualFrame = {
name = dataTextName,
text = {
SetFormattedText = E.noop,
},
}
WB:ConnectVirtualFrameToDataText(dataTextName, constructed.virtualFrame)
end
end
end
Expand Down
7 changes: 6 additions & 1 deletion Modules/WunderBar/Functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ end
function WB:GetElvUIDataText(name)
local dt = DT.RegisteredDataTexts[name]

if dt and (dt.category == nil or dt.category ~= "Data Broker") then return dt end
if dt and dt.category ~= "Data Broker" then return dt end
end

function WB:ConnectVirtualFrameToDataText(dataTextName, virtualFrame)
local dt = self:GetElvUIDataText(dataTextName)
if dt.applySettings then dt.applySettings(virtualFrame, E.media.hexvaluecolor) end
end

function WB:FlashFontOnEvent(fs, icon)
Expand Down
54 changes: 43 additions & 11 deletions Modules/WunderBar/SubModules/MicroMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ MM.microMenu = {
end
end,

-- RightButton = function(frame)
-- local dtModule = WB:GetElvUIDataText("Guild")

-- if dtModule then
-- dtModule.eventFunc(WB:GetElvUIDummy(), "GUILD_ROSTER_UPDATE")
-- dtModule.onClick(frame, "RightButton")
-- end
-- end,
RightButton = function(frame)
local dtModule = WB:GetElvUIDataText("Guild")

if dtModule then
dtModule.eventFunc(MM.guildVirtualFrame, "GUILD_ROSTER_UPDATE")
dtModule.onClick(frame, "RightButton")
end
end,
},
},
["social"] = {
Expand All @@ -219,7 +219,7 @@ MM.microMenu = {
local dtModule = WB:GetElvUIDataText("Friends")

if dtModule then
dtModule.eventFunc(WB:GetElvUIDummy(), nil)
dtModule.eventFunc(MM.friendsVirtualFrame, nil)
dtModule.onClick(frame, "RightButton")
end
end,
Expand Down Expand Up @@ -465,12 +465,20 @@ function MM:ButtonEnter(button)
local dtModule = WB:GetElvUIDataText("Friends")

if dtModule then
dtModule.eventFunc(WB:GetElvUIDummy(), nil)
dtModule.eventFunc(MM.friendsVirtualFrame, nil)
dtModule.onEnter()
skipTitle = true
end
elseif button.id == "guild" then
return
DT.tooltip:SetOwner(button, "ANCHOR_TOP", 0, 20)

local dtModule = WB:GetElvUIDataText("Guild")

if dtModule then
dtModule.eventFunc(MM.guildVirtualFrame, "GUILD_ROSTER_UPDATE")
dtModule.onEnter()
skipTitle = true
end
elseif button.id == "txui" then
self:ToxiUITooltip(button)
return
Expand Down Expand Up @@ -733,6 +741,30 @@ function MM:OnInit()
self.info.friends = -1
self.info.guildies = -1

-- Create virtual frames and connect them to datatexts
self.guildVirtualFrame = {
name = "Guild",
text = {
SetFormattedText = E.noop,
SetText = E.noop,
},
GetScript = function()
return E.noop
end,
IsMouseOver = function()
return false
end,
}
WB:ConnectVirtualFrameToDataText("Guild", self.guildVirtualFrame)

self.friendsVirtualFrame = {
name = "Friends",
text = {
SetFormattedText = E.noop,
},
}
WB:ConnectVirtualFrameToDataText("Friends", self.friendsVirtualFrame)

-- Of we go
self:CreateButtons()
self:OnWunderBarUpdate()
Expand Down
11 changes: 10 additions & 1 deletion Modules/WunderBar/SubModules/System.lua
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,21 @@ function ST:OnInit()
self.framerate = 0
self.latency = 0

-- Create virtual frame and connect it to datatext
self.systemVirtualFrame = {
name = "System",
text = {
SetFormattedText = E.noop,
},
}
WB:ConnectVirtualFrameToDataText("System", self.systemVirtualFrame)

self:CreateText()
self:OnWunderBarUpdate()

-- Update data text for accurate tooltips
local dtModule = WB:GetElvUIDataText("System")
if dtModule then dtModule.eventFunc(WB:GetElvUIDummy()) end
if dtModule then dtModule.eventFunc(self.systemVirtualFrame) end

-- We are done, hooray!
self.Initialized = true
Expand Down
11 changes: 10 additions & 1 deletion Modules/WunderBar/SubModules/Time.lua
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ end

function TI:UpdateTooltip(dataText)
local dtModule = dataText or WB:GetElvUIDataText("Time")
if dtModule then dtModule.eventFunc(WB:GetElvUIDummy(), "UPDATE_INSTANCE_INFO") end
if dtModule then dtModule.eventFunc(self.timeVirtualFrame, "UPDATE_INSTANCE_INFO") end
end

function TI:UpdateClock()
Expand Down Expand Up @@ -330,6 +330,15 @@ function TI:OnInit()
self.showRestingAnimation = false
self.activeInfoText = {}

-- Create virtual frame and connect it to datatext
self.timeVirtualFrame = {
name = "Time",
text = {
SetFormattedText = E.noop,
},
}
WB:ConnectVirtualFrameToDataText("Time", self.timeVirtualFrame)

self:CreateClock()
self:OnWunderBarUpdate()

Expand Down

0 comments on commit cfbf20d

Please sign in to comment.