First put a local:900 instead of blah.
It has to be a variable or there is not much point.
Second, make the line selectable.
This is done by doing this ->
<UIListbox name="SKILLPANE_LIST" ...snip... selectonleftclick="true" >
Finally refer to the value like this which grabs variable 6 from the listbox item and puts it in local:900, it's ok since it can repeatedly do this. Note i am doing this with OnLeftClick and not OnToolTip at present which might be a huge issue, but tooltips might be doable with onleftclick,who knows.
OnToolTip0=UIObject_Misc_ExtractData(selected:SKILLPANE_LIST,"string",6,local:900)
OnToolTip1=UIObject_Tooltip_DisplayTooltipString(local:900,"OBJECT_X","OBJECT_Y","SCREEN_TOOLTIP_2")
To set this variable, you do it when you create the row, the parameter for variables is set like this -->
string sVariables = "5="+sRowName+";6="+sRow;
Its basically a string, set like this it would put the row number in 6, and the row name in 5, and my above scraping is pulling from 6 so it would get the sRow value for the tooltip.
I use these as follows ( ignoring most of it except sVariable of course )
AddListBoxRow(oPC,sScreenName,"SKILLPANE_LIST",sRowName,sFields, sTextures,sVariables,sHide);
or
ModifyListBoxRow(oPC,sScreenName,"SKILLPANE_LIST",sRowName,sFields, sTextures,sVariables,sHide);
That is how i am kind of doing it now for skills, but i am also basing this on drammels tooltips, and kind of merging the two, i am just speculating, but it's kind of what i plan on doing eventually to replace how drammel is doing it. Selected is key, it's the only way i know which row is being clicked on/selected as such this might now work unless that is there.
I really need a way to refer to the current listbox row besides selected property, self: did not seem to work, but this is like anything else, it's something you just got to trial and error with until you find a way to get the result that you wanted.
Modifié par painofdungeoneternal, 03 avril 2011 - 08:31 .