igiImage

Draws a b2d image inside the GUI. Takes image (A b2d image handle (b2dLoadImage)), w (Width to draw it (0 = the image's width)), h (Height to draw it (0 = the image's height)).

IGI

Parameters & Returns

Parameters

image Int
w Int
h Int

Returns

Void

Quick Summary

Draws a b2d image inside the GUI. Takes image (A b2d image handle (b2dLoadImage)), w (Width to draw it (0 = the image's width)), h (Height to draw it (0 = the image's height)).

Technical Exegesis...

Draws a b2d image inside the GUI. On the web an image that hasn't loaded yet keeps its space empty until it arrives. Palette-cycling images and render targets aren't supported.

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

Example

Example.bam
Global icon:Int = b2dLoadImage("Media/coin.png")
; ...
igiImage(icon, 32, 32)
igiSameLine()
igiText("x " & ToString(coins))