It has a slider and an input box, so you can pick an amount with the slider and make fine corrections with the box.
It works, but there is still a problem: when I change the amount in the box the slider doesn't move...
Here is the xml:
<?xml version="1.0" encoding="NWN2UI">
<!-- GUI 3: SCREEN DEFINITIONS -->
<UIScene name="NUMGET" x=ALIGN_CENTER y=ALIGN_CENTER width=500 height=500 priority=SCENE_SCRIPT scriptloadable=true draggable=true idleexpiretime="0.1f" />
<UIButton name="CloseButton" x="454" y="6" style="STYLE_CLOSE_BUTTON"
OnLeftClick='UIButton_Input_ScreenClose()'>
</UIButton>
<UIPane name="NUMGET_CONTAINER" x="0" y="0" width="230" height="300" >
<UIText name="NUMGET_MESSAGE" x=ALIGN_PARENT y=25 width=PARENT_WIDTH height=DYNAMIC align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
<UIText name="NUMGET_VALUE" x=95 y=82 fontfamily="Body_Font" width=50 height=18 update=true editable="true" selectable="true" multiline="false" maxlength="15"
OnUpdate='UIObject_Misc_SetLocalVarString(local:0)' OnUpdate0='UIObject_Misc_ExecuteServerScript("gui_changeTnum","local:0","local:2")'/>
<UIFrame name="NumFrame" x=95 y=80 width=54 height=22 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga"
bottomleft="tp_frame_bl.tga" bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga" left="tp_frame_l.tga"
right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga" border=3 />
<UIScrollBar name="NUMGET_SLIDER" style="STYLE_OPTION_SLIDER" x=ALIGN_CENTER y=130 minsize=0 maxsize=100 maxvalue=100
update=true OnUpdate=UIObject_Misc_SetLocalVarString(local:1) OnUpdate0=UIObject_Misc_ExecuteServerScript("gui_changeSnum","local:1","local:2") ></UIScrollBar>
<UIButton name="NUMGET_CONFIRM" x="55" y="250" text="Confirm" style="STYLE_SMALL_BUTTON" OnLeftClick='UIObject_Misc_ExecuteServerScript("gui_numget","local:0","local:3","local:4")'/>
</UIPane>
<!-- BACKGROUND IMAGE - This has to come after everything else or it covers what we put in the GUI -->
<UIFrame name="Background" topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga" bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga" left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga" border=5/>
And the result on screen:

Uploaded with ImageShack.us
Is it a lost cause or is it possible to have the slider move when you change the amount in the box?
I could change it from script or from the UIText in the xml either is acceptable.
Modifié par Olblach, 18 octobre 2010 - 10:57 .





Retour en haut






