Пример #1
0
 void OnAddCellMapping()
 {
     CellMappings.Add(new CellMappingDeclaration()
     {
         HighlightColor = TextureParserExtensions.Colors[CellMappings.Count % TextureParserExtensions.Colors.Count]
     });
 }
Пример #2
0
        void OnRemoveCellMapping(CellMappingDeclaration?d)
        {
            if (d == null)
            {
                return;
            }

            CellMappings.Remove(d);
        }
Пример #3
0
        public bool TryGetCellMapping(string key, [MaybeNullWhen(false)] out CellMappingDeclaration d)
        {
            if (cellMappingsByKeyDirty)
            {
                cellMappingsByKey.Clear();
                foreach (var m in CellMappings.ToArray())
                {
                    if (m.Key != null)
                    {
                        cellMappingsByKey[m.Key] = m;
                    }
                }
            }

            return(cellMappingsByKey.TryGetValue(key, out d));
        }