Skip to main content

engage/generated/app/
refreshunitsetmenuitem.rs

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