igiColourEdit

Category: IGI (in-game GUI) — Values

Syntax:

igiColourEdit:Int(label:String, rgb:Int)


Parameters

Returns

The new colour, packed the same way.



Summary

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.



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

BambooBasic © 2026 Michael Denathorn