Example #1
0
        // One stop shopping for making an instant button that you want to let a player bind to a key in game
        public static void BindableActionButton(string title, params GUILayoutOption[] options)
        {
            if (options.Length == 0)
            {
                options = new GUILayoutOption[] { GL.Width(300) };
            }
            var action = KeyBindings.GetAction(title);

            if (GL.Button(title, options))
            {
                action();
            }
            EditKeyBind(title, true, false, Width(200));
        }