コード例 #1
0
 internal void CloseUI(bool silent = false, bool fromNet = false)
 {
     //if (!fromNet)
     //{
     //    if (Main.netMode == NetmodeID.MultiplayerClient)
     //    {
     //        ModPacket packet = VampKnives.Instance.GetPacket(MessageType.ExtractorMessage, 6);
     //        packet.Write(ID);
     //        packet.Write((byte)ExtractorMessage.SyncPlayer);
     //        packet.Write(byte.MaxValue);
     //        packet.Send();
     //    }
     //    else
     //    {
     //        Main.stackSplit = 600;
     //    }
     //}
     BloodAltarUI.visible = false;
     VampKnives.CloseBloodAltarUI();
     CurrentPlayer        = byte.MaxValue;
     BloodAltarUI.AltarTE = new BloodAltarTE();
     if (!silent)
     {
         Main.PlaySound(SoundID.MenuClose);
     }
 }
コード例 #2
0
 public override bool NewRightClick(int i, int j)
 {
     if (UpgradePanel.visible)
     {
         Main.playerInventory = false;
         VampKnives.CloseUpgradeUI();
         UpgradePanel.visible = false;
         Main.PlaySound(SoundID.MenuClose);
     }
     else if (UpgradePanel.visible == false)
     {
         Main.playerInventory = true;
         VampKnives.OpenUpgradeUI();
         UpgradePanel.visible = true;
         Main.PlaySound(SoundID.MenuOpen);
     }
     return(true);
 }
コード例 #3
0
        internal void OpenUI(bool fromNet = false)
        {
            bool switching = BloodAltarUI.AltarTE.CurrentPlayer != byte.MaxValue;

            if (switching)
            {
                BloodAltarUI.AltarTE.CurrentPlayer = byte.MaxValue;
            }

            if (PlayerInput.GrappleAndInteractAreShared)
            {
                PlayerInput.Triggers.JustPressed.Grapple = false;
            }

            BloodAltarUI.visible = true;
            VampKnives.OpenBloodAltarUI();
            BloodAltarUI.AltarTE = this;
            //BloodAltarUI.RepopulateItemSlot = true;
            Main.playerInventory = true;
            Main.recBigList      = false;
            Main.PlaySound(switching ? SoundID.MenuTick : SoundID.MenuOpen);
        }
コード例 #4
0
 private void CloseButtonClicked(UIMouseEvent evt, UIElement listeningElement)
 {
     VampKnives.CloseUpgradeUI();
 }