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

◆ DrawVisibility()

bool Terraria.ModLoader.AccessorySlotLoader.DrawVisibility ( ref bool visbility,
int context,
int xLoc,
int yLoc,
out int xLoc2,
out int yLoc2,
out Texture2D value4 )
inlinepackage

Is run in AccessorySlotLoader.Draw. Creates & sets up Hide Visibility Button.

Definition at line 353 of file AccessorySlotLoader.cs.

354 {
355 //IL_005f: Unknown result type (might be due to invalid IL or missing references)
356 yLoc2 = yLoc - 2;
357 xLoc2 = xLoc - 58 + 64 + 28;
359 if (visbility)
360 {
362 }
363 Rectangle rectangle = default(Rectangle);
364 ((Rectangle)(ref rectangle))._002Ector(xLoc2, yLoc2, value4.Width, value4.Height);
365 int num45 = 0;
366 bool skipCheck = false;
367 if (((Rectangle)(ref rectangle)).Contains(new Point(Main.mouseX, Main.mouseY)) && !PlayerInput.IgnoreMouseInterface)
368 {
369 skipCheck = true;
370 Player.mouseInterface = true;
371 if (Main.mouseLeft && Main.mouseLeftRelease)
372 {
375 if (Main.netMode == 1 && context > 0)
376 {
377 NetMessage.SendData(4, -1, -1, null, Player.whoAmI);
378 }
379 }
380 num45 = ((!visbility) ? 1 : 2);
381 }
382 if (num45 > 0)
383 {
384 Main.HoverItem = new Item();
385 Main.hoverItemName = Lang.inter[58 + num45].Value;
386 }
387 return skipCheck;
388 }
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 ...
static Asset< Texture2D > InventoryTickOff
static Asset< Texture2D > InventoryTickOn

References Terraria.GameInput.PlayerInput.IgnoreMouseInterface, Terraria.Lang.inter, Terraria.GameContent.TextureAssets.InventoryTickOff, Terraria.GameContent.TextureAssets.InventoryTickOn, Terraria.Main.mouseLeft, Terraria.Main.mouseLeftRelease, Terraria.Main.mouseX, Terraria.Main.mouseY, Terraria.Main.netMode, Terraria.Audio.SoundEngine.PlaySound(), Terraria.NetMessage.SendData(), and Terraria.Entity.whoAmI.

Referenced by Terraria.ModLoader.AccessorySlotLoader.Draw().

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