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

◆ HandleHotbar()

void Terraria.Player.HandleHotbar ( )
inlineprivate

Definition at line 29447 of file Player.cs.

29448 {
29449 int num = PlayerInput.Triggers.Current.HotbarPlus.ToInt() - PlayerInput.Triggers.Current.HotbarMinus.ToInt();
29450 if (PlayerInput.CurrentProfile.HotbarAllowsRadial && num != 0 && PlayerInput.Triggers.Current.HotbarHoldTime > PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired && PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired != -1)
29451 {
29452 PlayerInput.MiscSettingsTEMP.HotbarRadialShouldBeUsed = true;
29453 PlayerInput.Triggers.Current.HotbarScrollCD = 2;
29454 }
29455 if (PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired != -1)
29456 {
29457 num = PlayerInput.Triggers.JustReleased.HotbarPlus.ToInt() - PlayerInput.Triggers.JustReleased.HotbarMinus.ToInt();
29458 if (PlayerInput.Triggers.Current.HotbarScrollCD == 1 && num != 0)
29459 {
29460 num = 0;
29461 }
29462 }
29463 if (PlayerInput.Triggers.Current.HotbarScrollCD == 0 && num != 0)
29464 {
29465 HotbarOffset += num;
29466 PlayerInput.Triggers.Current.HotbarScrollCD = 8;
29467 }
29468 if (!Main.inFancyUI && !Main.ingameOptionsWindow)
29469 {
29470 HotbarOffset += PlayerInput.ScrollWheelDelta / -120;
29471 }
29473 HotbarOffset = 0;
29474 }
static TriggersPack Triggers
static PlayerInputProfile CurrentProfile
void ScrollHotbar(int Offset)
Definition Player.cs:29611

References Terraria.GameInput.PlayerInput.CurrentProfile, Terraria.Player.HotbarOffset, Terraria.Main.inFancyUI, Terraria.Main.ingameOptionsWindow, Terraria.Player.ScrollHotbar(), and Terraria.GameInput.PlayerInput.Triggers.

Referenced by Terraria.Player.Update().

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