コード例 #1
0
ファイル: Extensions.cs プロジェクト: avryzuki/HesaEngine
        public static void KeyBlind(this Menu menu, string key, string text, Key k, MenuKeybindType state = MenuKeybindType.Hold, Action <bool> cb = null)
        {
            var tmp = menu.Add(new MenuKeybind(key, text, k, state));

            if (cb != null)
            {
                tmp.OnValueChanged = (MenuKeybind x, bool y) => cb(y);
            }
        }
コード例 #2
0
 internal static void AddKey(string name, string defaultName, Key defaultKey, MenuKeybindType type = MenuKeybindType.Hold, bool enabled = false)
 {
     miscMenu.Add(new MenuKeybind(name + heroName, defaultName, new KeyBind(defaultKey, type, enabled)));
 }