Wikia

NWN2Wiki

UIPane

Talk0
3,772pages on
this wiki
UIPane example1
Two UI Pane in effect.Here two panes are arranged side by side within a scene. Additional objects can be arranged within such panes in turn to produce more complicated window layouts.
Barking MadAdded by Barking Mad

UIPane 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 TagFieldVariableRangeDescription
<UIPane>namestringanyA simple container element, pane. Gives the element a unique name that can be referenced in scripts.
x/y integerscreen coordsDefines the position relative to the parent element.
width/heightintegerscreen coordsSet the dimensionst of the pane, can inherit from parent.
scalewithscenebooltrue/false Desc (?elements dimensions are scaled with the scene, allowing re-scaling?)
usescalarbooltrue/false Desc
updatebooltrue/falseMark the element for dynamic updates by script callback.
draggablebooltrue/falseAllow repositioning of the element.
ignoreventsbooltrue/falseDesc
hiddenbooltrue/false The element is initially invisible and a script will toggle its visibility.
tupplebooltrue/false Desc (tooltip related)
prototypebooltrue/false Desc (??Allows drag-drop functionality, must have event handlers set??)
capturemouseclicks booltrue/falseSets if the Pane should intercept mouse click events.
capturemouseevents booltrue/falseSets 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 -->
Advertisement | Your ad here

Videos

Remove video
Are you sure you want to remove this video from the Videos list?
Please wait wile we are removing the video
Error occurred while loading data. Please recheck your connection and refesh the page.
3 Videos on this wiki
Add a video
1 of 1

Photos

Add a Photo
1,439photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki