pub fn mouse_buttons(&self) -> MouseButtonIterator {
        MouseButtonIterator {
            cur_button: 1,
            mouse_state: &self.mouse_state,
        }
    }
/// Returns an iterator all mouse buttons with a boolean indicating if the scancode is pressed.
///
/// # Example
/// ```no_run
/// use sdl2::mouse::MouseButton;
/// use std::collections::HashMap;
///
/// fn mouse_button_set(e: &sdl2::EventPump) -> HashMap<MouseButton, bool> {
///     e.mouse_state().mouse_buttons().collect()
/// }
///
/// fn find_first_pressed(e: &sdl2::EventPump) -> bool {
///     for (key,value) in mouse_button_set(e) {
///         return value != false
///     }
///     false
/// }
///
/// ```
Returns an iterator all mouse buttons with a boolean indicating if the scancode is pressed.
Returns an iterator all mouse buttons with a boolean indicating if the scancode is pressed .
pub fn mouse_buttons(&self) -> MouseButtonIterator {
        MouseButtonIterator {
            cur_button: 1,
            mouse_state: &self.mouse_state,
        }
    }
pub fn mouse_buttons ( & self ) -> MouseButtonIterator { MouseButtonIterator { cur_button : 1 , mouse_state : & self . mouse_state , } }
Returns an iterator all mouse buttons with a boolean indicating if the scancode is pressed.
Returns an iterator all mouse buttons with a boolean indicating if the scancode is pressed .
&self
&self
example
```no_run
use sdl2::mouse::MouseButton;
use std::collections::HashMap.

fn mouse_button_set(e: &sdl2::EventPump) -> HashMap {
e.mouse_state().mouse_buttons().collect()
}

fn find_first_pressed(e: &sdl2::EventPump) -> bool {
for (key,value) in mouse_button_set(e) {
return value != false
}
false
}


` ` ` no_run use sdl2 :: mouse :: MouseButton ; use std :: collections :: HashMap . fn mouse_button_set ( e : &sdl2 :: EventPump ) - > HashMap { e . mouse_state () . mouse_buttons () . collect () } fn find_first_pressed ( e : &sdl2 :: EventPump ) - > bool { for ( key value ) in mouse_button_set ( e ) { return value ! = false } false }