# nodesnim/nodescontrol/vprogress_bar

Dark Mode

Search:
Group by:

It provides a primitive display vertical progress.

# Imports

../thirdparty/opengl, ../core/vector2, ../core/rect2, ../core/anchor, ../core/input, ../core/color, ../core/enums, ../nodes/node, control

# Types

    VProgressBarObj = object of ControlRef
      max_value*, value*: uint
      progress_color*: ColorRef
      thumb_color*: ColorRef

    VProgressBarRef = ref VProgressBarObj

# Procs

    proc VProgressBar(name: string = "VProgressBar"): VProgressBarRef {...}{.raises: [], tags: [].}

  Creates a new VProgressBar.

  Arguments:

  - `name` is a node name.

  Examples:

      var progress = VProgressBar("VProgressBar")

# Methods

    method draw(self: VProgressBarRef; w, h: GLfloat) {...}{.raises: [GLerror, Exception],
        tags: [RootEffect].}

  This uses in the `window.nim`.

    method duplicate(self: VProgressBarRef): VProgressBarRef {...}{.base, raises: [], tags: [].}

  Duplicates VProgressBar object and create a new VProgressBar.

    method setMaxValue(self: VProgressBarRef; value: uint) {...}{.base, raises: [], tags: [].}

  Changes max value.

    method setProgress(self: VProgressBarRef; value: uint) {...}{.base, raises: [], tags: [].}

  Changes progress.

    method setProgressColor(self: VProgressBarRef; color: ColorRef) {...}{.base, raises: [],
        tags: [].}

  Changes progress color. For change background color use `setBackgroundColor` method.