Elin Modding Docs Doc
Loading...
Searching...
No Matches
WidgetMemo.cs
1using System;
2using UnityEngine.UI;
3
4// Token: 0x02000621 RID: 1569
5public class WidgetMemo : Widget
6{
7 // Token: 0x17000C91 RID: 3217
8 // (get) Token: 0x06002BE0 RID: 11232 RVA: 0x000F6A00 File Offset: 0x000F4C00
9 public override bool AlwaysBottom
10 {
11 get
12 {
13 return true;
14 }
15 }
16
17 // Token: 0x17000C92 RID: 3218
18 // (get) Token: 0x06002BE1 RID: 11233 RVA: 0x000F6A03 File Offset: 0x000F4C03
19 public override Type SetSiblingAfter
20 {
21 get
22 {
23 return typeof(WidgetSideScreen);
24 }
25 }
26
27 // Token: 0x06002BE2 RID: 11234 RVA: 0x000F6A0F File Offset: 0x000F4C0F
28 public override void OnActivate()
29 {
30 this.input.text = EMono.player.memo;
31 this.buttonEdit.SetOnClick(delegate
32 {
33 this.ToggleInput(!this.input.isFocused);
34 });
35 WidgetMemo.Instance = this;
36 }
37
38 // Token: 0x06002BE3 RID: 11235 RVA: 0x000F6A43 File Offset: 0x000F4C43
39 public override void OnDeactivate()
40 {
41 EMono.player.memo = this.input.text;
42 }
43
44 // Token: 0x06002BE4 RID: 11236 RVA: 0x000F6A5A File Offset: 0x000F4C5A
45 public void ToggleInput(bool enable)
46 {
47 this.input.interactable = enable;
48 this.bgInput.enabled = enable;
49 this.textInput.raycastTarget = enable;
50 this.buttonClose.SetActive(enable);
51 if (enable)
52 {
53 this.input.Select();
54 }
55 }
56
57 // Token: 0x06002BE5 RID: 11237 RVA: 0x000F6A9A File Offset: 0x000F4C9A
58 public override void OnUpdateConfig()
59 {
60 EMono.player.memo = this.input.text;
61 }
62
63 // Token: 0x06002BE6 RID: 11238 RVA: 0x000F6AB1 File Offset: 0x000F4CB1
64 private void Update()
65 {
66 if (!this.input.isFocused)
67 {
68 if (this.input.interactable && !InputModuleEX.IsPointerChildOf(this))
69 {
70 this.ToggleInput(false);
71 return;
72 }
73 }
74 else if (!this.bgInput.enabled)
75 {
76 this.ToggleInput(true);
77 }
78 }
79
80 // Token: 0x04001873 RID: 6259
81 public static WidgetMemo Instance;
82
83 // Token: 0x04001874 RID: 6260
84 public InputField input;
85
86 // Token: 0x04001875 RID: 6261
87 public Window window;
88
89 // Token: 0x04001876 RID: 6262
90 public Image bgInput;
91
92 // Token: 0x04001877 RID: 6263
93 public Text textInput;
94
95 // Token: 0x04001878 RID: 6264
96 public UIButton buttonClose;
97
98 // Token: 0x04001879 RID: 6265
99 public UIButton buttonEdit;
100}
Definition EMono.cs:6