shopping tooltips completed
This commit is contained in:
@@ -5,6 +5,7 @@ Aux.info = public
|
|||||||
|
|
||||||
function public.inventory_index(slot)
|
function public.inventory_index(slot)
|
||||||
local inventory_index_map = {
|
local inventory_index_map = {
|
||||||
|
INVTYPE_AMMO = {0},
|
||||||
INVTYPE_HEAD = {1},
|
INVTYPE_HEAD = {1},
|
||||||
INVTYPE_NECK = {2},
|
INVTYPE_NECK = {2},
|
||||||
INVTYPE_SHOULDER = {3},
|
INVTYPE_SHOULDER = {3},
|
||||||
@@ -18,14 +19,16 @@ function public.inventory_index(slot)
|
|||||||
INVTYPE_HAND = {10},
|
INVTYPE_HAND = {10},
|
||||||
INVTYPE_FINGER = {11, 12},
|
INVTYPE_FINGER = {11, 12},
|
||||||
INVTYPE_TRINKET = {13, 14},
|
INVTYPE_TRINKET = {13, 14},
|
||||||
INVTYPE_HEAD = {1},
|
INVTYPE_CLOAK = {15},
|
||||||
INVTYPE_HEAD = {1},
|
INVTYPE_2HWEAPON = {16},
|
||||||
INVTYPE_HEAD = {1},
|
INVTYPE_WEAPONMAINHAND = {16},
|
||||||
INVTYPE_HEAD = {1},
|
INVTYPE_WEAPON = {16, 17},
|
||||||
INVTYPE_HEAD = {1},
|
INVTYPE_WEAPONOFFHAND = {17},
|
||||||
INVTYPE_HEAD = {1},
|
INVTYPE_HOLDABLE = {17},
|
||||||
INVTYPE_HEAD = {1},
|
INVTYPE_SHIELD = {17},
|
||||||
INVTYPE_HEAD = {1},
|
INVTYPE_RANGED = {18},
|
||||||
|
INVTYPE_RANGEDRIGHT = {18},
|
||||||
|
INVTYPE_TABARD = {19},
|
||||||
}
|
}
|
||||||
|
|
||||||
return unpack(inventory_index_map[slot] or {})
|
return unpack(inventory_index_map[slot] or {})
|
||||||
@@ -191,15 +194,19 @@ function public.set_tooltip(itemstring, EnhTooltip_info, owner, anchor, x_offset
|
|||||||
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)
|
||||||
Aux.control.on_next_update(function()
|
Aux.control.on_next_update(function()
|
||||||
ShoppingTooltip1:SetPoint('TOPLEFT', GameTooltip, 'TOPRIGHT', 0, -10)
|
ShoppingTooltip1:SetPoint('TOPLEFT', GameTooltip, 'TOPRIGHT', 0, -10)
|
||||||
|
ShoppingTooltip1:SetAlpha(1)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
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)
|
||||||
Aux.control.on_next_update(function()
|
Aux.control.on_next_update(function()
|
||||||
ShoppingTooltip2:SetPoint('TOPLEFT', ShoppingTooltip1, 'TOPRIGHT')
|
ShoppingTooltip2:SetPoint('TOPLEFT', ShoppingTooltip1, 'TOPRIGHT')
|
||||||
|
ShoppingTooltip2:SetAlpha(1)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+3
-3
@@ -192,7 +192,7 @@ function m.filter_to_string(filter)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if filter.exact then
|
if filter.exact then
|
||||||
add('/exact')
|
add('exact')
|
||||||
end
|
end
|
||||||
|
|
||||||
if filter.min_level then
|
if filter.min_level then
|
||||||
@@ -204,7 +204,7 @@ function m.filter_to_string(filter)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if filter.usable then
|
if filter.usable then
|
||||||
add('/usable')
|
add('usable')
|
||||||
end
|
end
|
||||||
|
|
||||||
if filter.class then
|
if filter.class then
|
||||||
@@ -232,7 +232,7 @@ function m.filter_to_string(filter)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if filter.discard then
|
if filter.discard then
|
||||||
add('/discard')
|
add('discard')
|
||||||
end
|
end
|
||||||
|
|
||||||
if filter.tooltip then
|
if filter.tooltip then
|
||||||
|
|||||||
+1
-1
@@ -785,7 +785,7 @@ function public.start_search()
|
|||||||
private.status_bar:update_status(100 * (current_page - 1) / current_total_pages, 100 * (current_query - 1) / getn(queries)) -- TODO
|
private.status_bar:update_status(100 * (current_page - 1) / current_total_pages, 100 * (current_query - 1) / getn(queries)) -- TODO
|
||||||
private.status_bar:set_text(format('Scanning %d / %d (Page %d / %d)', current_query, getn(queries), current_page, current_total_pages))
|
private.status_bar:set_text(format('Scanning %d / %d (Page %d / %d)', current_query, getn(queries), current_page, current_total_pages))
|
||||||
else
|
else
|
||||||
private.status_bar:update_status(0, 100 * current_query / getn(queries)) -- TODO
|
private.status_bar:update_status(0, 100 * (current_query - 1) / getn(queries)) -- TODO
|
||||||
private.status_bar:set_text(format('Scanning %d / %d', current_query, getn(queries)))
|
private.status_bar:set_text(format('Scanning %d / %d', current_query, getn(queries)))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user