Skip to content

Commit 3ba6e01

Browse files
committed
feat: add Ctrl+Click gear preview with dressing room
1 parent b5c9885 commit 3ba6e01

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [1.1.25] - 2025-02-01
4+
5+
### Added
6+
- **Gear preview**: Ctrl+Click any goal card to open dressing room and see how gear looks on your character
7+
- **Preview cursor**: Magnifying glass cursor appears when holding Ctrl over goal cards (native WoW behavior)
8+
- **Smart positioning**: Dressing room opens to the side of HonorLog instead of overlapping
9+
310
## [1.1.24] - 2025-01-31
411

512
### Added

HonorLog.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## Title: HonorLog
33
## Notes: Track battleground and world PvP statistics with gear goal tracking, hourly honor rates, and session/lifetime stats for TBC Classic Anniversary
44
## Author: adbergen
5-
## Version: 1.1.24
5+
## Version: 1.1.25
66
## SavedVariables: HonorLogDB
77
## SavedVariablesPerCharacter: HonorLogCharDB
88

UI/GoalsPanel.lua

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,17 @@ local function CreateGoalCard(parent, index)
320320
card.barShimmer = CreateFrame("Frame", nil, card)
321321
card.sparkle = CreateFrame("Frame", nil, card)
322322

323-
-- Hover effect with item tooltip and shift-compare
323+
-- Hover effect with item tooltip, shift-compare, and ctrl-preview
324324
card:EnableMouse(true)
325325
card.shiftWasDown = false
326+
card.ctrlWasDown = false
326327

327328
local function ShowCardTooltip(self)
328329
if self.itemID then
329330
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
330331
GameTooltip:SetItemByID(self.itemID)
332+
GameTooltip:AddLine(" ")
333+
GameTooltip:AddLine("|cff888888Ctrl+Click to preview|r", 1, 1, 1)
331334
GameTooltip:Show()
332335
if IsShiftKeyDown() then
333336
GameTooltip_ShowCompareItem()
@@ -343,6 +346,13 @@ local function CreateGoalCard(parent, index)
343346
self:SetBackdropColor(unpack(COLORS.bgCardHover))
344347
self:SetBackdropBorderColor(unpack(COLORS.borderAccent))
345348
ShowCardTooltip(self)
349+
-- Show magnifying glass cursor if Ctrl is held
350+
if IsControlKeyDown() and self.itemID then
351+
SetCursor("INSPECT_CURSOR")
352+
self.ctrlWasDown = true
353+
else
354+
self.ctrlWasDown = false
355+
end
346356
end
347357
end)
348358
card:SetScript("OnLeave", function(self)
@@ -352,15 +362,43 @@ local function CreateGoalCard(parent, index)
352362
GameTooltip:Hide()
353363
if ShoppingTooltip1 then ShoppingTooltip1:Hide() end
354364
if ShoppingTooltip2 then ShoppingTooltip2:Hide() end
365+
ResetCursor()
366+
self.ctrlWasDown = false
355367
end
356368
end)
357369
card:SetScript("OnUpdate", function(self)
358370
if not self:IsMouseOver() then return end
359371
if dragState.card then return end
372+
-- Handle Shift for compare tooltip
360373
local shiftDown = IsShiftKeyDown()
361374
if shiftDown ~= self.shiftWasDown then
362375
ShowCardTooltip(self)
363376
end
377+
-- Handle Ctrl for magnifying glass cursor
378+
local ctrlDown = IsControlKeyDown()
379+
if ctrlDown ~= self.ctrlWasDown then
380+
if ctrlDown and self.itemID then
381+
SetCursor("INSPECT_CURSOR")
382+
else
383+
ResetCursor()
384+
end
385+
self.ctrlWasDown = ctrlDown
386+
end
387+
end)
388+
389+
-- Ctrl+Click to preview item in dressing room
390+
card:SetScript("OnMouseUp", function(self, button)
391+
if button == "LeftButton" and IsControlKeyDown() and self.itemID then
392+
local _, itemLink = GetItemInfo(self.itemID)
393+
if itemLink then
394+
DressUpItemLink(itemLink)
395+
-- Position dressing room to the side of HonorLog frame
396+
if DressUpFrame and HonorLog.mainFrame then
397+
DressUpFrame:ClearAllPoints()
398+
DressUpFrame:SetPoint("TOPLEFT", HonorLog.mainFrame, "TOPRIGHT", 10, 0)
399+
end
400+
end
401+
end
364402
end)
365403

366404
-- Drag handle (left side grip) - extends to icon edge to prevent click-through

0 commit comments

Comments
 (0)