Learn / Documentation / UIDrawer

Description

The UIDrawer is a core component in the DoozyUI system that works and behaves like a Navigation Drawer, that can be opened/closed from/to the Left/Right/Up/Down side of the screen.

Component Details

Gesture Listener
  • Settings – Opens the Control Panel at the Settings tab

  • Manual – Link to the manual page for this component

  • YouTube – Link to the quick video tutorial for this component

  • Debug Mode – Enables relevant debug messages to be printed to the console

  • Close Direction  – UIDrawer position when closed (this also affects what gesture shows/hides the drawer)

  • Detect Gestures – Enables/Disables the gesture detectors of this UIDrawer. If FALSE, this drawer will no longer react to gestures. Useful if you plan on showing/hiding the drawer via a button or a script.

  • Rename GameObject – Renames the UIDrawer GameObject to a predefined name

  • Open Database – Opens the Control Panel at the Drawers tab

  • Custom Start Position – If enabled, this UIDrawer will slide from and to the set custom position

  • Open Speed – UIDrawer show animation speed

  • Close Speed – UIDrawer hide animation speed

  • Open Drawer – Behavior when the UIDrawer gets shown (becomes visible on screen)

  • Close Drawer – Behavior when this UIDrawer gets hidden (goes off screen)

  • Drag Drawer – Behavior when this UIDrawer is being dragged

  • Progressor – Reference to a Progressor that allows animating anything (texts, images, animations…) in order to show the current open progress value of this drawer in a visual manner

  • OnProgressChangedProgressEvent executed when the drawer is animating (opening or closing) and its progress has been updated. Passes the Progress (float between 0 – when the drawer is closed and 1 – when the drawer is opened)

  • OnInverseProgressChangedProgressEvent executed when the drawer is animating (opening or closing) and its progress has been updated. Passes the InverseProgress (float between 1 – when the drawer is closed and 0 – when the drawer is opened). InverseProgress = 1 – Progress

Gesture Listener
Gesture Listener

Open Behavior

  • @START UIAction executed when the UIDrawer Open Behavior starts

  • @FINISH UIAction executed when the Open Behavior finished

Gesture Listener
Gesture Listener

Close Behavior

  • @START UIAction executed when the UIDrawer Close Behavior starts

  • @FINISH UIAction executed when the Close Behavior finished

Gesture Listener
Gesture Listener

Drag Behavior

  • @START UIAction executed when the UIDrawer Drag Behavior starts

  • @FINISH UIAction executed when the Drag Behavior finished

Gesture Listener
Gesture Listener
Gesture Listener

Container

  • Container – UIDrawer container settings. This is the actual drawer that gets animated

  • Fade Out Container – If enabled, when the UIDrawer closes, the container will fade out and, when the UIDrawer opens, the container will fade in

  • Disable GameObject – If enabled, the container’s GameObject can be automatically disabled when not in view

  • Disable Canvas – If enabled, the Canvas component can be automatically disabled when not in view

  • Container Size – Determines the container’s size (FullScreen, PercentageOfScreen or FixedSize)

  • Update Container – Updates the container’s settings by taking into account the close direction and the container size settings

  • Percentage Of Screen – When UIDrawerContainerSize is set to PercentageOfScreen, the container’s width and height will be calculated as percentage of the screen’s size

  • Minimum Size – When UIDrawerContainerSize is set to PercentageOfScreen, the container will have a set minimum size

  • Fixed Size – When UIDrawerContainerSize is set to FixedSize, the container will have a set fixed size

Gesture Listener

Overlay

  • Overlay – Reference to the Overlay UIContainer used to dim the screen when the this UIDrawer is shown

Gesture Listener

Arrow

  • Enabled – Determines if the UIDrawerArrow is enabled or not

  • Scale – Scale variable that overrides the scale of the UIDrawerArrow at runtime. This will set the localScale values of the UIDrawerArrow. (only overrides localScale.x and localScale.y)

  • Override Color – If enabled, the UIDrawerArrow color will get interpolated between ClosedColor and OpenedColor

  • Opened – If OverrideColor is enabled, the UIDrawerArrow’s Image color, for when the UIDrawer is opened, will get overridden by this value

  • Closed – If OverrideColor is enabled, the UIDrawerArrow’s Image color, for when the UIDrawer is closed, will get overridden by this value

  • Reset Closed Position – Reset the closed arrow position to the default value

  • Reset Root – Reset the arrow root position (that holds the closed and opened positions) to the default value

  • Reset Opened Position – Reset the opened arrow position to the default value

  • Closed Position = Opened Position – Copies the opened arrow position value to the closed arrow position

  • Opened Position = Closed Position – Copies the closed arrow position value to the opened arrow position

  • Arrow Components – Contains references for all the arrow components