Skip to main content

engage/generated/unity_engine/
contextmenu.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-contextmenu-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8
9    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/contextmenu/ContextMenu.md"))]
10    #[::unity::class(namespace = "UnityEngine", name = "ContextMenu")]
11    pub struct ContextMenu {
12        #[offset(16)]
13        #[rename(name = "menuItem")]
14        pub menu_item: ::unity::Il2CppString,
15        #[offset(24)]
16        #[rename(name = "validate")]
17        pub validate: bool,
18        #[offset(28)]
19        #[rename(name = "priority")]
20        pub priority: i32,
21    }
22}
23
24#[cfg(feature = "unity_engine-contextmenu-types")]
25pub use __types::*;
26
27#[cfg(feature = "unity_engine-contextmenu")]
28pub trait IContextMenuMethods: IContextMenu {
29    #[doc = "`.ctor(::unity::Il2CppString)` overload"]
30    fn ctor(self, item_name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
31        unsafe {
32            let __receiver = <ContextMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
33            ::unity::il2cpp_call!((::unity::module_base()+0x2c47280usize)as*mut u8,();
34(ContextMenu)__receiver,(::unity::Il2CppString)::core::convert::Into::into(item_name))
35        }
36    }
37    #[doc = "`.ctor(::unity::Il2CppString, bool)` overload"]
38    fn ctor_2(self, item_name: impl ::core::convert::Into<::unity::Il2CppString>, is_validate_function: impl ::core::convert::Into<bool>) -> () {
39        unsafe {
40            let __receiver = <ContextMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
41            ::unity::il2cpp_call!((::unity::module_base()+0x2c472d0usize)as*mut u8,();
42(ContextMenu)__receiver,(::unity::Il2CppString)::core::convert::Into::into(item_name),(bool)::core::convert::Into::into(is_validate_function))
43        }
44    }
45    #[doc = "`.ctor(::unity::Il2CppString, bool, i32)` overload"]
46    fn ctor_3(
47        self,
48        item_name: impl ::core::convert::Into<::unity::Il2CppString>,
49        is_validate_function: impl ::core::convert::Into<bool>,
50        priority: impl ::core::convert::Into<i32>,
51    ) -> () {
52        unsafe {
53            let __receiver = <ContextMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
54            ::unity::il2cpp_call!((::unity::module_base()+0x2c47330usize)as*mut u8,();
55(ContextMenu)__receiver,(::unity::Il2CppString)::core::convert::Into::into(item_name),(bool)::core::convert::Into::into(is_validate_function),(i32)::core::convert::Into::into(priority))
56        }
57    }
58}
59
60#[cfg(feature = "unity_engine-contextmenu")]
61impl<__T: IContextMenu> IContextMenuMethods for __T {}
62
63#[cfg(feature = "unity_engine-contextmenu")]
64impl ContextMenu {
65    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
66        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
67    }
68
69    pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
70        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
71    }
72
73    pub fn ctor_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
74        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
75    }
76}
77
78#[cfg(feature = "unity_engine-contextmenu")]
79impl ContextMenu {
80    #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
81    pub fn new(item_name: ::unity::Il2CppString) -> Self {
82        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
83            panic!(
84                "{}
85::{}
86 failed to instantiate",
87                ::core::stringify!(ContextMenu),
88                ::core::stringify!(new),
89            )
90        });
91        <Self as IContextMenuMethods>::ctor(this, item_name);
92        this
93    }
94
95    #[doc = "`.ctor(::unity::Il2CppString, bool)` — overload selector"]
96    pub fn new_2(item_name: ::unity::Il2CppString, is_validate_function: bool) -> Self {
97        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
98            panic!(
99                "{}
100::{}
101 failed to instantiate",
102                ::core::stringify!(ContextMenu),
103                ::core::stringify!(new_2),
104            )
105        });
106        <Self as IContextMenuMethods>::ctor_2(this, item_name, is_validate_function);
107        this
108    }
109
110    #[doc = "`.ctor(::unity::Il2CppString, bool, i32)` — overload selector"]
111    pub fn new_3(item_name: ::unity::Il2CppString, is_validate_function: bool, priority: i32) -> Self {
112        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
113            panic!(
114                "{}
115::{}
116 failed to instantiate",
117                ::core::stringify!(ContextMenu),
118                ::core::stringify!(new_3),
119            )
120        });
121        <Self as IContextMenuMethods>::ctor_3(this, item_name, is_validate_function, priority);
122        this
123    }
124}
125
126#[cfg(feature = "unity_engine-contextmenu")]
127#[doc(hidden)]
128pub mod prelude {
129    pub use super::{ContextMenu, IContextMenu, IContextMenuMethods};
130}