Struct direct_gui::controls::ControlState
[−]
[src]
pub struct ControlState { pub mouse_pos: (i32, i32), pub mouse_down: bool, }
Data that needs to be supplied to the update
function.
Fields
mouse_pos: (i32, i32)
The position of the mouse cursor. Is not required to be inside the bounds of the screen.
mouse_down: bool
If the left mouse button is pressed or not.
Methods
impl ControlState
[src]
fn mouse_collision(&self, pos: (i32, i32), size: (i32, i32)) -> bool
[src]
Determines if the mouse is inside a rectangle. Mostly used internally.