engage/generated/app/
refreshunitsetmenuitemcontent.rs1#[cfg(feature = "app-refreshunitsetmenuitemcontent-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::basicmenuitemcontent::{BasicMenuItemContent, IBasicMenuItemContent},
10 system::object::{IObject, Object},
11 unity_engine::{
12 behaviour::{Behaviour, IBehaviour},
13 component::{Component, IComponent},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 },
17 };
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/refreshunitsetmenuitemcontent/RefreshUnitSetMenuItemContent.md"))]
20 #[::unity::class(namespace = "App", name = "RefreshUnitSetMenuItemContent")]
21 #[parent(crate::app::basicmenuitemcontent::BasicMenuItemContent)]
22 pub struct RefreshUnitSetMenuItemContent {
23 #[offset(72)]
24 #[rename(name = "m_UnitIcon")]
25 pub m_unit_icon: crate::app::uniticon::UnitIcon,
26 #[offset(80)]
27 #[rename(name = "m_Text")]
28 pub m_text: crate::tm_pro::textmeshprougui::TextMeshProUGUI,
29 #[offset(88)]
30 #[rename(name = "m_FixedCursorObject")]
31 pub m_fixed_cursor_object: crate::unity_engine::gameobject::GameObject,
32 #[offset(96)]
33 #[rename(name = "m_FixedCursorImage")]
34 pub m_fixed_cursor_image: crate::unity_engine::ui::image::Image,
35 }
36}
37
38#[cfg(feature = "app-refreshunitsetmenuitemcontent-types")]
39pub use __types::*;
40
41#[cfg(feature = "app-refreshunitsetmenuitemcontent")]
42pub trait IRefreshUnitSetMenuItemContentMethods: IRefreshUnitSetMenuItemContent {
43 #[doc = "`BuildText()` overload"]
44 fn build_text(self) -> () {
45 unsafe {
46 let __receiver =
47 <RefreshUnitSetMenuItemContent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
48 {
49 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
50 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
51 panic!(
52 "unity: virtual slot {}
53 out of range (vtable len {}
54) on the runtime class behind {}
55 (method `{}
56`)",
57 10usize,
58 __vt.len(),
59 <RefreshUnitSetMenuItemContent as ::unity::ClassIdentity>::NAME,
60 "BuildText",
61 )
62 });
63 let __inner: extern "C" fn(RefreshUnitSetMenuItemContent, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
64 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
65 __inner(__receiver, __mi)
66 }
67 }
68 }
69 #[doc = "`SetContent(crate::app::unit::Unit)` overload"]
70 fn set_content(self, unit: impl ::core::convert::Into<crate::app::unit::Unit>) -> () {
71 unsafe {
72 let __receiver =
73 <RefreshUnitSetMenuItemContent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
74 ::unity::il2cpp_call!((::unity::module_base()+0x22c6b00usize)as*mut u8,();
75(RefreshUnitSetMenuItemContent)__receiver,(crate::app::unit::Unit)::core::convert::Into::into(unit))
76 }
77 }
78 #[doc = "`UpdateTextColor()` overload"]
79 fn update_text_color(self) -> () {
80 unsafe {
81 let __receiver =
82 <RefreshUnitSetMenuItemContent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
83 {
84 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
85 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
86 panic!(
87 "unity: virtual slot {}
88 out of range (vtable len {}
89) on the runtime class behind {}
90 (method `{}
91`)",
92 7usize,
93 __vt.len(),
94 <RefreshUnitSetMenuItemContent as ::unity::ClassIdentity>::NAME,
95 "UpdateTextColor",
96 )
97 });
98 let __inner: extern "C" fn(RefreshUnitSetMenuItemContent, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
99 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
100 __inner(__receiver, __mi)
101 }
102 }
103 }
104 #[doc = "`SetFixedCursorActive(bool)` overload"]
105 fn set_fixed_cursor_active(self, active: impl ::core::convert::Into<bool>) -> () {
106 unsafe {
107 let __receiver =
108 <RefreshUnitSetMenuItemContent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
109 ::unity::il2cpp_call!((::unity::module_base()+0x22c6e30usize)as*mut u8,();
110(RefreshUnitSetMenuItemContent)__receiver,(bool)::core::convert::Into::into(active))
111 }
112 }
113 #[doc = "`.ctor()` overload"]
114 fn ctor(self) -> () {
115 unsafe {
116 let __receiver =
117 <RefreshUnitSetMenuItemContent as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
118 ::unity::il2cpp_call!((::unity::module_base()+0x22c7240usize)as*mut u8,();
119(RefreshUnitSetMenuItemContent)__receiver)
120 }
121 }
122}
123
124#[cfg(feature = "app-refreshunitsetmenuitemcontent")]
125impl<__T: IRefreshUnitSetMenuItemContent> IRefreshUnitSetMenuItemContentMethods for __T {}
126
127#[cfg(feature = "app-refreshunitsetmenuitemcontent")]
128impl RefreshUnitSetMenuItemContent {
129 pub fn build_text_method_info() -> &'static ::unity::il2cpp::MethodInfo {
130 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
131 }
132
133 pub fn set_content_method_info() -> &'static ::unity::il2cpp::MethodInfo {
134 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
135 }
136
137 pub fn update_text_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
138 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
139 }
140
141 pub fn set_fixed_cursor_active_method_info() -> &'static ::unity::il2cpp::MethodInfo {
142 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
143 }
144
145 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
146 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
147 }
148}
149
150#[cfg(feature = "app-refreshunitsetmenuitemcontent")]
151impl RefreshUnitSetMenuItemContent {
152 #[doc = "Direct (non-virtual) call to `RefreshUnitSetMenuItemContent`'s own `BuildText`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
153 pub unsafe fn build_text(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
154 let __mi = Self::build_text_method_info();
155 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
156 __inner(this.into(), ::core::option::Option::None)
157 }
158
159 #[doc = "Direct (non-virtual) call to `RefreshUnitSetMenuItemContent`'s own `UpdateTextColor`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
160 pub unsafe fn update_text_color(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
161 let __mi = Self::update_text_color_method_info();
162 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
163 __inner(this.into(), ::core::option::Option::None)
164 }
165}
166
167#[cfg(feature = "app-refreshunitsetmenuitemcontent")]
168impl RefreshUnitSetMenuItemContent {
169 #[doc = "`.ctor()` — no args"]
170 pub fn new() -> Self {
171 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
172 panic!(
173 "{}
174::{}
175 failed to instantiate",
176 ::core::stringify!(RefreshUnitSetMenuItemContent),
177 ::core::stringify!(new),
178 )
179 });
180 <Self as IRefreshUnitSetMenuItemContentMethods>::ctor(this);
181 this
182 }
183}
184
185#[cfg(feature = "app-refreshunitsetmenuitemcontent")]
186#[doc(hidden)]
187pub mod prelude {
188 pub use super::{IRefreshUnitSetMenuItemContent, IRefreshUnitSetMenuItemContentMethods, RefreshUnitSetMenuItemContent};
189 #[cfg(feature = "app-basicmenuitemcontent")]
190 pub use crate::app::basicmenuitemcontent::IBasicMenuItemContentMethods;
191 #[cfg(feature = "system-object")]
192 pub use crate::system::object::IObjectMethods;
193 #[cfg(feature = "unity_engine-behaviour")]
194 pub use crate::unity_engine::behaviour::IBehaviourMethods;
195 #[cfg(feature = "unity_engine-component")]
196 pub use crate::unity_engine::component::IComponentMethods;
197 #[cfg(feature = "unity_engine-monobehaviour")]
198 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
199 #[cfg(feature = "unity_engine-object_2")]
200 pub use crate::unity_engine::object_2::IObject_2Methods;
201 pub use crate::{
202 app::basicmenuitemcontent::IBasicMenuItemContent,
203 system::object::IObject,
204 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
205 };
206}