Skip to main content

engage/generated/tm_pro/
tmp_textelement.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "tm_pro-tmp_textelement-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/tm_pro/tmp_textelement/TMP_TextElement.md"))]
11    #[::unity::class(namespace = "TMPro", name = "TMP_TextElement")]
12    #[parent(crate::system::object::Object)]
13    pub struct TMP_TextElement {
14        #[offset(16)]
15        #[rename(name = "m_ElementType")]
16        pub m_element_type: crate::tm_pro::textelementtype::TextElementType,
17        #[offset(20)]
18        #[rename(name = "m_Unicode")]
19        pub m_unicode: u32,
20        #[offset(24)]
21        #[rename(name = "m_TextAsset")]
22        pub m_text_asset: crate::tm_pro::tmp_asset::TMP_Asset,
23        #[offset(32)]
24        #[rename(name = "m_Glyph")]
25        pub m_glyph: crate::unity_engine::text_core::glyph::Glyph,
26        #[offset(40)]
27        #[rename(name = "m_GlyphIndex")]
28        pub m_glyph_index: u32,
29        #[offset(44)]
30        #[rename(name = "m_Scale")]
31        pub m_scale: f32,
32    }
33}
34
35#[cfg(feature = "tm_pro-tmp_textelement-types")]
36pub use __types::*;
37
38#[cfg(feature = "tm_pro-tmp_textelement")]
39pub trait ITMP_TextElementMethods: ITMP_TextElement {
40    #[doc = "`get_elementType()` overload"]
41    fn get_element_type(self) -> crate::tm_pro::textelementtype::TextElementType {
42        unsafe {
43            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
44            ::unity::il2cpp_call!((::unity::module_base()+0x2e60840usize)as*mut u8,crate::tm_pro::textelementtype::TextElementType;
45(TMP_TextElement)__receiver)
46        }
47    }
48    #[doc = "`get_unicode()` overload"]
49    fn get_unicode(self) -> u32 {
50        unsafe {
51            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
52            ::unity::il2cpp_call!((::unity::module_base()+0x2e60850usize)as*mut u8,u32;
53(TMP_TextElement)__receiver)
54        }
55    }
56    #[doc = "`set_unicode(u32)` overload"]
57    fn set_unicode(self, value: impl ::core::convert::Into<u32>) -> () {
58        unsafe {
59            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
60            ::unity::il2cpp_call!((::unity::module_base()+0x2e60860usize)as*mut u8,();
61(TMP_TextElement)__receiver,(u32)::core::convert::Into::into(value))
62        }
63    }
64    #[doc = "`get_textAsset()` overload"]
65    fn get_text_asset(self) -> crate::tm_pro::tmp_asset::TMP_Asset {
66        unsafe {
67            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
68            ::unity::il2cpp_call!((::unity::module_base()+0x2e60870usize)as*mut u8,crate::tm_pro::tmp_asset::TMP_Asset;
69(TMP_TextElement)__receiver)
70        }
71    }
72    #[doc = "`set_textAsset(crate::tm_pro::tmp_asset::TMP_Asset)` overload"]
73    fn set_text_asset(self, value: impl ::core::convert::Into<crate::tm_pro::tmp_asset::TMP_Asset>) -> () {
74        unsafe {
75            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
76            ::unity::il2cpp_call!((::unity::module_base()+0x2e60880usize)as*mut u8,();
77(TMP_TextElement)__receiver,(crate::tm_pro::tmp_asset::TMP_Asset)::core::convert::Into::into(value))
78        }
79    }
80    #[doc = "`get_glyph()` overload"]
81    fn get_glyph(self) -> crate::unity_engine::text_core::glyph::Glyph {
82        unsafe {
83            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
84            ::unity::il2cpp_call!((::unity::module_base()+0x2e60890usize)as*mut u8,crate::unity_engine::text_core::glyph::Glyph;
85(TMP_TextElement)__receiver)
86        }
87    }
88    #[doc = "`set_glyph(crate::unity_engine::text_core::glyph::Glyph)` overload"]
89    fn set_glyph(self, value: impl ::core::convert::Into<crate::unity_engine::text_core::glyph::Glyph>) -> () {
90        unsafe {
91            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
92            ::unity::il2cpp_call!((::unity::module_base()+0x2e608a0usize)as*mut u8,();
93(TMP_TextElement)__receiver,(crate::unity_engine::text_core::glyph::Glyph)::core::convert::Into::into(value))
94        }
95    }
96    #[doc = "`get_glyphIndex()` overload"]
97    fn get_glyph_index(self) -> u32 {
98        unsafe {
99            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100            ::unity::il2cpp_call!((::unity::module_base()+0x2e608b0usize)as*mut u8,u32;
101(TMP_TextElement)__receiver)
102        }
103    }
104    #[doc = "`set_glyphIndex(u32)` overload"]
105    fn set_glyph_index(self, value: impl ::core::convert::Into<u32>) -> () {
106        unsafe {
107            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
108            ::unity::il2cpp_call!((::unity::module_base()+0x2e608c0usize)as*mut u8,();
109(TMP_TextElement)__receiver,(u32)::core::convert::Into::into(value))
110        }
111    }
112    #[doc = "`get_scale()` overload"]
113    fn get_scale(self) -> f32 {
114        unsafe {
115            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
116            ::unity::il2cpp_call!((::unity::module_base()+0x2e608d0usize)as*mut u8,f32;
117(TMP_TextElement)__receiver)
118        }
119    }
120    #[doc = "`set_scale(f32)` overload"]
121    fn set_scale(self, value: impl ::core::convert::Into<f32>) -> () {
122        unsafe {
123            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
124            ::unity::il2cpp_call!((::unity::module_base()+0x2e608e0usize)as*mut u8,();
125(TMP_TextElement)__receiver,(f32)::core::convert::Into::into(value))
126        }
127    }
128    #[doc = "`.ctor()` overload"]
129    fn ctor(self) -> () {
130        unsafe {
131            let __receiver = <TMP_TextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
132            ::unity::il2cpp_call!((::unity::module_base()+0x2e608f0usize)as*mut u8,();
133(TMP_TextElement)__receiver)
134        }
135    }
136}
137
138#[cfg(feature = "tm_pro-tmp_textelement")]
139impl<__T: ITMP_TextElement> ITMP_TextElementMethods for __T {}
140
141#[cfg(feature = "tm_pro-tmp_textelement")]
142impl TMP_TextElement {
143    pub fn get_element_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
144        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
145    }
146
147    pub fn get_unicode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
148        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
149    }
150
151    pub fn set_unicode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
152        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
153    }
154
155    pub fn get_text_asset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
156        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
157    }
158
159    pub fn set_text_asset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
160        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
161    }
162
163    pub fn get_glyph_method_info() -> &'static ::unity::il2cpp::MethodInfo {
164        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
165    }
166
167    pub fn set_glyph_method_info() -> &'static ::unity::il2cpp::MethodInfo {
168        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
169    }
170
171    pub fn get_glyph_index_method_info() -> &'static ::unity::il2cpp::MethodInfo {
172        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
173    }
174
175    pub fn set_glyph_index_method_info() -> &'static ::unity::il2cpp::MethodInfo {
176        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
177    }
178
179    pub fn get_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
180        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
181    }
182
183    pub fn set_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
184        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
185    }
186
187    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
188        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
189    }
190}
191
192#[cfg(feature = "tm_pro-tmp_textelement")]
193impl TMP_TextElement {
194    #[doc = "`.ctor()` — no args"]
195    pub fn new() -> Self {
196        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
197            panic!(
198                "{}
199::{}
200 failed to instantiate",
201                ::core::stringify!(TMP_TextElement),
202                ::core::stringify!(new),
203            )
204        });
205        <Self as ITMP_TextElementMethods>::ctor(this);
206        this
207    }
208}
209
210#[cfg(feature = "tm_pro-tmp_textelement")]
211#[doc(hidden)]
212pub mod prelude {
213    pub use super::{ITMP_TextElement, ITMP_TextElementMethods, TMP_TextElement};
214    pub use crate::system::object::IObject;
215    #[cfg(feature = "system-object")]
216    pub use crate::system::object::IObjectMethods;
217}