Skip to main content

engage/generated/app/
shopunitselectmenuitem.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-shopunitselectmenuitem-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        app::basicmenuitem::{BasicMenuItem, IBasicMenuItem},
10        system::object::{IObject, Object},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/shopunitselectmenuitem/ShopUnitSelectMenuItem.md"))]
14    #[::unity::class(namespace = "App", name = "ShopUnitSelectMenuItem")]
15    #[parent(crate::app::basicmenuitem::BasicMenuItem)]
16    pub struct ShopUnitSelectMenuItem {
17        #[offset(112)]
18        #[rename(name = "m_DecideEventHandler")]
19        pub m_decide_event_handler: crate::app::shopunitselectmenu::ShopUnitSelectMenu_DecideEventHandler,
20        #[offset(120)]
21        #[rename(name = "m_SelectEventHandler")]
22        pub m_select_event_handler: crate::app::shopunitselectmenu::ShopUnitSelectMenu_SelectEventHandler,
23    }
24}
25
26#[cfg(feature = "app-shopunitselectmenuitem-types")]
27pub use __types::*;
28
29#[cfg(feature = "app-shopunitselectmenuitem")]
30pub trait IShopUnitSelectMenuItemMethods: IShopUnitSelectMenuItem {
31    #[doc = "`get_Unit()` overload"]
32    fn get_unit(self) -> crate::app::unit::Unit {
33        unsafe {
34            let __receiver =
35                <ShopUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
36            ::unity::il2cpp_call!((::unity::module_base()+0x2479ad0usize)as*mut u8,crate::app::unit::Unit;
37(ShopUnitSelectMenuItem)__receiver)
38        }
39    }
40    #[doc = "`set_Unit(crate::app::unit::Unit)` overload"]
41    fn set_unit(self, value: impl ::core::convert::Into<crate::app::unit::Unit>) -> () {
42        unsafe {
43            let __receiver =
44                <ShopUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
45            ::unity::il2cpp_call!((::unity::module_base()+0x2479ae0usize)as*mut u8,();
46(ShopUnitSelectMenuItem)__receiver,(crate::app::unit::Unit)::core::convert::Into::into(value))
47        }
48    }
49    #[doc = "`.ctor(crate::app::unit::Unit, crate::app::shopunitselectmenu::ShopUnitSelectMenu_DecideEventHandler, crate::app::shopunitselectmenu::ShopUnitSelectMenu_SelectEventHandler)` overload"]
50    fn ctor(
51        self,
52        unit: impl ::core::convert::Into<crate::app::unit::Unit>,
53        decide_event_handler: impl ::core::convert::Into<crate::app::shopunitselectmenu::ShopUnitSelectMenu_DecideEventHandler>,
54        select_event_handler: impl ::core::convert::Into<crate::app::shopunitselectmenu::ShopUnitSelectMenu_SelectEventHandler>,
55    ) -> () {
56        unsafe {
57            let __receiver =
58                <ShopUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
59            ::unity::il2cpp_call!((::unity::module_base()+0x2479af0usize)as*mut u8,();
60(ShopUnitSelectMenuItem)__receiver,(crate::app::unit::Unit)::core::convert::Into::into(unit),(crate::app::shopunitselectmenu::ShopUnitSelectMenu_DecideEventHandler)::core::convert::Into::into(decide_event_handler),(crate::app::shopunitselectmenu::ShopUnitSelectMenu_SelectEventHandler)::core::convert::Into::into(select_event_handler))
61        }
62    }
63    #[doc = "`OnBuild()` overload"]
64    fn on_build(self) -> () {
65        unsafe {
66            let __receiver =
67                <ShopUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
68            {
69                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
70                let __vi = *__vt.get(10usize).unwrap_or_else(|| {
71                    panic!(
72                        "unity: virtual slot {}
73 out of range (vtable len {}
74) on the runtime class behind {}
75 (method `{}
76`)",
77                        10usize,
78                        __vt.len(),
79                        <ShopUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
80                        "OnBuild",
81                    )
82                });
83                let __inner: extern "C" fn(ShopUnitSelectMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
84                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
85                __inner(__receiver, __mi)
86            }
87        }
88    }
89    #[doc = "`OnBuildMenuItemContent()` overload"]
90    fn on_build_menu_item_content(self) -> () {
91        unsafe {
92            let __receiver =
93                <ShopUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
94            {
95                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
96                let __vi = *__vt.get(11usize).unwrap_or_else(|| {
97                    panic!(
98                        "unity: virtual slot {}
99 out of range (vtable len {}
100) on the runtime class behind {}
101 (method `{}
102`)",
103                        11usize,
104                        __vt.len(),
105                        <ShopUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
106                        "OnBuildMenuItemContent",
107                    )
108                });
109                let __inner: extern "C" fn(ShopUnitSelectMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
110                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
111                __inner(__receiver, __mi)
112            }
113        }
114    }
115    #[doc = "`SetInitialColor()` overload"]
116    fn set_initial_color(self) -> () {
117        unsafe {
118            let __receiver =
119                <ShopUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
120            ::unity::il2cpp_call!((::unity::module_base()+0x2479b70usize)as*mut u8,();
121(ShopUnitSelectMenuItem)__receiver)
122        }
123    }
124    #[doc = "`ACall()` overload"]
125    fn a_call(self) -> crate::app::basicmenu::BasicMenu_Result {
126        unsafe {
127            let __receiver =
128                <ShopUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
129            {
130                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
131                let __vi = *__vt.get(18usize).unwrap_or_else(|| {
132                    panic!(
133                        "unity: virtual slot {}
134 out of range (vtable len {}
135) on the runtime class behind {}
136 (method `{}
137`)",
138                        18usize,
139                        __vt.len(),
140                        <ShopUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
141                        "ACall",
142                    )
143                });
144                let __inner: extern "C" fn(ShopUnitSelectMenuItem, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
145                    ::core::mem::transmute(__vi.method_ptr);
146                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
147                __inner(__receiver, __mi)
148            }
149        }
150    }
151    #[doc = "`BCall()` overload"]
152    fn b_call(self) -> crate::app::basicmenu::BasicMenu_Result {
153        unsafe {
154            let __receiver =
155                <ShopUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
156            {
157                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
158                let __vi = *__vt.get(19usize).unwrap_or_else(|| {
159                    panic!(
160                        "unity: virtual slot {}
161 out of range (vtable len {}
162) on the runtime class behind {}
163 (method `{}
164`)",
165                        19usize,
166                        __vt.len(),
167                        <ShopUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
168                        "BCall",
169                    )
170                });
171                let __inner: extern "C" fn(ShopUnitSelectMenuItem, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
172                    ::core::mem::transmute(__vi.method_ptr);
173                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
174                __inner(__receiver, __mi)
175            }
176        }
177    }
178    #[doc = "`OnSelect()` overload"]
179    fn on_select(self) -> () {
180        unsafe {
181            let __receiver =
182                <ShopUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
183            {
184                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
185                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
186                    panic!(
187                        "unity: virtual slot {}
188 out of range (vtable len {}
189) on the runtime class behind {}
190 (method `{}
191`)",
192                        12usize,
193                        __vt.len(),
194                        <ShopUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
195                        "OnSelect",
196                    )
197                });
198                let __inner: extern "C" fn(ShopUnitSelectMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
199                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
200                __inner(__receiver, __mi)
201            }
202        }
203    }
204}
205
206#[cfg(feature = "app-shopunitselectmenuitem")]
207impl<__T: IShopUnitSelectMenuItem> IShopUnitSelectMenuItemMethods for __T {}
208
209#[cfg(feature = "app-shopunitselectmenuitem")]
210impl ShopUnitSelectMenuItem {
211    pub fn get_unit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
212        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
213    }
214
215    pub fn set_unit_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_build_method_info() -> &'static ::unity::il2cpp::MethodInfo {
224        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
225    }
226
227    pub fn on_build_menu_item_content_method_info() -> &'static ::unity::il2cpp::MethodInfo {
228        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
229    }
230
231    pub fn set_initial_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
232        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
233    }
234
235    pub fn a_call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
236        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
237    }
238
239    pub fn b_call_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
248#[cfg(feature = "app-shopunitselectmenuitem")]
249impl ShopUnitSelectMenuItem {
250    #[doc = "Direct (non-virtual) call to `ShopUnitSelectMenuItem`'s own `OnBuild`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
251    pub unsafe fn on_build(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
252        let __mi = Self::on_build_method_info();
253        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
254        __inner(this.into(), ::core::option::Option::None)
255    }
256
257    #[doc = "Direct (non-virtual) call to `ShopUnitSelectMenuItem`'s own `OnBuildMenuItemContent`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
258    pub unsafe fn on_build_menu_item_content(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
259        let __mi = Self::on_build_menu_item_content_method_info();
260        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
261        __inner(this.into(), ::core::option::Option::None)
262    }
263
264    #[doc = "Direct (non-virtual) call to `ShopUnitSelectMenuItem`'s own `ACall`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
265    pub unsafe fn a_call(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::basicmenu::BasicMenu_Result {
266        let __mi = Self::a_call_method_info();
267        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
268            ::core::mem::transmute(__mi.method_ptr);
269        __inner(this.into(), ::core::option::Option::None)
270    }
271
272    #[doc = "Direct (non-virtual) call to `ShopUnitSelectMenuItem`'s own `BCall`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
273    pub unsafe fn b_call(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::basicmenu::BasicMenu_Result {
274        let __mi = Self::b_call_method_info();
275        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
276            ::core::mem::transmute(__mi.method_ptr);
277        __inner(this.into(), ::core::option::Option::None)
278    }
279
280    #[doc = "Direct (non-virtual) call to `ShopUnitSelectMenuItem`'s own `OnSelect`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
281    pub unsafe fn on_select(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
282        let __mi = Self::on_select_method_info();
283        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
284        __inner(this.into(), ::core::option::Option::None)
285    }
286}
287
288#[cfg(feature = "app-shopunitselectmenuitem")]
289impl ShopUnitSelectMenuItem {
290    #[doc = "`.ctor(crate::app::unit::Unit, crate::app::shopunitselectmenu::ShopUnitSelectMenu_DecideEventHandler, crate::app::shopunitselectmenu::ShopUnitSelectMenu_SelectEventHandler)` — overload selector"]
291    pub fn new(
292        unit: crate::app::unit::Unit,
293        decide_event_handler: crate::app::shopunitselectmenu::ShopUnitSelectMenu_DecideEventHandler,
294        select_event_handler: crate::app::shopunitselectmenu::ShopUnitSelectMenu_SelectEventHandler,
295    ) -> Self {
296        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
297            panic!(
298                "{}
299::{}
300 failed to instantiate",
301                ::core::stringify!(ShopUnitSelectMenuItem),
302                ::core::stringify!(new),
303            )
304        });
305        <Self as IShopUnitSelectMenuItemMethods>::ctor(this, unit, decide_event_handler, select_event_handler);
306        this
307    }
308}
309
310#[cfg(feature = "app-shopunitselectmenuitem")]
311#[doc(hidden)]
312pub mod prelude {
313    pub use super::{IShopUnitSelectMenuItem, IShopUnitSelectMenuItemMethods, ShopUnitSelectMenuItem};
314    #[cfg(feature = "app-basicmenuitem")]
315    pub use crate::app::basicmenuitem::IBasicMenuItemMethods;
316    #[cfg(feature = "system-object")]
317    pub use crate::system::object::IObjectMethods;
318    pub use crate::{app::basicmenuitem::IBasicMenuItem, system::object::IObject};
319}