createvar light_position_hor
createvar light_position_vert
createvar light_width
createvar light_height
createvar light_row_space
createvar _light_position_hor
createvar _light_position_vert
createvar light_spacingvert
createvar lightrows
createvar lightcol

createvar lightswatchrow




//-------size-------------------------------------
set light_position_hor 5
set light_position_vert 309
set light_width 180
set light_height 261
set light_spacingvert 20



set lightrows 5
set lightcol 50
set lightswatchrow 120

//-----end-size-----------------------------------



set _light_position_hor #light_position_hor#
inc _light_position_hor 14

set _light_position_vert #light_position_vert#
inc _light_position_vert 12


create panel light $_light_position_hor$ $_light_position_vert$

// //////////////////////////////////////////////////////////
// Ambient - Terrain

	create graphic "terrain_amb_graphic"  $lightcol$ $lightrows$ 100 16
		param text "Terrain Amb"
		param interactive 0

	create swatch "swatch" #lightswatchrow# $lightrows$ 25 16 
		param variables ter_ambient_r ter_ambient_g ter_ambient_b
//
// /////////////////////////////////////////////////////////

inc lightrows $light_spacingvert$

// //////////////////////////////////////////////////////////
// Light 0 - Terrain

	create graphic "terrain_0_graphic"  $lightcol$ $lightrows$ 100 16
		param text "Terrain 0"
		param interactive 0

	create swatch "swatch" #lightswatchrow# $lightrows$ 25 16 
		param variables ter_light0_r ter_light0_g ter_light0_b
//
// /////////////////////////////////////////////////////////

inc lightrows $light_spacingvert$

// //////////////////////////////////////////////////////////
// Light 1 - Terrain

	create graphic "terrain_1_graphic"  $lightcol$ $lightrows$ 100 16
		param text "Terrain 1"
		param interactive 0

	create swatch "swatch" #lightswatchrow# $lightrows$ 25 16 
		
		param variables ter_light1_r ter_light1_g ter_light1_b
//
// /////////////////////////////////////////////////////////

inc lightrows [light_spacingvert + 15]

create graphic whitebar [lightcol -30] [lightrows -11] 120 2
	param image 1_nl_selected120x16.tga




// //////////////////////////////////////////////////////////
// Ambient - Objects

	create graphic "obj_amb_graphic"  $lightcol$ $lightrows$ 100 16
		param text "Object Amb"
		param interactive 0

	create swatch "swatch" #lightswatchrow# $lightrows$ 25 16 
		param variables obj_ambient_r obj_ambient_g obj_ambient_b
		
//
// /////////////////////////////////////////////////////////

inc lightrows $light_spacingvert$

// //////////////////////////////////////////////////////////
// Light 0 - Objects

	create graphic "obj_0_graphic"  $lightcol$ $lightrows$ 100 16
		param text "Object 0"
		param interactive 0

	create swatch "swatch" #lightswatchrow# $lightrows$ 25 16 
		param variables obj_light0_r obj_light0_g obj_light0_b
//
// /////////////////////////////////////////////////////////

inc lightrows $light_spacingvert$

// //////////////////////////////////////////////////////////
// Light 1 - objects

	create graphic "obj_1_graphic"  $lightcol$ $lightrows$ 100 16
		param text "Object 1"
		param interactive 0

	create swatch "swatch" #lightswatchrow# $lightrows$ 25 16 
		param variables obj_light1_r obj_light1_g obj_light1_b
//
// /////////////////////////////////////////////////////////



	
inc lightrows [light_spacingvert + 15]

create graphic whitebar [lightcol -30] [lightrows -11] 120 2
	param image 1_nl_selected120x16.tga



// //////////////////////////////////////////////////////////
// Sky

	create graphic "sky_graphic"  $lightcol$ $lightrows$ 100 16
		param text "Sky"
		param interactive 0

	create swatch "swatch" #lightswatchrow# $lightrows$ 25 16 
		param variables tl_skyr tl_skyg tl_skyb tl_skya
//
// /////////////////////////////////////////////////////////

inc lightrows $light_spacingvert$

// //////////////////////////////////////////////////////////
// Sky BG

	create graphic "sky_bg_graphic"  $lightcol$ $lightrows$ 100 16
		param text "Sky BG"
		param interactive 0

	create swatch "swatch" #lightswatchrow# $lightrows$ 25 16 
		param variables tl_backgroundr tl_backgroundg tl_backgroundb
//
// /////////////////////////////////////////////////////////

inc lightrows $light_spacingvert$



create graphic "tod_text" 0 [lightrows] 159 20
		param text "Time of Day"
		param interactive 0
	

create slider "tod_slider" [lightcol -43] [lightrows + 2] 139 15 horizontal
		param variable		le_tod 
		param range		0 1439
		param slider_color	0 .2 1.0

create trackcontrol "tod_controls" [lightcol -43] [lightrows + 16] 139 20
		param icon_unselected /brushes/standard/brush2.tga
		param icon_selected /brushes/standard/brush13.tga

inc lightrows 36

create panel lightframe $light_position_hor$ $light_position_vert$ $light_width$ $light_height$




create floater "light_frame" 0 0 $light_width$ $light_height$ 		
set framewidth $light_width$
set frameheight $light_height$
exec ui_frame.cfg


panel link light lightframe
hide light 
hide lightframe

