Skip to main content

engage/generated/app/
refreshunitselectrandommenuitem.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-refreshunitselectrandommenuitem-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        app::{
10            basicmenuitem::{BasicMenuItem, IBasicMenuItem},
11            refreshunitselectmenuitem::{IRefreshUnitSelectMenuItem, RefreshUnitSelectMenuItem},
12        },
13        system::object::{IObject, Object},
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/refreshunitselectrandommenuitem/RefreshUnitSelectRandomMenuItem.md"))]
17    #[::unity::class(namespace = "App", name = "RefreshUnitSelectRandomMenuItem")]
18    #[parent(crate::app::refreshunitselectmenuitem::RefreshUnitSelectMenuItem)]
19    pub struct RefreshUnitSelectRandomMenuItem {}
20}
21
22#[cfg(feature = "app-refreshunitselectrandommenuitem-types")]
23pub use __types::*;
24
25#[cfg(feature = "app-refreshunitselectrandommenuitem")]
26pub trait IRefreshUnitSelectRandomMenuItemMethods: IRefreshUnitSelectRandomMenuItem {
27    #[doc = "`.ctor(bool, crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_SelectEventHandler, crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_DecideEventHandler)` overload"]
28    fn ctor(
29        self,
30        decided: impl ::core::convert::Into<bool>,
31        select_event_handler: impl ::core::convert::Into<crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_SelectEventHandler>,
32        decide_event_handler: impl ::core::convert::Into<crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_DecideEventHandler>,
33    ) -> () {
34        unsafe {
35            let __receiver =
36                <RefreshUnitSelectRandomMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
37            ::unity::il2cpp_call!((::unity::module_base()+0x22c2b00usize)as*mut u8,();
38(RefreshUnitSelectRandomMenuItem)__receiver,(bool)::core::convert::Into::into(decided),(crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_SelectEventHandler)::core::convert::Into::into(select_event_handler),(crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_DecideEventHandler)::core::convert::Into::into(decide_event_handler))
39        }
40    }
41    #[doc = "`OnBuildMenuItemContent()` overload"]
42    fn on_build_menu_item_content(self) -> () {
43        unsafe {
44            let __receiver =
45                <RefreshUnitSelectRandomMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
46            {
47                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
48                let __vi = *__vt.get(11usize).unwrap_or_else(|| {
49                    panic!(
50                        "unity: virtual slot {}
51 out of range (vtable len {}
52) on the runtime class behind {}
53 (method `{}
54`)",
55                        11usize,
56                        __vt.len(),
57                        <RefreshUnitSelectRandomMenuItem as ::unity::ClassIdentity>::NAME,
58                        "OnBuildMenuItemContent",
59                    )
60                });
61                let __inner: extern "C" fn(RefreshUnitSelectRandomMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
62                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
63                __inner(__receiver, __mi)
64            }
65        }
66    }
67    #[doc = "`OnSelect()` overload"]
68    fn on_select(self) -> () {
69        unsafe {
70            let __receiver =
71                <RefreshUnitSelectRandomMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
72            {
73                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
74                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
75                    panic!(
76                        "unity: virtual slot {}
77 out of range (vtable len {}
78) on the runtime class behind {}
79 (method `{}
80`)",
81                        12usize,
82                        __vt.len(),
83                        <RefreshUnitSelectRandomMenuItem as ::unity::ClassIdentity>::NAME,
84                        "OnSelect",
85                    )
86                });
87                let __inner: extern "C" fn(RefreshUnitSelectRandomMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
88                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
89                __inner(__receiver, __mi)
90            }
91        }
92    }
93    #[doc = "`ACall()` overload"]
94    fn a_call(self) -> crate::app::basicmenu::BasicMenu_Result {
95        unsafe {
96            let __receiver =
97                <RefreshUnitSelectRandomMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
98            {
99                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
100                let __vi = *__vt.get(18usize).unwrap_or_else(|| {
101                    panic!(
102                        "unity: virtual slot {}
103 out of range (vtable len {}
104) on the runtime class behind {}
105 (method `{}
106`)",
107                        18usize,
108                        __vt.len(),
109                        <RefreshUnitSelectRandomMenuItem as ::unity::ClassIdentity>::NAME,
110                        "ACall",
111                    )
112                });
113                let __inner: extern "C" fn(RefreshUnitSelectRandomMenuItem, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
114                    ::core::mem::transmute(__vi.method_ptr);
115                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
116                __inner(__receiver, __mi)
117            }
118        }
119    }
120}
121
122#[cfg(feature = "app-refreshunitselectrandommenuitem")]
123impl<__T: IRefreshUnitSelectRandomMenuItem> IRefreshUnitSelectRandomMenuItemMethods for __T {}
124
125#[cfg(feature = "app-refreshunitselectrandommenuitem")]
126impl RefreshUnitSelectRandomMenuItem {
127    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
128        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
129    }
130
131    pub fn on_build_menu_item_content_method_info() -> &'static ::unity::il2cpp::MethodInfo {
132        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
133    }
134
135    pub fn on_select_method_info() -> &'static ::unity::il2cpp::MethodInfo {
136        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
137    }
138
139    pub fn a_call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
140        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
141    }
142}
143
144#[cfg(feature = "app-refreshunitselectrandommenuitem")]
145impl RefreshUnitSelectRandomMenuItem {
146    #[doc = "Direct (non-virtual) call to `RefreshUnitSelectRandomMenuItem`'s own `OnBuildMenuItemContent`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
147    pub unsafe fn on_build_menu_item_content(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
148        let __mi = Self::on_build_menu_item_content_method_info();
149        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
150        __inner(this.into(), ::core::option::Option::None)
151    }
152
153    #[doc = "Direct (non-virtual) call to `RefreshUnitSelectRandomMenuItem`'s own `OnSelect`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
154    pub unsafe fn on_select(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
155        let __mi = Self::on_select_method_info();
156        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
157        __inner(this.into(), ::core::option::Option::None)
158    }
159
160    #[doc = "Direct (non-virtual) call to `RefreshUnitSelectRandomMenuItem`'s own `ACall`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
161    pub unsafe fn a_call(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::basicmenu::BasicMenu_Result {
162        let __mi = Self::a_call_method_info();
163        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
164            ::core::mem::transmute(__mi.method_ptr);
165        __inner(this.into(), ::core::option::Option::None)
166    }
167}
168
169#[cfg(feature = "app-refreshunitselectrandommenuitem")]
170impl RefreshUnitSelectRandomMenuItem {
171    #[doc = "`.ctor(bool, crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_SelectEventHandler, crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_DecideEventHandler)` — overload selector"]
172    pub fn new(
173        decided: bool,
174        select_event_handler: crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_SelectEventHandler,
175        decide_event_handler: crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_DecideEventHandler,
176    ) -> Self {
177        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
178            panic!(
179                "{}
180::{}
181 failed to instantiate",
182                ::core::stringify!(RefreshUnitSelectRandomMenuItem),
183                ::core::stringify!(new),
184            )
185        });
186        <Self as IRefreshUnitSelectRandomMenuItemMethods>::ctor(this, decided, select_event_handler, decide_event_handler);
187        this
188    }
189}
190
191#[cfg(feature = "app-refreshunitselectrandommenuitem")]
192#[doc(hidden)]
193pub mod prelude {
194    pub use super::{IRefreshUnitSelectRandomMenuItem, IRefreshUnitSelectRandomMenuItemMethods, RefreshUnitSelectRandomMenuItem};
195    #[cfg(feature = "app-basicmenuitem")]
196    pub use crate::app::basicmenuitem::IBasicMenuItemMethods;
197    #[cfg(feature = "app-refreshunitselectmenuitem")]
198    pub use crate::app::refreshunitselectmenuitem::IRefreshUnitSelectMenuItemMethods;
199    #[cfg(feature = "system-object")]
200    pub use crate::system::object::IObjectMethods;
201    pub use crate::{
202        app::{basicmenuitem::IBasicMenuItem, refreshunitselectmenuitem::IRefreshUnitSelectMenuItem},
203        system::object::IObject,
204    };
205}