1#[cfg(feature = "app-gx-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 system::{
10 object::{IObject, Object},
11 r#enum::{Enum, IEnum},
12 valuetype::{IValueType, ValueType},
13 },
14 unity_engine::gui::{GUI, IGUI},
15 };
16
17 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/gx/GX_Anchor.md"))]
18 #[repr(C)]
19 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
20 pub struct GX_Anchor {
21 pub value: i32,
22 }
23 impl ::unity::ClassIdentity for GX_Anchor {
24 const NAME: &'static str = "GX.Anchor";
25 const NAMESPACE: &'static str = "App";
26
27 fn class() -> ::unity::Class {
28 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
29 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
30 }
31 }
32 impl ::unity::IlType for GX_Anchor {
33 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
34 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
35 }
36 }
37 impl GX_Anchor {
38 pub fn center() -> Self {
39 Self { value: 0 }
40 }
41
42 pub fn left_up() -> Self {
43 Self { value: 1 }
44 }
45
46 pub fn up() -> Self {
47 Self { value: 2 }
48 }
49
50 pub fn right_up() -> Self {
51 Self { value: 3 }
52 }
53
54 pub fn right() -> Self {
55 Self { value: 4 }
56 }
57
58 pub fn right_down() -> Self {
59 Self { value: 5 }
60 }
61
62 pub fn down() -> Self {
63 Self { value: 6 }
64 }
65
66 pub fn left_down() -> Self {
67 Self { value: 7 }
68 }
69
70 pub fn left() -> Self {
71 Self { value: 8 }
72 }
73
74 pub fn num() -> Self {
75 Self { value: 9 }
76 }
77 }
78
79 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/gx/GX.md"))]
80 #[::unity::class(namespace = "App", name = "GX")]
81 #[parent(crate::unity_engine::gui::GUI)]
82 pub struct GX {
83 #[static_field]
84 #[rename(name = "scrollBaseColor")]
85 pub scroll_base_color: crate::unity_engine::color::Color,
86 #[static_field]
87 #[rename(name = "scrollBarColor")]
88 pub scroll_bar_color: crate::unity_engine::color::Color,
89 #[static_field]
90 #[rename(name = "CanvasSizeX")]
91 pub canvas_size_x: f32,
92 #[static_field]
93 #[rename(name = "CanvasSizeY")]
94 pub canvas_size_y: f32,
95 #[static_field]
96 #[rename(name = "CanvasHalfX")]
97 pub canvas_half_x: f32,
98 #[static_field]
99 #[rename(name = "CanvasHalfY")]
100 pub canvas_half_y: f32,
101 }
102}
103
104#[cfg(feature = "app-gx-types")]
105pub use __types::*;
106
107#[cfg(feature = "app-gx")]
108impl GX {
109 #[doc = "`GetAnchorDir(crate::app::gx::GX_Anchor)` overload"]
110 pub fn get_anchor_dir(anchor: impl ::core::convert::Into<crate::app::gx::GX_Anchor>) -> crate::unity_engine::vector2::Vector2 {
111 unsafe {
112 ::unity::il2cpp_call!((::unity::module_base()+0x22770d0usize)as*mut u8,crate::unity_engine::vector2::Vector2;
113(crate::app::gx::GX_Anchor)::core::convert::Into::into(anchor))
114 }
115 }
116
117 #[doc = "`GetAnchorPos(crate::app::gx::GX_Anchor)` overload"]
118 pub fn get_anchor_pos(anchor: impl ::core::convert::Into<crate::app::gx::GX_Anchor>) -> crate::unity_engine::vector3::Vector3 {
119 unsafe {
120 ::unity::il2cpp_call!((::unity::module_base()+0x2277110usize)as*mut u8,crate::unity_engine::vector3::Vector3;
121(crate::app::gx::GX_Anchor)::core::convert::Into::into(anchor))
122 }
123 }
124
125 #[doc = "`GetReduceRect(crate::unity_engine::rect::Rect, f32)` overload"]
126 pub fn get_reduce_rect(
127 rect: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
128 size: impl ::core::convert::Into<f32>,
129 ) -> crate::unity_engine::rect::Rect {
130 unsafe {
131 ::unity::il2cpp_call!((::unity::module_base()+0x2277210usize)as*mut u8,crate::unity_engine::rect::Rect;
132(crate::unity_engine::rect::Rect)::core::convert::Into::into(rect),(f32)::core::convert::Into::into(size))
133 }
134 }
135
136 #[doc = "`GetReduceRect(crate::unity_engine::rect::Rect, f32, f32)` overload"]
137 pub fn get_reduce_rect_2(
138 rect: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
139 size_x: impl ::core::convert::Into<f32>,
140 size_y: impl ::core::convert::Into<f32>,
141 ) -> crate::unity_engine::rect::Rect {
142 unsafe {
143 ::unity::il2cpp_call!((::unity::module_base()+0x22772b0usize)as*mut u8,crate::unity_engine::rect::Rect;
144(crate::unity_engine::rect::Rect)::core::convert::Into::into(rect),(f32)::core::convert::Into::into(size_x),(f32)::core::convert::Into::into(size_y))
145 }
146 }
147
148 #[doc = "`GetLocalRect(crate::unity_engine::rect::Rect)` overload"]
149 pub fn get_local_rect(rect: impl ::core::convert::Into<crate::unity_engine::rect::Rect>) -> crate::unity_engine::rect::Rect {
150 unsafe {
151 ::unity::il2cpp_call!((::unity::module_base()+0x2277380usize)as*mut u8,crate::unity_engine::rect::Rect;
152(crate::unity_engine::rect::Rect)::core::convert::Into::into(rect))
153 }
154 }
155
156 #[doc = "`SetupScreenMatrix(crate::app::gx::GX_Anchor)` overload"]
157 pub fn setup_screen_matrix(anchor: impl ::core::convert::Into<crate::app::gx::GX_Anchor>) -> () {
158 unsafe {
159 ::unity::il2cpp_call!((::unity::module_base()+0x22773e0usize)as*mut u8,();
160(crate::app::gx::GX_Anchor)::core::convert::Into::into(anchor))
161 }
162 }
163
164 #[doc = "`GetScreenSpaceMatrix(crate::app::gx::GX_Anchor)` overload"]
165 pub fn get_screen_space_matrix(anchor: impl ::core::convert::Into<crate::app::gx::GX_Anchor>) -> crate::unity_engine::matrix4x4::Matrix4x4 {
166 unsafe {
167 ::unity::il2cpp_call!((::unity::module_base()+0x22774b0usize)as*mut u8,crate::unity_engine::matrix4x4::Matrix4x4;
168(crate::app::gx::GX_Anchor)::core::convert::Into::into(anchor))
169 }
170 }
171
172 #[doc = "`DrawRect(crate::unity_engine::rect::Rect, crate::unity_engine::color::Color)` overload"]
173 pub fn draw_rect(
174 rect: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
175 color: impl ::core::convert::Into<crate::unity_engine::color::Color>,
176 ) -> () {
177 unsafe {
178 ::unity::il2cpp_call!((::unity::module_base()+0x2277690usize)as*mut u8,();
179(crate::unity_engine::rect::Rect)::core::convert::Into::into(rect),(crate::unity_engine::color::Color)::core::convert::Into::into(color))
180 }
181 }
182
183 #[doc = "`DrawRect(f32, f32, f32, f32, crate::unity_engine::color::Color)` overload"]
184 pub fn draw_rect_2(
185 x: impl ::core::convert::Into<f32>,
186 y: impl ::core::convert::Into<f32>,
187 w: impl ::core::convert::Into<f32>,
188 h: impl ::core::convert::Into<f32>,
189 color: impl ::core::convert::Into<crate::unity_engine::color::Color>,
190 ) -> () {
191 unsafe {
192 ::unity::il2cpp_call!((::unity::module_base()+0x2277760usize)as*mut u8,();
193(f32)::core::convert::Into::into(x),(f32)::core::convert::Into::into(y),(f32)::core::convert::Into::into(w),(f32)::core::convert::Into::into(h),(crate::unity_engine::color::Color)::core::convert::Into::into(color))
194 }
195 }
196
197 #[doc = "`DrawText(f32, f32, f32, f32, crate::unity_engine::color::Color, ::unity::Il2CppString)` overload"]
198 pub fn draw_text(
199 x: impl ::core::convert::Into<f32>,
200 y: impl ::core::convert::Into<f32>,
201 w: impl ::core::convert::Into<f32>,
202 h: impl ::core::convert::Into<f32>,
203 color: impl ::core::convert::Into<crate::unity_engine::color::Color>,
204 text: impl ::core::convert::Into<::unity::Il2CppString>,
205 ) -> () {
206 unsafe {
207 ::unity::il2cpp_call!((::unity::module_base()+0x22778a0usize)as*mut u8,();
208(f32)::core::convert::Into::into(x),(f32)::core::convert::Into::into(y),(f32)::core::convert::Into::into(w),(f32)::core::convert::Into::into(h),(crate::unity_engine::color::Color)::core::convert::Into::into(color),(::unity::Il2CppString)::core::convert::Into::into(text))
209 }
210 }
211
212 #[doc = "`DrawText(crate::unity_engine::rect::Rect, crate::unity_engine::color::Color, ::unity::Il2CppString)` overload"]
213 pub fn draw_text_2(
214 rect: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
215 color: impl ::core::convert::Into<crate::unity_engine::color::Color>,
216 text: impl ::core::convert::Into<::unity::Il2CppString>,
217 ) -> () {
218 unsafe {
219 ::unity::il2cpp_call!((::unity::module_base()+0x2277b20usize)as*mut u8,();
220(crate::unity_engine::rect::Rect)::core::convert::Into::into(rect),(crate::unity_engine::color::Color)::core::convert::Into::into(color),(::unity::Il2CppString)::core::convert::Into::into(text))
221 }
222 }
223
224 #[doc = "`BeginScreenClip(crate::unity_engine::rect::Rect)` overload"]
225 pub fn begin_screen_clip(rect: impl ::core::convert::Into<crate::unity_engine::rect::Rect>) -> () {
226 unsafe {
227 ::unity::il2cpp_call!((::unity::module_base()+0x2277c90usize)as*mut u8,();
228(crate::unity_engine::rect::Rect)::core::convert::Into::into(rect))
229 }
230 }
231
232 #[doc = "`BeginScreenClip(f32, f32, f32, f32)` overload"]
233 pub fn begin_screen_clip_2(
234 x: impl ::core::convert::Into<f32>,
235 y: impl ::core::convert::Into<f32>,
236 width: impl ::core::convert::Into<f32>,
237 height: impl ::core::convert::Into<f32>,
238 ) -> () {
239 unsafe {
240 ::unity::il2cpp_call!((::unity::module_base()+0x2277d20usize)as*mut u8,();
241(f32)::core::convert::Into::into(x),(f32)::core::convert::Into::into(y),(f32)::core::convert::Into::into(width),(f32)::core::convert::Into::into(height))
242 }
243 }
244
245 #[doc = "`EndScreenClip()` overload"]
246 pub fn end_screen_clip() -> () {
247 unsafe {
248 ::unity::il2cpp_call!((::unity::module_base()+0x2277dd0usize)as*mut u8,();
249 )
250 }
251 }
252
253 #[doc = "`DrawScrollBar(f32, f32, crate::unity_engine::color::Color, f32, f32, f32)` overload"]
254 pub fn draw_scroll_bar(
255 x: impl ::core::convert::Into<f32>,
256 y: impl ::core::convert::Into<f32>,
257 color: impl ::core::convert::Into<crate::unity_engine::color::Color>,
258 height: impl ::core::convert::Into<f32>,
259 pos: impl ::core::convert::Into<f32>,
260 max: impl ::core::convert::Into<f32>,
261 ) -> () {
262 unsafe {
263 ::unity::il2cpp_call!((::unity::module_base()+0x2277e40usize)as*mut u8,();
264(f32)::core::convert::Into::into(x),(f32)::core::convert::Into::into(y),(crate::unity_engine::color::Color)::core::convert::Into::into(color),(f32)::core::convert::Into::into(height),(f32)::core::convert::Into::into(pos),(f32)::core::convert::Into::into(max))
265 }
266 }
267
268 #[doc = "`GetTextSize(crate::unity_engine::guistyle::GUIStyle, ::unity::Il2CppString)` overload"]
269 pub fn get_text_size(
270 style: impl ::core::convert::Into<crate::unity_engine::guistyle::GUIStyle>,
271 text: impl ::core::convert::Into<::unity::Il2CppString>,
272 ) -> crate::unity_engine::vector2::Vector2 {
273 unsafe {
274 ::unity::il2cpp_call!((::unity::module_base()+0x22780d0usize)as*mut u8,crate::unity_engine::vector2::Vector2;
275(crate::unity_engine::guistyle::GUIStyle)::core::convert::Into::into(style),(::unity::Il2CppString)::core::convert::Into::into(text))
276 }
277 }
278
279 #[doc = "`GetTextSize(::unity::Il2CppString)` overload"]
280 pub fn get_text_size_2(text: impl ::core::convert::Into<::unity::Il2CppString>) -> crate::unity_engine::vector2::Vector2 {
281 unsafe {
282 ::unity::il2cpp_call!((::unity::module_base()+0x2278150usize)as*mut u8,crate::unity_engine::vector2::Vector2;
283(::unity::Il2CppString)::core::convert::Into::into(text))
284 }
285 }
286
287 #[doc = "`.cctor()` overload"]
288 pub fn cctor() -> () {
289 unsafe {
290 ::unity::il2cpp_call!((::unity::module_base()+0x2278300usize)as*mut u8,();
291 )
292 }
293 }
294}
295
296#[cfg(feature = "app-gx")]
297pub trait IGXMethods: IGX {
298 #[doc = "`.ctor()` overload"]
299 fn ctor(self) -> () {
300 unsafe {
301 let __receiver = <GX as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
302 ::unity::il2cpp_call!((::unity::module_base()+0x2278290usize)as*mut u8,();
303(GX)__receiver)
304 }
305 }
306}
307
308#[cfg(feature = "app-gx")]
309impl<__T: IGX> IGXMethods for __T {}
310
311#[cfg(feature = "app-gx")]
312impl GX {
313 pub fn get_anchor_dir_method_info() -> &'static ::unity::il2cpp::MethodInfo {
314 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
315 }
316
317 pub fn get_anchor_pos_method_info() -> &'static ::unity::il2cpp::MethodInfo {
318 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
319 }
320
321 pub fn get_reduce_rect_method_info() -> &'static ::unity::il2cpp::MethodInfo {
322 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
323 }
324
325 pub fn get_reduce_rect_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
326 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
327 }
328
329 pub fn get_local_rect_method_info() -> &'static ::unity::il2cpp::MethodInfo {
330 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
331 }
332
333 pub fn setup_screen_matrix_method_info() -> &'static ::unity::il2cpp::MethodInfo {
334 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
335 }
336
337 pub fn get_screen_space_matrix_method_info() -> &'static ::unity::il2cpp::MethodInfo {
338 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
339 }
340
341 pub fn draw_rect_method_info() -> &'static ::unity::il2cpp::MethodInfo {
342 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
343 }
344
345 pub fn draw_rect_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
346 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
347 }
348
349 pub fn draw_text_method_info() -> &'static ::unity::il2cpp::MethodInfo {
350 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
351 }
352
353 pub fn draw_text_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
354 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
355 }
356
357 pub fn begin_screen_clip_method_info() -> &'static ::unity::il2cpp::MethodInfo {
358 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
359 }
360
361 pub fn begin_screen_clip_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
362 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
363 }
364
365 pub fn end_screen_clip_method_info() -> &'static ::unity::il2cpp::MethodInfo {
366 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
367 }
368
369 pub fn draw_scroll_bar_method_info() -> &'static ::unity::il2cpp::MethodInfo {
370 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
371 }
372
373 pub fn get_text_size_method_info() -> &'static ::unity::il2cpp::MethodInfo {
374 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
375 }
376
377 pub fn get_text_size_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
378 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
379 }
380
381 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
382 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
383 }
384
385 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
386 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
387 }
388}
389
390#[cfg(feature = "app-gx")]
391impl GX {
392 #[doc = "`.ctor()` — no args"]
393 pub fn new() -> Self {
394 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
395 panic!(
396 "{}
397::{}
398 failed to instantiate",
399 ::core::stringify!(GX),
400 ::core::stringify!(new),
401 )
402 });
403 <Self as IGXMethods>::ctor(this);
404 this
405 }
406}
407
408#[cfg(feature = "app-gx")]
409#[doc(hidden)]
410pub mod prelude {
411 pub use super::{GX_Anchor, IGXMethods, GX, IGX};
412 #[cfg(feature = "system-object")]
413 pub use crate::system::object::IObjectMethods;
414 #[cfg(feature = "system-enum")]
415 pub use crate::system::r#enum::IEnumMethods;
416 #[cfg(feature = "system-valuetype")]
417 pub use crate::system::valuetype::IValueTypeMethods;
418 #[cfg(feature = "unity_engine-gui")]
419 pub use crate::unity_engine::gui::IGUIMethods;
420 pub use crate::{
421 system::{object::IObject, r#enum::IEnum, valuetype::IValueType},
422 unity_engine::gui::IGUI,
423 };
424}