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

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