-- Disables the DeleteCursorItem() call for testing when true
EasyDestroy_Debug = false;
EasyDestroy_OnLoad(self);
EasyDestroy_OnEvent(event);
if arg1 == "ESCAPE" and EasyDestroy_Debug then
self:EnableKeyboard(false)
EasyDestroy_Debug = false
end
-- Delete the item in hand
if arg1 == 'DELETE' then
EasyDestroy_DeleteCursorItem();
end
-- Change the rarity threashold
if EasyDestroy_Debug and (arg1 == 'UP' or arg1 == 'DOWN') then
EasyDestroy_ChangeQualityFloor(arg1);
end
if IsControlKeyDown() then
-- Save the item to the safe list
local _, _, itemLink = GetCursorInfo();
if arg1 == 'S' then
EasyDestroy_AddRemove(itemLink, 'add');
ClearCursor();
elseif arg1 == 'R' then
EasyDestroy_AddRemove(itemLink, 'remove');
ClearCursor();
end
end
-- Tell me what key I pressed
if EasyDestroy_Debug then
ChatFrame1:AddMessage('[EasyDestroy] Key Pressed: '..arg1);
end
if CursorHasItem() and EasyDestroy_Options.KeyBoardShortcuts then
self:EnableKeyboard(true);
else
if EasyDestroy_Debug then
-- Enable the keyboard in debug mode regardless
self:EnableKeyboard(true);
else
self:EnableKeyboard(false);
end
end
if ( self.tooltipText ) then
GameTooltip:SetOwner(self, "ANCHOR_LEFT");
GameTooltip:SetBackdropColor(0.0, 0.0, 0.0);
GameTooltip:SetText(self.tooltipText, 1.0, 1.0, 1.0);
end
GameTooltip:Hide();
EasyDestroyOptions_Show(self);