engage/generated/root/
bgmchangemenuitem.rs1#[cfg(feature = "root-bgmchangemenuitem-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::basicmenuitem::{BasicMenuItem, IBasicMenuItem},
10 root::configbasicmenuitem::{ConfigBasicMenuItem, IConfigBasicMenuItem},
11 system::object::{IObject, Object},
12 };
13
14 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root/bgmchangemenuitem/BGMChangeMenuItem.md"))]
15 #[::unity::class(namespace = "", name = "BGMChangeMenuItem")]
16 #[parent(crate::root::configbasicmenuitem::ConfigBasicMenuItem)]
17 pub struct BGMChangeMenuItem {
18 #[offset(136)]
19 #[rename(name = "m_IsEnemy")]
20 pub m_is_enemy: bool,
21 }
22}
23
24#[cfg(feature = "root-bgmchangemenuitem-types")]
25pub use __types::*;
26
27#[cfg(feature = "root-bgmchangemenuitem")]
28pub trait IBGMChangeMenuItemMethods: IBGMChangeMenuItem {
29 #[doc = "`get_SelectBGM()` overload"]
30 fn get_select_bgm(self) -> ::unity::Il2CppString {
31 unsafe {
32 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
33 ::unity::il2cpp_call!((::unity::module_base()+0x21215f0usize)as*mut u8, ::unity::Il2CppString;
34(BGMChangeMenuItem)__receiver)
35 }
36 }
37 #[doc = "`set_SelectBGM(::unity::Il2CppString)` overload"]
38 fn set_select_bgm(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
39 unsafe {
40 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
41 ::unity::il2cpp_call!((::unity::module_base()+0x21216b0usize)as*mut u8,();
42(BGMChangeMenuItem)__receiver,(::unity::Il2CppString)::core::convert::Into::into(value))
43 }
44 }
45 #[doc = "`.ctor(bool)` overload"]
46 fn ctor(self, is_enemy: impl ::core::convert::Into<bool>) -> () {
47 unsafe {
48 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
49 ::unity::il2cpp_call!((::unity::module_base()+0x2121780usize)as*mut u8,();
50(BGMChangeMenuItem)__receiver,(bool)::core::convert::Into::into(is_enemy))
51 }
52 }
53 #[doc = "`OnChildMenuDecide(::unity::Il2CppString)` overload"]
54 fn on_child_menu_decide(self, event_name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
55 unsafe {
56 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
57 ::unity::il2cpp_call!((::unity::module_base()+0x2121b10usize)as*mut u8,();
58(BGMChangeMenuItem)__receiver,(::unity::Il2CppString)::core::convert::Into::into(event_name))
59 }
60 }
61 #[doc = "`BuildAttribute()` overload"]
62 fn build_attribute(self) -> crate::app::basicmenuitem::BasicMenuItem_Attribute {
63 unsafe {
64 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
65 {
66 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
67 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
68 panic!(
69 "unity: virtual slot {}
70 out of range (vtable len {}
71) on the runtime class behind {}
72 (method `{}
73`)",
74 8usize,
75 __vt.len(),
76 <BGMChangeMenuItem as ::unity::ClassIdentity>::NAME,
77 "BuildAttribute",
78 )
79 });
80 let __inner: extern "C" fn(BGMChangeMenuItem, ::unity::OptionalMethod) -> crate::app::basicmenuitem::BasicMenuItem_Attribute =
81 ::core::mem::transmute(__vi.method_ptr);
82 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
83 __inner(__receiver, __mi)
84 }
85 }
86 }
87 #[doc = "`CustomCall()` overload"]
88 fn custom_call(self) -> crate::app::basicmenu::BasicMenu_Result {
89 unsafe {
90 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
91 {
92 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
93 let __vi = *__vt.get(26usize).unwrap_or_else(|| {
94 panic!(
95 "unity: virtual slot {}
96 out of range (vtable len {}
97) on the runtime class behind {}
98 (method `{}
99`)",
100 26usize,
101 __vt.len(),
102 <BGMChangeMenuItem as ::unity::ClassIdentity>::NAME,
103 "CustomCall",
104 )
105 });
106 let __inner: extern "C" fn(BGMChangeMenuItem, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
107 ::core::mem::transmute(__vi.method_ptr);
108 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
109 __inner(__receiver, __mi)
110 }
111 }
112 }
113 #[doc = "`InitContent()` overload"]
114 fn init_content(self) -> () {
115 unsafe {
116 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
117 {
118 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
119 let __vi = *__vt.get(27usize).unwrap_or_else(|| {
120 panic!(
121 "unity: virtual slot {}
122 out of range (vtable len {}
123) on the runtime class behind {}
124 (method `{}
125`)",
126 27usize,
127 __vt.len(),
128 <BGMChangeMenuItem as ::unity::ClassIdentity>::NAME,
129 "InitContent",
130 )
131 });
132 let __inner: extern "C" fn(BGMChangeMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
133 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
134 __inner(__receiver, __mi)
135 }
136 }
137 }
138 #[doc = "`SetCommandText()` overload"]
139 fn set_command_text(self) -> () {
140 unsafe {
141 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
142 ::unity::il2cpp_call!((::unity::module_base()+0x21218e0usize)as*mut u8,();
143(BGMChangeMenuItem)__receiver)
144 }
145 }
146 #[doc = "`OnSelect()` overload"]
147 fn on_select(self) -> () {
148 unsafe {
149 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
150 {
151 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
152 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
153 panic!(
154 "unity: virtual slot {}
155 out of range (vtable len {}
156) on the runtime class behind {}
157 (method `{}
158`)",
159 12usize,
160 __vt.len(),
161 <BGMChangeMenuItem as ::unity::ClassIdentity>::NAME,
162 "OnSelect",
163 )
164 });
165 let __inner: extern "C" fn(BGMChangeMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
166 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
167 __inner(__receiver, __mi)
168 }
169 }
170 }
171 #[doc = "`OnDeselect()` overload"]
172 fn on_deselect(self) -> () {
173 unsafe {
174 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
175 {
176 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
177 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
178 panic!(
179 "unity: virtual slot {}
180 out of range (vtable len {}
181) on the runtime class behind {}
182 (method `{}
183`)",
184 13usize,
185 __vt.len(),
186 <BGMChangeMenuItem as ::unity::ClassIdentity>::NAME,
187 "OnDeselect",
188 )
189 });
190 let __inner: extern "C" fn(BGMChangeMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
191 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
192 __inner(__receiver, __mi)
193 }
194 }
195 }
196 #[doc = "`SetHelpText()` overload"]
197 fn set_help_text(self) -> () {
198 unsafe {
199 let __receiver = <BGMChangeMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
200 ::unity::il2cpp_call!((::unity::module_base()+0x2121970usize)as*mut u8,();
201(BGMChangeMenuItem)__receiver)
202 }
203 }
204}
205
206#[cfg(feature = "root-bgmchangemenuitem")]
207impl<__T: IBGMChangeMenuItem> IBGMChangeMenuItemMethods for __T {}
208
209#[cfg(feature = "root-bgmchangemenuitem")]
210impl BGMChangeMenuItem {
211 pub fn get_select_bgm_method_info() -> &'static ::unity::il2cpp::MethodInfo {
212 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
213 }
214
215 pub fn set_select_bgm_method_info() -> &'static ::unity::il2cpp::MethodInfo {
216 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
217 }
218
219 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
220 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
221 }
222
223 pub fn on_child_menu_decide_method_info() -> &'static ::unity::il2cpp::MethodInfo {
224 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
225 }
226
227 pub fn build_attribute_method_info() -> &'static ::unity::il2cpp::MethodInfo {
228 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
229 }
230
231 pub fn custom_call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
232 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
233 }
234
235 pub fn init_content_method_info() -> &'static ::unity::il2cpp::MethodInfo {
236 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
237 }
238
239 pub fn set_command_text_method_info() -> &'static ::unity::il2cpp::MethodInfo {
240 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
241 }
242
243 pub fn on_select_method_info() -> &'static ::unity::il2cpp::MethodInfo {
244 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
245 }
246
247 pub fn on_deselect_method_info() -> &'static ::unity::il2cpp::MethodInfo {
248 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
249 }
250
251 pub fn set_help_text_method_info() -> &'static ::unity::il2cpp::MethodInfo {
252 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
253 }
254}
255
256#[cfg(feature = "root-bgmchangemenuitem")]
257impl BGMChangeMenuItem {
258 #[doc = "Direct (non-virtual) call to `BGMChangeMenuItem`'s own `BuildAttribute`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
259 pub unsafe fn build_attribute(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::basicmenuitem::BasicMenuItem_Attribute {
260 let __mi = Self::build_attribute_method_info();
261 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::basicmenuitem::BasicMenuItem_Attribute =
262 ::core::mem::transmute(__mi.method_ptr);
263 __inner(this.into(), ::core::option::Option::None)
264 }
265
266 #[doc = "Direct (non-virtual) call to `BGMChangeMenuItem`'s own `CustomCall`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
267 pub unsafe fn custom_call(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::basicmenu::BasicMenu_Result {
268 let __mi = Self::custom_call_method_info();
269 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
270 ::core::mem::transmute(__mi.method_ptr);
271 __inner(this.into(), ::core::option::Option::None)
272 }
273
274 #[doc = "Direct (non-virtual) call to `BGMChangeMenuItem`'s own `InitContent`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
275 pub unsafe fn init_content(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
276 let __mi = Self::init_content_method_info();
277 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
278 __inner(this.into(), ::core::option::Option::None)
279 }
280
281 #[doc = "Direct (non-virtual) call to `BGMChangeMenuItem`'s own `OnSelect`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
282 pub unsafe fn on_select(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
283 let __mi = Self::on_select_method_info();
284 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
285 __inner(this.into(), ::core::option::Option::None)
286 }
287
288 #[doc = "Direct (non-virtual) call to `BGMChangeMenuItem`'s own `OnDeselect`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
289 pub unsafe fn on_deselect(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
290 let __mi = Self::on_deselect_method_info();
291 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
292 __inner(this.into(), ::core::option::Option::None)
293 }
294}
295
296#[cfg(feature = "root-bgmchangemenuitem")]
297impl BGMChangeMenuItem {
298 #[doc = "`.ctor(bool)` — overload selector"]
299 pub fn new(is_enemy: bool) -> Self {
300 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
301 panic!(
302 "{}
303::{}
304 failed to instantiate",
305 ::core::stringify!(BGMChangeMenuItem),
306 ::core::stringify!(new),
307 )
308 });
309 <Self as IBGMChangeMenuItemMethods>::ctor(this, is_enemy);
310 this
311 }
312}
313
314#[cfg(feature = "root-bgmchangemenuitem")]
315#[doc(hidden)]
316pub mod prelude {
317 pub use super::{BGMChangeMenuItem, IBGMChangeMenuItem, IBGMChangeMenuItemMethods};
318 #[cfg(feature = "app-basicmenuitem")]
319 pub use crate::app::basicmenuitem::IBasicMenuItemMethods;
320 #[cfg(feature = "root-configbasicmenuitem")]
321 pub use crate::root::configbasicmenuitem::IConfigBasicMenuItemMethods;
322 #[cfg(feature = "system-object")]
323 pub use crate::system::object::IObjectMethods;
324 pub use crate::{app::basicmenuitem::IBasicMenuItem, root::configbasicmenuitem::IConfigBasicMenuItem, system::object::IObject};
325}