Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ AUCTIONATOR_LOCALES.enUS = function()
L["CONFIG_PET_TOOLTIP"] = "Show pet tooltips"
L["PET_TOOLTIP_TOOLTIP_HEADER"] = "Pet Tooltips"
L["PET_TOOLTIP_TOOLTIP_TEXT"] = "Shows Auctionator information for caged pets."
L["CONFIG_SELL_PRICE_TOOLTIP"] = "Show default sell price."
L["SELL_PRICE_TOOLTIP_TOOLTIP_HEADER"] = "Sell Price Tooltip Information"
L["SELL_PRICE_TOOLTIP_TOOLTIP_TEXT"] = "Show the default sell price information in tooltip on mouseover."
L["CONFIG_VENDOR_TOOLTIP"] = "Show vendor tooltips."
L["VENDOR_TOOLTIP_TOOLTIP_HEADER"] = "Vendor Tooltip Information"
L["VENDOR_TOOLTIP_TOOLTIP_TEXT"] = "Show vendor information in tooltip on mouseover."
Expand Down
2 changes: 2 additions & 0 deletions Source/Config/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Auctionator.Config.Options = {
DEBUG = "debug",
NO_PRICE_DATABASE = "no_price_database",
MAILBOX_TOOLTIPS = "mailbox_tooltips",
SELL_PRICE_TOOLTIPS = "sell_price_tooltips",
VENDOR_TOOLTIPS = "vendor_tooltips",
AUCTION_TOOLTIPS = "auction_tooltips",
AUCTION_AGE_TOOLTIPS = "auction_age_tooltips",
Expand Down Expand Up @@ -81,6 +82,7 @@ Auctionator.Config.Defaults = {
[Auctionator.Config.Options.DEBUG] = false,
[Auctionator.Config.Options.NO_PRICE_DATABASE] = false,
[Auctionator.Config.Options.MAILBOX_TOOLTIPS] = true,
[Auctionator.Config.Options.SELL_PRICE_TOOLTIPS] = false,
[Auctionator.Config.Options.VENDOR_TOOLTIPS] = true,
[Auctionator.Config.Options.AUCTION_TOOLTIPS] = true,
[Auctionator.Config.Options.AUCTION_AGE_TOOLTIPS] = false,
Expand Down
9 changes: 9 additions & 0 deletions Source/Tooltips/Hooks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,15 @@ TooltipHandlers["SetInboxItem"] = function(tip, index, attachIndex)
end
end

-- This removed the price from the tooltip if the option is disabled
local originalGameTooltipOnTooltipSetItem = GameTooltip_OnTooltipAddMoney;
GameTooltip_OnTooltipAddMoney = function(...)
local sellPriceEnabled = Auctionator.Config.Get(Auctionator.Config.Options.SELL_PRICE_TOOLTIPS)
if sellPriceEnabled then
originalGameTooltipOnTooltipSetItem(...)
end
end

-- This occurs when mousing over an item in the Inbox frame
hooksecurefunc("InboxFrameItem_OnEnter",
function(self)
Expand Down
13 changes: 12 additions & 1 deletion Source_Mainline/Config/Frames/Tooltips.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,25 @@
</Anchors>
</Frame>

<Frame inherits="AuctionatorConfigurationCheckbox" parentKey="SellPriceTooltips">
<KeyValues>
<KeyValue key="labelText" value="AUCTIONATOR_L_CONFIG_SELL_PRICE_TOOLTIP" type="global"/>
<KeyValue key="tooltipTitleText" value="AUCTIONATOR_L_SELL_PRICE_TOOLTIP_TOOLTIP_HEADER" type="global"/>
<KeyValue key="tooltipText" value="AUCTIONATOR_L_SELL_PRICE_TOOLTIP_TOOLTIP_TEXT" type="global"/>
</KeyValues>
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.PetTooltips" relativePoint="BOTTOMLEFT"/>
</Anchors>
</Frame>

<Frame inherits="AuctionatorConfigurationCheckbox" parentKey="VendorTooltips">
<KeyValues>
<KeyValue key="labelText" value="AUCTIONATOR_L_CONFIG_VENDOR_TOOLTIP" type="global"/>
<KeyValue key="tooltipTitleText" value="AUCTIONATOR_L_VENDOR_TOOLTIP_TOOLTIP_HEADER" type="global"/>
<KeyValue key="tooltipText" value="AUCTIONATOR_L_VENDOR_TOOLTIP_TOOLTIP_TEXT" type="global"/>
</KeyValues>
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.PetTooltips" relativePoint="BOTTOMLEFT"/>
<Anchor point="TOPLEFT" relativeKey="$parent.SellPriceTooltips" relativePoint="BOTTOMLEFT"/>
</Anchors>
</Frame>

Expand Down
2 changes: 2 additions & 0 deletions Source_Mainline/Config/Mixins/Tooltips.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ end
function AuctionatorConfigTooltipsFrameMixin:ShowSettings()
self.MailboxTooltips:SetChecked(Auctionator.Config.Get(Auctionator.Config.Options.MAILBOX_TOOLTIPS))
self.PetTooltips:SetChecked(Auctionator.Config.Get(Auctionator.Config.Options.PET_TOOLTIPS))
self.SellPriceTooltips:SetChecked(Auctionator.Config.Get(Auctionator.Config.Options.SELL_PRICE_TOOLTIPS))
self.VendorTooltips:SetChecked(Auctionator.Config.Get(Auctionator.Config.Options.VENDOR_TOOLTIPS))
self.AuctionTooltips:SetChecked(Auctionator.Config.Get(Auctionator.Config.Options.AUCTION_TOOLTIPS))
self.EnchantTooltips:SetChecked(Auctionator.Config.Get(Auctionator.Config.Options.ENCHANT_TOOLTIPS))
Expand All @@ -24,6 +25,7 @@ function AuctionatorConfigTooltipsFrameMixin:Save()

Auctionator.Config.Set(Auctionator.Config.Options.MAILBOX_TOOLTIPS, self.MailboxTooltips:GetChecked())
Auctionator.Config.Set(Auctionator.Config.Options.PET_TOOLTIPS, self.PetTooltips:GetChecked())
Auctionator.Config.Set(Auctionator.Config.Options.SELL_PRICE_TOOLTIPS, self.SellPriceTooltips:GetChecked())
Auctionator.Config.Set(Auctionator.Config.Options.VENDOR_TOOLTIPS, self.VendorTooltips:GetChecked())
Auctionator.Config.Set(Auctionator.Config.Options.AUCTION_TOOLTIPS, self.AuctionTooltips:GetChecked())
Auctionator.Config.Set(Auctionator.Config.Options.ENCHANT_TOOLTIPS, self.EnchantTooltips:GetChecked())
Expand Down