/// <summary> /// Wait for an action to be chosen. /// </summary> public override void DetermineAction() { Grid main = new Grid("Main"); main.List = new IButtonable[] { PageUtil.GenerateTargets(currentBattle, main, brainOwner, ATTACK, GetAttackSprite(brainOwner.Equipment), handlePlay, false), null, null, null, PageUtil.GenerateActions(currentBattle, main, brainOwner, ATTACK, temporarySpells, handlePlay), PageUtil.GenerateSpellBooks(currentBattle, main, brainOwner, ATTACK, handlePlay), PageUtil.GenerateItemsGrid(true, currentBattle, main, brainOwner, handlePlay), PageUtil.GenerateEquipmentGrid(currentBattle, main, brainOwner, handlePlay, true), }; currentBattle.Actions = main.List; }
/// <summary> /// Wait for an action to be chosen. /// </summary> public override void DetermineAction() { Grid main = new Grid("Main"); main.List = new IButtonable[] { PageUtil.GenerateTargets(currentBattle, main, brainOwner, ATTACK, GetAttackSprite(brainOwner.Equipment), spellHandler), null, null, null, PageUtil.GenerateActions(currentBattle, main, brainOwner, ATTACK, temporarySpells, spellHandler), PageUtil.GenerateSpellBooks(currentBattle, main, brainOwner, ATTACK, spellHandler), PageUtil.GenerateItemsGrid(currentBattle, main, brainOwner, spellHandler, PageUtil.INVENTORY, brainOwner.Inventory.DetailedName, brainOwner.Inventory.DetailedDescription), PageUtil.GenerateEquipmentGrid(currentBattle, main, brainOwner, spellHandler, PageUtil.EQUIPMENT, "Equipment"), }; currentBattle.Actions = main.List; }
private void SetupMenus() { Page p = Get(ROOT_INDEX); Grid main = new Grid("Shop Menu"); main.OnEnter = () => { main.List.Clear(); main.List.Add(SetupTalkMenu(main)); main.List.Add(SetupSellMenu(main)); main.List.Add(SetupBuyMenu(main)); main.List.Add(null); main.List.Add(PageUtil.GenerateItemsGrid(false, p, main, party.Default, PageUtil.GetOutOfBattlePlayableHandler(p))); main.List.Add(PageUtil.GenerateEquipmentGrid(p, main, party.Default, PageUtil.GetOutOfBattlePlayableHandler(p), false)); main.List.Add(null); main.List.Add(PageUtil.GenerateBack(previous)); }; p.OnEnter += () => { main.Invoke(); }; }