# HG changeset patch # User John@Yosemite-PC # Date 1332711789 14400 # Node ID 615346b6ee994b2e649bedbac4ecb122d85eabdf # Parent 93acdcd6ace55f378250bf0d8717a51773d702e4 Starting to use userdata diff -r 93acdcd6ace5 -r 615346b6ee99 Gui.lua --- a/Gui.lua Sun Mar 25 13:09:44 2012 -0400 +++ b/Gui.lua Sun Mar 25 17:43:09 2012 -0400 @@ -73,6 +73,7 @@ f:SetHeight(680) f:SetWidth(580) + local left = AceGUI:Create("InlineGroup") left:SetLayout("List") left:SetWidth(175) @@ -155,9 +156,10 @@ local label = AceGUI:Create("Label") label:SetText("Bidding now open for ...") local biddingOn = AceGUI:Create("InteractiveLabel") - biddingOn:SetText( "|cffa335ee|Hitem:65003:0:0:0:0:0:0:0:85:0|h[Reclaimed Ashkandi, Greatsword of the Brotherhood]|h|r") + biddingOn.userdata = { "|cffa335ee|Hitem:65003:0:0:0:0:0:0:0:85:0|h[Reclaimed Ashkandi, Greatsword of the Brotherhood]|h|r" } + biddingOn:SetText(biddingOn.userdata[1]) biddingOn:SetFullWidth(true) - biddingOn:SetCallback("OnEnter", function(widget) _G.GameTooltip:SetOwner(widget.frame,"ANCHOR_RIGHT"); _G.GameTooltip:SetHyperlink("|cffa335ee|Hitem:65003:0:0:0:0:0:0:0:85:0|h[Reclaimed Ashkandi, Greatsword of the Brotherhood]|h|r"); _G.GameTooltip:Show() end ) + biddingOn:SetCallback("OnEnter", function(widget) _G.GameTooltip:SetOwner(widget.frame,"ANCHOR_RIGHT"); _G.GameTooltip:SetHyperlink(widget.userdata[1]); _G.GameTooltip:Show() end ) biddingOn:SetCallback("OnLeave", function(widget) _G.GameTooltip:Hide() end ) local b1 = AceGUI:Create("SelectorList") b1:SetNumLines(6) @@ -170,7 +172,6 @@ bidTitle:SetText("Current bids") bidTitle:SetFullWidth(true) - local bidRetractButton = AceGUI:Create("Button") bidRetractButton:SetText("Place Bid") bidRetractButton:SetWidth(100) @@ -211,4 +212,6 @@ if admin then right:AddChildren(alb1,alb2,alb3) end right:AddChildren(biddingZone) f:AddChildren(left,right) + + end