classicube_helpers\events/
controller.rs

1use std::os::raw::{c_float, c_int};
2
3use crate::make_event_handler;
4
5make_event_handler!(
6    /// Player begins loading a new world
7    Controller,
8    AxisUpdate,
9    PadAxis,
10    (
11        {
12            name: port,
13            rust_type: c_int,
14            c_type: c_int,
15            to_rust: |a| a,
16        },
17        {
18            name: axis,
19            rust_type: c_int,
20            c_type: c_int,
21            to_rust: |a| a,
22        },
23        {
24            name: x,
25            rust_type: c_float,
26            c_type: c_float,
27            to_rust: |a| a,
28        },
29        {
30            name: y,
31            rust_type: c_float,
32            c_type: c_float,
33            to_rust: |a| a,
34        },
35    )
36);