public void ActivateSellMenu(ShopMenuController shopMenu, ShopDialog dialog) { this.shopMenu = shopMenu; this.dialog = dialog; sellMenu.SetActive(true); sellMenuController.Activate(dialog); gameObject.SetActive(true); }
public void ActivateBuyMenu(ShopMenuController shopMenu, ShopDialog dialog, Item[] merchToDisplay) { this.shopMenu = shopMenu; this.dialog = dialog; buyMenu.SetActive(true); buyMenuController.Activate(dialog, merchToDisplay); gameObject.SetActive(true); }
public void Activate(ShopDialog dialog, Item[] merchToDisplay) { this.dialog = dialog; UpdateMerch(merchToDisplay); buyButton.SetActive(true); gameObject.SetActive(true); merchDisplay.Init(this, merchToDisplay); }
public void ToggleActionCanvas(bool flag, ShopDialog dialog) { actionCanvas.SetActive(flag); if (dialog != null) { this.dialog = dialog; } ToggleActionButtons(flag); }
public override async Task Execute(IFieldObjUser user, NPCShopCommandArgs args) { var template = await _templates.Retrieve(args.TemplateID); if (template == null) { await user.Message($"The specified NPC Shop: {args.TemplateID}, does not exist."); return; } var shop = new ShopDialog(template.ID, template); await user.Dialog(shop); }
private async Task GetUserInputAsync() { var categoryDialog = new ShopDialog(); var dialogViewModel = new ShopDialogViewModel(async instance => { await dialogCoordinator.HideMetroDialogAsync(this, categoryDialog); if (!instance.Cancel) { ProcessUserInput(instance.Shop); } }); categoryDialog.DataContext = dialogViewModel; await dialogCoordinator.ShowMetroDialogAsync(this, categoryDialog); }
private void HandleLeftClick() { bool mouseClicked = _currMouseState.LeftButton == ButtonState.Released && _prevMouseState.LeftButton == ButtonState.Pressed; if (mouseClicked && DrawArea.ContainsPoint(_currMouseState.X, _currMouseState.Y)) { if (OldWorld.Instance.MainPlayer.ActiveCharacter.NeedsSpellTarget) { var data = OldWorld.Instance.ESF[OldWorld.Instance.MainPlayer.ActiveCharacter.SelectedSpell]; if (data.TargetRestrict != SpellTargetRestrict.Friendly) { OldWorld.Instance.ActiveCharacterRenderer.SetSpellTarget(this); } else { //todo status label message "you cannot attack this NPC" OldWorld.Instance.MainPlayer.ActiveCharacter.SelectSpell(-1); } return; //don't process regular click on NPC while targeting a spell } PacketAPI api = ((EOGame)Game).API; switch (NPC.Data.Type) { case NPCType.Shop: ShopDialog.Show(api, this); break; case NPCType.Inn: break; case NPCType.Bank: BankAccountDialog.Show(api, NPC.Index); break; case NPCType.Barber: break; case NPCType.Guild: break; case NPCType.Priest: break; case NPCType.Law: break; case NPCType.Skills: SkillmasterDialog.Show(api, NPC.Index); break; case NPCType.Quest: QuestDialog.Show(api, NPC.Index, NPC.Data.VendorID, NPC.Data.Name); break; } } }
public void Activate(ShopDialog dialog) { this.dialog = dialog; sellButton.SetActive(true); gameObject.SetActive(true); }
public void ShowShopDialog() { ShopDialog shopDialog = UIManager.Instance.OpenDialog(ShopDialog.DIALOG_ID) as ShopDialog; shopDialog.Initialize(_gameMap.GetShopStageData()); }
public void onClick() { ShopDialog.Init(); }