igiColourEdit

Red, green and blue boxes and a swatch; click the swatch for a colour picker. Takes label (The text beside it), rgb (The colour as one number: r * 65536 + g * 256 + b). Returns: The new colour, packed the same way.

IGI

Parameters & Returns

Parameters

label String
rgb Int

Returns

Int

Quick Summary

Red, green and blue boxes and a swatch; click the swatch for a colour picker. Takes label (The text beside it), rgb (The colour as one number: r * 65536 + g * 256 + b). Returns: The new colour, packed the same way.

Technical Exegesis...

Red, green and blue boxes and a swatch; click the swatch for a colour picker. To split the colour up: r = (rgb Shr 16) BitAnd 255, g = (rgb Shr 8) BitAnd 255, b = rgb BitAnd 255.

Call it every frame, between drawing your game and b2dFlip. See the IGI guide.

Returns: The new colour, packed the same way.

Example

Example.bam
shipColour = igiColourEdit("Ship", shipColour)
b2dSetColor((shipColour Shr 16) BitAnd 255, (shipColour Shr 8) BitAnd 255, shipColour BitAnd 255)