예제 #1
0
        public void BuildRenderList()
        {
            // If item is blacklisted we just don`t draw it.
            if (structs.BlackListed)
            {
                return;
            }

            // Check if we have that loot name if the list we need to look for.
            var indexLC = Settings.LootListToLookFor.IndexOf(structs.LootName);

            // We do.
            if (indexLC >= 0)
            {
                // If we have name already we prepare render list.
                var entityLoot = new EntityLootListRender(
                    structs.LootName,
                    Color.Fuchsia,
                    10, // hardcoded? good?
                    structs.PosX,
                    structs.PosY,
                    structs.PosZ);

                HelperOpenGL.LootListToRenderPre.Add(entityLoot);
            }

            var lootForSelector = new LootListView(structs.LootName, "-");

            if (!Settings.LootListForListView.Contains(lootForSelector))
            {
                if (Settings.LootListToLookFor.Contains(structs.LootName))
                {
                    // We have that item in loot list selected as to look for.
                    lootForSelector.Status = "+";

                    // Add with + sign.
                    Settings.LootListForListView.Add(lootForSelector);
                }
                else
                {
                    // Add with - sign.
                    Settings.LootListForListView.Add(lootForSelector);
                }

                Settings.FindLootRebuildTable = true;
            }
        }
예제 #2
0
        private void InitializeListView()
        {
            headerStyle.SetFont(fontBold);
            headerStyle.Hot.Font = fontUnderline;

            headerStyleEmoji.SetFont(fontEmoji);
            olvLootList.EmptyListMsg = "Nothing for now";

            // This is changed in form but I keep track of what has changed from default.
            olvLootList.GridLines     = true;
            olvLootList.ShowGroups    = false;
            olvLootList.FullRowSelect = true;
            olvLootList.UseHyperlinks = false;

            // No context menu filter on column right click.
            olvLootList.SelectColumnsOnRightClick          = false;
            olvLootList.SelectColumnsOnRightClickBehaviour = BrightIdeasSoftware.ObjectListView.ColumnSelectBehaviour.None;

            olvLootList.TintSortColumn = false;

            // Textbox search filter.
            olvLootList.UseFiltering = true;

            // Cell format events, so we can apply different colors and wonts
            olvLootList.UseCellFormatEvents = true;

            olvLootList.ShowSortIndicators = true;

            olvLootList.MultiSelect = true;
            olvLootList.UseCustomSelectionColors = true;

            olvLootList.HasCollapsibleGroups = true;

            olvLootList.Font = new Font(FontFamily.GenericSansSerif, 8, FontStyle.Bold);

            // Declare what columns are searchable
            columnName.Searchable    = true;
            columnEnabled.Searchable = true;

            // Get Lootables list.
            olvLootList.SetObjects(LootListView.GetLootLists());

            // Use always on every change like drawing stuff etc.
            Olv_ParseEntries();
            olvLootList.Sort(olvLootList.GetColumn(0), SortOrder.Ascending);
        }