Ran in to an interesting problem today and I was wondering if anyone here knows what's up. In short, I decided to add a tab to the ingame journal for quest items. So far all I've done was copy the main journal page, rename everything, and get the tab switching working (it all works fine, quests display as normal, etc). Here's the page I added:
<UIPane name="ITEMS_PAGE" x=34 y=84 width=363 height=368 hidden=true > <UIListbox name="ItemEntryList" x=1 y=47 width=359 height=320 yPadding=2 showpartialchild=true scrollbaronright=true unequalcontrols=true scrollsegmentsize=32 update=true > <UICollapsable prototype=true name="ItemCollapsable" x=0 y=0 height=PARENT_HEIGHT width=326 isexpanded=true yPadding=1 xPadding=5 > <UIButton name="PROTO_HEADER" x=0 y=0 height=44 width=326 header=true > <UIText indent=18 hangingindent=18 align=left valign=middle fontfamily="Default" style=2 uppercase=true prototype=true maxlines=2 /> <UIFrame state=up fill="b_qjd_hover_pressed.tga" /> <UIFrame state=down fill="b_qjd_hover_pressed.tga" /> <UIFrame state=hilited fill="b_qjd_hover_pressed.tga" /> <UIFrame state=focused fill="b_qjd_hover_pressed.tga" /> <UIFrame state=hifocus fill="b_qjd_hover_pressed.tga" /> <UIFrame state=disabled fill="b_qjd_hover_pressed.tga" /> <UIFrame state=header fill="b_qjd_normal.tga" /> <UIFrame state=hiheader fill="b_qjd_normal.tga" /> <UIFrame state=downheader fill="b_qjd_normal.tga" /> </UIButton> <UIText name="PROTO_TEXT" x=0 y=0 width=326 height=DYNAMIC prototype=true align=left valign=top multiline=true color="312A0A" fontfamily="NWN1_Dialog" style="bold" /> </UICollapsable> <UIScrollBar name="SB" style="STYLE_SB_THIN"></UIScrollBar> </UIListbox> </UIPane>
Nothing special, it's exactly what the game has to work with for the journal. Now here's the script line I'm running to populate it:
AddListBoxRow(oPC,"SCREEN_JOURNAL","ItemEntryList","Row1","PROTO_HEADER=Quest Item 1;PROTO_TEXT=Plenty of descriptive text for this quest item.;","","","");
Unfortunately, running the code only seems to add the UICollapsable object, that is I can see the collapse button with the correct text (and click it, which turns it from a + to a -), but there's no text field underneath it.
Seems like it's a problem with how AddListBoxRow adds elements from a collapsable box, but obviously the blackboxed game scripts do it just fine in the journal. Any ideas?





Retour en haut












