Struct immi::SharedDrawContext [] [src]

pub struct SharedDrawContext { /* fields omitted */ }

A context shared between all draw contexts.

Methods

impl SharedDrawContext
[src]

The cursor coordinates, if any, must be in OpenGL viewport coordinates. In other words, [-1.0, -1.0] corresponds to the bottom-left hand corner of the screen, and [1.0, 1.0] to the top-right hand corner.

Returns true if one of the elements that has been drawn by one of the draw contexts was under the mouse cursor.

This function can be used to determine whether the user is hovering some part of the UI. In other words, if this function returns false, then you know that the user is hovering what is under the UI.

When you create the context, this value is initally false. Each widget that you draw can call set_cursor_hovered_widget to pass this value to true.