engage/generated/unity_engine/ui/
colorblock.rs1#[cfg(feature = "unity_engine-ui-colorblock-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 valuetype::{IValueType, ValueType},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/ui/colorblock/ColorBlock.md"))]
14 #[repr(C)]
15 #[derive(::core::clone::Clone, ::core::marker::Copy)]
16 pub struct ColorBlock {
17 pub m_normal_color: crate::unity_engine::color::Color,
18 pub m_highlighted_color: crate::unity_engine::color::Color,
19 pub m_pressed_color: crate::unity_engine::color::Color,
20 pub m_selected_color: crate::unity_engine::color::Color,
21 pub m_disabled_color: crate::unity_engine::color::Color,
22 pub m_color_multiplier: f32,
23 pub m_fade_duration: f32,
24 }
25 impl ::unity::ClassIdentity for ColorBlock {
26 const NAME: &'static str = "ColorBlock";
27 const NAMESPACE: &'static str = "UnityEngine.UI";
28
29 fn class() -> ::unity::Class {
30 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
31 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
32 }
33 }
34 impl ::unity::IlType for ColorBlock {
35 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
36 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
37 }
38 }
39 impl ColorBlock {
40 #[inline]
41 pub fn default_color_block() -> crate::unity_engine::ui::colorblock::ColorBlock {
42 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
43 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "defaultColorBlock");
44 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
45 }
46
47 #[inline]
48 pub fn set_default_color_block(value: crate::unity_engine::ui::colorblock::ColorBlock) {
49 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
50 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "defaultColorBlock");
51 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
52 }
53 }
54}
55
56#[cfg(feature = "unity_engine-ui-colorblock-types")]
57pub use __types::*;
58
59#[cfg(feature = "unity_engine-ui-colorblock")]
60impl ColorBlock {
61 #[doc = "`.cctor()` overload"]
62 pub fn cctor() -> () {
63 unsafe {
64 ::unity::il2cpp_call!((::unity::module_base()+0x317f370usize)as*mut u8,();
65 )
66 }
67 }
68
69 #[doc = "`op_Equality(crate::unity_engine::ui::colorblock::ColorBlock, crate::unity_engine::ui::colorblock::ColorBlock)` overload"]
70 pub fn op_equality(
71 point1: impl ::core::convert::Into<crate::unity_engine::ui::colorblock::ColorBlock>,
72 point2: impl ::core::convert::Into<crate::unity_engine::ui::colorblock::ColorBlock>,
73 ) -> bool {
74 unsafe {
75 ::unity::il2cpp_call!((::unity::module_base()+0x317f720usize)as*mut u8,bool;
76(crate::unity_engine::ui::colorblock::ColorBlock)::core::convert::Into::into(point1),(crate::unity_engine::ui::colorblock::ColorBlock)::core::convert::Into::into(point2))
77 }
78 }
79
80 #[doc = "`op_Inequality(crate::unity_engine::ui::colorblock::ColorBlock, crate::unity_engine::ui::colorblock::ColorBlock)` overload"]
81 pub fn op_inequality(
82 point1: impl ::core::convert::Into<crate::unity_engine::ui::colorblock::ColorBlock>,
83 point2: impl ::core::convert::Into<crate::unity_engine::ui::colorblock::ColorBlock>,
84 ) -> bool {
85 unsafe {
86 ::unity::il2cpp_call!((::unity::module_base()+0x317f780usize)as*mut u8,bool;
87(crate::unity_engine::ui::colorblock::ColorBlock)::core::convert::Into::into(point1),(crate::unity_engine::ui::colorblock::ColorBlock)::core::convert::Into::into(point2))
88 }
89 }
90}
91
92#[cfg(feature = "unity_engine-ui-colorblock")]
93impl ColorBlock {
94 #[doc = "`get_normalColor()` overload"]
95 pub fn get_normal_color(&mut self) -> crate::unity_engine::color::Color {
96 unsafe {
97 ::unity::il2cpp_call!((::unity::module_base()+0x317f240usize)as*mut u8,crate::unity_engine::color::Color;
98(*mut ColorBlock)self as*mut ColorBlock)
99 }
100 }
101
102 #[doc = "`set_normalColor(crate::unity_engine::color::Color)` overload"]
103 pub fn set_normal_color(&mut self, value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> () {
104 unsafe {
105 ::unity::il2cpp_call!((::unity::module_base()+0x317f250usize)as*mut u8,();
106(*mut ColorBlock)self as*mut ColorBlock,(crate::unity_engine::color::Color)::core::convert::Into::into(value))
107 }
108 }
109
110 #[doc = "`get_highlightedColor()` overload"]
111 pub fn get_highlighted_color(&mut self) -> crate::unity_engine::color::Color {
112 unsafe {
113 ::unity::il2cpp_call!((::unity::module_base()+0x317f270usize)as*mut u8,crate::unity_engine::color::Color;
114(*mut ColorBlock)self as*mut ColorBlock)
115 }
116 }
117
118 #[doc = "`set_highlightedColor(crate::unity_engine::color::Color)` overload"]
119 pub fn set_highlighted_color(&mut self, value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> () {
120 unsafe {
121 ::unity::il2cpp_call!((::unity::module_base()+0x317f280usize)as*mut u8,();
122(*mut ColorBlock)self as*mut ColorBlock,(crate::unity_engine::color::Color)::core::convert::Into::into(value))
123 }
124 }
125
126 #[doc = "`get_pressedColor()` overload"]
127 pub fn get_pressed_color(&mut self) -> crate::unity_engine::color::Color {
128 unsafe {
129 ::unity::il2cpp_call!((::unity::module_base()+0x317f2a0usize)as*mut u8,crate::unity_engine::color::Color;
130(*mut ColorBlock)self as*mut ColorBlock)
131 }
132 }
133
134 #[doc = "`set_pressedColor(crate::unity_engine::color::Color)` overload"]
135 pub fn set_pressed_color(&mut self, value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> () {
136 unsafe {
137 ::unity::il2cpp_call!((::unity::module_base()+0x317f2b0usize)as*mut u8,();
138(*mut ColorBlock)self as*mut ColorBlock,(crate::unity_engine::color::Color)::core::convert::Into::into(value))
139 }
140 }
141
142 #[doc = "`get_selectedColor()` overload"]
143 pub fn get_selected_color(&mut self) -> crate::unity_engine::color::Color {
144 unsafe {
145 ::unity::il2cpp_call!((::unity::module_base()+0x317f2d0usize)as*mut u8,crate::unity_engine::color::Color;
146(*mut ColorBlock)self as*mut ColorBlock)
147 }
148 }
149
150 #[doc = "`set_selectedColor(crate::unity_engine::color::Color)` overload"]
151 pub fn set_selected_color(&mut self, value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> () {
152 unsafe {
153 ::unity::il2cpp_call!((::unity::module_base()+0x317f2e0usize)as*mut u8,();
154(*mut ColorBlock)self as*mut ColorBlock,(crate::unity_engine::color::Color)::core::convert::Into::into(value))
155 }
156 }
157
158 #[doc = "`get_disabledColor()` overload"]
159 pub fn get_disabled_color(&mut self) -> crate::unity_engine::color::Color {
160 unsafe {
161 ::unity::il2cpp_call!((::unity::module_base()+0x317f300usize)as*mut u8,crate::unity_engine::color::Color;
162(*mut ColorBlock)self as*mut ColorBlock)
163 }
164 }
165
166 #[doc = "`set_disabledColor(crate::unity_engine::color::Color)` overload"]
167 pub fn set_disabled_color(&mut self, value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> () {
168 unsafe {
169 ::unity::il2cpp_call!((::unity::module_base()+0x317f310usize)as*mut u8,();
170(*mut ColorBlock)self as*mut ColorBlock,(crate::unity_engine::color::Color)::core::convert::Into::into(value))
171 }
172 }
173
174 #[doc = "`get_colorMultiplier()` overload"]
175 pub fn get_color_multiplier(&mut self) -> f32 {
176 unsafe {
177 ::unity::il2cpp_call!((::unity::module_base()+0x317f330usize)as*mut u8,f32;
178(*mut ColorBlock)self as*mut ColorBlock)
179 }
180 }
181
182 #[doc = "`set_colorMultiplier(f32)` overload"]
183 pub fn set_color_multiplier(&mut self, value: impl ::core::convert::Into<f32>) -> () {
184 unsafe {
185 ::unity::il2cpp_call!((::unity::module_base()+0x317f340usize)as*mut u8,();
186(*mut ColorBlock)self as*mut ColorBlock,(f32)::core::convert::Into::into(value))
187 }
188 }
189
190 #[doc = "`get_fadeDuration()` overload"]
191 pub fn get_fade_duration(&mut self) -> f32 {
192 unsafe {
193 ::unity::il2cpp_call!((::unity::module_base()+0x317f350usize)as*mut u8,f32;
194(*mut ColorBlock)self as*mut ColorBlock)
195 }
196 }
197
198 #[doc = "`set_fadeDuration(f32)` overload"]
199 pub fn set_fade_duration(&mut self, value: impl ::core::convert::Into<f32>) -> () {
200 unsafe {
201 ::unity::il2cpp_call!((::unity::module_base()+0x317f360usize)as*mut u8,();
202(*mut ColorBlock)self as*mut ColorBlock,(f32)::core::convert::Into::into(value))
203 }
204 }
205
206 #[doc = "`Equals(crate::system::object::Object)` overload"]
207 pub fn equals(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
208 unsafe {
209 ::unity::il2cpp_call!((::unity::module_base()+0x317f580usize)as*mut u8,bool;
210(*mut ColorBlock)self as*mut ColorBlock,(crate::system::object::Object)::core::convert::Into::into(obj))
211 }
212 }
213
214 #[doc = "`Equals(crate::unity_engine::ui::colorblock::ColorBlock)` overload"]
215 pub fn equals_2(&mut self, other: impl ::core::convert::Into<crate::unity_engine::ui::colorblock::ColorBlock>) -> bool {
216 unsafe {
217 ::unity::il2cpp_call!((::unity::module_base()+0x317f640usize)as*mut u8,bool;
218(*mut ColorBlock)self as*mut ColorBlock,(crate::unity_engine::ui::colorblock::ColorBlock)::core::convert::Into::into(other))
219 }
220 }
221
222 #[doc = "`GetHashCode()` overload"]
223 pub fn get_hash_code(&mut self) -> i32 {
224 unsafe {
225 ::unity::il2cpp_call!((::unity::module_base()+0x317f7e0usize)as*mut u8,i32;
226(*mut ColorBlock)self as*mut ColorBlock)
227 }
228 }
229}
230
231#[cfg(feature = "unity_engine-ui-colorblock")]
232impl ColorBlock {
233 pub fn get_normal_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
234 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
235 }
236
237 pub fn set_normal_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
238 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
239 }
240
241 pub fn get_highlighted_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
242 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
243 }
244
245 pub fn set_highlighted_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
246 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
247 }
248
249 pub fn get_pressed_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
250 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
251 }
252
253 pub fn set_pressed_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
254 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
255 }
256
257 pub fn get_selected_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
258 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
259 }
260
261 pub fn set_selected_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
262 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
263 }
264
265 pub fn get_disabled_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
266 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
267 }
268
269 pub fn set_disabled_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
270 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
271 }
272
273 pub fn get_color_multiplier_method_info() -> &'static ::unity::il2cpp::MethodInfo {
274 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
275 }
276
277 pub fn set_color_multiplier_method_info() -> &'static ::unity::il2cpp::MethodInfo {
278 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
279 }
280
281 pub fn get_fade_duration_method_info() -> &'static ::unity::il2cpp::MethodInfo {
282 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
283 }
284
285 pub fn set_fade_duration_method_info() -> &'static ::unity::il2cpp::MethodInfo {
286 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
287 }
288
289 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
290 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
291 }
292
293 pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
294 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
295 }
296
297 pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
298 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
299 }
300
301 pub fn op_equality_method_info() -> &'static ::unity::il2cpp::MethodInfo {
302 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
303 }
304
305 pub fn op_inequality_method_info() -> &'static ::unity::il2cpp::MethodInfo {
306 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
307 }
308
309 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
311 }
312}
313
314#[cfg(feature = "unity_engine-ui-colorblock")]
315#[doc(hidden)]
316pub mod prelude {
317 pub use super::ColorBlock;
318 #[cfg(feature = "system-object")]
319 pub use crate::system::object::IObjectMethods;
320 #[cfg(feature = "system-valuetype")]
321 pub use crate::system::valuetype::IValueTypeMethods;
322 pub use crate::system::{object::IObject, valuetype::IValueType};
323}