@@ -13,21 +13,22 @@ use bevy_script_api::{
13
13
#[ proxy(
14
14
derive( ) ,
15
15
remote = "bevy::input::gamepad::Gamepad" ,
16
- functions[ r#"
17
- /// Returns the USB vendor ID as assigned by the USB-IF, if available.
16
+ functions[
17
+ // r#"
18
+ // /// Returns the USB vendor ID as assigned by the USB-IF, if available.
18
19
19
- #[lua(kind = "Method")]
20
- fn vendor_id(&self) -> std::option::Option<u16>;
20
+ // #[lua(kind = "Method")]
21
+ // fn vendor_id(&self) -> std::option::Option<u16>;
21
22
22
- "# ,
23
- r#"
24
- /// Returns the USB product ID as assigned by the [vendor], if available.
25
- /// [vendor]: Self::vendor_id
23
+ // "#,
24
+ // r#"
25
+ // // / Returns the USB product ID as assigned by the [vendor], if available.
26
+ // // / [vendor]: Self::vendor_id
26
27
27
- #[lua(kind = "Method")]
28
- fn product_id(&self) -> std::option::Option<u16>;
28
+ // #[lua(kind = "Method")]
29
+ // fn product_id(&self) -> std::option::Option<u16>;
29
30
30
- "# ,
31
+ // "#,
31
32
r#"
32
33
/// Returns the left stick as a [`Vec2`]
33
34
@@ -49,37 +50,37 @@ use bevy_script_api::{
49
50
fn dpad(&self) -> bevy::math::Vec2;
50
51
51
52
"# ,
52
- r#"
53
- /// Returns `true` if the [`GamepadButton`] has been pressed.
53
+ // r#"
54
+ // // / Returns `true` if the [`GamepadButton`] has been pressed.
54
55
55
- #[lua(kind = "Method")]
56
- fn pressed(&self, #[proxy] button_type: bevy::input::gamepad::GamepadButton) -> bool;
56
+ // #[lua(kind = "Method")]
57
+ // fn pressed(&self, #[proxy] button_type: bevy::input::gamepad::GamepadButton) -> bool;
57
58
58
- "# ,
59
- r#"
60
- /// Returns `true` if the [`GamepadButton`] has been pressed during the current frame.
61
- /// Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_released`].
59
+ // "#,
60
+ // r#"
61
+ // // / Returns `true` if the [`GamepadButton`] has been pressed during the current frame.
62
+ // // / Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_released`].
62
63
63
- #[lua(kind = "Method")]
64
- fn just_pressed(
65
- &self,
66
- #[proxy]
67
- button_type: bevy::input::gamepad::GamepadButton,
68
- ) -> bool;
64
+ // #[lua(kind = "Method")]
65
+ // fn just_pressed(
66
+ // &self,
67
+ // #[proxy]
68
+ // button_type: bevy::input::gamepad::GamepadButton,
69
+ // ) -> bool;
69
70
70
- "# ,
71
- r#"
72
- /// Returns `true` if the [`GamepadButton`] has been released during the current frame.
73
- /// Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_pressed`].
71
+ // "#,
72
+ // r#"
73
+ // // / Returns `true` if the [`GamepadButton`] has been released during the current frame.
74
+ // // / Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_pressed`].
74
75
75
- #[lua(kind = "Method")]
76
- fn just_released(
77
- &self,
78
- #[proxy]
79
- button_type: bevy::input::gamepad::GamepadButton,
80
- ) -> bool;
76
+ // #[lua(kind = "Method")]
77
+ // fn just_released(
78
+ // &self,
79
+ // #[proxy]
80
+ // button_type: bevy::input::gamepad::GamepadButton,
81
+ // ) -> bool;
81
82
82
- "# ,
83
+ // "#,
83
84
r#"
84
85
#[lua(kind="MetaMethod", metamethod="ToString")]
85
86
fn index(&self) -> String {
@@ -824,45 +825,45 @@ fn index(&self) -> String {
824
825
"# ]
825
826
) ]
826
827
struct GamepadEvent { }
827
- #[ derive( bevy_mod_scripting_lua_derive:: LuaProxy ) ]
828
- #[ proxy(
829
- derive( clone) ,
830
- remote = "bevy::input::gamepad::GamepadInfo" ,
831
- functions[ r#"
832
-
833
- #[lua(
834
- as_trait = "std::cmp::PartialEq",
835
- kind = "MetaFunction",
836
- composite = "eq",
837
- metamethod = "Eq",
838
- )]
839
- fn eq(&self, #[proxy] other: &gamepad::GamepadInfo) -> bool;
840
-
841
- "# ,
842
- r#"
843
-
844
- #[lua(as_trait = "std::cmp::Eq", kind = "Method")]
845
- fn assert_receiver_is_total_eq(&self) -> ();
846
-
847
- "# ,
848
- r#"
849
-
850
- #[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
851
- fn clone(&self) -> bevy::input::gamepad::GamepadInfo;
852
-
853
- "# ,
854
- r#"
855
- #[lua(kind="MetaMethod", metamethod="ToString")]
856
- fn index(&self) -> String {
857
- format!("{:?}", _self)
858
- }
859
- "# ]
860
- ) ]
861
- struct GamepadInfo {
862
- name : std:: string:: String ,
863
- vendor_id : std:: option:: Option < u16 > ,
864
- product_id : std:: option:: Option < u16 > ,
865
- }
828
+ // #[derive(bevy_mod_scripting_lua_derive::LuaProxy)]
829
+ // #[proxy(
830
+ // derive(clone),
831
+ // remote = "bevy::input::gamepad::GamepadInfo",
832
+ // functions[r#"
833
+
834
+ // #[lua(
835
+ // as_trait = "std::cmp::PartialEq",
836
+ // kind = "MetaFunction",
837
+ // composite = "eq",
838
+ // metamethod = "Eq",
839
+ // )]
840
+ // fn eq(&self, #[proxy] other: &gamepad::GamepadInfo) -> bool;
841
+
842
+ // "#,
843
+ // r#"
844
+
845
+ // #[lua(as_trait = "std::cmp::Eq", kind = "Method")]
846
+ // fn assert_receiver_is_total_eq(&self) -> ();
847
+
848
+ // "#,
849
+ // r#"
850
+
851
+ // #[lua(as_trait = "std::clone::Clone", kind = "Method", output(proxy))]
852
+ // fn clone(&self) -> bevy::input::gamepad::GamepadInfo;
853
+
854
+ // "#,
855
+ // r#"
856
+ // #[lua(kind="MetaMethod", metamethod="ToString")]
857
+ // fn index(&self) -> String {
858
+ // format!("{:?}", _self)
859
+ // }
860
+ // "#]
861
+ // )]
862
+ // struct GamepadInfo {
863
+ // name: std::string::String,
864
+ // vendor_id: std::option::Option<u16>,
865
+ // product_id: std::option::Option<u16>,
866
+ // }
866
867
#[ derive( bevy_mod_scripting_lua_derive:: LuaProxy ) ]
867
868
#[ proxy(
868
869
derive( clone) ,
@@ -1818,7 +1819,7 @@ impl bevy_mod_scripting_core::hosts::APIProvider for BevyInputAPIProvider {
1818
1819
> ,
1819
1820
> ( )
1820
1821
. process_type :: < LuaGamepadEvent > ( )
1821
- . process_type :: < LuaGamepadInfo > ( )
1822
+ // .process_type::<LuaGamepadInfo>()
1822
1823
. process_type :: < LuaGamepadInput > ( )
1823
1824
. process_type :: < LuaGamepadRumbleRequest > ( )
1824
1825
. process_type :: < LuaRawGamepadAxisChangedEvent > ( )
@@ -1898,7 +1899,7 @@ impl bevy_mod_scripting_core::hosts::APIProvider for BevyInputAPIProvider {
1898
1899
app. register_foreign_lua_type :: < bevy:: input:: gamepad:: GamepadConnection > ( ) ;
1899
1900
app. register_foreign_lua_type :: < bevy:: input:: gamepad:: GamepadConnectionEvent > ( ) ;
1900
1901
app. register_foreign_lua_type :: < bevy:: input:: gamepad:: GamepadEvent > ( ) ;
1901
- app. register_foreign_lua_type :: < bevy:: input:: gamepad:: GamepadInfo > ( ) ;
1902
+ // app.register_foreign_lua_type::<bevy::input::gamepad::GamepadInfo>();
1902
1903
app. register_foreign_lua_type :: < bevy:: input:: gamepad:: GamepadInput > ( ) ;
1903
1904
app. register_foreign_lua_type :: < bevy:: input:: gamepad:: GamepadRumbleRequest > ( ) ;
1904
1905
app. register_foreign_lua_type :: <
0 commit comments