improved shopping tooltip displaying

This commit is contained in:
Manuel Simon Hirsig
2016-02-03 14:08:04 +01:00
parent 890cf138a3
commit 21767fc14d
2 changed files with 15 additions and 11 deletions
+2 -1
View File
@@ -576,7 +576,8 @@ function m.slider(frame, name)
-- editbox:SetScript('OnTextChanged', EditBox_OnTextChanged) -- editbox:SetScript('OnTextChanged', EditBox_OnTextChanged)
-- editbox:SetScript('OnEnter', Control_OnEnter) -- editbox:SetScript('OnEnter', Control_OnEnter)
-- editbox:SetScript('OnLeave', Control_OnLeave) -- editbox:SetScript('OnLeave', Control_OnLeave)
editbox:SetFont(m.config.content_font, m.config.normal_font_size) -- editbox:SetFont(m.config.content_font, m.config.normal_font_size)
editbox:SetFont(m.config.content_font, m.config.normal_button_font_size)
editbox:SetShadowColor(0, 0, 0, 0) editbox:SetShadowColor(0, 0, 0, 0)
-- --
-- local button = CreateFrame('Button', nil, editbox, 'UIPanelButtonTemplate') -- local button = CreateFrame('Button', nil, editbox, 'UIPanelButtonTemplate')
+13 -10
View File
@@ -200,20 +200,23 @@ function public.set_shopping_tooltip(slot)
if index1 then if index1 then
ShoppingTooltip1:SetOwner(GameTooltip, 'ANCHOR_BOTTOMRIGHT') ShoppingTooltip1:SetOwner(GameTooltip, 'ANCHOR_BOTTOMRIGHT')
ShoppingTooltip1:SetInventoryItem('player', index1) ShoppingTooltip1:SetInventoryItem('player', index1)
ShoppingTooltip1:SetAlpha(0) ShoppingTooltip1:SetPoint('TOPLEFT', GameTooltip, 'TOPRIGHT', 0, -10)
Aux.control.on_next_update(function()
ShoppingTooltip1:SetPoint('TOPLEFT', GameTooltip, 'TOPRIGHT', 0, -10) -- for i = TOOLTIP_LENGTH-1,1,-1 do
ShoppingTooltip1:SetAlpha(1) -- for _, side in ipairs({'Left', 'Right'}) do
end) -- getglobal('ShoppingTooltip1Text'..side..(i + 1)):SetWidth(getglobal('ShoppingTooltip1Text'..side..i):GetWidth())
-- getglobal('ShoppingTooltip1Text'..side..(i + 1)):SetText(getglobal('ShoppingTooltip1Text'..side..i):GetText())
-- getglobal('ShoppingTooltip1Text'..side..(i + 1)):SetTextColor(getglobal('ShoppingTooltip1Text'..side..i):GetTextColor())
-- end
-- end
--
-- ShoppingTooltip1TextLeft1:SetText('Currently Equipped')
-- ShoppingTooltip1TextLeft1:SetTextColor(0.5, 0.5, 0.5)
if index2 then if index2 then
ShoppingTooltip2:SetOwner(ShoppingTooltip1, 'ANCHOR_BOTTOMRIGHT') ShoppingTooltip2:SetOwner(ShoppingTooltip1, 'ANCHOR_BOTTOMRIGHT')
ShoppingTooltip2:SetInventoryItem('player', index2) ShoppingTooltip2:SetInventoryItem('player', index2)
ShoppingTooltip2:SetAlpha(0) ShoppingTooltip2:SetPoint('TOPLEFT', ShoppingTooltip1, 'TOPRIGHT')
Aux.control.on_next_update(function()
ShoppingTooltip2:SetPoint('TOPLEFT', ShoppingTooltip1, 'TOPRIGHT')
ShoppingTooltip2:SetAlpha(1)
end)
end end
end end
end end