VgaGames4

VgaGames4 - canvas man-pages

[.. upper level ..]

# vg4->canvas->chain_add()

Add chain-item to selection-chain.

SYNTAX
VG_BOOL vg4->canvas->chain_add(struct VG_Canvas *cvas, const char *iname, const char *fileprefix, const char *filename, const char *ename)
FUNCTION PARAMETERS

cvas | Canvas
iname | Name of selection-chain
fileprefix | Specifying the file to load: - img for an image - txt for a text - sprt for a sprite
filename | File of chain-item to load
ename | Name of chain-item

RETURN VALUE
Returns boolean: - VG_TRUE: added - VG_FALSE: not added
DESCRIPTION
Add chain-item to selection-chain. See section CV-CHAIN in vg4->canvas->load().
EXAMPLE

      struct VG_Canvas *cvas;

      /* load canvas containing an empty selection-chain named "chain1" */
      [...]

      /* add three chain-items */
      vg4->canvas->chain_add(cvas, "chain1", "img", "images/blue_boy.bmp", "blueboy");
      vg4->canvas->chain_add(cvas, "chain1", "img", "images/yellow_boy.bmp", "yellowboy");
      vg4->canvas->chain_add(cvas, "chain1", "img", "images/red_boy.bmp", "redboy");

SEE ALSO
vg4->canvas->chain_clear() vg4->canvas->chain_disable() vg4->canvas->chain_set_activated() vg4->canvas->chain_get_activated()