engage/generated/nn/hid/
npadbutton.rs1#[cfg(feature = "nn-hid-npadbutton-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 r#enum::{Enum, IEnum},
11 valuetype::{IValueType, ValueType},
12 };
13
14 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/nn/hid/npadbutton/NpadButton.md"))]
15 #[repr(C)]
16 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
17 pub struct NpadButton {
18 pub value: i64,
19 }
20 impl ::unity::ClassIdentity for NpadButton {
21 const NAME: &'static str = "NpadButton";
22 const NAMESPACE: &'static str = "nn.hid";
23
24 fn class() -> ::unity::Class {
25 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27 }
28 }
29 impl ::unity::IlType for NpadButton {
30 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32 }
33 }
34 impl NpadButton {
35 pub fn none() -> Self {
36 Self { value: 0 }
37 }
38
39 pub fn a() -> Self {
40 Self { value: 1 }
41 }
42
43 pub fn b() -> Self {
44 Self { value: 2 }
45 }
46
47 pub fn x() -> Self {
48 Self { value: 4 }
49 }
50
51 pub fn y() -> Self {
52 Self { value: 8 }
53 }
54
55 pub fn stick_l() -> Self {
56 Self { value: 16 }
57 }
58
59 pub fn stick_r() -> Self {
60 Self { value: 32 }
61 }
62
63 pub fn l() -> Self {
64 Self { value: 64 }
65 }
66
67 pub fn r() -> Self {
68 Self { value: 128 }
69 }
70
71 pub fn zl() -> Self {
72 Self { value: 256 }
73 }
74
75 pub fn zr() -> Self {
76 Self { value: 512 }
77 }
78
79 pub fn plus() -> Self {
80 Self { value: 1024 }
81 }
82
83 pub fn minus() -> Self {
84 Self { value: 2048 }
85 }
86
87 pub fn left() -> Self {
88 Self { value: 4096 }
89 }
90
91 pub fn up() -> Self {
92 Self { value: 8192 }
93 }
94
95 pub fn right() -> Self {
96 Self { value: 16384 }
97 }
98
99 pub fn down() -> Self {
100 Self { value: 32768 }
101 }
102
103 pub fn stick_l_left() -> Self {
104 Self { value: 65536 }
105 }
106
107 pub fn stick_l_up() -> Self {
108 Self { value: 131072 }
109 }
110
111 pub fn stick_l_right() -> Self {
112 Self { value: 262144 }
113 }
114
115 pub fn stick_l_down() -> Self {
116 Self { value: 524288 }
117 }
118
119 pub fn stick_r_left() -> Self {
120 Self { value: 1048576 }
121 }
122
123 pub fn stick_r_up() -> Self {
124 Self { value: 2097152 }
125 }
126
127 pub fn stick_r_right() -> Self {
128 Self { value: 4194304 }
129 }
130
131 pub fn stick_r_down() -> Self {
132 Self { value: 8388608 }
133 }
134
135 pub fn left_sl() -> Self {
136 Self { value: 16777216 }
137 }
138
139 pub fn left_sr() -> Self {
140 Self { value: 33554432 }
141 }
142
143 pub fn right_sl() -> Self {
144 Self { value: 67108864 }
145 }
146
147 pub fn right_sr() -> Self {
148 Self { value: 134217728 }
149 }
150 }
151}
152
153#[cfg(feature = "nn-hid-npadbutton-types")]
154pub use __types::*;
155
156#[cfg(feature = "nn-hid-npadbutton")]
157#[doc(hidden)]
158pub mod prelude {
159 pub use super::NpadButton;
160 #[cfg(feature = "system-object")]
161 pub use crate::system::object::IObjectMethods;
162 #[cfg(feature = "system-enum")]
163 pub use crate::system::r#enum::IEnumMethods;
164 #[cfg(feature = "system-valuetype")]
165 pub use crate::system::valuetype::IValueTypeMethods;
166 pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
167}