TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ DrawSelf()

override void Terraria.ModLoader.UI.UIModItem.DrawSelf ( SpriteBatch spriteBatch)
inlineprotectedvirtual

Reimplemented from Terraria.GameContent.UI.Elements.UIPanel.

Definition at line 478 of file UIModItem.cs.

479 {
480 //IL_0040: Unknown result type (might be due to invalid IL or missing references)
481 //IL_004a: Unknown result type (might be due to invalid IL or missing references)
482 //IL_0054: Unknown result type (might be due to invalid IL or missing references)
483 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
484 //IL_0156: Unknown result type (might be due to invalid IL or missing references)
485 //IL_0161: Unknown result type (might be due to invalid IL or missing references)
486 //IL_0166: Unknown result type (might be due to invalid IL or missing references)
487 //IL_016b: Unknown result type (might be due to invalid IL or missing references)
488 //IL_0177: Unknown result type (might be due to invalid IL or missing references)
489 //IL_0183: Unknown result type (might be due to invalid IL or missing references)
490 //IL_018d: Unknown result type (might be due to invalid IL or missing references)
491 //IL_0197: Unknown result type (might be due to invalid IL or missing references)
492 //IL_01ac: Unknown result type (might be due to invalid IL or missing references)
493 //IL_01b3: Unknown result type (might be due to invalid IL or missing references)
494 //IL_01be: Unknown result type (might be due to invalid IL or missing references)
495 //IL_01c3: Unknown result type (might be due to invalid IL or missing references)
496 //IL_01c6: Unknown result type (might be due to invalid IL or missing references)
497 //IL_01cb: Unknown result type (might be due to invalid IL or missing references)
498 //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
499 //IL_00fa: Unknown result type (might be due to invalid IL or missing references)
500 //IL_00ff: Unknown result type (might be due to invalid IL or missing references)
501 //IL_0104: Unknown result type (might be due to invalid IL or missing references)
502 //IL_0124: Unknown result type (might be due to invalid IL or missing references)
503 //IL_0125: Unknown result type (might be due to invalid IL or missing references)
504 //IL_013a: Unknown result type (might be due to invalid IL or missing references)
505 base.DrawSelf(spriteBatch);
507 Vector2 drawPos = default(Vector2);
508 ((Vector2)(ref drawPos))._002Ector(innerDimensions.X + 5f + (float)_modIconAdjust, innerDimensions.Y + 30f);
509 spriteBatch.Draw(UICommon.DividerTexture.Value, drawPos, (Rectangle?)null, Color.White, 0f, Vector2.Zero, new Vector2((innerDimensions.Width - 10f - (float)_modIconAdjust) / 8f, 1f), (SpriteEffects)0, 0f);
510 ((Vector2)(ref drawPos))._002Ector(innerDimensions.X + 10f + (float)_modIconAdjust, innerDimensions.Y + 45f);
511 if (_mod.properties.side != ModSide.Server && (_mod.Enabled != _loaded || _configChangesRequireReload))
512 {
513 drawPos += new Vector2(_uiModStateText.Width.Pixels + left2ndLine, 0f);
514 Utils.DrawBorderString(spriteBatch, _configChangesRequireReload ? Language.GetTextValue("tModLoader.ModReloadForced") : Language.GetTextValue("tModLoader.ModReloadRequired"), drawPos, Color.White);
515 }
516 if (_mod.properties.side == ModSide.Server)
517 {
518 drawPos += new Vector2(90f, -2f);
519 spriteBatch.Draw(UICommon.ModBrowserIconsTexture.Value, drawPos, (Rectangle?)new Rectangle(170, 102, 32, 32), Color.White, 0f, Vector2.Zero, 1f, (SpriteEffects)0, 0f);
520 Rectangle val = new Rectangle((int)drawPos.X, (int)drawPos.Y, 32, 32);
521 if (((Rectangle)(ref val)).Contains(Main.MouseScreen.ToPoint()))
522 {
523 UICommon.DrawHoverStringInBounds(spriteBatch, Language.GetTextValue("tModLoader.ModIsServerSide"));
524 }
525 }
527 if (moreInfoButton != null && moreInfoButton.IsMouseHovering)
528 {
529 _tooltip = Language.GetTextValue("tModLoader.ModsMoreInfo");
530 return;
531 }
533 if (deleteModButton != null && deleteModButton.IsMouseHovering)
534 {
535 _tooltip = Language.GetTextValue("UI.Delete");
536 return;
537 }
538 UIText modName = _modName;
539 if (modName != null && modName.IsMouseHovering)
540 {
541 LocalMod mod = _mod;
542 if (mod != null && mod.properties.author.Length > 0)
543 {
544 _tooltip = Language.GetTextValue("tModLoader.ModsByline", _mod.properties.author);
545 return;
546 }
547 }
548 UIModStateText uiModStateText = _uiModStateText;
549 if (uiModStateText != null && uiModStateText.IsMouseHovering)
550 {
552 return;
553 }
555 if (configButton != null && configButton.IsMouseHovering)
556 {
557 _tooltip = Language.GetTextValue("tModLoader.ModsOpenConfig");
558 return;
559 }
561 if (uIImageFramed != null && uIImageFramed.IsMouseHovering)
562 {
563 if (previousVersionHint == null)
564 {
565 _tooltip = Language.GetTextValue("tModLoader.ModAddedSinceLastLaunchMessage");
566 }
567 else
568 {
569 _tooltip = Language.GetTextValue("tModLoader.ModUpdatedSinceLastLaunchMessage", previousVersionHint);
570 }
571 return;
572 }
574 if (uIAutoScaleTextTextPanel != null && uIAutoScaleTextTextPanel.IsMouseHovering)
575 {
576 _tooltip = Language.GetTextValue("tModLoader.SwitchVersionInfoButton");
577 return;
578 }
580 if (modReferenceIcon != null && modReferenceIcon.IsMouseHovering)
581 {
582 string refs2 = string.Join(", ", _mod.properties.modReferences);
583 _tooltip = Language.GetTextValue("tModLoader.ModDependencyTooltip", refs2);
584 return;
585 }
587 if (translationModIcon != null && translationModIcon.IsMouseHovering)
588 {
589 string refs = string.Join(", ", _mod.properties.RefNames(includeWeak: true));
590 _tooltip = Language.GetTextValue("tModLoader.TranslationModTooltip", refs);
591 }
592 }
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
readonly BuildProperties properties
Definition LocalMod.cs:9
UIAutoScaleTextTextPanel< string > tMLUpdateRequired
Definition UIModItem.cs:44
CalculatedStyle GetInnerDimensions()
Definition UIElement.cs:455
StyleDimension Width
Definition UIElement.cs:27

References Terraria.ModLoader.UI.UIModItem._configButton, Terraria.ModLoader.UI.UIModItem._configChangesRequireReload, Terraria.ModLoader.UI.UIModItem._deleteModButton, Terraria.ModLoader.UI.UIModItem._loaded, Terraria.ModLoader.UI.UIModItem._mod, Terraria.ModLoader.UI.UIModItem._modIconAdjust, Terraria.ModLoader.UI.UIModItem._modName, Terraria.ModLoader.UI.UIModItem._modReferenceIcon, Terraria.ModLoader.UI.UIModItem._moreInfoButton, Terraria.ModLoader.UI.UIModItem._tooltip, Terraria.ModLoader.UI.UIModItem._translationModIcon, Terraria.ModLoader.UI.UIModItem._uiModStateText, Terraria.ModLoader.UI.UICommon.DividerTexture, Terraria.Utils.DrawBorderString(), Terraria.ModLoader.UI.UICommon.DrawHoverStringInBounds(), Terraria.UI.UIElement.GetInnerDimensions(), Terraria.Localization.Language.GetTextValue(), Terraria.UI.UIElement.IsMouseHovering, Terraria.ModLoader.UI.UIModItem.left2ndLine, Terraria.ModLoader.UI.UICommon.ModBrowserIconsTexture, Terraria.Main.MouseScreen, Terraria.UI.StyleDimension.Pixels, Terraria.ModLoader.UI.UIModItem.previousVersionHint, Terraria.ModLoader.Core.LocalMod.properties, Terraria.ModLoader.UI.UIModItem.tMLUpdateRequired, Terraria.ModLoader.UI.UIModItem.ToggleModStateText, Terraria.ModLoader.UI.UIModItem.updatedModDot, and Terraria.UI.UIElement.Width.

+ Here is the call graph for this function: