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

◆ ToggleInv()

void Terraria.Player.ToggleInv ( )
inline

Definition at line 5275 of file Player.cs.

5276 {
5278 if (Main.mapFullscreen)
5279 {
5280 Main.mapFullscreen = false;
5281 releaseInventory = false;
5284 {
5286 }
5287 }
5288 else if (PlayerInput.InBuildingMode)
5289 {
5291 }
5292 else if (Main.ingameOptionsWindow)
5293 {
5295 {
5297 }
5298 else
5299 {
5300 IngameOptions.Close();
5301 }
5302 }
5303 else if (Main.inFancyUI)
5304 {
5306 }
5307 else if (CaptureManager.Instance.Active)
5308 {
5309 CaptureManager.Instance.Active = false;
5310 }
5311 else if (talkNPC >= 0)
5312 {
5313 SetTalkNPC(-1);
5314 Main.npcChatCornerItem = 0;
5315 Main.npcChatText = "";
5318 {
5319 Main.npcChatRelease = false;
5320 }
5321 }
5322 else if (sign >= 0)
5323 {
5324 sign = -1;
5325 Main.editSign = false;
5326 Main.npcChatText = "";
5328 }
5329 else if (Main.clothesWindow)
5330 {
5331 Main.CancelClothesWindow();
5332 }
5333 else if (!Main.playerInventory)
5334 {
5335 OpenInventory();
5336 }
5337 else
5338 {
5339 Main.playerInventory = false;
5340 if (channel && Main.mouseItem != null && !Main.mouseItem.IsAir)
5341 {
5342 channel = false;
5343 }
5346 {
5347 Main.EquipPageSelected = 0;
5348 }
5349 else
5350 {
5352 Main.GamepadCursorAlpha = 0f;
5355 {
5357 }
5358 }
5361 {
5362 Item[] array = inventory;
5363 for (int i = 0; i < array.Length; i++)
5364 {
5365 array[i].newAndShiny = false;
5366 }
5367 }
5369 {
5370 Main.npcChatRelease = false;
5372 releaseInventory = false;
5373 Main.mouseRight = true;
5374 }
5375 }
5377 {
5379 }
5380 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
bool newAndShiny
Definition Item.cs:762
void SetTalkNPC(int npcIndex, bool fromNet=false)
Definition Player.cs:4880
void GamepadEnableGrappleCooldown()
Definition Player.cs:22476
static int BlockInteractionWithProjectiles
Definition Player.cs:3135
static void OpenInventory()
Definition Player.cs:5382
void LockGamepadTileInteractions()
Definition Player.cs:29668
bool releaseInventory
Definition Player.cs:1930
Item[] inventory
The player's normal inventory. Indexes 0-9 hold the hotbar items, 10-49 the rest of the main inventor...
Definition Player.cs:1767
bool tileInteractionHappened
Definition Player.cs:1958
PlayerInteractionAnchor tileEntityAnchor
Definition Player.cs:3015
static bool HighlightNewItems
Definition ItemSlot.cs:30

References Terraria.Player.BlockInteractionWithProjectiles, Terraria.Main.CancelClothesWindow(), Terraria.UI.Gamepad.UILinkPointNavigator.ChangePage(), Terraria.Player.channel, Terraria.DataStructures.PlayerInteractionAnchor.Clear(), Terraria.UI.IngameFancyUI.Close(), Terraria.IngameOptions.Close(), Terraria.Main.clothesWindow, Terraria.UI.Gamepad.UILinkPointNavigator.CurrentPage, Terraria.GameInput.PlayerInput.ExitBuildingMode(), Terraria.Player.GamepadEnableGrappleCooldown(), Terraria.GameInput.PlayerInput.GrappleAndInteractAreShared, Terraria.UI.ItemSlot.Options.HighlightNewItems, Terraria.GameInput.PlayerInput.InBuildingMode, Terraria.Main.inFancyUI, Terraria.Main.ingameOptionsWindow, Terraria.Graphics.Capture.CaptureManager.Instance, Terraria.Player.inventory, Terraria.Player.LockGamepadTileInteractions(), Terraria.Main.mapFullscreen, Terraria.Main.mouseItem, Terraria.GameInput.PlayerInput.NavigatorUnCachePosition(), Terraria.Item.newAndShiny, Terraria.Player.OpenInventory(), Terraria.Main.playerInventory, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Player.releaseInventory, Terraria.Player.SetTalkNPC(), Terraria.Player.sign, Terraria.Player.talkNPC, Terraria.Player.tileEntityAnchor, Terraria.Player.tileInteractionHappened, Terraria.GameInput.PlayerInput.UsingGamepad, and Terraria.GameInput.PlayerInput.UsingGamepadUI.

Referenced by Terraria.Player.Update().

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