MCPcopy Create free account
hub / github.com/17cupsofcoffee/nova / from_raw

Method from_raw

src/input/mouse.rs:13–22  ·  view source on GitHub ↗
(raw: i32)

Source from the content-addressed store, hash-verified

11
12impl MouseButton {
13 pub(crate) fn from_raw(raw: i32) -> Option<MouseButton> {
14 match raw {
15 SDL_BUTTON_LEFT => Some(MouseButton::Left),
16 SDL_BUTTON_MIDDLE => Some(MouseButton::Middle),
17 SDL_BUTTON_RIGHT => Some(MouseButton::Right),
18 SDL_BUTTON_X1 => Some(MouseButton::X1),
19 SDL_BUTTON_X2 => Some(MouseButton::X2),
20 _ => None,
21 }
22 }
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected