Skip to main content

engage/generated/root/
battlemenuitem.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "root-battlemenuitem-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        app::basicmenuitem::{BasicMenuItem, IBasicMenuItem},
10        root::tutoriallisttopbasicmenuitem::{ITutorialListTopBasicMenuItem, TutorialListTopBasicMenuItem},
11        system::object::{IObject, Object},
12    };
13
14    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root/battlemenuitem/BattleMenuItem.md"))]
15    #[::unity::class(namespace = "", name = "BattleMenuItem")]
16    #[parent(crate::root::tutoriallisttopbasicmenuitem::TutorialListTopBasicMenuItem)]
17    pub struct BattleMenuItem {}
18}
19
20#[cfg(feature = "root-battlemenuitem-types")]
21pub use __types::*;
22
23#[cfg(feature = "root-battlemenuitem")]
24pub trait IBattleMenuItemMethods: IBattleMenuItem {
25    #[doc = "`.ctor(bool, crate::root::tutoriallisttopmenu::TutorialListTopMenu_DecideEventHandler)` overload"]
26    fn ctor(
27        self,
28        is_get_all_tutorial: impl ::core::convert::Into<bool>,
29        decide_event_handler: impl ::core::convert::Into<crate::root::tutoriallisttopmenu::TutorialListTopMenu_DecideEventHandler>,
30    ) -> () {
31        unsafe {
32            let __receiver = <BattleMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
33            ::unity::il2cpp_call!((::unity::module_base()+0x1e8d880usize)as*mut u8,();
34(BattleMenuItem)__receiver,(bool)::core::convert::Into::into(is_get_all_tutorial),(crate::root::tutoriallisttopmenu::TutorialListTopMenu_DecideEventHandler)::core::convert::Into::into(decide_event_handler))
35        }
36    }
37    #[doc = "`ACall()` overload"]
38    fn a_call(self) -> crate::app::basicmenu::BasicMenu_Result {
39        unsafe {
40            let __receiver = <BattleMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
41            {
42                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
43                let __vi = *__vt.get(18usize).unwrap_or_else(|| {
44                    panic!(
45                        "unity: virtual slot {}
46 out of range (vtable len {}
47) on the runtime class behind {}
48 (method `{}
49`)",
50                        18usize,
51                        __vt.len(),
52                        <BattleMenuItem as ::unity::ClassIdentity>::NAME,
53                        "ACall",
54                    )
55                });
56                let __inner: extern "C" fn(BattleMenuItem, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
57                    ::core::mem::transmute(__vi.method_ptr);
58                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
59                __inner(__receiver, __mi)
60            }
61        }
62    }
63}
64
65#[cfg(feature = "root-battlemenuitem")]
66impl<__T: IBattleMenuItem> IBattleMenuItemMethods for __T {}
67
68#[cfg(feature = "root-battlemenuitem")]
69impl BattleMenuItem {
70    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
71        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
72    }
73
74    pub fn a_call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
75        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
76    }
77}
78
79#[cfg(feature = "root-battlemenuitem")]
80impl BattleMenuItem {
81    #[doc = "Direct (non-virtual) call to `BattleMenuItem`'s own `ACall`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
82    pub unsafe fn a_call(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::basicmenu::BasicMenu_Result {
83        let __mi = Self::a_call_method_info();
84        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
85            ::core::mem::transmute(__mi.method_ptr);
86        __inner(this.into(), ::core::option::Option::None)
87    }
88}
89
90#[cfg(feature = "root-battlemenuitem")]
91impl BattleMenuItem {
92    #[doc = "`.ctor(bool, crate::root::tutoriallisttopmenu::TutorialListTopMenu_DecideEventHandler)` — overload selector"]
93    pub fn new(is_get_all_tutorial: bool, decide_event_handler: crate::root::tutoriallisttopmenu::TutorialListTopMenu_DecideEventHandler) -> Self {
94        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
95            panic!(
96                "{}
97::{}
98 failed to instantiate",
99                ::core::stringify!(BattleMenuItem),
100                ::core::stringify!(new),
101            )
102        });
103        <Self as IBattleMenuItemMethods>::ctor(this, is_get_all_tutorial, decide_event_handler);
104        this
105    }
106}
107
108#[cfg(feature = "root-battlemenuitem")]
109#[doc(hidden)]
110pub mod prelude {
111    pub use super::{BattleMenuItem, IBattleMenuItem, IBattleMenuItemMethods};
112    #[cfg(feature = "app-basicmenuitem")]
113    pub use crate::app::basicmenuitem::IBasicMenuItemMethods;
114    #[cfg(feature = "root-tutoriallisttopbasicmenuitem")]
115    pub use crate::root::tutoriallisttopbasicmenuitem::ITutorialListTopBasicMenuItemMethods;
116    #[cfg(feature = "system-object")]
117    pub use crate::system::object::IObjectMethods;
118    pub use crate::{app::basicmenuitem::IBasicMenuItem, root::tutoriallisttopbasicmenuitem::ITutorialListTopBasicMenuItem, system::object::IObject};
119}