Part B: TreeView GUI in Resource Editor

From NeoAxis Engine Wiki

Jump to: navigation, search

To use the TreeView GUI:

1) Navigate to folder : 'Game\Bin\Data\Gui\Controls'


2) Create a new text file there and copy the following code into it:

control TreeView
{  
	clipRectangleBorders = Texture 4 4
	size = Texture 320 240
	control Control
	{
		position = Texture 2 2
		size = Texture 316 236
		anchor = Left, Bottom, Top, Right
		backColor = 0 0 0 0.5764706
		backTextureCoord = 0 0 0 0
	}
	itemButton Button
	{
		position = Texture 6 6
		size = Texture 310 20
		anchor = Left, Right
		visible = False
		defaultControl TextBox
		{
			textHorizontalAlign = Left
			shadow = True
			shadowOffset = Texture 2 2
			copyTextFromParent = True
		}
		overControl TextBox
		{
			textHorizontalAlign = Left
			shadow = True
			shadowOffset = Texture 2 2
			copyTextFromParent = True
			backColor = 1 1 1 0.4980392
			visible = False
		}
		pushControl TextBox
		{
			textHorizontalAlign = Left
			shadow = True
			shadowOffset = Texture 2 2
			copyTextFromParent = True
			backColor = 1 1 1 0.3921569
			visible = False
		}
		activeControl TextBox
		{
			textHorizontalAlign = Left
			shadow = True
			shadowOffset = Texture 2 2
			copyTextFromParent = True
			backColor = 1 0.9725491 0.937255 0.6078432
			visible = False
		}
	}
	scrollBar Gui\Controls\DefaultVScrollBar.gui
	{
		position = Texture 322 0
		size = Texture 20 240
		anchor = Bottom, Top, Right
		visible = False
		lockEditorResizing = False
	}
}


3) Save the file as DefaultTreeView.Gui


4) Now load your gui interface in the resource editor and add the DefaultTreeView GUI control and save.


Next Part C: TreeView Use in your project

Personal tools