terraria-cpp2il-methodrecon
v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
UITextBox.cs
Go to the documentation of this file.
1
using
System
;
2
using
Microsoft.Xna.Framework.Graphics
;
3
4
namespace
Terraria.GameContent.UI.Elements
5
{
6
// Token: 0x02000ACF RID: 2767
7
internal
class
UITextBox
:
UITextPanel
<string>
8
{
9
// Token: 0x06005175 RID: 20853 RVA: 0x002807F8 File Offset: 0x0027E9F8
10
public
UITextBox
(
string
text
,
float
textScale
= 1f,
bool
large
=
false
)
11
{
12
}
13
14
// Token: 0x06005176 RID: 20854 RVA: 0x00280814 File Offset: 0x0027EA14
15
public
void
Write
(
string
text
)
16
{
17
string
text2 =
base
.Text;
18
int
cursor
= this.
_cursor
;
19
string
text3
= text2.Insert(
cursor
,
text
);
20
int
cursor2
= this.
_cursor
;
21
int
stringLength
= text._stringLength;
22
this._cursor
=
cursor2
;
23
}
24
25
// Token: 0x06005177 RID: 20855 RVA: 0x00280850 File Offset: 0x0027EA50
26
public
override
void
SetText
(
string
text
,
float
textScale
,
bool
large
)
27
{
28
int
maxLength = this.
_maxLength
;
29
int
stringLength
= text._stringLength;
30
long
num = 0
L
;
31
string
text2 =
text
.Substring((
int
)num, maxLength);
32
string
text3
=
base
.Text;
33
int
stringLength2
=
text3
._stringLength;
34
int
cursor
= this.
_cursor
;
35
if
(text3 ==
null
)
36
{
37
}
38
int
num2
=
Math
.
Min
(
stringLength2
,
cursor
);
39
this._cursor
=
num2
;
40
}
41
42
// Token: 0x06005178 RID: 20856 RVA: 0x002808A8 File Offset: 0x0027EAA8
43
public
void
SetTextMaxLength
(
int
maxLength)
44
{
45
this._maxLength
= maxLength;
46
}
47
48
// Token: 0x06005179 RID: 20857 RVA: 0x002808BC File Offset: 0x0027EABC
49
public
void
Backspace
()
50
{
51
if
(this.
_cursor
!= 0)
52
{
53
string
text
=
base
.Text;
54
int
stringLength
=
base
.Text._stringLength;
55
return
;
56
}
57
}
58
59
// Token: 0x0600517A RID: 20858 RVA: 0x002808E8 File Offset: 0x0027EAE8
60
public
void
CursorLeft
()
61
{
62
int
cursor
= this.
_cursor
;
63
if
(cursor != 0)
64
{
65
this._cursor
=
cursor
;
66
}
67
}
68
69
// Token: 0x0600517B RID: 20859 RVA: 0x00280908 File Offset: 0x0027EB08
70
public
void
CursorRight
()
71
{
72
int
cursor
= this.
_cursor
;
73
int
stringLength
=
base
.Text._stringLength;
74
int
cursor2
= this.
_cursor
;
75
this._cursor
=
cursor2
;
76
}
77
78
// Token: 0x0600517C RID: 20860 RVA: 0x00280938 File Offset: 0x0027EB38
79
protected
override
void
DrawSelf
(
SpriteBatch
spriteBatch)
80
{
81
if
(!this.
HideSelf
)
82
{
83
int
stringLength
=
base
.Text._stringLength;
84
this._cursor
=
stringLength
;
85
base
.DrawSelf(spriteBatch);
86
int
frameCount = this.
_frameCount
;
87
this._frameCount
= frameCount;
88
bool
showInputTicker
= this.
ShowInputTicker
;
89
if
(showInputTicker)
90
{
91
float
x = this._innerDimensions.X;
92
if
(!
showInputTicker
)
93
{
94
}
95
string
text
=
base
.Text;
96
int
cursor
= this.
_cursor
;
97
long
num = 0
L
;
98
string
text2 =
text
.Substring((
int
)num,
cursor
);
99
if
(!
showInputTicker
)
100
{
101
}
102
if
(!
showInputTicker
)
103
{
104
}
105
return
;
106
}
107
}
108
}
109
110
// Token: 0x040089FB RID: 35323
111
private
int
_cursor
;
112
113
// Token: 0x040089FC RID: 35324
114
private
int
_frameCount
;
115
116
// Token: 0x040089FD RID: 35325
117
private
int
_maxLength
= 20;
118
119
// Token: 0x040089FE RID: 35326
120
public
bool
ShowInputTicker
=
true
;
121
122
// Token: 0x040089FF RID: 35327
123
public
bool
HideSelf
;
124
}
125
}
j__TPar
class f__AnonymousType0<< Count > j__TPar
Definition
--f__AnonymousType0.cs:8
Microsoft.Xna.Framework.Graphics.SpriteBatch
Definition
SpriteBatch.cs:14
System.Math.Min
static byte Min(byte val1, byte val2)
Definition
Math.cs:152
System.Math
Definition
Math.cs:11
Terraria.GameContent.UI.Elements.UITextBox.CursorRight
void CursorRight()
Definition
UITextBox.cs:70
Terraria.GameContent.UI.Elements.UITextBox.DrawSelf
override void DrawSelf(SpriteBatch spriteBatch)
Definition
UITextBox.cs:79
Terraria.GameContent.UI.Elements.UITextBox.Write
void Write(string text)
Definition
UITextBox.cs:15
Terraria.GameContent.UI.Elements.UITextBox.HideSelf
bool HideSelf
Definition
UITextBox.cs:123
Terraria.GameContent.UI.Elements.UITextBox.Backspace
void Backspace()
Definition
UITextBox.cs:49
Terraria.GameContent.UI.Elements.UITextBox._frameCount
int _frameCount
Definition
UITextBox.cs:114
Terraria.GameContent.UI.Elements.UITextBox._maxLength
int _maxLength
Definition
UITextBox.cs:117
Terraria.GameContent.UI.Elements.UITextBox.SetTextMaxLength
void SetTextMaxLength(int maxLength)
Definition
UITextBox.cs:43
Terraria.GameContent.UI.Elements.UITextBox.UITextBox
UITextBox(string text, float textScale=1f, bool large=false)
Definition
UITextBox.cs:10
Terraria.GameContent.UI.Elements.UITextBox.CursorLeft
void CursorLeft()
Definition
UITextBox.cs:60
Terraria.GameContent.UI.Elements.UITextBox.SetText
override void SetText(string text, float textScale, bool large)
Definition
UITextBox.cs:26
Terraria.GameContent.UI.Elements.UITextBox._cursor
int _cursor
Definition
UITextBox.cs:111
Terraria.GameContent.UI.Elements.UITextBox.ShowInputTicker
bool ShowInputTicker
Definition
UITextBox.cs:120
Terraria.GameContent.UI.Elements.UITextBox
Definition
UITextBox.cs:8
Terraria.GameContent.UI.Elements.UITextPanel
Definition
UITextPanel.cs:10
Microsoft.Xna.Framework.Graphics
Definition
Blend.cs:4
System.ExceptionArgument.text
@ text
System.ConsoleKey.L
@ L
System
Definition
__ComObject.cs:4
Terraria.GameContent.UI.Elements
Definition
EmoteButton.cs:9
source
Terraria
GameContent
UI
Elements
UITextBox.cs
Generated by
1.10.0