1#[cfg(feature = "app-refreshunitselectmenuitem-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/refreshunitselectmenuitem/RefreshUnitSelectMenuItem.md"))]
14 #[::unity::class(namespace = "App", name = "RefreshUnitSelectMenuItem")]
15 #[parent(crate::app::basicmenuitem::BasicMenuItem)]
16 pub struct RefreshUnitSelectMenuItem {
17 #[offset(112)]
18 #[rename(name = "m_InitialSelected")]
19 pub m_initial_selected: bool,
20 #[offset(113)]
21 #[rename(name = "m_Decided")]
22 pub m_decided: bool,
23 #[offset(120)]
24 #[rename(name = "m_SelectEventHandler")]
25 pub m_select_event_handler: crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_SelectEventHandler,
26 #[offset(128)]
27 #[rename(name = "m_DecideEventHandler")]
28 pub m_decide_event_handler: crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_DecideEventHandler,
29 }
30}
31
32#[cfg(feature = "app-refreshunitselectmenuitem-types")]
33pub use __types::*;
34
35#[cfg(feature = "app-refreshunitselectmenuitem")]
36pub trait IRefreshUnitSelectMenuItemMethods: IRefreshUnitSelectMenuItem {
37 #[doc = "`get_m_Unit()` overload"]
38 fn get_m_unit(self) -> crate::app::unit::Unit {
39 unsafe {
40 let __receiver =
41 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
42 ::unity::il2cpp_call!((::unity::module_base()+0x22c23d0usize)as*mut u8,crate::app::unit::Unit;
43(RefreshUnitSelectMenuItem)__receiver)
44 }
45 }
46 #[doc = "`set_m_Unit(crate::app::unit::Unit)` overload"]
47 fn set_m_unit(self, value: impl ::core::convert::Into<crate::app::unit::Unit>) -> () {
48 unsafe {
49 let __receiver =
50 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
51 ::unity::il2cpp_call!((::unity::module_base()+0x22c23e0usize)as*mut u8,();
52(RefreshUnitSelectMenuItem)__receiver,(crate::app::unit::Unit)::core::convert::Into::into(value))
53 }
54 }
55 #[doc = "`.ctor(crate::app::unit::Unit, bool, bool, crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_SelectEventHandler, crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_DecideEventHandler)` overload"]
56 fn ctor(
57 self,
58 unit: impl ::core::convert::Into<crate::app::unit::Unit>,
59 initial_selected: impl ::core::convert::Into<bool>,
60 decided: impl ::core::convert::Into<bool>,
61 select_event_handler: impl ::core::convert::Into<crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_SelectEventHandler>,
62 decide_event_handler: impl ::core::convert::Into<crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_DecideEventHandler>,
63 ) -> () {
64 unsafe {
65 let __receiver =
66 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
67 ::unity::il2cpp_call!((::unity::module_base()+0x22c0d90usize)as*mut u8,();
68(RefreshUnitSelectMenuItem)__receiver,(crate::app::unit::Unit)::core::convert::Into::into(unit),(bool)::core::convert::Into::into(initial_selected),(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))
69 }
70 }
71 #[doc = "`BuildAttribute()` overload"]
72 fn build_attribute(self) -> crate::app::basicmenuitem::BasicMenuItem_Attribute {
73 unsafe {
74 let __receiver =
75 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
76 {
77 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
78 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
79 panic!(
80 "unity: virtual slot {}
81 out of range (vtable len {}
82) on the runtime class behind {}
83 (method `{}
84`)",
85 8usize,
86 __vt.len(),
87 <RefreshUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
88 "BuildAttribute",
89 )
90 });
91 let __inner: extern "C" fn(RefreshUnitSelectMenuItem, ::unity::OptionalMethod) -> crate::app::basicmenuitem::BasicMenuItem_Attribute =
92 ::core::mem::transmute(__vi.method_ptr);
93 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
94 __inner(__receiver, __mi)
95 }
96 }
97 }
98 #[doc = "`OnBuild()` overload"]
99 fn on_build(self) -> () {
100 unsafe {
101 let __receiver =
102 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
103 {
104 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
105 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
106 panic!(
107 "unity: virtual slot {}
108 out of range (vtable len {}
109) on the runtime class behind {}
110 (method `{}
111`)",
112 10usize,
113 __vt.len(),
114 <RefreshUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
115 "OnBuild",
116 )
117 });
118 let __inner: extern "C" fn(RefreshUnitSelectMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
119 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
120 __inner(__receiver, __mi)
121 }
122 }
123 }
124 #[doc = "`OnBuildMenuItemContent()` overload"]
125 fn on_build_menu_item_content(self) -> () {
126 unsafe {
127 let __receiver =
128 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
129 {
130 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
131 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
132 panic!(
133 "unity: virtual slot {}
134 out of range (vtable len {}
135) on the runtime class behind {}
136 (method `{}
137`)",
138 11usize,
139 __vt.len(),
140 <RefreshUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
141 "OnBuildMenuItemContent",
142 )
143 });
144 let __inner: extern "C" fn(RefreshUnitSelectMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
145 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
146 __inner(__receiver, __mi)
147 }
148 }
149 }
150 #[doc = "`SetInitialColor()` overload"]
151 fn set_initial_color(self) -> () {
152 unsafe {
153 let __receiver =
154 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
155 ::unity::il2cpp_call!((::unity::module_base()+0x22c0fd0usize)as*mut u8,();
156(RefreshUnitSelectMenuItem)__receiver)
157 }
158 }
159 #[doc = "`UpdateFixedCursor()` overload"]
160 fn update_fixed_cursor(self) -> () {
161 unsafe {
162 let __receiver =
163 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
164 ::unity::il2cpp_call!((::unity::module_base()+0x22c2580usize)as*mut u8,();
165(RefreshUnitSelectMenuItem)__receiver)
166 }
167 }
168 #[doc = "`SetDecided(bool)` overload"]
169 fn set_decided(self, decided: impl ::core::convert::Into<bool>) -> () {
170 unsafe {
171 let __receiver =
172 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
173 ::unity::il2cpp_call!((::unity::module_base()+0x22c1e10usize)as*mut u8,();
174(RefreshUnitSelectMenuItem)__receiver,(bool)::core::convert::Into::into(decided))
175 }
176 }
177 #[doc = "`OnSelect()` overload"]
178 fn on_select(self) -> () {
179 unsafe {
180 let __receiver =
181 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
182 {
183 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
184 let __vi = *__vt.get(12usize).unwrap_or_else(|| {
185 panic!(
186 "unity: virtual slot {}
187 out of range (vtable len {}
188) on the runtime class behind {}
189 (method `{}
190`)",
191 12usize,
192 __vt.len(),
193 <RefreshUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
194 "OnSelect",
195 )
196 });
197 let __inner: extern "C" fn(RefreshUnitSelectMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
198 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
199 __inner(__receiver, __mi)
200 }
201 }
202 }
203 #[doc = "`OnDeselect()` overload"]
204 fn on_deselect(self) -> () {
205 unsafe {
206 let __receiver =
207 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
208 {
209 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
210 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
211 panic!(
212 "unity: virtual slot {}
213 out of range (vtable len {}
214) on the runtime class behind {}
215 (method `{}
216`)",
217 13usize,
218 __vt.len(),
219 <RefreshUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
220 "OnDeselect",
221 )
222 });
223 let __inner: extern "C" fn(RefreshUnitSelectMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
224 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
225 __inner(__receiver, __mi)
226 }
227 }
228 }
229 #[doc = "`OnCursorMoveEnd()` overload"]
230 fn on_cursor_move_end(self) -> () {
231 unsafe {
232 let __receiver =
233 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
234 {
235 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
236 let __vi = *__vt.get(14usize).unwrap_or_else(|| {
237 panic!(
238 "unity: virtual slot {}
239 out of range (vtable len {}
240) on the runtime class behind {}
241 (method `{}
242`)",
243 14usize,
244 __vt.len(),
245 <RefreshUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
246 "OnCursorMoveEnd",
247 )
248 });
249 let __inner: extern "C" fn(RefreshUnitSelectMenuItem, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
250 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
251 __inner(__receiver, __mi)
252 }
253 }
254 }
255 #[doc = "`ACall()` overload"]
256 fn a_call(self) -> crate::app::basicmenu::BasicMenu_Result {
257 unsafe {
258 let __receiver =
259 <RefreshUnitSelectMenuItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
260 {
261 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
262 let __vi = *__vt.get(18usize).unwrap_or_else(|| {
263 panic!(
264 "unity: virtual slot {}
265 out of range (vtable len {}
266) on the runtime class behind {}
267 (method `{}
268`)",
269 18usize,
270 __vt.len(),
271 <RefreshUnitSelectMenuItem as ::unity::ClassIdentity>::NAME,
272 "ACall",
273 )
274 });
275 let __inner: extern "C" fn(RefreshUnitSelectMenuItem, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
276 ::core::mem::transmute(__vi.method_ptr);
277 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
278 __inner(__receiver, __mi)
279 }
280 }
281 }
282}
283
284#[cfg(feature = "app-refreshunitselectmenuitem")]
285impl<__T: IRefreshUnitSelectMenuItem> IRefreshUnitSelectMenuItemMethods for __T {}
286
287#[cfg(feature = "app-refreshunitselectmenuitem")]
288impl RefreshUnitSelectMenuItem {
289 pub fn get_m_unit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
290 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
291 }
292
293 pub fn set_m_unit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
294 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
295 }
296
297 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
298 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
299 }
300
301 pub fn build_attribute_method_info() -> &'static ::unity::il2cpp::MethodInfo {
302 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
303 }
304
305 pub fn on_build_method_info() -> &'static ::unity::il2cpp::MethodInfo {
306 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
307 }
308
309 pub fn on_build_menu_item_content_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
311 }
312
313 pub fn set_initial_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
314 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
315 }
316
317 pub fn update_fixed_cursor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
318 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
319 }
320
321 pub fn set_decided_method_info() -> &'static ::unity::il2cpp::MethodInfo {
322 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
323 }
324
325 pub fn on_select_method_info() -> &'static ::unity::il2cpp::MethodInfo {
326 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
327 }
328
329 pub fn on_deselect_method_info() -> &'static ::unity::il2cpp::MethodInfo {
330 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
331 }
332
333 pub fn on_cursor_move_end_method_info() -> &'static ::unity::il2cpp::MethodInfo {
334 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
335 }
336
337 pub fn a_call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
338 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
339 }
340}
341
342#[cfg(feature = "app-refreshunitselectmenuitem")]
343impl RefreshUnitSelectMenuItem {
344 #[doc = "Direct (non-virtual) call to `RefreshUnitSelectMenuItem`'s own `BuildAttribute`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
345 pub unsafe fn build_attribute(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::basicmenuitem::BasicMenuItem_Attribute {
346 let __mi = Self::build_attribute_method_info();
347 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::basicmenuitem::BasicMenuItem_Attribute =
348 ::core::mem::transmute(__mi.method_ptr);
349 __inner(this.into(), ::core::option::Option::None)
350 }
351
352 #[doc = "Direct (non-virtual) call to `RefreshUnitSelectMenuItem`'s own `OnBuild`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
353 pub unsafe fn on_build(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
354 let __mi = Self::on_build_method_info();
355 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
356 __inner(this.into(), ::core::option::Option::None)
357 }
358
359 #[doc = "Direct (non-virtual) call to `RefreshUnitSelectMenuItem`'s own `OnBuildMenuItemContent`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
360 pub unsafe fn on_build_menu_item_content(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
361 let __mi = Self::on_build_menu_item_content_method_info();
362 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
363 __inner(this.into(), ::core::option::Option::None)
364 }
365
366 #[doc = "Direct (non-virtual) call to `RefreshUnitSelectMenuItem`'s own `OnSelect`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
367 pub unsafe fn on_select(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
368 let __mi = Self::on_select_method_info();
369 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
370 __inner(this.into(), ::core::option::Option::None)
371 }
372
373 #[doc = "Direct (non-virtual) call to `RefreshUnitSelectMenuItem`'s own `OnDeselect`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
374 pub unsafe fn on_deselect(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
375 let __mi = Self::on_deselect_method_info();
376 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
377 __inner(this.into(), ::core::option::Option::None)
378 }
379
380 #[doc = "Direct (non-virtual) call to `RefreshUnitSelectMenuItem`'s own `OnCursorMoveEnd`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
381 pub unsafe fn on_cursor_move_end(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
382 let __mi = Self::on_cursor_move_end_method_info();
383 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
384 __inner(this.into(), ::core::option::Option::None)
385 }
386
387 #[doc = "Direct (non-virtual) call to `RefreshUnitSelectMenuItem`'s own `ACall`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
388 pub unsafe fn a_call(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::basicmenu::BasicMenu_Result {
389 let __mi = Self::a_call_method_info();
390 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::basicmenu::BasicMenu_Result =
391 ::core::mem::transmute(__mi.method_ptr);
392 __inner(this.into(), ::core::option::Option::None)
393 }
394}
395
396#[cfg(feature = "app-refreshunitselectmenuitem")]
397impl RefreshUnitSelectMenuItem {
398 #[doc = "`.ctor(crate::app::unit::Unit, bool, bool, crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_SelectEventHandler, crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_DecideEventHandler)` — overload selector"]
399 pub fn new(
400 unit: crate::app::unit::Unit,
401 initial_selected: bool,
402 decided: bool,
403 select_event_handler: crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_SelectEventHandler,
404 decide_event_handler: crate::app::refreshunitselectmenu::RefreshUnitSelectMenu_DecideEventHandler,
405 ) -> Self {
406 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
407 panic!(
408 "{}
409::{}
410 failed to instantiate",
411 ::core::stringify!(RefreshUnitSelectMenuItem),
412 ::core::stringify!(new),
413 )
414 });
415 <Self as IRefreshUnitSelectMenuItemMethods>::ctor(this, unit, initial_selected, decided, select_event_handler, decide_event_handler);
416 this
417 }
418}
419
420#[cfg(feature = "app-refreshunitselectmenuitem")]
421#[doc(hidden)]
422pub mod prelude {
423 pub use super::{IRefreshUnitSelectMenuItem, IRefreshUnitSelectMenuItemMethods, RefreshUnitSelectMenuItem};
424 #[cfg(feature = "app-basicmenuitem")]
425 pub use crate::app::basicmenuitem::IBasicMenuItemMethods;
426 #[cfg(feature = "system-object")]
427 pub use crate::system::object::IObjectMethods;
428 pub use crate::{app::basicmenuitem::IBasicMenuItem, system::object::IObject};
429}