comparison Frames.lua @ 144:12a8ea5af671

Added a ?remove? button to the crafting queue. When removing an item from the queue or when it is finished casting (when using the Inventorium queue processer), items are moved to the ?unqueuables? window. Fixed auction price checking. Now resetting filters before scanning the tradeskill recipes.
author Zerotorescue
date Wed, 19 Jan 2011 23:21:16 +0100
parents 5ed50feddeb0
children 6a52272a0e5a
comparison
equal deleted inserted replaced
143:8eb0f5b5a885 144:12a8ea5af671
415 scrollTable.frame:SetPoint("TOP", frame.lblDescription, "BOTTOM", 0, -18); 415 scrollTable.frame:SetPoint("TOP", frame.lblDescription, "BOTTOM", 0, -18);
416 scrollTable.frame:SetPoint("LEFT", frame, "LEFT", 15, 0); 416 scrollTable.frame:SetPoint("LEFT", frame, "LEFT", 15, 0);
417 scrollTable.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -15, 35); 417 scrollTable.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -15, 35);
418 -- When moving over a row, provide a tooltip for the item 418 -- When moving over a row, provide a tooltip for the item
419 scrollTable:RegisterEvents({ 419 scrollTable:RegisterEvents({
420 ["OnEnter"] = function(rowFrame, cellFrame, data, cols, row, realrow, column, scrollingTable, ...) 420 ["OnEnter"] = function(rowFrame, cellFrame, data, cols, row, realrow, column)
421 if row and realrow then 421 if row and realrow then
422 -- Data row 422 -- Data row
423 423
424 if data[realrow] and data[realrow].rowData and data[realrow].rowData.itemId then 424 if cols[column].name == "X" then
425 cellFrame.tooltipTitle = "Remove";
426 cellFrame.tooltip = "Remove this item from the queue.";
427 cellFrame.tooltipLocation = "BOTTOM";
428
429 ShowTooltip(cellFrame);
430 elseif data[realrow] and data[realrow].rowData and data[realrow].rowData.itemId then
425 GameTooltip:SetOwner(rowFrame, "ANCHOR_NONE"); 431 GameTooltip:SetOwner(rowFrame, "ANCHOR_NONE");
426 GameTooltip:SetPoint("TOPLEFT", rowFrame, "BOTTOMLEFT"); 432 GameTooltip:SetPoint("TOPLEFT", rowFrame, "BOTTOMLEFT");
427 GameTooltip:SetHyperlink(("item:%d"):format(data[realrow].rowData.itemId)); 433 GameTooltip:SetHyperlink(("item:%d"):format(data[realrow].rowData.itemId));
428 GameTooltip:Show(); 434 GameTooltip:Show();
429 end 435 end
440 446
441 ShowTooltip(cellFrame); 447 ShowTooltip(cellFrame);
442 end 448 end
443 end 449 end
444 end, 450 end,
445 ["OnLeave"] = function(rowFrame, cellFrame, data, cols, row, realrow, column, scrollingTable, ...) 451 ["OnLeave"] = function()
446 HideTooltip(); 452 HideTooltip();
447 end, 453 end,
448 ["OnClick"] = function() end, 454 ["OnClick"] = function(rowFrame, cellFrame, data, cols, row, realrow, column)
455 if row and realrow then
456 -- Data row
457
458 if cols[column].name == "X" then
459 cols[column].onClick(data[realrow].rowData);
460
461 return true; -- cancel default event
462 end
463 end
464 end,
449 }); 465 });
466 scrollTable:EnableSelection(true);
450 467
451 frame.scrollTable = scrollTable; 468 frame.scrollTable = scrollTable;
452 469
453 -- Change the amount of displayed rows based on the size of the frame 470 -- Change the amount of displayed rows based on the size of the frame
454 frame.AdjustScrollTableRows = function(this) 471 frame.AdjustScrollTableRows = function(this)