From 991a8302ecfd8a827d5a669da5921b5d28289efc Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Wed, 13 Jul 2016 21:44:52 +0200 Subject: [PATCH] post icon improvement --- core.lua | 2 +- panels/post/core.xml | 4 ++-- panels/post/frames.lua | 23 +++++++++++++++-------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/core.lua b/core.lua index 3188e66..1ad8805 100644 --- a/core.lua +++ b/core.lua @@ -1,5 +1,5 @@ Aux = { - version = '2.15.6', + version = '2.15.7', blizzard_ui_shown = false, orig = {}, } diff --git a/panels/post/core.xml b/panels/post/core.xml index ecf2cd6..6d9ef7d 100644 --- a/panels/post/core.xml +++ b/panels/post/core.xml @@ -31,9 +31,9 @@ - + diff --git a/panels/post/frames.lua b/panels/post/frames.lua index afca0b7..552426f 100644 --- a/panels/post/frames.lua +++ b/panels/post/frames.lua @@ -9,14 +9,21 @@ function Aux.post_frame.create_frames(private, public) end ClearCursor() end) - -- AuxPostParametersItemIconTexture:SetScript('OnEnter', function() - -- if private.selected_item then - -- Aux.info.set_tooltip(private.selected_item.itemstring, this, 'ANCHOR_RIGHT') - -- end - -- end) - -- AuxPostParametersItemIconTexture:SetScript('OnLeave', function() - -- GameTooltip:Hide() - -- end) + AuxPostParametersItem:SetScript('OnClick', function() + local item_info = Aux.cursor_item() + if item_info then + public.select_item(item_info.item_key) + end + ClearCursor() + end) + AuxPostParametersItem:SetScript('OnEnter', function() + if private.selected_item then + Aux.info.set_tooltip(private.selected_item.itemstring, this, 'ANCHOR_RIGHT') + end + end) + AuxPostParametersItem:SetScript('OnLeave', function() + GameTooltip:Hide() + end) do local checkbox = CreateFrame('CheckButton', nil, AuxPostInventory, 'UICheckButtonTemplate')