Page 1 of 1

colfield

Posted: August 21st, 2014, 7:54 pm
by northstar
i'm working on this script...

Code: Select all

newgui light1 [
	guistayopen [
		guibutton "Spawn Light(s)" [loop i $lightam [newent light $lightrad $lightr $lightg $lightb]] light
	]
	guistrut 1
	guilist [
		guitext "Amount to spawn: " info
		guifield lightam 5
	]
	guibar	
	guitext "Radius" info
	guislider lightrad 0 1024	
	guitext "Red" info
	guislider lightr 0 255	
	guitext "Green" info
	guislider lightg 0 255
	guitext "Blue" info
	guislider lightb 0 255	
	guilist [
			guitext (tabify "Colour (RGB):" 3)
			colfieldsa col tmp3 entupdate			
		]	
] "lights"
and what i want to do is have the colfield update as the slider is moved...

Re: colfield

Posted: August 28th, 2014, 3:03 pm
by northstar
i did find a kinda fix for this problem btw...

Code: Select all

newgui newlight [
    guibutton "sunlight"    "newent light 0 255 255 255"    
	guibutton "spotlight"	"newent spotlight"
	guibar
	guibutton (lightcmd)
    guibar
    guitext "color:"                                                               ///// just text
    guicolor (+ (* (+ (* $lightr 256) $lightg) 256) $lightb)         ///// translates the colour in text from sliders
    guislider lightr 0 255
    guislider lightg 0 255
    guislider lightb 0 255
    guilist [
        guicheckbox "bright"    lightbright 1 0 [lightscale]
        guibar
        guiradio "white"        lightcolour 0 [lightset 255 255 255]
        guiradio "Orange"	    lightcolour 1 [lightset 255 127 0]
        guiradio "yellow"       lightcolour 2 [lightset 255 255 192]
        guiradio "purple"       lightcolour 3 [lightset 255 192 255]        
		guiradio "aqua"    		lightcolour 4 [lightset 0 255 255]
		guiradio "turquoise"    lightcolour 5 [lightset 192 255 255]
    ]
    guitext "radius:"
    guislider lightradius 0 1024
]
it's a sweet little newlight menu... maybe later i'll change the colour to fields, but for now it's functional :)

Re: colfield

Posted: September 29th, 2014, 7:54 am
by anamta
Welcome at this forum. It is a very good community having a big collection of things that we desire. We gat knowledge about latest technology and make fun in entertainment corner. Stay blessed.

Re: colfield

Posted: September 30th, 2014, 12:30 pm
by northstar
thank you, thats very kind of you...

stev