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

◆ DrawRadialQuicks()

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

Definition at line 3404 of file ItemSlot.cs.

3405 {
3406 //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
3407 //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
3408 //IL_00c6: Unknown result type (might be due to invalid IL or missing references)
3409 //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
3410 //IL_0194: Unknown result type (might be due to invalid IL or missing references)
3411 //IL_01a5: Unknown result type (might be due to invalid IL or missing references)
3412 //IL_01ab: Unknown result type (might be due to invalid IL or missing references)
3413 //IL_01ad: Unknown result type (might be due to invalid IL or missing references)
3414 //IL_01b4: Unknown result type (might be due to invalid IL or missing references)
3415 //IL_01b9: Unknown result type (might be due to invalid IL or missing references)
3416 //IL_01da: Unknown result type (might be due to invalid IL or missing references)
3417 //IL_01db: Unknown result type (might be due to invalid IL or missing references)
3418 //IL_01dd: Unknown result type (might be due to invalid IL or missing references)
3419 //IL_01ec: Unknown result type (might be due to invalid IL or missing references)
3420 //IL_01f0: Unknown result type (might be due to invalid IL or missing references)
3421 //IL_01fb: Unknown result type (might be due to invalid IL or missing references)
3422 //IL_0205: Unknown result type (might be due to invalid IL or missing references)
3423 //IL_0234: Unknown result type (might be due to invalid IL or missing references)
3424 //IL_0235: Unknown result type (might be due to invalid IL or missing references)
3425 //IL_0237: Unknown result type (might be due to invalid IL or missing references)
3426 //IL_0247: Unknown result type (might be due to invalid IL or missing references)
3427 //IL_024c: Unknown result type (might be due to invalid IL or missing references)
3428 //IL_0251: Unknown result type (might be due to invalid IL or missing references)
3429 //IL_0262: Unknown result type (might be due to invalid IL or missing references)
3430 //IL_0263: Unknown result type (might be due to invalid IL or missing references)
3431 //IL_0265: Unknown result type (might be due to invalid IL or missing references)
3432 //IL_0274: Unknown result type (might be due to invalid IL or missing references)
3433 //IL_027e: Unknown result type (might be due to invalid IL or missing references)
3434 //IL_0285: Unknown result type (might be due to invalid IL or missing references)
3435 //IL_028c: Unknown result type (might be due to invalid IL or missing references)
3436 //IL_0291: Unknown result type (might be due to invalid IL or missing references)
3437 //IL_02a0: Unknown result type (might be due to invalid IL or missing references)
3438 //IL_02a4: Unknown result type (might be due to invalid IL or missing references)
3439 //IL_02af: Unknown result type (might be due to invalid IL or missing references)
3440 //IL_02b9: Unknown result type (might be due to invalid IL or missing references)
3441 QuicksRadialOpacity = MathHelper.Clamp(QuicksRadialOpacity + ((PlayerInput.UsingGamepad && PlayerInput.Triggers.Current.RadialQuickbar) ? 0.25f : (-0.15f)), 0f, 1f);
3442 if (QuicksRadialOpacity == 0f)
3443 {
3444 return;
3445 }
3446 Player player = Main.player[Main.myPlayer];
3447 Texture2D value = TextureAssets.HotbarRadial[2].Value;
3448 Texture2D value2 = TextureAssets.QuicksIcon.Value;
3449 float num = QuicksRadialOpacity * 0.9f;
3450 float num2 = QuicksRadialOpacity * 1f;
3451 float num3 = (float)(int)Main.mouseTextColor / 255f;
3452 float num4 = 1f - (1f - num3) * (1f - num3);
3453 num4 *= 0.785f;
3454 Color color = Color.White * num4 * num;
3455 float num5 = (float)Math.PI * 2f / (float)player.QuicksRadial.RadialCount;
3456 float num6 = -(float)Math.PI / 2f;
3457 Item item = player.QuickHeal_GetItemToUse();
3458 Item item2 = player.QuickMana_GetItemToUse();
3459 Item item3 = null;
3460 Item item4 = null;
3461 if (item == null)
3462 {
3463 item = new Item();
3464 item.SetDefaults(28);
3465 }
3466 if (item2 == null)
3467 {
3468 item2 = new Item();
3469 item2.SetDefaults(110);
3470 }
3471 if (item3 == null)
3472 {
3473 item3 = new Item();
3474 item3.SetDefaults(292);
3475 }
3476 if (item4 == null)
3477 {
3478 item4 = new Item();
3479 item4.SetDefaults(2428);
3480 }
3481 for (int i = 0; i < player.QuicksRadial.RadialCount; i++)
3482 {
3483 Item inv = item4;
3484 if (i == 1)
3485 {
3486 inv = item;
3487 }
3488 if (i == 2)
3489 {
3490 inv = item3;
3491 }
3492 if (i == 3)
3493 {
3494 inv = item2;
3495 }
3496 _ = player.QuicksRadial.Bindings[i];
3497 Vector2 vector = Utils.RotatedBy(new Vector2(120f, 0f), num6 + num5 * (float)i) * num2;
3498 float num7 = 0.85f;
3499 if (player.QuicksRadial.SelectedBinding == i)
3500 {
3501 num7 = 1.7f;
3502 }
3503 sb.Draw(value, position + vector, (Rectangle?)null, color * num7, 0f, value.Size() / 2f, num2 * num7 * 1.3f, (SpriteEffects)0, 0f);
3504 float inventoryScale = Main.inventoryScale;
3505 Main.inventoryScale = num2 * num7;
3506 Draw(sb, ref inv, 14, position + vector + new Vector2(-26f * num2 * num7), Color.White);
3507 Main.inventoryScale = inventoryScale;
3508 sb.Draw(value2, position + vector + new Vector2(34f, 20f) * 0.85f * num2 * num7, (Rectangle?)null, color * num7, 0f, value.Size() / 2f, num2 * num7 * 1.3f, (SpriteEffects)0, 0f);
3509 }
3510 }
static Asset< Texture2D >[] HotbarRadial
static Asset< Texture2D > QuicksIcon
static TriggersPack Triggers
static void Draw(SpriteBatch spriteBatch, ref Item inv, int context, Vector2 position, Color lightColor=default(Color))
Definition ItemSlot.cs:1814
static float QuicksRadialOpacity
Definition ItemSlot.cs:169

References Terraria.Player.SelectionRadial.Bindings, Terraria.UI.ItemSlot.Draw(), Terraria.GameContent.TextureAssets.HotbarRadial, Terraria.Main.inventoryScale, Terraria.Main.myPlayer, Terraria.Main.player, Terraria.Player.QuickHeal_GetItemToUse(), Terraria.Player.QuickMana_GetItemToUse(), Terraria.GameContent.TextureAssets.QuicksIcon, Terraria.Player.QuicksRadial, Terraria.UI.ItemSlot.QuicksRadialOpacity, Terraria.Player.SelectionRadial.RadialCount, Terraria.Utils.RotatedBy(), Terraria.Player.SelectionRadial.SelectedBinding, Terraria.Item.SetDefaults(), Terraria.GameInput.PlayerInput.Triggers, and Terraria.GameInput.PlayerInput.UsingGamepad.

Referenced by Terraria.Main.DrawInterface_32_GamepadRadialHotbars().

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