# nodesnim/nodescontrol/texture_progress_bar

Dark Mode

Search:
Group by:

It provides convenient display progress.

# Imports

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

# Types

    TextureProgressBarObj = object of ControlRef
      max_value*, value*: uint
      progress_texture*, back_texture*: GlTextureObj

    TextureProgressBarRef = ref TextureProgressBarObj

# Procs

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

  Creates a new TextureProgressBar.

  Arguments:

  - `name` is a node name.

  Examples:

      var p = TextureProgressBar("TextureProgressBar")

# Methods

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

  This uses in the `window.nim`.

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

  Duplicates TextureProgressBar object and create a new TextureProgressBar.

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

  Changes max value.

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

  Changes progress.

    method setProgressTexture(self: TextureProgressBarRef; texture: GlTextureObj) {...}{.base,
        raises: [], tags: [].}

  Changes progress texture.

    method setBackgroundTexture(self: TextureProgressBarRef; texture: GlTextureObj) {...}{.
        base, raises: [], tags: [].}

  Changes background progress texture.