96 {
97 Player player = Main.player[Main.myPlayer];
98 string text =
string.Empty;
99 if (Main.editChest)
100 {
101 text = Main.npcChatText;
102 Main.instance.textBlinkerCount++;
103 if (Main.instance.textBlinkerCount >= 20)
104 {
105 if (Main.instance.textBlinkerState == 0)
106 {
107 Main.instance.textBlinkerState = 1;
108 }
109 else
110 {
111 Main.instance.textBlinkerState = 0;
112 }
113 Main.instance.textBlinkerCount = 0;
114 }
115 if (Main.instance.textBlinkerState == 1)
116 {
118 }
119 Main.instance.DrawWindowsIMEPanel(
new Vector2(120f, 518f));
120 }
121 else if (player.chest > -1)
122 {
123 if (Main.chest[player.chest] == null)
124 {
125 Main.chest[player.chest] = new Chest();
126 }
127 Chest chest = Main.chest[player.chest];
128 if (chest.name != "")
129 {
131 }
132 else
133 {
134 Tile tile = Main.tile[player.chestX, player.chestY];
135 if (tile.type == 21)
136 {
137 text = Lang.chestType[tile.frameX / 36].Value;
138 }
139 else if (tile.type == 467 && tile.frameX / 36 == 4)
140 {
141 text = Lang.GetItemNameValue(3988);
142 }
143 else if (tile.type == 467)
144 {
145 text = Lang.chestType2[tile.frameX / 36].Value;
146 }
147 else if (tile.type == 88)
148 {
149 text = Lang.dresserType[tile.frameX / 54].Value;
150 }
151 }
152 }
153 else if (player.chest == -2)
154 {
155 text = Lang.inter[32].Value;
156 }
157 else if (player.chest == -3)
158 {
159 text = Lang.inter[33].Value;
160 }
161 else if (player.chest == -4)
162 {
163 text = Lang.GetItemNameValue(3813);
164 }
165 else if (player.chest == -5)
166 {
167 text = Lang.GetItemNameValue(4076);
168 }
169 Color color =
new Color(Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor);
170 color = Color.White * (1f - (255f - (float)(int)Main.mouseTextColor) / 255f * 0.5f);
171 color.A = byte.MaxValue;
175 {
176 ChatManager.
DrawColorCodedStringWithShadow(
spritebatch,
FontAssets.
MouseText.Value, text,
new Vector2(504f, Main.instance.invBottom + i * 26), color, 0f,
Vector2.
Zero,
Vector2.
One, -1f, 1.5f);
177 }
178 }
static Asset< DynamicSpriteFont > MouseText
static Vector2 DrawColorCodedStringWithShadow(SpriteBatch spriteBatch, DynamicSpriteFont font, TextSnippet[] snippets, Vector2 position, float rotation, Vector2 origin, Vector2 baseScale, out int hoveredSnippet, float maxWidth=-1f, float spread=2f)