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

◆ DrawThickCursor()

static Vector2 Terraria.Main.DrawThickCursor ( bool smart = false)
inlinestatic

Definition at line 62091 of file Main.cs.

62092 {
62093 //IL_022b: Unknown result type (might be due to invalid IL or missing references)
62094 //IL_001e: Unknown result type (might be due to invalid IL or missing references)
62095 //IL_002e: Unknown result type (might be due to invalid IL or missing references)
62096 //IL_007b: Unknown result type (might be due to invalid IL or missing references)
62097 //IL_0080: Unknown result type (might be due to invalid IL or missing references)
62098 //IL_0062: Unknown result type (might be due to invalid IL or missing references)
62099 //IL_0095: Unknown result type (might be due to invalid IL or missing references)
62100 //IL_009a: Unknown result type (might be due to invalid IL or missing references)
62101 //IL_0225: Unknown result type (might be due to invalid IL or missing references)
62102 //IL_00ff: Unknown result type (might be due to invalid IL or missing references)
62103 //IL_0106: Unknown result type (might be due to invalid IL or missing references)
62104 //IL_010b: Unknown result type (might be due to invalid IL or missing references)
62105 //IL_010d: Unknown result type (might be due to invalid IL or missing references)
62106 //IL_010f: Unknown result type (might be due to invalid IL or missing references)
62107 //IL_0119: Unknown result type (might be due to invalid IL or missing references)
62108 //IL_011e: Unknown result type (might be due to invalid IL or missing references)
62109 //IL_0123: Unknown result type (might be due to invalid IL or missing references)
62110 //IL_01ef: Unknown result type (might be due to invalid IL or missing references)
62111 //IL_01f4: Unknown result type (might be due to invalid IL or missing references)
62112 //IL_01f6: Unknown result type (might be due to invalid IL or missing references)
62113 //IL_01fd: Unknown result type (might be due to invalid IL or missing references)
62114 //IL_0203: Unknown result type (might be due to invalid IL or missing references)
62115 //IL_01ae: Unknown result type (might be due to invalid IL or missing references)
62116 //IL_01b3: Unknown result type (might be due to invalid IL or missing references)
62117 //IL_01c1: Unknown result type (might be due to invalid IL or missing references)
62118 //IL_01cb: Unknown result type (might be due to invalid IL or missing references)
62119 //IL_01d0: Unknown result type (might be due to invalid IL or missing references)
62120 //IL_0158: Unknown result type (might be due to invalid IL or missing references)
62121 //IL_015d: Unknown result type (might be due to invalid IL or missing references)
62122 //IL_016f: Unknown result type (might be due to invalid IL or missing references)
62123 //IL_0187: Unknown result type (might be due to invalid IL or missing references)
62124 //IL_018c: Unknown result type (might be due to invalid IL or missing references)
62125 //IL_0196: Unknown result type (might be due to invalid IL or missing references)
62126 //IL_019b: Unknown result type (might be due to invalid IL or missing references)
62127 //IL_019d: Unknown result type (might be due to invalid IL or missing references)
62128 //IL_01a3: Unknown result type (might be due to invalid IL or missing references)
62129 //IL_01a8: Unknown result type (might be due to invalid IL or missing references)
62130 if (ThickMouse)
62131 {
62134 {
62135 return Vector2.Zero;
62136 }
62138 {
62139 return Vector2.Zero;
62140 }
62141 if (showGamepadCursor && player[myPlayer].dead && !player[myPlayer].ghost && !gameMenu)
62142 {
62143 return Vector2.Zero;
62144 }
62145 bool flag = UILinkPointNavigator.Available && !PlayerInput.InBuildingMode;
62147 int num = 11;
62148 num += smart.ToInt();
62149 Vector2 origin = default(Vector2);
62150 for (int i = 0; i < 4; i++)
62151 {
62152 Vector2 vector = Vector2.Zero;
62153 switch (i)
62154 {
62155 case 0:
62156 ((Vector2)(ref vector))._002Ector(0f, 1f);
62157 break;
62158 case 1:
62159 ((Vector2)(ref vector))._002Ector(1f, 0f);
62160 break;
62161 case 2:
62162 ((Vector2)(ref vector))._002Ector(0f, -1f);
62163 break;
62164 case 3:
62165 ((Vector2)(ref vector))._002Ector(-1f, 0f);
62166 break;
62167 }
62168 vector *= 1f;
62169 vector += Vector2.One * 2f;
62170 ((Vector2)(ref origin))._002Ector(2f);
62171 Rectangle? sourceRectangle = null;
62172 float scale = cursorScale * 1.1f;
62174 {
62175 if (smart && !flag)
62176 {
62177 num = 13;
62178 int frameX = 0;
62179 vector = Vector2.One;
62180 sourceRectangle = TextureAssets.Cursors[num].Frame(2, 1, frameX);
62181 origin = TextureAssets.Cursors[num].Frame(2, 1, frameX).Size() / 2f;
62183 }
62184 else
62185 {
62186 num = 15;
62187 vector = Vector2.One;
62188 origin = TextureAssets.Cursors[num].Value.Size() / 2f;
62189 }
62190 }
62191 spriteBatch.Draw(TextureAssets.Cursors[num].Value, new Vector2((float)mouseX, (float)mouseY) + vector, sourceRectangle, mouseBorderColor, 0f, origin, scale, (SpriteEffects)0, 0f);
62192 }
62193 return new Vector2(2f);
62194 }
62195 return Vector2.Zero;
62196 }
static Asset< Texture2D >[] Cursors
static SpriteBatch spriteBatch
Definition Main.cs:1043
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
Definition Main.cs:1958
static Color MouseBorderColor
Definition Main.cs:289
static bool alreadyGrabbingSunOrMoon
Definition Main.cs:1385
static float cursorScale
Definition Main.cs:2298
static float GamepadCursorAlpha
Definition Main.cs:2610
static bool ThickMouse
Definition Main.cs:2827
static int mouseY
Definition Main.cs:634
static bool gameMenu
Definition Main.cs:2076
static Player[] player
Definition Main.cs:1960
static int mouseX
Definition Main.cs:632

References Terraria.Main.alreadyGrabbingSunOrMoon, Terraria.GameContent.TextureAssets.Cursors, Terraria.Main.cursorScale, Terraria.Main.gameMenu, Terraria.Main.GamepadCursorAlpha, Terraria.GameInput.PlayerInput.InBuildingMode, Terraria.GameInput.PlayerInput.InvisibleGamepadInMenus, Terraria.Main.MouseBorderColor, Terraria.Main.mouseX, Terraria.Main.mouseY, Terraria.Main.myPlayer, Terraria.Main.player, Terraria.GameInput.PlayerInput.SettingsForUI.ShowGamepadCursor, Terraria.Main.spriteBatch, and Terraria.Main.ThickMouse.

Referenced by Terraria.Main.DoDraw(), Terraria.UI.IngameFancyUI.Draw(), Terraria.Utils.DrawCursorSingle(), Terraria.Main.DrawInterface_36_Cursor(), Terraria.Main.DrawMap(), and Terraria.Main.DrawMenu().

+ Here is the caller graph for this function: