Esempio n. 1
0
        internal void Append(h2_MatchData data)
        {
            var shortcuts = getShortcuts();

            if ((shortcuts == null) || (shortcuts.Length == 0))
            {
                return;
            }

            for (var i = 0; i < shortcuts.Length; i++)
            {
                var sc = shortcuts[i];
                if (!sc.enable)
                {
                    continue;
                }

                var m = sc.GetMatch(Event.current);
                if (m == 0)
                {
                    continue;         // not matched
                }
                sc.handler = this;

                if (m == 1) // perfect match
                {
                    data.exactMatch.Add(sc);
                }
                else
                {
                    data.comboMatch.Add(sc);
                }
            }
        }
Esempio n. 2
0
        public void Check()
        {
            if (hndMap == null)
            {
                return;
            }

            var e = Event.current;

            if ((e.type != EventType.keyUp) || (e.keyCode == KeyCode.None))
            {
                return;
            }

            if (matchData == null)
            {
                matchData = new h2_MatchData();
            }
            matchData.Check(e, hndMap);
        }