Ejemplo n.º 1
0
        private void Inventory(Page previous, Party party, Inventory inventory)
        {
            Page p = Get(ROOT_INDEX);

            p.AddCharacters(Side.LEFT, party);
            p.Icon    = PageUtil.INVENTORY;
            p.OnEnter = () => {
                p.AddText(string.Format("{0}/{1} spaces used.", inventory.TotalOccupiedSpace, inventory.Capacity));
                p.Actions = PageUtil.GenerateGroupItemsGrid(
                    p,
                    previous,
                    party,
                    PageUtil.GetOutOfBattlePlayableHandler(p))
                            .List;
            };
        }
Ejemplo n.º 2
0
        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.GenerateGroupItemsGrid(p, main, party, PageUtil.GetOutOfBattlePlayableHandler(p)));
                main.List.Add(PageUtil.GenerateGroupEquipmentGrid(main, p, party.Collection, PageUtil.GetOutOfBattlePlayableHandler(p)));
                main.List.Add(null);
                main.List.Add(PageUtil.GenerateBack(previous));
            };
            p.OnEnter += () => {
                main.Invoke();
            };
        }