Struct immi::SharedDrawContext [] [src]

pub struct SharedDrawContext<'a> {
    // some fields omitted
}

A context shared between all draw contexts.

Methods

impl<'a> SharedDrawContext<'a>
[src]

fn draw<'b, D: ?Sized + Draw + 'b>(&self, width: f32, height: f32, draw: &'b mut D, cursor: Option<[f32; 2]>, cursor_was_pressed: bool, cursor_was_released: bool) -> DrawContext<'a, 'b, D>

fn cursor_hovered_widget(&self) -> bool

Returns true if one of the elements that has been drawn is under the mouse cursor.

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.