Hi,
university was very, very boring today, so here's the result of the last 15 minutes...
Use SPACE to create new colors...
well, that's it =D
// --------------------------------- //
// Project: chaoscolor
// Start: Saturday, April 27, 2013
// IDE Version: 11.171
// SETCURRENTDIR("Media") // go to media files
TYPE color
x
red
green
blue
ENDTYPE
GLOBAL c[] AS color, x, y, b1, b2, col_r, col_g, col_b
main()
FUNCTION main:
SYSTEMPOINTER TRUE
WHILE TRUE
MOUSESTATE x, y, b1, b2
DRAWLINE x, 0, x, 610, RGB(255, 255, 255)
IF KEY(57) =1 THEN add_color()
show_color()
PRINT "RED: " + col_r, 100, 620
PRINT "GREEN: " + col_g, 100, 650
PRINT "BLUE: " + col_b, 100, 680
DRAWRECT 200, 620, 100, 720, RGB(col_r, col_g, col_b)
SHOWSCREEN
WEND
ENDFUNCTION
FUNCTION add_color:
LOCAL col AS color
col.red = RND(255)
col.green = RND(255)
col.blue = RND(255)
col.x = 0
IF LEN(c[]) > 0
FOREACH co IN c[]
INC co.x, 1
NEXT
ENDIF
DIMPUSH c[], col
ENDFUNCTION
FUNCTION show_color:
LOCAL count
IF LEN(c[]) > 0
FOREACH col IN c[]
DRAWLINE col.x, 200, col.x, 600, RGB(col.red, col.green, col.blue)
IF x = col.x
col_r = col.red
col_g = col.green
col_b = col.blue
ENDIF
IF col.x > 1024 THEN DELETE col
NEXT
ENDIF
ENDFUNCTION
Was nimmst du bitte für Drogen?! :D
JAJAJA :D :D