示例#1
0
        private void RecreateItemToggles()
        {
            ToggleBag.RemoveChildren();

            var itemKeys = ItemDataManager.Categories[ActiveCategory];

            foreach (var itemKey in itemKeys)
            {
                var item   = ItemDataManager.GetItem(itemKey);
                var toggle = ToggleBag.AddChild(new ItemToggle(TooltipManager, item, ChestData.Accepts(itemKey)));
                toggle.OnToggle += () => ToggleItem(itemKey);
            }
        }
示例#2
0
        private void RecreateItemToggles()
        {
            ToggleBag.RemoveChildren();

            var itemKeys = ItemDataManager.Categories[ActiveCategory]
                           .OrderBy(p => ItemDataManager.GetItem(p).DisplayName)
                           .Skip(Row * MaxItemColumns)
                           .Take(MaxItemsPage).ToList();

            foreach (var itemKey in itemKeys)
            {
                var item   = ItemDataManager.GetItem(itemKey);
                var toggle = ToggleBag.AddChild(new ItemToggle(TooltipManager, item, ChestData.Accepts(itemKey)));
                toggle.OnToggle += () => ToggleItem(itemKey);
            }
        }