Skip to main content

engage/generated/app/
arenabondunitselectmenuitem.rs

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