VgaGames4 - dialog man-pages

[.. upper level ..]

vg4->dialog->winbright()

Open a canvas-dialog for setting common window brightness.

SYNTAX
VG_BOOL vg4->dialog->winbright(const char *cvasdir, const struct VG_Position *posdst, struct VG_Hash *hvar)

FUNCTION PARAMETERS
cvasdir Directory to load canvasses from, or NULL = use system-canvasses
posdst Canvas-position on window, or NULL = centered
hvar Hash with variable-values (see vg4->canvas->load())

RETURN VALUE
Returns boolean: - VG_TRUE: OK - VG_FALSE: Got exit-request

DESCRIPTION
Open a canvas-dialog for setting common window brightness. This function uses following canvas-file (installed below share/vgagames4/canvas/) - winbright.top.cvas: Top-canvas The parameter hvar should contain following variables - key: top:title value: title of top-canvas If own canvas-files shall be used instead of the system-canvas-files, they must lay in cvasdir or cvasdir/winbright/ and have the same names as the system-canvas-files: - winbright.top.cvas - uses canvas-items: - [CV-TEXT] with name title: text for title - [CV-BAR] with name bar-brightness: for setting brightness - [CV-BUTTON] with name reset: for resetting to default value - [CV-BUTTON] with name apply: for applying changes - [CV-BUTTON] as a cancel-button - uses variables: - key: title value: title of canvas

EXAMPLE
  struct VG_Hash *hvar;

  hvar = vg4->hash->create();

  /* set variables */
  vg4->hash->setstr(hvar, "top:title", "Set window brightness");

  /* execute dialog */
  if (!vg4->dialog->winbright(NULL, NULL, hvar)) {
    /* exit request */
    VG_dest();
    exit(0);
  }

  vg4->hash->destroy(hvar);