public RootController(ContentManager contentManager)
        {
            this.m_contentManager = contentManager;
            m_keyBindings = new CKeyBindings();

            InitDebugView();
        }
Beispiel #2
0
        public override void Execute()
        {
            if (ArgsCount() != 0)
            {
                Print("usage: " + name);
                return;
            }

            CKeyBindings bindings = GetRootController().GetKeyBindings();

            bindings.UnbindAll();
        }
Beispiel #3
0
        public override void Execute()
        {
            if (ArgsCount() != 0)
            {
                Print("usage: " + name);
                return;
            }

            CKeyBindings       bindings = GetRootController().GetKeyBindings();
            List <CKeyBinding> list     = bindings.ListBindings();

            for (int i = 0; i < list.Count; ++i)
            {
                String cmd  = list[i].cmd;
                String name = list[i].name;
                Print(name + " \"" + cmd + "\"");
            }
        }
Beispiel #4
0
        public override void Execute()
        {
            if (ArgsCount() != 1)
            {
                Print("usage: " + name + " <key>");
                return;
            }

            String  codeValue = StrArg(0).ToUpper();
            KeyCode code      = KeyCodeHelper.FromString(codeValue);

            if (code == KeyCode.None)
            {
                Print("Invalid key '" + codeValue + "'");
                return;
            }

            CKeyBindings bindings = GetRootController().GetKeyBindings();

            bindings.Unbind(code);
        }