Skip to content

Commit

Permalink
- added border color and infos for instance lock chat links
Browse files Browse the repository at this point in the history
  • Loading branch information
frozn committed May 26, 2024
1 parent 4bbbda9 commit a91ab51
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
26 changes: 18 additions & 8 deletions TipTacItemRef/ttItemRef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ end
local TTIF_DefaultConfig = {
if_enable = true,
if_infoColor = { 0.2, 0.6, 1 },

if_itemQualityBorder = true,
if_showItemLevel = false, -- Used to be true, but changed due to the itemLevel issues
if_showItemId = false,
Expand Down Expand Up @@ -103,7 +103,8 @@ local TTIF_DefaultConfig = {
if_showFlyoutId = false,
if_petActionColoredBorder = true,
if_showPetActionId = false,

if_showInstanceLockDifficulty = true,

if_showIcon = true,
if_smartIcons = true,
if_stackCountToTooltip = "none",
Expand Down Expand Up @@ -2378,12 +2379,21 @@ function ttif:SetBackdropBorderColorLocked(tip, r, g, b, a)
end

-- instancelock
function LinkTypeFuncs:instancelock(link,linkType,guid,mapId,difficulty,encounterBits)
--AzDump(guid,mapId,difficulty,encounterBits)
-- TipType Border Color -- Disable these 3 lines to color border. Az: Work into options?
-- if (cfg.if_itemQualityBorder) then
-- ttif:SetBackdropBorderColorLocked(self, 1, .5, 0, 1);
-- end
function LinkTypeFuncs:instancelock(link, linkType, guid, mapID, difficulty, defeatedEncounters)
-- Colored Border
if (cfg.if_itemQualityBorder) then
ttif:SetBackdropBorderColorLocked(self, INSTANCE_LOCK_LINK_COLOR:GetRGBA());
end

-- Difficulty
local showDifficulty = (difficulty and cfg.if_showInstanceLockDifficulty);

if (showDifficulty) then
local difficultyName = GetDifficultyInfo(difficulty);
if (difficultyName) then
self:AddLine(format("Difficulty: %s", difficultyName), unpack(cfg.if_infoColor));
end
end
end

-- item
Expand Down
2 changes: 2 additions & 0 deletions TipTacOptions/ttOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ if (TipTacItemRef) then
tinsert(ttifOptions, { type = "Check", var = "if_petActionColoredBorder", label = "Show Pet Action Tips with Colored Border", tip = "When enabled and the tip is showing a pet action, the tip border will have the the standard spell color", enabled = function(factory) return factory:GetConfigValue("if_enable") end, y = 10 });
tinsert(ttifOptions, { type = "Check", var = "if_showPetActionId", label = "Show Pet Action ID", tip = "For flyout tooltips, show their petActionID", enabled = function(factory) return factory:GetConfigValue("if_enable") end });

tinsert(ttifOptions, { type = "Check", var = "if_showInstanceLockDifficulty", label = "Show Instance Lock Difficulty", tip = "For instance lock tooltips, show their difficulty", enabled = function(factory) return factory:GetConfigValue("if_enable") end, y = 10 });

tinsert(ttifOptions, { type = "Header", label = "Icon", tip = "Settings about tooltip icon", enabled = function(factory) return factory:GetConfigValue("if_enable") end });

tinsert(ttifOptions, { type = "Check", var = "if_showIcon", label = "Show Icon Texture and Stack Count (when available)", tip = "Shows an icon next to the tooltip. For items, the stack count will also be shown", enabled = function(factory) return factory:GetConfigValue("if_enable") end });
Expand Down

0 comments on commit a91ab51

Please sign in to comment.