コード例 #1
0
    private bool OnRightArrow()
    {
        object binding = null;

        if (MenuLineBase is MenuLineBaseSimple)
        {
            var m = (MenuLineBaseSimple)MenuLineBase;
            binding = m.binding;
        }
        else if (MenuLineBase is MenuLineBaseComplex)
        {
            var m = (MenuLineBaseComplex)MenuLineBase;
            binding = m.binding;
        }
        else
        {
            parentFocus.Close();
            return(true);
        }

        if (binding == null)
        {
            parentFocus.Close();
            return(true);
        }
        else if (binding is KeyMap)
        {
            var     menu = (KeyMap)binding;
            Vector3 pos  = ChildPosition;
            submenu = UiManager.I.CreateMenu(menu, pos, 200, this);
        }
        else if (binding is NativeFunction)
        {
            var func = (NativeFunction)binding;
            func.Call();
            parentFocus.Close();
        }
        else if (binding is string)
        {
            var expression = (string)binding;
            var func       = NativeFunction.Lockup(expression);
            func.Call();
            parentFocus.Close();
        }
        return(true);
    }
コード例 #2
0
        private void Eval(string function)
        {
            string[] args = function.Split(' ');

            var func = NativeFunction.Lockup(function);
        }