# nodesnim/nodescontrol/popup

Dark Mode

Search:
Group by:

By default popup visible is false. Popup, unlike other nodes, changes children visible when calling show() and hide().

# Imports

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

# Types

    PopupObj = object of ControlRef

    PopupRef = ref PopupObj

# Procs

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

  Creates a new Popup.

  Arguments:

  - `name` is a node name.

  Examples:

      var p = Popup("Popup")

# Methods

    method hide(self: PopupRef) {...}{.raises: [Exception], tags: [RootEffect].}

  Hides popup.

    method show(self: PopupRef) {...}{.raises: [Exception], tags: [RootEffect].}

  Shws popup.

    method calcPositionAnchor(self: PopupRef) {...}{.raises: [Exception], tags: [RootEffect].}

  This uses in the `scene.nim`.

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

  This uses in the `window.nim`.

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

  Duplicates Popup object and create a new Popup.