Advanced Trade Skill Window

117 - Change to allow shift-click to paste item name in auction house search box [meant for enchanting]

I would like to suggest the following changes to allow Shift-Click on an item and have the name pasted in either the default Auction House search box or Auctionator's search box on the buy tab. This change will allow the shift-click to work with enchanting, which it currently does not either in ATSW or the original Blizzard UI. These changes work with patch 4.3, ATSW v0.8.5 and Auctionator v2.9.9, as of Dec 3rd, 2011.

Attached are the modified files for ATSW v0.8.5.

Change to the atsw.xml file:

change the ATSWSkillIcon OnClick() handler from:

if ( IsControlKeyDown() ) then
  DressUpItemLink(GetTradeSkillItemLink(ATSWFrame.selectedSkill));
elseif ( IsShiftKeyDown() ) then
  ChatEdit_InsertLink(GetTradeSkillItemLink(ATSWFrame.selectedSkill));
end

to:

if ( IsControlKeyDown() ) then
  DressUpItemLink(GetTradeSkillItemLink(ATSWFrame.selectedSkill));
elseif ( IsShiftKeyDown() ) then
  ATSWSkillIcon_OnShiftClick(self, button);
end

Add in atsw.lua:

function ATSWSkillIcon_OnShiftClick(self, button)

	local Handled = false;
	
	-- do we have an item selected?
	if( ATSWFrame.selectedSkillName ~= nil ) then
	
		local ItemName = ATSWFrame.selectedSkillName;
		
		-- is the AH default browse edit box visible?
		if( BrowseName and BrowseName:IsVisible() ) then
		
			BrowseName:SetText( ItemName );
			Handled = true;
		
		-- is Auctionator search box visible?
		elseif( Atr_Search_Box and Atr_Search_Box:IsVisible() ) then
			
			Atr_Search_Box:SetText( ItemName );
			Atr_Search_Onclick();
			Handled = true;
			
		end;
		
	end
	
	-- if the click was not handled, pass it to the InsertLink function.
	if( Handled == false ) then
		ChatEdit_InsertLink( GetTradeSkillItemLink( ATSWFrame.selectedSkill ) );
	end
	
end
Name Description Size MD5
ATSW_change_for_shift_click.zip changed files for v0.8.5 30.3 KiB b71cc9ce677c...
User When Change
amrosia Dec 03, 2011 at 15:46 UTC

Added attachment ATSW_change_for_shift_click.zip

amrosia Dec 03, 2011 at 15:45 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

Facts

Last updated
Dec 03, 2011
Reported
Dec 03, 2011
Status
New - Issue has not had initial review yet.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees