189 {
190 Player player = Main.player[Main.myPlayer];
191 if ((ID == 5 && player.chest < -1) || (ID == 6 && !Main.editChest))
192 {
194 return;
195 }
196 if (ID == 7 && player.chest != -5)
197 {
199 return;
200 }
201 int num = ID;
202 if (ID == 7)
203 {
204 num = 5;
205 }
209 switch (ID)
210 {
211 case 0:
212 text = Lang.inter[29].Value;
213 break;
214 case 1:
215 text = Lang.inter[30].Value;
216 break;
217 case 2:
218 text = Lang.inter[31].Value;
219 break;
220 case 3:
221 text = Lang.inter[82].Value;
222 break;
223 case 5:
224 text = Lang.inter[Main.editChest ? 47 : 61].Value;
225 break;
226 case 6:
227 text = Lang.inter[63].Value;
228 break;
229 case 4:
230 text = Lang.inter[122].Value;
231 break;
232 case 7:
234 break;
235 }
237 Color color =
new Color(Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor) *
num2;
238 color = Color.White * 0.97f * (1f - (255f - (float)(int)Main.mouseTextColor) / 255f * 0.5f);
239 color.A = byte.MaxValue;
241 bool flag = Utils.FloatIntersect(Main.mouseX, Main.mouseY, 0f, 0f, (
float)
X - vector.X / 2f,
Y - 12,
vector.X, 24f);
243 {
244 flag = Utils.FloatIntersect(Main.mouseX, Main.mouseY, 0f, 0f, (
float)
X - vector.X / 2f - 10f,
Y - 12, vector.X + 16f, 24f);
245 }
246 if (flag)
247 {
248 color = Main.OurFavoriteColor;
249 }
250 ChatManager.
DrawColorCodedStringWithShadow(spriteBatch,
FontAssets.
MouseText.Value, text,
new Vector2(X, Y), color, 0f,
vector / 2f,
new Vector2(
num2), -1f, 1.5f);
252 switch (ID)
253 {
254 case 0:
256 break;
257 case 1:
259 break;
260 case 2:
262 break;
263 case 5:
265 break;
266 case 6:
268 break;
269 case 3:
271 break;
272 case 4:
274 break;
275 case 7:
277 break;
278 }
279 if (!flag)
280 {
282 return;
283 }
286 {
287 return;
288 }
289 player.mouseInterface = true;
290 if (Main.mouseLeft && Main.mouseLeftRelease)
291 {
292 switch (ID)
293 {
294 case 0:
296 break;
297 case 1:
299 break;
300 case 2:
302 break;
303 case 5:
305 break;
306 case 6:
308 break;
309 case 3:
311 break;
312 case 4:
313 ItemSorting.SortChest();
314 break;
315 case 7:
317 break;
318 }
319 Recipe.FindRecipes();
320 }
321 }
static Asset< DynamicSpriteFont > MouseText
static string GetTextValue(string key)
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)
static float[] ButtonScale
static bool[] ButtonHovered
static void DepositAll(ContainerTransferContext context)
static void RenameChestCancel()
static void QuickStack(ContainerTransferContext context, bool voidStack=false)
static void RenameChest()
static void ToggleVacuum()
static void UpdateHover(int ID, bool hovering)
static void SetPosition(int ID, Vector2 Position)
static ContainerTransferContext FromUnknown(Player player)