Exemplo n.º 1
0
        public override void DoubleClick(UIMouseEvent evt)
        {
            // Open up bestiary tab
            // Large grid for npc
            //
            // Small drops grid

            // Catalogue double click? recipe ingredient?
            // quickly visiting catalogue not really needed...just share type so scroll to it/select it when switch tabs

            // Make
            if (RecipeBrowserUI.instance.CurrentPanel == RecipeBrowserUI.RecipeCatalogue)
            {
                RecipeBrowserUI.instance.tabController.SetPanel(RecipeBrowserUI.Bestiary);
                BestiaryUI.instance.npcNameFilter.SetText("");
                BestiaryUI.instance.queryItem.ReplaceWithFake(0);
                // Need update before Goto
                BestiaryUI.instance.updateNeeded = true;
                BestiaryUI.instance.Update();
                BestiaryUI.instance.npcGrid.Recalculate();
                BestiaryUI.instance.npcGrid.Goto((element) =>
                {
                    UINPCSlot slot = element as UINPCSlot;
                    if (slot != null)
                    {
                        if (slot.npcType == this.npcType)
                        {
                            BestiaryUI.instance.queryLootNPC = slot;
                            BestiaryUI.instance.updateNeeded = true;
                            BestiaryUI.instance.SetNPC(slot);
                            return(true);
                        }
                        return(false);
                    }
                    return(false);
                }, true);
            }
        }
Exemplo n.º 2
0
        public override int CompareTo(object obj)
        {
            UINPCSlot other = obj as UINPCSlot;

            return /*-1 * */ (npcType.CompareTo(other.npcType));
        }