View Single Post
  #16  
Unread 07-30-2010, 05:38 AM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

You don't need the row index, just the template's "Top" loc within the scroll page.

Place chatButton inside the scroll page (not inside the template). Set it's visibility="false".

Assuming this doesn't crash the client add something like the following to the row template

onHover="
parent.chatButton.Top = Top
parent.chatButton.visible = true
parent.chatButton.itemVariable=itemTextLabel.text
parent.chatButton.dkpVariable=parent.parent.yourDKPtextbox.text
"

And your button has an onPress Script that looks something like this...
onPress="
chatConcat = 'Now taking bids on ' ## itemVariable ## '. Opening bid is ' ## dkpVariable
rsay=chatConcat
rsay=chatConcat
visible=false
"

The onHover moves the button to the vertical location of the row, makes it visible, and assigns the item name and the dkp you entered to variables on the button. Pressing the button generates the chat msg then hides the button.

If you hover over another row, the button moves to that row, is shown, and receives the item value for that row.

Now if putting the button inside the scroll page crashes the client, you'll need to promote it to a higher level and do some extra math to adjust the buttons location using both the row's "Top" value and the scrollpage's vertical scrolllocation. Come to think of it, not sure you can get the vertical scroll separate from the horizontal, so might just be screwed at that point.

Disclaimer: Pathing and object names have been changed to protect the innocent. Any resemblance to real paths or objects in your code is purely coincidence. Adjust as needed to work in your mod.
Reply With Quote