
SuperStrict

Import "../../../hitoro.mod/newtonb3d.mod/newtonb3d.bmx"
Import "../../../hitoro.mod/newtonb3d.mod/examples/helpers_general.bmx"

Function LabelEntity (camera:TCamera, entity:TEntity, label:String)
	If EntityInView (entity, camera)
		CameraProject camera, EntityX (entity), EntityY (entity), EntityZ (entity)
		Local w:Int = TextWidth (label)
		Local h:Int = TextHeight (label)
		Local x:Int = ProjectedX () - (w / 2) - 1
		Local y:Int = ProjectedY () - (h / 2) - 1
		y = y + TextHeight (label)
		ShadowText label, x, y
	EndIf
End Function
