Esempio n. 1
0
 void OnAddCellMapping()
 {
     CellMappings.Add(new CellMappingDeclaration()
     {
         HighlightColor = TextureParserExtensions.Colors[CellMappings.Count % TextureParserExtensions.Colors.Count]
     });
 }
Esempio n. 2
0
        void OnRemoveCellMapping(CellMappingDeclaration?d)
        {
            if (d == null)
            {
                return;
            }

            CellMappings.Remove(d);
        }
Esempio n. 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));
        }