Exemplo n.º 1
0
 public void TrueExit()
 {
     this.bInGameMenu = false;
     this.bJustChangedState = true;
     this.xSkillView.iChargeUnlocked = 0;
     this.xInventoryView.enMenuLevel = InGameMenu.InventoryView.MenuLevel.Top;
     this.enCurrentView = InGameMenu.BaseView.Main;
     if (Program.GetTheGame().xNetworkInfo.enCurrentRole == NetworkHelperInterface.NetworkRole.LocalOnly)
     {
         Program.GetTheGame().xSoundSystem.ResumeCues();
     }
     this.xInventoryView.enEquipOverride = InGameMenu.InventoryView.EquipOverride.None;
     this.xInventoryView.bInRecipeLibrary = false;
     this.xInventoryView.xPopup.iPopupVariant = -1;
     this.xSkillView.enMenuLevel = InGameMenu.SkillView.MenuLevel.Top;
     this.xJournalView.enMenuLevel = InGameMenu.JournalView.MenuLevel.Top;
     this.xEquipmentView.iCursorPosition = 0;
     this.xEquipmentView.bInGroup = false;
     this.xEquipmentView.iSelectedGroup = 0;
     this.xEquipmentView.xPopup.iPopupVariant = -1;
     this.xEquipmentView.iGhostCursorPosition = -1;
     this.xEquipmentView.enEquipOverride = InGameMenu.EquipmentView.EquipOverride.None;
     this.xJournalView.iInContentPosition = 0;
     this.xJournalView.iInContentSubPosition = 0;
     this.xJournalView.iScrollOffsetTopContent = 0;
     this.xJournalView.iScrollOffsetDetailContent = 0;
     this.xMapView.enMenuLevel = InGameMenu.MapView.MenuLevel.Top;
     this.xSkillView.xPopup = new InGameMenu.PopupA();
     this.xSkillView.bInDetailsHehe = false;
     this.xSkillView.iJustLeveledSkill = -1;
     this.xSkillView.enEquipOverride = InGameMenu.SkillView.EquipOverride.None;
     this.xSystemView.enMenuLevel = InGameMenu.SystemView.MenuLevel.Top;
     this.xSystemView.iInContentPosition = 0;
     this.xCraftingView.enMenuLevel = InGameMenu.CraftingView.MenuLevel.Top;
     this.xCraftingView.iInContentPosition = 0;
     this.xCraftingView.xPopup.ExitPopup();
     this.xCharacterView.xPopup.ExitPopup();
     this.xCharacterView.iCursorPosition = 0;
     this.xCharacterView.bPetSelected = false;
     this.xCraftingView.fPopupAppear = 0f;
     this.xCraftingView.fPopupAlpha = 0f;
     this.iEquippedCycle = 0;
     InGameMenu.contTempAssetManager.Unload();
     InGameMenu.xQueueContent.Unload();
 }
Exemplo n.º 2
0
 public void Enter()
 {
     this.v2GhostCursorPos = Vector2.Zero;
     Game1 Master = Program.GetTheGame();
     Master._InGameMenu_SortInventoryView();
     Master._InGameMenu_SortCraftingView();
     Master._InGameMenu_SortEnemiesAndShit();
     if (Master.xNetworkInfo.enCurrentRole == NetworkHelperInterface.NetworkRole.LocalOnly)
     {
         Master.xSoundSystem.PauseCues();
     }
     this.bInGameMenu = true;
     this.bJustChangedState = true;
     this.xTopView.bIsEntering = true;
     this.enCurrentView = InGameMenu.BaseView.Main;
     this.xTopView.fEntireMenuAppear = 0f;
     this.xTopView.bIsExiting = false;
     this.xSystemView.iSelectedZoomLevel = Master.xOptions.iZoom;
     this.xSystemView.enSelectedFullScreen = Master.xOptions.enFullScreen;
     this.ChangeBotHelpBar(new InGameMenu.HelpBarBotEntry[]
     {
         new InGameMenu.HelpBarBotEntry(Master.xInput_Menu.Action, "Select"),
         new InGameMenu.HelpBarBotEntry(Master.xInput_Menu.MenuButton, "Exit Menu")
     });
     if (this.xPlayerPreview == null)
     {
         bool bIsCancelable = Master.xLocalPlayer.xEntity.bAttackCancelable;
         this.xPlayerPreview = new PlayerRenderComponent(Master.xLocalPlayer.xEntity);
         this.xPlayerPreview.av4ClothingColors = this.xPlayerPreview.xOwnerObject.xRenderComponent.av4ClothingColors;
         string sFemale = "";
         if (!this.xPlayerPreview.xOwnerObject.Owner.xViewStats.bIsMale)
         {
             sFemale = "Female";
         }
         this.xPlayerPreview.dixAnimations.Add(2, new PlayerAnimation(2, 2, Master._Animations_GetAnimationSet(this.xPlayerPreview.xOwnerObject.Owner, "Idle" + sFemale, "Down", false, false, false, false), new Vector2(12f, 30f), 4, 1, 24, 32, 0, 0, 1, Animation.LoopSettings.Clamp, Animation.CancelOptions.IgnoreIfPlaying, true, false, true, new AnimationInstruction[0]));
         this.xPlayerPreview.xTransform = new TransformComponent(new Vector2(134f, 168f));
         this.xPlayerPreview.SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying, 1f);
         this.xPlayerPreview.GetCurrentAnimation().recCurrentFrame = new Rectangle(0, 0, 24, 32);
         this.xPlayerPreview.Update();
         Master.xLocalPlayer.xEntity.bAttackCancelable = bIsCancelable;
     }
     Master.xLocalPlayer.xGUIStuff.ClearEquipQueue();
     this.xPlayerPreview.av4HairdoColors = this.xPlayerPreview.xOwnerObject.xRenderComponent.av4HairdoColors;
     if (this.xJournalView.xEnemyCharSprite == null)
     {
         this.xJournalView.xEnemyCharSprite = new AnimatedRenderComponent(new EntityShell(new Vector2(358f, 160f) * 2f));
         this.xJournalView.xEnemyCharSprite.xCamera = new Camera();
         this.xJournalView.xEnemyCharSprite.xTransform = new TransformComponent(new Vector2(358f, 160f) * 2f);
     }
     this.xPlayerPreview.xCamera = new Camera();
 }