colour 'include' file wtd
Blitz3D Forums/Blitz3D Beginners Area/colour 'include' file wtd
| ||
Is there an 'include' file which somebody may have written for selecting colours ie instead of having to use color(255,0,255) text"magenta" I could use color(magenta) text"magenta" or color(darkblue) text"darkblue" if you get my meaning. I have an include file for keyboard input from Krylar but cant find a similar one for colour Thanks Graham |
| ||
Well, I dont think there is one, but, what you could do is do one yourself and be the first to submit one. |
| ||
Just how many colours do you want this to work with? There's millions of them! :O If you only need it for the basic, primary-based colours, it'd take 5 mins to write your own. |
| ||
no, i just wanted the basics, eg light blue, blue, dark blue for each of the colours I will write my own, it just makes it simpler when writing text in different colours so I dont have to keep looking the rgb codes up thanks anyway |
| ||
Something along the lines of (and I do not have access to Blitz, so I can't check the colours or there may be little syntax errors, sorry - So to activate the colours, it should work with: etc. etc. Hope this helps! _______________________________EDIT____________________________ Added code to the Archives... you never know... ;-) |
| ||
Or you could do it via constants:Const color_red=$FF0000 Const color_green=$00FF00 Const color_blue=$0000FF Const color_yellow=$FFFF00 Function Colour(rgb,g=-1,b=-1) If g=-1 Color 0,0,rgb Else Color rgb,g,b EndIf End Function Colour color_red Text 10,10,"Red" Colour color_green Text 10,30,"Green" Colour color_blue Text 10,50,"Blue" Colour color_yellow Text 10,70,"Yellow" Colour 255,255,255 Text 10,90,"White" MouseWait |
| ||
thanks guys, thats what I will do sometime this week |