engage/generated/app/
labelitem.rs1#[cfg(feature = "app-labelitem-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::{
10 menuitem::{IMenuItem, MenuItem},
11 stringitem::{IStringItem, StringItem},
12 },
13 system::object::{IObject, Object},
14 };
15
16 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/labelitem/LabelItem.md"))]
17 #[::unity::class(namespace = "App", name = "LabelItem")]
18 #[parent(crate::app::stringitem::StringItem)]
19 pub struct LabelItem {
20 #[static_field]
21 #[rename(name = "COLOR_BACK")]
22 pub color_back: crate::unity_engine::color::Color,
23 #[static_field]
24 #[rename(name = "COLOR_FONT")]
25 pub color_font: crate::unity_engine::color::Color,
26 }
27}
28
29#[cfg(feature = "app-labelitem-types")]
30pub use __types::*;
31
32#[cfg(feature = "app-labelitem")]
33impl LabelItem {
34 #[doc = "`.cctor()` overload"]
35 pub fn cctor() -> () {
36 unsafe {
37 ::unity::il2cpp_call!((::unity::module_base()+0x1bdb1c0usize)as*mut u8,();
38 )
39 }
40 }
41}
42
43#[cfg(feature = "app-labelitem")]
44pub trait ILabelItemMethods: ILabelItem {
45 #[doc = "`.ctor()` overload"]
46 fn ctor(self) -> () {
47 unsafe {
48 let __receiver = <LabelItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
49 ::unity::il2cpp_call!((::unity::module_base()+0x1bdb070usize)as*mut u8,();
50(LabelItem)__receiver)
51 }
52 }
53 #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString)` overload"]
54 fn ctor_2(self, name: impl ::core::convert::Into<::unity::Il2CppString>, english: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
55 unsafe {
56 let __receiver = <LabelItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
57 ::unity::il2cpp_call!((::unity::module_base()+0x1bdb080usize)as*mut u8,();
58(LabelItem)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(::unity::Il2CppString)::core::convert::Into::into(english))
59 }
60 }
61 #[doc = "`IsSelectable()` overload"]
62 fn is_selectable(self) -> bool {
63 unsafe {
64 let __receiver = <LabelItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
65 {
66 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
67 let __vi = *__vt.get(24usize).unwrap_or_else(|| {
68 panic!(
69 "unity: virtual slot {}
70 out of range (vtable len {}
71) on the runtime class behind {}
72 (method `{}
73`)",
74 24usize,
75 __vt.len(),
76 <LabelItem as ::unity::ClassIdentity>::NAME,
77 "IsSelectable",
78 )
79 });
80 let __inner: extern "C" fn(LabelItem, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
81 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
82 __inner(__receiver, __mi)
83 }
84 }
85 }
86 #[doc = "`GetBackColor()` overload"]
87 fn get_back_color(self) -> crate::unity_engine::color::Color {
88 unsafe {
89 let __receiver = <LabelItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
90 {
91 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
92 let __vi = *__vt.get(28usize).unwrap_or_else(|| {
93 panic!(
94 "unity: virtual slot {}
95 out of range (vtable len {}
96) on the runtime class behind {}
97 (method `{}
98`)",
99 28usize,
100 __vt.len(),
101 <LabelItem as ::unity::ClassIdentity>::NAME,
102 "GetBackColor",
103 )
104 });
105 let __inner: extern "C" fn(LabelItem, ::unity::OptionalMethod) -> crate::unity_engine::color::Color =
106 ::core::mem::transmute(__vi.method_ptr);
107 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
108 __inner(__receiver, __mi)
109 }
110 }
111 }
112 #[doc = "`GetFontColor()` overload"]
113 fn get_font_color(self) -> crate::unity_engine::color::Color {
114 unsafe {
115 let __receiver = <LabelItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
116 {
117 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
118 let __vi = *__vt.get(27usize).unwrap_or_else(|| {
119 panic!(
120 "unity: virtual slot {}
121 out of range (vtable len {}
122) on the runtime class behind {}
123 (method `{}
124`)",
125 27usize,
126 __vt.len(),
127 <LabelItem as ::unity::ClassIdentity>::NAME,
128 "GetFontColor",
129 )
130 });
131 let __inner: extern "C" fn(LabelItem, ::unity::OptionalMethod) -> crate::unity_engine::color::Color =
132 ::core::mem::transmute(__vi.method_ptr);
133 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
134 __inner(__receiver, __mi)
135 }
136 }
137 }
138 #[doc = "`GetMarginWidth()` overload"]
139 fn get_margin_width(self) -> f32 {
140 unsafe {
141 let __receiver = <LabelItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
142 {
143 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
144 let __vi = *__vt.get(65usize).unwrap_or_else(|| {
145 panic!(
146 "unity: virtual slot {}
147 out of range (vtable len {}
148) on the runtime class behind {}
149 (method `{}
150`)",
151 65usize,
152 __vt.len(),
153 <LabelItem as ::unity::ClassIdentity>::NAME,
154 "GetMarginWidth",
155 )
156 });
157 let __inner: extern "C" fn(LabelItem, ::unity::OptionalMethod) -> f32 = ::core::mem::transmute(__vi.method_ptr);
158 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
159 __inner(__receiver, __mi)
160 }
161 }
162 }
163 #[doc = "`GetMarginHeight()` overload"]
164 fn get_margin_height(self) -> f32 {
165 unsafe {
166 let __receiver = <LabelItem 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(66usize).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 66usize,
177 __vt.len(),
178 <LabelItem as ::unity::ClassIdentity>::NAME,
179 "GetMarginHeight",
180 )
181 });
182 let __inner: extern "C" fn(LabelItem, ::unity::OptionalMethod) -> f32 = ::core::mem::transmute(__vi.method_ptr);
183 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
184 __inner(__receiver, __mi)
185 }
186 }
187 }
188}
189
190#[cfg(feature = "app-labelitem")]
191impl<__T: ILabelItem> ILabelItemMethods for __T {}
192
193#[cfg(feature = "app-labelitem")]
194impl LabelItem {
195 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
196 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
197 }
198
199 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
200 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
201 }
202
203 pub fn is_selectable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
204 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
205 }
206
207 pub fn get_back_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
208 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
209 }
210
211 pub fn get_font_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
212 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
213 }
214
215 pub fn get_margin_width_method_info() -> &'static ::unity::il2cpp::MethodInfo {
216 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
217 }
218
219 pub fn get_margin_height_method_info() -> &'static ::unity::il2cpp::MethodInfo {
220 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
221 }
222
223 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
224 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
225 }
226}
227
228#[cfg(feature = "app-labelitem")]
229impl LabelItem {
230 #[doc = "Direct (non-virtual) call to `LabelItem`'s own `IsSelectable`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
231 pub unsafe fn is_selectable(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
232 let __mi = Self::is_selectable_method_info();
233 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
234 __inner(this.into(), ::core::option::Option::None)
235 }
236
237 #[doc = "Direct (non-virtual) call to `LabelItem`'s own `GetBackColor`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
238 pub unsafe fn get_back_color(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::unity_engine::color::Color {
239 let __mi = Self::get_back_color_method_info();
240 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::unity_engine::color::Color =
241 ::core::mem::transmute(__mi.method_ptr);
242 __inner(this.into(), ::core::option::Option::None)
243 }
244
245 #[doc = "Direct (non-virtual) call to `LabelItem`'s own `GetFontColor`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
246 pub unsafe fn get_font_color(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::unity_engine::color::Color {
247 let __mi = Self::get_font_color_method_info();
248 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::unity_engine::color::Color =
249 ::core::mem::transmute(__mi.method_ptr);
250 __inner(this.into(), ::core::option::Option::None)
251 }
252
253 #[doc = "Direct (non-virtual) call to `LabelItem`'s own `GetMarginWidth`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
254 pub unsafe fn get_margin_width(this: impl ::core::convert::Into<::unity::IlInstance>) -> f32 {
255 let __mi = Self::get_margin_width_method_info();
256 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> f32 = ::core::mem::transmute(__mi.method_ptr);
257 __inner(this.into(), ::core::option::Option::None)
258 }
259
260 #[doc = "Direct (non-virtual) call to `LabelItem`'s own `GetMarginHeight`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
261 pub unsafe fn get_margin_height(this: impl ::core::convert::Into<::unity::IlInstance>) -> f32 {
262 let __mi = Self::get_margin_height_method_info();
263 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> f32 = ::core::mem::transmute(__mi.method_ptr);
264 __inner(this.into(), ::core::option::Option::None)
265 }
266}
267
268#[cfg(feature = "app-labelitem")]
269impl LabelItem {
270 #[doc = "`.ctor()` — no args"]
271 pub fn new() -> Self {
272 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
273 panic!(
274 "{}
275::{}
276 failed to instantiate",
277 ::core::stringify!(LabelItem),
278 ::core::stringify!(new),
279 )
280 });
281 <Self as ILabelItemMethods>::ctor(this);
282 this
283 }
284
285 #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString)` — overload selector"]
286 pub fn new_2(name: ::unity::Il2CppString, english: ::unity::Il2CppString) -> Self {
287 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
288 panic!(
289 "{}
290::{}
291 failed to instantiate",
292 ::core::stringify!(LabelItem),
293 ::core::stringify!(new_2),
294 )
295 });
296 <Self as ILabelItemMethods>::ctor_2(this, name, english);
297 this
298 }
299}
300
301#[cfg(feature = "app-labelitem")]
302#[doc(hidden)]
303pub mod prelude {
304 pub use super::{ILabelItem, ILabelItemMethods, LabelItem};
305 #[cfg(feature = "app-menuitem")]
306 pub use crate::app::menuitem::IMenuItemMethods;
307 #[cfg(feature = "app-stringitem")]
308 pub use crate::app::stringitem::IStringItemMethods;
309 #[cfg(feature = "system-object")]
310 pub use crate::system::object::IObjectMethods;
311 pub use crate::{
312 app::{menuitem::IMenuItem, stringitem::IStringItem},
313 system::object::IObject,
314 };
315}