Skip to main content

engage/generated/app/
shopsellemptymenuitem.rs

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