1#[cfg(feature = "app-trademenu-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::{
10 basicmenu::{BasicMenu, IBasicMenu},
11 gridmenu::{GridMenu, IGridMenu},
12 procinst::{IProcInst, ProcInst},
13 },
14 system::object::{IObject, Object},
15 };
16
17 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/trademenu/TradeMenu.md"))]
18 #[::unity::class(namespace = "App", name = "TradeMenu")]
19 #[parent(crate::app::gridmenu::GridMenu)]
20 pub struct TradeMenu {
21 #[offset(212)]
22 #[rename(name = "m_selectItemIndex")]
23 pub m_select_item_index: i32,
24 #[offset(216)]
25 #[rename(name = "m_CanLeftUnitAutoEquipBefore")]
26 pub m_can_left_unit_auto_equip_before: bool,
27 #[offset(217)]
28 #[rename(name = "m_CanRightUnitAutoEquipBefore")]
29 pub m_can_right_unit_auto_equip_before: bool,
30 }
31}
32
33#[cfg(feature = "app-trademenu-types")]
34pub use __types::*;
35
36#[cfg(feature = "app-trademenu")]
37pub trait ITradeMenuMethods: ITradeMenu {
38 #[doc = "`.ctor(crate::system::collections::generic::list_1::List_1<crate::app::basicmenuitem::BasicMenuItem>, crate::app::trademenucontent::TradeMenuContent)` overload"]
39 fn ctor(
40 self,
41 menu_item_list: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<crate::app::basicmenuitem::BasicMenuItem>>,
42 menu_content: impl ::core::convert::Into<crate::app::trademenucontent::TradeMenuContent>,
43 ) -> () {
44 unsafe {
45 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
46 ::unity::il2cpp_call!((::unity::module_base()+0x229b140usize)as*mut u8,();
47(TradeMenu)__receiver,(crate::system::collections::generic::list_1::List_1<crate::app::basicmenuitem::BasicMenuItem>)::core::convert::Into::into(menu_item_list),(crate::app::trademenucontent::TradeMenuContent)::core::convert::Into::into(menu_content))
48 }
49 }
50 #[doc = "`GetName()` overload"]
51 fn get_name(self) -> ::unity::Il2CppString {
52 unsafe {
53 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
54 {
55 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
56 let __vi = *__vt.get(30usize).unwrap_or_else(|| {
57 panic!(
58 "unity: virtual slot {}
59 out of range (vtable len {}
60) on the runtime class behind {}
61 (method `{}
62`)",
63 30usize,
64 __vt.len(),
65 <TradeMenu as ::unity::ClassIdentity>::NAME,
66 "GetName",
67 )
68 });
69 let __inner: extern "C" fn(TradeMenu, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
70 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
71 __inner(__receiver, __mi)
72 }
73 }
74 }
75 #[doc = "`GetShowRowMax()` overload"]
76 fn get_show_row_max(self) -> i32 {
77 unsafe {
78 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
79 {
80 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
81 let __vi = *__vt.get(32usize).unwrap_or_else(|| {
82 panic!(
83 "unity: virtual slot {}
84 out of range (vtable len {}
85) on the runtime class behind {}
86 (method `{}
87`)",
88 32usize,
89 __vt.len(),
90 <TradeMenu as ::unity::ClassIdentity>::NAME,
91 "GetShowRowMax",
92 )
93 });
94 let __inner: extern "C" fn(TradeMenu, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
95 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
96 __inner(__receiver, __mi)
97 }
98 }
99 }
100 #[doc = "`GetBuildRowNum()` overload"]
101 fn get_build_row_num(self) -> i32 {
102 unsafe {
103 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
104 {
105 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
106 let __vi = *__vt.get(33usize).unwrap_or_else(|| {
107 panic!(
108 "unity: virtual slot {}
109 out of range (vtable len {}
110) on the runtime class behind {}
111 (method `{}
112`)",
113 33usize,
114 __vt.len(),
115 <TradeMenu as ::unity::ClassIdentity>::NAME,
116 "GetBuildRowNum",
117 )
118 });
119 let __inner: extern "C" fn(TradeMenu, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
120 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
121 __inner(__receiver, __mi)
122 }
123 }
124 }
125 #[doc = "`KeyLeft(bool)` overload"]
126 fn key_left(self, is_trigger: impl ::core::convert::Into<bool>) -> () {
127 unsafe {
128 let __receiver = <TradeMenu 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(42usize).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 42usize,
139 __vt.len(),
140 <TradeMenu as ::unity::ClassIdentity>::NAME,
141 "KeyLeft",
142 )
143 });
144 let __inner: extern "C" fn(TradeMenu, bool, ::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, ::core::convert::Into::into(is_trigger), __mi)
147 }
148 }
149 }
150 #[doc = "`KeyRight(bool)` overload"]
151 fn key_right(self, is_trigger: impl ::core::convert::Into<bool>) -> () {
152 unsafe {
153 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
154 {
155 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
156 let __vi = *__vt.get(43usize).unwrap_or_else(|| {
157 panic!(
158 "unity: virtual slot {}
159 out of range (vtable len {}
160) on the runtime class behind {}
161 (method `{}
162`)",
163 43usize,
164 __vt.len(),
165 <TradeMenu as ::unity::ClassIdentity>::NAME,
166 "KeyRight",
167 )
168 });
169 let __inner: extern "C" fn(TradeMenu, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
170 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
171 __inner(__receiver, ::core::convert::Into::into(is_trigger), __mi)
172 }
173 }
174 }
175 #[doc = "`AfterBuild()` overload"]
176 fn after_build(self) -> () {
177 unsafe {
178 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
179 {
180 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
181 let __vi = *__vt.get(25usize).unwrap_or_else(|| {
182 panic!(
183 "unity: virtual slot {}
184 out of range (vtable len {}
185) on the runtime class behind {}
186 (method `{}
187`)",
188 25usize,
189 __vt.len(),
190 <TradeMenu as ::unity::ClassIdentity>::NAME,
191 "AfterBuild",
192 )
193 });
194 let __inner: extern "C" fn(TradeMenu, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
195 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
196 __inner(__receiver, __mi)
197 }
198 }
199 }
200 #[doc = "`InitLeftUnitInfo(crate::app::unit::Unit)` overload"]
201 fn init_left_unit_info(self, unit: impl ::core::convert::Into<crate::app::unit::Unit>) -> () {
202 unsafe {
203 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
204 ::unity::il2cpp_call!((::unity::module_base()+0x229b7c0usize)as*mut u8,();
205(TradeMenu)__receiver,(crate::app::unit::Unit)::core::convert::Into::into(unit))
206 }
207 }
208 #[doc = "`InitRightUnitInfo(crate::app::unit::Unit)` overload"]
209 fn init_right_unit_info(self, unit: impl ::core::convert::Into<crate::app::unit::Unit>) -> () {
210 unsafe {
211 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
212 ::unity::il2cpp_call!((::unity::module_base()+0x229b930usize)as*mut u8,();
213(TradeMenu)__receiver,(crate::app::unit::Unit)::core::convert::Into::into(unit))
214 }
215 }
216 #[doc = "`SetLeftUnitName(::unity::Il2CppString)` overload"]
217 fn set_left_unit_name(self, name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
218 unsafe {
219 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
220 ::unity::il2cpp_call!((::unity::module_base()+0x229b890usize)as*mut u8,();
221(TradeMenu)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name))
222 }
223 }
224 #[doc = "`SetRightUnitName(::unity::Il2CppString)` overload"]
225 fn set_right_unit_name(self, name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
226 unsafe {
227 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
228 ::unity::il2cpp_call!((::unity::module_base()+0x229ba00usize)as*mut u8,();
229(TradeMenu)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name))
230 }
231 }
232 #[doc = "`CanLeftUnitAutoEquip()` overload"]
233 fn can_left_unit_auto_equip(self) -> bool {
234 unsafe {
235 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
236 ::unity::il2cpp_call!((::unity::module_base()+0x229bae0usize)as*mut u8,bool;
237(TradeMenu)__receiver)
238 }
239 }
240 #[doc = "`CanRightUnitAutoEquip()` overload"]
241 fn can_right_unit_auto_equip(self) -> bool {
242 unsafe {
243 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
244 ::unity::il2cpp_call!((::unity::module_base()+0x229baf0usize)as*mut u8,bool;
245(TradeMenu)__receiver)
246 }
247 }
248 #[doc = "`ShowSelectCursor()` overload"]
249 fn show_select_cursor(self) -> () {
250 unsafe {
251 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
252 ::unity::il2cpp_call!((::unity::module_base()+0x229b730usize)as*mut u8,();
253(TradeMenu)__receiver)
254 }
255 }
256 #[doc = "`HideSelectCursor()` overload"]
257 fn hide_select_cursor(self) -> () {
258 unsafe {
259 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
260 ::unity::il2cpp_call!((::unity::module_base()+0x229bb10usize)as*mut u8,();
261(TradeMenu)__receiver)
262 }
263 }
264 #[doc = "`SetSelectItemIndex(i32)` overload"]
265 fn set_select_item_index(self, item_index: impl ::core::convert::Into<i32>) -> () {
266 unsafe {
267 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
268 ::unity::il2cpp_call!((::unity::module_base()+0x229b600usize)as*mut u8,();
269(TradeMenu)__receiver,(i32)::core::convert::Into::into(item_index))
270 }
271 }
272 #[doc = "`GetSelectItemIndex()` overload"]
273 fn get_select_item_index(self) -> i32 {
274 unsafe {
275 let __receiver = <TradeMenu as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
276 ::unity::il2cpp_call!((::unity::module_base()+0x229bc70usize)as*mut u8,i32;
277(TradeMenu)__receiver)
278 }
279 }
280}
281
282#[cfg(feature = "app-trademenu")]
283impl<__T: ITradeMenu> ITradeMenuMethods for __T {}
284
285#[cfg(feature = "app-trademenu")]
286impl TradeMenu {
287 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
288 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
289 }
290
291 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
292 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
293 }
294
295 pub fn get_show_row_max_method_info() -> &'static ::unity::il2cpp::MethodInfo {
296 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
297 }
298
299 pub fn get_build_row_num_method_info() -> &'static ::unity::il2cpp::MethodInfo {
300 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
301 }
302
303 pub fn key_left_method_info() -> &'static ::unity::il2cpp::MethodInfo {
304 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
305 }
306
307 pub fn key_right_method_info() -> &'static ::unity::il2cpp::MethodInfo {
308 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
309 }
310
311 pub fn after_build_method_info() -> &'static ::unity::il2cpp::MethodInfo {
312 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
313 }
314
315 pub fn init_left_unit_info_method_info() -> &'static ::unity::il2cpp::MethodInfo {
316 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
317 }
318
319 pub fn init_right_unit_info_method_info() -> &'static ::unity::il2cpp::MethodInfo {
320 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
321 }
322
323 pub fn set_left_unit_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
324 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
325 }
326
327 pub fn set_right_unit_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
328 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
329 }
330
331 pub fn can_left_unit_auto_equip_method_info() -> &'static ::unity::il2cpp::MethodInfo {
332 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
333 }
334
335 pub fn can_right_unit_auto_equip_method_info() -> &'static ::unity::il2cpp::MethodInfo {
336 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
337 }
338
339 pub fn show_select_cursor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
340 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
341 }
342
343 pub fn hide_select_cursor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
344 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
345 }
346
347 pub fn set_select_item_index_method_info() -> &'static ::unity::il2cpp::MethodInfo {
348 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
349 }
350
351 pub fn get_select_item_index_method_info() -> &'static ::unity::il2cpp::MethodInfo {
352 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
353 }
354}
355
356#[cfg(feature = "app-trademenu")]
357impl TradeMenu {
358 #[doc = "Direct (non-virtual) call to `TradeMenu`'s own `GetName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
359 pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
360 let __mi = Self::get_name_method_info();
361 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
362 __inner(this.into(), ::core::option::Option::None)
363 }
364
365 #[doc = "Direct (non-virtual) call to `TradeMenu`'s own `GetShowRowMax`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
366 pub unsafe fn get_show_row_max(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
367 let __mi = Self::get_show_row_max_method_info();
368 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
369 __inner(this.into(), ::core::option::Option::None)
370 }
371
372 #[doc = "Direct (non-virtual) call to `TradeMenu`'s own `GetBuildRowNum`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
373 pub unsafe fn get_build_row_num(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
374 let __mi = Self::get_build_row_num_method_info();
375 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
376 __inner(this.into(), ::core::option::Option::None)
377 }
378
379 #[doc = "Direct (non-virtual) call to `TradeMenu`'s own `KeyLeft`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
380 pub unsafe fn key_left(this: impl ::core::convert::Into<::unity::IlInstance>, is_trigger: bool) -> () {
381 let __mi = Self::key_left_method_info();
382 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
383 __inner(this.into(), is_trigger, ::core::option::Option::None)
384 }
385
386 #[doc = "Direct (non-virtual) call to `TradeMenu`'s own `KeyRight`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
387 pub unsafe fn key_right(this: impl ::core::convert::Into<::unity::IlInstance>, is_trigger: bool) -> () {
388 let __mi = Self::key_right_method_info();
389 let __inner: extern "C" fn(::unity::IlInstance, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
390 __inner(this.into(), is_trigger, ::core::option::Option::None)
391 }
392
393 #[doc = "Direct (non-virtual) call to `TradeMenu`'s own `AfterBuild`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
394 pub unsafe fn after_build(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
395 let __mi = Self::after_build_method_info();
396 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
397 __inner(this.into(), ::core::option::Option::None)
398 }
399}
400
401#[cfg(feature = "app-trademenu")]
402impl TradeMenu {
403 #[doc = "`.ctor(crate::system::collections::generic::list_1::List_1<crate::app::basicmenuitem::BasicMenuItem>, crate::app::trademenucontent::TradeMenuContent)` — overload selector"]
404 pub fn new(
405 menu_item_list: crate::system::collections::generic::list_1::List_1<crate::app::basicmenuitem::BasicMenuItem>,
406 menu_content: crate::app::trademenucontent::TradeMenuContent,
407 ) -> Self {
408 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
409 panic!(
410 "{}
411::{}
412 failed to instantiate",
413 ::core::stringify!(TradeMenu),
414 ::core::stringify!(new),
415 )
416 });
417 <Self as ITradeMenuMethods>::ctor(this, menu_item_list, menu_content);
418 this
419 }
420}
421
422#[cfg(feature = "app-trademenu")]
423#[doc(hidden)]
424pub mod prelude {
425 pub use super::{ITradeMenu, ITradeMenuMethods, TradeMenu};
426 #[cfg(feature = "app-basicmenu")]
427 pub use crate::app::basicmenu::IBasicMenuMethods;
428 #[cfg(feature = "app-gridmenu")]
429 pub use crate::app::gridmenu::IGridMenuMethods;
430 #[cfg(feature = "app-procinst")]
431 pub use crate::app::procinst::IProcInstMethods;
432 #[cfg(feature = "system-object")]
433 pub use crate::system::object::IObjectMethods;
434 pub use crate::{
435 app::{basicmenu::IBasicMenu, gridmenu::IGridMenu, procinst::IProcInst},
436 system::object::IObject,
437 };
438}