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
UICharacterNameButton.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Runtime.InteropServices
;
3
using
Microsoft.Xna.Framework.Graphics
;
4
using
ReLogic.Content
;
5
using
Terraria.Localization
;
6
using
Terraria.UI
;
7
8
namespace
Terraria.GameContent.UI.Elements
9
{
10
// Token: 0x02000AA8 RID: 2728
11
public
class
UICharacterNameButton
:
UIElement
12
{
13
// Token: 0x06005064 RID: 20580 RVA: 0x0027D02C File Offset: 0x0027B22C
14
public
UICharacterNameButton
(
LocalizedText
titleText
,
LocalizedText
emptyContentText
, [Optional]
LocalizedText
description)
15
{
16
int
num = 16800;
17
this.DistanceFromTitleToOption
= (float)num;
18
if
(num == 0)
19
{
20
}
21
base
..ctor();
22
if
(num == 0)
23
{
24
}
25
int
num2
= 16928;
26
this.Description
= description;
27
if
(
num2
== 0)
28
{
29
}
30
}
31
32
// Token: 0x06005065 RID: 20581 RVA: 0x0027D09C File Offset: 0x0027B29C
33
protected
override
void
DrawSelf
(
SpriteBatch
spriteBatch)
34
{
35
if
(!this.
_hovered
)
36
{
37
return
;
38
}
39
if
(this.
_soundedHover
)
40
{
41
return
;
42
}
43
this._soundedHover
=
true
;
44
Asset<Texture2D>
basePanelTexture
= this.
_BasePanelTexture
;
45
float
x = this.
_dimensions
.
X
;
46
float
y = this.
_dimensions
.
Y
;
47
float
width = this.
_dimensions
.
Width
;
48
float
height = this.
_dimensions
.
Height
;
49
if
(this.
_hovered
)
50
{
51
Asset<Texture2D>
hoveredBorderTexture
= this.
_hoveredBorderTexture
;
52
if
(32640 == 0)
53
{
54
}
55
if
(32768 == 0)
56
{
57
}
58
}
59
}
60
61
// Token: 0x06005066 RID: 20582 RVA: 0x0027D11C File Offset: 0x0027B31C
62
public
void
SetContents
(
string
name
)
63
{
64
this.actualContents
=
name
;
65
bool
flag =
string
.IsNullOrEmpty(
name
);
66
UIText
text
= this.
_text
;
67
UIText
text2 = this.
_text
;
68
LocalizedText
textToShowWhenEmpty
= this.
_textToShowWhenEmpty
;
69
text2.
SetText
(
textToShowWhenEmpty
);
70
}
71
72
// Token: 0x06005067 RID: 20583 RVA: 0x0027D198 File Offset: 0x0027B398
73
public
void
TrimDisplayIfOverElementDimensions
(
int
padding)
74
{
75
float
x = this.
_dimensions
.
X
;
76
float
y = this.
_dimensions
.
Y
;
77
float
width = this.
_dimensions
.
Width
;
78
float
height = this.
_dimensions
.
Height
;
79
UIText
text
= this.
_text
;
80
float
x2
= text.
_dimensions
.
X
;
81
float
y2
=
text
._dimensions.Y;
82
float
width2
=
text
._dimensions.Width;
83
float
height2
=
text
._dimensions.Height;
84
UIText
text2 = this.
_text
;
85
string
text3
= text2.
Text
;
86
int
stringLength
= this.
_text
.
Text
._stringLength;
87
long
num = 0
L
;
88
string
text4
;
89
text2.
SetText
(
text4
);
90
UIText
text5
= this.
_text
;
91
float
x3
= text5.
_dimensions
.
X
;
92
float
y3
=
text5
._dimensions.Y;
93
float
width3
=
text5
._dimensions.Width;
94
float
height3
=
text5
._dimensions.Height;
95
UIText
text6
= this.
_text
;
96
string
text7
= text6.
Text
;
97
int
stringLength2
= this.
_text
.
Text
._stringLength;
98
long
num2
= 0
L
;
99
string
text8
= text7.Substring((
int
)
num2
, (
int
)num) +
"…"
;
100
text6
.SetText(
text8
);
101
}
102
103
// Token: 0x06005068 RID: 20584 RVA: 0x0027D2D0 File Offset: 0x0027B4D0
104
public
override
void
LeftMouseDown
(
UIMouseEvent
evt
)
105
{
106
base
.LeftMouseDown(
evt
);
107
}
108
109
// Token: 0x06005069 RID: 20585 RVA: 0x0027D2E4 File Offset: 0x0027B4E4
110
public
override
void
MouseOver
(
UIMouseEvent
evt
)
111
{
112
base
.MouseOver(
evt
);
113
this._hovered
=
true
;
114
}
115
116
// Token: 0x0600506A RID: 20586 RVA: 0x0027D300 File Offset: 0x0027B500
117
public
override
void
MouseOut
(
UIMouseEvent
evt
)
118
{
119
base
.MouseOut(
evt
);
120
}
121
122
// Token: 0x04008922 RID: 35106
123
private
readonly
Asset<Texture2D>
_BasePanelTexture
;
124
125
// Token: 0x04008923 RID: 35107
126
private
readonly
Asset<Texture2D>
_selectedBorderTexture
;
127
128
// Token: 0x04008924 RID: 35108
129
private
readonly
Asset<Texture2D>
_hoveredBorderTexture
;
130
131
// Token: 0x04008925 RID: 35109
132
private
bool
_hovered
;
133
134
// Token: 0x04008926 RID: 35110
135
private
bool
_soundedHover
;
136
137
// Token: 0x04008927 RID: 35111
138
private
readonly
LocalizedText
_textToShowWhenEmpty
;
139
140
// Token: 0x04008928 RID: 35112
141
private
string
actualContents
;
142
143
// Token: 0x04008929 RID: 35113
144
private
UIText
_text
;
145
146
// Token: 0x0400892A RID: 35114
147
private
UIText
_title
;
148
149
// Token: 0x0400892B RID: 35115
150
public
readonly
LocalizedText
Description
;
151
152
// Token: 0x0400892C RID: 35116
153
public
float
DistanceFromTitleToOption
;
154
}
155
}
j__TPar
class f__AnonymousType0<< Count > j__TPar
Definition
--f__AnonymousType0.cs:8
Microsoft.Xna.Framework.Graphics.SpriteBatch
Definition
SpriteBatch.cs:14
ReLogic.Content.Asset
Definition
Asset.cs:10
Terraria.GameContent.UI.Elements.UICharacterNameButton.DistanceFromTitleToOption
float DistanceFromTitleToOption
Definition
UICharacterNameButton.cs:153
Terraria.GameContent.UI.Elements.UICharacterNameButton._hovered
bool _hovered
Definition
UICharacterNameButton.cs:132
Terraria.GameContent.UI.Elements.UICharacterNameButton.MouseOver
override void MouseOver(UIMouseEvent evt)
Definition
UICharacterNameButton.cs:110
Terraria.GameContent.UI.Elements.UICharacterNameButton._selectedBorderTexture
readonly Asset< Texture2D > _selectedBorderTexture
Definition
UICharacterNameButton.cs:126
Terraria.GameContent.UI.Elements.UICharacterNameButton._soundedHover
bool _soundedHover
Definition
UICharacterNameButton.cs:135
Terraria.GameContent.UI.Elements.UICharacterNameButton.SetContents
void SetContents(string name)
Definition
UICharacterNameButton.cs:62
Terraria.GameContent.UI.Elements.UICharacterNameButton.Description
readonly LocalizedText Description
Definition
UICharacterNameButton.cs:150
Terraria.GameContent.UI.Elements.UICharacterNameButton.DrawSelf
override void DrawSelf(SpriteBatch spriteBatch)
Definition
UICharacterNameButton.cs:33
Terraria.GameContent.UI.Elements.UICharacterNameButton._title
UIText _title
Definition
UICharacterNameButton.cs:147
Terraria.GameContent.UI.Elements.UICharacterNameButton._hoveredBorderTexture
readonly Asset< Texture2D > _hoveredBorderTexture
Definition
UICharacterNameButton.cs:129
Terraria.GameContent.UI.Elements.UICharacterNameButton.MouseOut
override void MouseOut(UIMouseEvent evt)
Definition
UICharacterNameButton.cs:117
Terraria.GameContent.UI.Elements.UICharacterNameButton.UICharacterNameButton
UICharacterNameButton(LocalizedText titleText, LocalizedText emptyContentText, [Optional] LocalizedText description)
Definition
UICharacterNameButton.cs:14
Terraria.GameContent.UI.Elements.UICharacterNameButton.TrimDisplayIfOverElementDimensions
void TrimDisplayIfOverElementDimensions(int padding)
Definition
UICharacterNameButton.cs:73
Terraria.GameContent.UI.Elements.UICharacterNameButton.LeftMouseDown
override void LeftMouseDown(UIMouseEvent evt)
Definition
UICharacterNameButton.cs:104
Terraria.GameContent.UI.Elements.UICharacterNameButton._text
UIText _text
Definition
UICharacterNameButton.cs:144
Terraria.GameContent.UI.Elements.UICharacterNameButton._BasePanelTexture
readonly Asset< Texture2D > _BasePanelTexture
Definition
UICharacterNameButton.cs:123
Terraria.GameContent.UI.Elements.UICharacterNameButton.actualContents
string actualContents
Definition
UICharacterNameButton.cs:141
Terraria.GameContent.UI.Elements.UICharacterNameButton._textToShowWhenEmpty
readonly LocalizedText _textToShowWhenEmpty
Definition
UICharacterNameButton.cs:138
Terraria.GameContent.UI.Elements.UICharacterNameButton
Definition
UICharacterNameButton.cs:12
Terraria.GameContent.UI.Elements.UIText.SetText
void SetText(string text)
Definition
UIText.cs:266
Terraria.GameContent.UI.Elements.UIText.Text
string Text
Definition
UIText.cs:17
Terraria.GameContent.UI.Elements.UIText
Definition
UIText.cs:13
Terraria.Localization.LocalizedText
Definition
LocalizedText.cs:13
Terraria.UI.UIElement._dimensions
CalculatedStyle _dimensions
Definition
UIElement.cs:1172
Terraria.UI.UIElement
Definition
UIElement.cs:15
Terraria.UI.UIMouseEvent
Definition
UIMouseEvent.cs:8
Microsoft.Xna.Framework.Graphics
Definition
Blend.cs:4
ReLogic.Content
Definition
Asset.cs:7
System.Runtime.InteropServices
Definition
_Activator.cs:4
System.ExceptionArgument.text
@ text
System.ExceptionArgument.name
@ name
System.ConsoleKey.L
@ L
System
Definition
__ComObject.cs:4
Terraria.GameContent.UI.Elements
Definition
EmoteButton.cs:9
Terraria.Localization
Definition
GameCulture.cs:7
Terraria.UI
Definition
Alignment.cs:5
Terraria.UI.CalculatedStyle.X
float X
Definition
CalculatedStyle.cs:62
Terraria.UI.CalculatedStyle.Y
float Y
Definition
CalculatedStyle.cs:65
Terraria.UI.CalculatedStyle.Height
float Height
Definition
CalculatedStyle.cs:71
Terraria.UI.CalculatedStyle.Width
float Width
Definition
CalculatedStyle.cs:68
source
Terraria
GameContent
UI
Elements
UICharacterNameButton.cs
Generated by
1.10.0