UIPane
Talk0
3,772pages on
this wiki
this wiki

Added by Barking MadUIPane is an element of the NWN2's GUI interface which can be used as a container for other elements and arranged independently withn a UIScene. Sub elements of panes are positioned relative to the pane, they are used to create segments of the user interface windows.
A simple UI Pane element is defined as follows:
<UIPane name"PANEL_NAME" x=10 y=10 width=100 height=100>
...
<!-- Put stuff in panel -->
...
</UIPane>
UIPane Attributes
Edit
| XML Tag | Field | Variable | Range | Description |
|---|---|---|---|---|
| <UIPane> | name | string | any | A simple container element, pane. Gives the element a unique name that can be referenced in scripts. |
| x/y | integer | screen coords | Defines the position relative to the parent element. | |
| width/height | integer | screen coords | Set the dimensionst of the pane, can inherit from parent. | |
| scalewithscene | bool | true/false | Desc (?elements dimensions are scaled with the scene, allowing re-scaling?) | |
| usescalar | bool | true/false | Desc | |
| update | bool | true/false | Mark the element for dynamic updates by script callback. | |
| draggable | bool | true/false | Allow repositioning of the element. | |
| ignorevents | bool | true/false | Desc | |
| hidden | bool | true/false | The element is initially invisible and a script will toggle its visibility. | |
| tupple | bool | true/false | Desc (tooltip related) | |
| prototype | bool | true/false | Desc (??Allows drag-drop functionality, must have event handlers set??) | |
| capturemouseclicks | bool | true/false | Sets if the Pane should intercept mouse click events. | |
| capturemouseevents | bool | true/false | Sets the Pane to intercept mouse-over type events. |
Pane Element Example:
Edit
The following XML code will produce two Panels which are aligned to the left and right of the scene.
<!-- A simple Pane UI demonstration
SCENE_PANE_TEST is the name of the scene, it is the name that scripts use to access this scene.
It is also refrenced in the *gui.ini files, for those scene elements that are created when you start the game
like the default menu or your hotbar.
I have edited the ingamegui.ini to include SCREEN_PANE_TEST=panetest.xml letting nwn know where to find this scene
should a script ask for it.
-->
<UIScene name="SCREEN_PANE_TEST" x=5 y=5 width=422 height=204 draggable=true idleexpiretime="0.5" />
<!-- This is the left hand pane with a frame inside -->
<UIPane name="MY_TEST_PANE1" x=ALIGN_LEFT y=ALIGN_CENTER
width=200 height=100 capturemouseclicks=true>
<!-- content to be contained or arranged within
the panes dimensions goes here -->
<UIFrame name="TEST_PANE_BGRND1" x=ALIGN_LEFT y=ALIGN_CENTER
width=PARENT_WIDTH height=PARENT_HEIGHT
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 />
</UIPane>
<!-- This is the right hand pane with the other frame inside-->
<UIPane name="MY_TEST_PANE2" x=ALIGN_RIGHT y=ALIGN_CENTER width=200 height=100
capturemouseclicks=true>
<!-- content to be contained or arranged within
the panes dimensions goes here -->
<UIFrame name="TEST_PANE_BGRND2" x=ALIGN_RIGHT y=ALIGN_CENTER
width=PARENT_WIDTH height=PARENT_HEIGHT 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 />
</UIPane>
<!-- Close Button -->
<UIButton name="CloseButton" x=ALIGN_RIGHT y=ALIGN_TOP style="STYLE_CLOSE_BUTTON"
OnLeftClick=UIButton_Input_ScreenClose()>
</UIButton>
<!-- End of Scene -->