private static void PackPopUp_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.No) { sender.CloseWindow(); } else { if (!GameManager.Instance.PlayerEnterExit.IsPlayerInside && GameManager.Instance.AreEnemiesNearby()) { DaggerfallUI.MessageBox("There are enemies nearby."); } else { DaggerfallUnityItem CampEquip = ItemBuilder.CreateItem(ItemGroups.UselessItems2, ClimateCalories.templateIndex_CampEquip); CampEquip.LowerCondition(CampDmg, GameManager.Instance.PlayerEntity); DestroyCamp(); GameManager.Instance.PlayerEntity.Items.AddItem(CampEquip); CampDeployed = false; FireLit = false; TentMatrix = new Matrix4x4(); sender.CloseWindow(); } } }
private static void CampPopUp_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { sender.CloseWindow(); IUserInterfaceManager uiManager = DaggerfallUI.UIManager; ClimateCalories.camping = true; uiManager.PushWindow(new DaggerfallRestWindow(uiManager, true)); } else { sender.CloseWindow(); PackOrLeaveCamp(); } }
//handles button clicks from Sell ship message box void SellShip_messageBox_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { DaggerfallBankManager.MakeTransaction(TransactionType.Sell_ship, 0, regionIndex); } sender.CloseWindow(); }
private void MessageBox_OnCustomButtonClick(DaggerfallMessageBox sender, string messageBoxButton) { Symbol task; buttons.TryGetValue(messageBoxButton, out task); ParentQuest.StartTask(task); sender.CloseWindow(); }
static void ReplaceBookBox_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { sender.CloseWindow(); if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { GivePlayerLocationsBook(); DaggerfallUI.MessageBox("Here's your replacement guild hall locations book."); } }
private static void SurrenderToGuardsDialogue_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { sender.CloseWindow(); if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { GameManager.Instance.PlayerEntity.SurrenderToCityGuards(true); } ; }
//handles button clicks from Deposit LOC message box void DepositLOC_messageBox_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { DaggerfallBankManager.MakeTransaction(TransactionType.Depositing_LOC, 0, regionIndex); } sender.CloseWindow(); }
static void ReplaceMarkBox_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { sender.CloseWindow(); if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { GameManager.Instance.PlayerEntity.DeductGoldAmount(replaceMarkCost); GivePlayerMarkOfRecall(); DaggerfallUI.MessageBox("Here's your replacement Mark of Recall, take more care in future!"); } }
protected virtual void SaveBoxClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { DaggerfallUI.Instance.PlayOneShot(SoundClips.ButtonClick); sender.CloseWindow(); if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { WriteEditedPathData(BasicRoadsTexturing.roads, RoadDataFilename); WriteEditedPathData(BasicRoadsTexturing.tracks, TrackDataFilename); } CloseTravelWindows(); }
protected virtual void SaveBoxClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { DaggerfallUI.Instance.PlayOneShot(SoundClips.ButtonClick); sender.CloseWindow(); if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { WriteRoadData(); roadTexturing.UpdateRoadData(roadData); } CloseTravelWindows(); }
private static void Bribe_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { sender.CloseWindow(); if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { BribePopup(); } else { ArrestPrompt(); } }
void ConfirmClassPopup_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { sender.CloseWindow(); if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { ; } else if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.No) { DeleteOutfit(); } }
// Access wagon or dungeon exit private void DungeonWagonAccess_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.No) { playerEnterExit.TransitionDungeonExterior(true); } else { DaggerfallUI.Instance.InventoryWindow.AllowDungeonWagonAccess(); DaggerfallUI.PostMessage(DaggerfallUIMessages.dfuiOpenInventoryWindow); } sender.CloseWindow(); }
private static void CampPopUp_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { sender.CloseWindow(); if (GameManager.Instance.AreEnemiesNearby()) { DaggerfallUI.MessageBox("There are enemies nearby."); } else { IUserInterfaceManager uiManager = DaggerfallUI.UIManager; ClimateCalories.camping = true; uiManager.PushWindow(new DaggerfallRestWindow(uiManager, true)); } } else { sender.CloseWindow(); PackOrLeaveCamp(); } }
private static void NewWagonPopup_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { sender.CloseWindow(); DestroyWagon(); WagonDeployed = false; GameManager.Instance.PlayerEntity.WagonItems.Clear(); } else { sender.CloseWindow(); ItemCollection playerItems = GameManager.Instance.PlayerEntity.Items; for (int i = 0; i < playerItems.Count; i++) { DaggerfallUnityItem item = playerItems.GetItem(i); if (item != null && item.IsOfTemplate(ItemGroups.Transportation, (int)Transportation.Small_cart)) { playerItems.RemoveItem(item); } } } }
static void ConfirmRepairBox_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { sender.CloseWindow(); if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { DaggerfallUnityItem markOfRecall = FindRecallMark(); if (markOfRecall != null) { int cost = CalculateRepairCost(markOfRecall); GameManager.Instance.PlayerEntity.DeductGoldAmount(cost); markOfRecall.currentCondition = markOfRecall.maxCondition; DaggerfallUI.MessageBox("Your Mark of Recall is now as good as new."); } } }
public static void Tent_messageBox_OnButtonClick(DaggerfallMessageBox sender, string messageBoxButton) { if (messageBoxButton == "REST") { IUserInterfaceManager uiManager = DaggerfallUI.UIManager; uiManager.PushWindow(new DaggerfallRestWindow(uiManager, true)); } else if (messageBoxButton == "PACKUPTENT") { DestroyTent(); TentDeployed = false; TentMatrix = new Matrix4x4(); sender.CloseWindow(); } }
private void MessageBox_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { // Start yes or no task if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { ParentQuest.StartTask(yesTaskSymbol); } else { ParentQuest.StartTask(noTaskSymbol); } // Close prompt sender.CloseWindow(); }
private void AvoidEncounter_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons button) { sender.CloseWindow(); if (button == DaggerfallMessageBox.MessageBoxButtons.Yes) { if (AttemptAvoid()) { delayCombat = delayCombatTime; StartFastTravel(destinationSummary); } else { travelUi.CloseWindow(); DaggerfallUI.MessageBox("You fail to avoid the encounter!"); } } else { travelUi.CloseWindow(); } }
private void EffectActionPrompt_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { sender.CloseWindow(); if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Anchor) { SetAnchor(); } else if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Teleport) { if (GameManager.Instance.PlayerEntity.AnchorPosition == null) { DaggerfallMessageBox mb = new DaggerfallMessageBox(DaggerfallUI.Instance.UserInterfaceManager, DaggerfallUI.Instance.UserInterfaceManager.TopWindow); mb.SetTextTokens(achorMustBeSet); mb.ClickAnywhereToClose = true; mb.Show(); return; } TeleportPlayer(); } }
private void EffectActionPrompt_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { sender.CloseWindow(); if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Anchor) { SetAnchor(); } else if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Teleport) { if (!anchorSet) { DaggerfallMessageBox mb = new DaggerfallMessageBox(DaggerfallUI.Instance.UserInterfaceManager, DaggerfallUI.Instance.UserInterfaceManager.TopWindow); mb.SetTextTokens(achorMustBeSet); mb.ClickAnywhereToClose = true; mb.Show(); forcedRoundsRemaining = 0; ResignAsIncumbent(); return; } TeleportPlayer(); } }
private void MessageBox_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { // Start selected task if (messageBoxButton == (DaggerfallMessageBox.MessageBoxButtons)opt1button) { ParentQuest.StartTask(opt1TaskSymbol); } else if (messageBoxButton == (DaggerfallMessageBox.MessageBoxButtons)opt2button) { ParentQuest.StartTask(opt2TaskSymbol); } else if (messageBoxButton == (DaggerfallMessageBox.MessageBoxButtons)opt3button) { ParentQuest.StartTask(opt3TaskSymbol); } else if (messageBoxButton == (DaggerfallMessageBox.MessageBoxButtons)opt4button) { ParentQuest.StartTask(opt4TaskSymbol); } // Close prompt sender.CloseWindow(); }