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

◆ DrawInterface_36_Cursor()

static void Terraria.Main.DrawInterface_36_Cursor ( )
inlinestaticprivate

Definition at line 58404 of file Main.cs.

58405 {
58406 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
58407 //IL_0089: Unknown result type (might be due to invalid IL or missing references)
58408 //IL_008e: Unknown result type (might be due to invalid IL or missing references)
58409 //IL_009c: Unknown result type (might be due to invalid IL or missing references)
58410 //IL_0214: Unknown result type (might be due to invalid IL or missing references)
58411 //IL_0207: Unknown result type (might be due to invalid IL or missing references)
58412 //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
58413 //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
58414 //IL_0104: Unknown result type (might be due to invalid IL or missing references)
58415 //IL_0109: Unknown result type (might be due to invalid IL or missing references)
58416 //IL_0121: Unknown result type (might be due to invalid IL or missing references)
58417 //IL_0126: Unknown result type (might be due to invalid IL or missing references)
58418 //IL_014f: Unknown result type (might be due to invalid IL or missing references)
58419 //IL_015e: Unknown result type (might be due to invalid IL or missing references)
58420 //IL_0161: Unknown result type (might be due to invalid IL or missing references)
58421 //IL_0173: Unknown result type (might be due to invalid IL or missing references)
58422 //IL_0178: Unknown result type (might be due to invalid IL or missing references)
58423 //IL_01bd: Unknown result type (might be due to invalid IL or missing references)
58424 //IL_01cc: Unknown result type (might be due to invalid IL or missing references)
58425 //IL_01cf: Unknown result type (might be due to invalid IL or missing references)
58426 //IL_01e1: Unknown result type (might be due to invalid IL or missing references)
58427 //IL_01e6: Unknown result type (might be due to invalid IL or missing references)
58428 spriteBatch.End();
58429 spriteBatch.Begin((SpriteSortMode)0, BlendState.AlphaBlend, SamplerStateForCursor, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect)null, UIScaleMatrix);
58430 if (cursorOverride != -1)
58431 {
58432 Color color = default(Color);
58433 ((Color)(ref color))._002Ector((int)((float)(int)((Color)(ref cursorColor)).R * 0.2f), (int)((float)(int)((Color)(ref cursorColor)).G * 0.2f), (int)((float)(int)((Color)(ref cursorColor)).B * 0.2f), (int)((float)(int)((Color)(ref cursorColor)).A * 0.5f));
58434 Color white = cursorColor;
58435 bool flag = true;
58436 bool flag2 = true;
58437 float rotation = 0f;
58438 Vector2 vector = default(Vector2);
58439 float num = 1f;
58440 if (cursorOverride == 2)
58441 {
58442 flag = false;
58443 white = Color.White;
58444 num = 0.7f;
58445 ((Vector2)(ref vector))._002Ector(0.1f);
58446 }
58447 switch (cursorOverride)
58448 {
58449 case 2:
58450 flag = false;
58451 white = Color.White;
58452 num = 0.7f;
58453 ((Vector2)(ref vector))._002Ector(0.1f);
58454 break;
58455 case 3:
58456 case 6:
58457 case 7:
58458 case 8:
58459 case 9:
58460 case 10:
58461 flag = false;
58462 white = Color.White;
58463 break;
58464 }
58465 if (flag)
58466 {
58467 spriteBatch.Draw(TextureAssets.Cursors[cursorOverride].Value, new Vector2((float)(mouseX + 1), (float)(mouseY + 1)), (Rectangle?)null, color, rotation, vector * TextureAssets.Cursors[cursorOverride].Value.Size(), cursorScale * 1.1f * num, (SpriteEffects)0, 0f);
58468 }
58469 if (flag2)
58470 {
58471 spriteBatch.Draw(TextureAssets.Cursors[cursorOverride].Value, new Vector2((float)mouseX, (float)mouseY), (Rectangle?)null, white, rotation, vector * TextureAssets.Cursors[cursorOverride].Value.Size(), cursorScale * num, (SpriteEffects)0, 0f);
58472 }
58473 }
58474 else if (SmartCursorIsUsed)
58475 {
58477 }
58478 else
58479 {
58481 }
58482 }
static Asset< Texture2D >[] Cursors
static SpriteBatch spriteBatch
Definition Main.cs:1043
static int cursorOverride
Definition Main.cs:2268
static Vector2 DrawThickCursor(bool smart=false)
Definition Main.cs:62091
static void DrawCursor(Vector2 bonus, bool smart=false)
Definition Main.cs:61952
static Matrix UIScaleMatrix
Definition Main.cs:2777
static SamplerState SamplerStateForCursor
Definition Main.cs:1049
static float cursorScale
Definition Main.cs:2298
static bool SmartCursorIsUsed
Definition Main.cs:3027
static int mouseY
Definition Main.cs:634
static Color cursorColor
Definition Main.cs:2292
static int mouseX
Definition Main.cs:632

References Terraria.Graphics.Light.Color, Terraria.Main.cursorColor, Terraria.Main.cursorOverride, Terraria.GameContent.TextureAssets.Cursors, Terraria.Main.cursorScale, Terraria.Main.DrawCursor(), Terraria.Main.DrawThickCursor(), Terraria.Main.mouseX, Terraria.Main.mouseY, Terraria.Main.SamplerStateForCursor, Terraria.Main.SmartCursorIsUsed, Terraria.Main.spriteBatch, and Terraria.Main.UIScaleMatrix.

Referenced by Terraria.Main.DrawPendingMouseText(), and Terraria.Main.SetupDrawInterfaceLayers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: