draw-single ( display-cell loc dim gadget -- )


Vocabulary
gamelib.ui

Inputs
display-cellan object
locan object
diman object
gadgetan object


Outputs
None

Definition


:: draw-single ( display-cell loc dim gadget -- )
{
{
[ display-cell cell-object instance? ]
[ loc dim display-cell draw-cell-object* ]
}
{
[ display-cell string? ]
[
dim { display-cell loc } gadget textures>>
[ first load-image loc <texture> ] cache
draw-scaled-texture
]
}
{
[ display-cell color? ]
[ display-cell gl-color loc dim gl-fill-rect ]
}
{
[ display-cell quotation? ]
[ loc dim display-cell 2curry ( -- ) call-effect ]
}
{
[ display-cell array? ]
[ display-cell [ loc dim gadget draw-single ] each ]
}
[ ]
} cond ;