engage/generated/app/
challengedifficultymenuitem.rs1#[cfg(feature = "app-challengedifficultymenuitem-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/challengedifficultymenuitem/ChallengeDifficultyMenuItem.md"))]
14 #[::unity::class(namespace = "App", name = "ChallengeDifficultyMenuItem")]
15 #[parent(crate::app::basicmenuitem::BasicMenuItem)]
16 pub struct ChallengeDifficultyMenuItem {
17 #[offset(104)]
18 #[rename(name = "m_DecideEventHandler")]
19 pub m_decide_event_handler: crate::app::challengedifficultymenu::ChallengeDifficultyMenu_DecideEventHandler,
20 }
21}
22
23#[cfg(feature = "app-challengedifficultymenuitem-types")]
24pub use __types::*;
25
26#[cfg(feature = "app-challengedifficultymenuitem")]
27pub trait IChallengeDifficultyMenuItemMethods: IChallengeDifficultyMenuItem {
28 #[doc = "`.ctor(crate::app::challengedifficultymenu::ChallengeDifficultyMenu_DecideEventHandler)` overload"]
29 fn ctor(
30 self,
31 decide_event_handler: impl ::core::convert::Into<crate::app::challengedifficultymenu::ChallengeDifficultyMenu_DecideEventHandler>,
32 ) -> () {
33 unsafe {
34 let __receiver =
35 <ChallengeDifficultyMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
36 ::unity::il2cpp_call!((::unity::module_base()+0x25c2800usize)as*mut u8,();
37(ChallengeDifficultyMenuItem)__receiver,(crate::app::challengedifficultymenu::ChallengeDifficultyMenu_DecideEventHandler)::core::convert::Into::into(decide_event_handler))
38 }
39 }
40 #[doc = "`ACall()` overload"]
41 fn a_call(self) -> crate::app::basicmenu::BasicMenu_Result {
42 unsafe {
43 let __receiver =
44 <ChallengeDifficultyMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
45 {
46 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
47 let __vi = *__vt.get(18usize).unwrap_or_else(|| {
48 panic!(
49 "unity: virtual slot {}
50 out of range (vtable len {}
51) on the runtime class behind {}
52 (method `{}
53`)",
54 18usize,
55 __vt.len(),
56 <ChallengeDifficultyMenuItem as ::unity::ClassIdentity>::NAME,
57 "ACall",
58 )
59 });
60 let __inner: extern "C" fn(ChallengeDifficultyMenuItem, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
61 ::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}
68
69#[cfg(feature = "app-challengedifficultymenuitem")]
70impl<__T: IChallengeDifficultyMenuItem> IChallengeDifficultyMenuItemMethods for __T {}
71
72#[cfg(feature = "app-challengedifficultymenuitem")]
73impl ChallengeDifficultyMenuItem {
74 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
75 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
76 }
77
78 pub fn a_call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
79 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
80 }
81}
82
83#[cfg(feature = "app-challengedifficultymenuitem")]
84impl ChallengeDifficultyMenuItem {
85 #[doc = "Direct (non-virtual) call to `ChallengeDifficultyMenuItem`'s own `ACall`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
86 pub unsafe fn a_call(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::basicmenu::BasicMenu_Result {
87 let __mi = Self::a_call_method_info();
88 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
89 ::core::mem::transmute(__mi.method_ptr);
90 __inner(this.into(), ::core::option::Option::None)
91 }
92}
93
94#[cfg(feature = "app-challengedifficultymenuitem")]
95impl ChallengeDifficultyMenuItem {
96 #[doc = "`.ctor(crate::app::challengedifficultymenu::ChallengeDifficultyMenu_DecideEventHandler)` — overload selector"]
97 pub fn new(decide_event_handler: crate::app::challengedifficultymenu::ChallengeDifficultyMenu_DecideEventHandler) -> Self {
98 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
99 panic!(
100 "{}
101::{}
102 failed to instantiate",
103 ::core::stringify!(ChallengeDifficultyMenuItem),
104 ::core::stringify!(new),
105 )
106 });
107 <Self as IChallengeDifficultyMenuItemMethods>::ctor(this, decide_event_handler);
108 this
109 }
110}
111
112#[cfg(feature = "app-challengedifficultymenuitem")]
113#[doc(hidden)]
114pub mod prelude {
115 pub use super::{ChallengeDifficultyMenuItem, IChallengeDifficultyMenuItem, IChallengeDifficultyMenuItemMethods};
116 #[cfg(feature = "app-basicmenuitem")]
117 pub use crate::app::basicmenuitem::IBasicMenuItemMethods;
118 #[cfg(feature = "system-object")]
119 pub use crate::system::object::IObjectMethods;
120 pub use crate::{app::basicmenuitem::IBasicMenuItem, system::object::IObject};
121}