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

◆ DrawRadialDpad()

static void Terraria.UI.ItemSlot.DrawRadialDpad ( SpriteBatch sb,
Vector2 position )
inlinestatic

Definition at line 3512 of file ItemSlot.cs.

3513 {
3514 //IL_0062: Unknown result type (might be due to invalid IL or missing references)
3515 //IL_0068: Unknown result type (might be due to invalid IL or missing references)
3516 //IL_006d: Unknown result type (might be due to invalid IL or missing references)
3517 //IL_0071: Unknown result type (might be due to invalid IL or missing references)
3518 //IL_007c: Unknown result type (might be due to invalid IL or missing references)
3519 //IL_0084: Unknown result type (might be due to invalid IL or missing references)
3520 //IL_008e: Unknown result type (might be due to invalid IL or missing references)
3521 //IL_00c8: Unknown result type (might be due to invalid IL or missing references)
3522 //IL_00d7: Unknown result type (might be due to invalid IL or missing references)
3523 //IL_00ee: Unknown result type (might be due to invalid IL or missing references)
3524 //IL_00f4: Unknown result type (might be due to invalid IL or missing references)
3525 //IL_00f6: Unknown result type (might be due to invalid IL or missing references)
3526 //IL_00fb: Unknown result type (might be due to invalid IL or missing references)
3527 //IL_010b: Unknown result type (might be due to invalid IL or missing references)
3528 //IL_0110: Unknown result type (might be due to invalid IL or missing references)
3529 //IL_0115: Unknown result type (might be due to invalid IL or missing references)
3530 if (!PlayerInput.UsingGamepad || !PlayerInput.CurrentProfile.UsingDpadHotbar())
3531 {
3532 return;
3533 }
3534 Player player = Main.player[Main.myPlayer];
3535 if (player.chest != -1)
3536 {
3537 return;
3538 }
3539 Texture2D value = TextureAssets.HotbarRadial[0].Value;
3540 float num = (float)(int)Main.mouseTextColor / 255f;
3541 float num2 = 1f - (1f - num) * (1f - num);
3542 num2 *= 0.785f;
3543 Color color = Color.White * num2;
3544 sb.Draw(value, position, (Rectangle?)null, color, 0f, value.Size() / 2f, Main.inventoryScale, (SpriteEffects)0, 0f);
3545 for (int i = 0; i < 4; i++)
3546 {
3547 int num3 = player.DpadRadial.Bindings[i];
3548 if (num3 != -1)
3549 {
3550 Draw(sb, player.inventory, 14, num3, position + Utils.RotatedBy(new Vector2((float)(value.Width / 3), 0f), -(float)Math.PI / 2f + (float)Math.PI / 2f * (float)i) + new Vector2(-26f * Main.inventoryScale), Color.White);
3551 }
3552 }
3553 }
static Asset< Texture2D >[] HotbarRadial
static PlayerInputProfile CurrentProfile
static void Draw(SpriteBatch spriteBatch, ref Item inv, int context, Vector2 position, Color lightColor=default(Color))
Definition ItemSlot.cs:1814

References Terraria.Player.SelectionRadial.Bindings, Terraria.Player.chest, Terraria.GameInput.PlayerInput.CurrentProfile, Terraria.Player.DpadRadial, Terraria.UI.ItemSlot.Draw(), Terraria.GameContent.TextureAssets.HotbarRadial, Terraria.Player.inventory, Terraria.Main.inventoryScale, Terraria.Main.myPlayer, Terraria.Main.player, Terraria.Utils.RotatedBy(), and Terraria.GameInput.PlayerInput.UsingGamepad.

Referenced by Terraria.Main.DrawInventory().

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