/// <summary>
        /// Clear
        /// </summary>
        public void Clear()
        {
            short      modifier = (short)MyShortcut.ModifierValue.Control + (short)MyShortcut.ModifierValue.Shift;
            MyShortcut shortcut = new MyShortcut(Keys.R, modifier);

            MyDebugConsole.GetInstance().UnregisterShortcut(shortcut);

            short resObjMod = (short)MyShortcut.ModifierValue.Control;

            shortcut = new MyShortcut(Keys.R, resObjMod);
            MyDebugConsole.GetInstance().UnregisterShortcut(shortcut);
        }
        /// <summary>
        /// Initialize
        /// </summary>
        public void Initialize()
        {
            short modifier = (short)MyShortcut.ModifierValue.Control + (short)MyShortcut.ModifierValue.Shift;

            //@ reset camera
            MyShortcut shortcut = new MyShortcut(Keys.R, modifier);

            MyDebugConsole.GetInstance().RegisterShortcut(MyDebugSystem.Editor, "EditorShortcutManager", "Reset camera", shortcut, OnResetCamera);

            //@ reset object rotation
            short resObjMod = (short)MyShortcut.ModifierValue.Control;

            shortcut = new MyShortcut(Keys.R, resObjMod);
            MyDebugConsole.GetInstance().RegisterShortcut(MyDebugSystem.Editor, "EditorShortcutManager", "Reset object rotation", shortcut, OnRotationScaleReset);
        }
Esempio n. 3
0
        //////////////////////////////////////////////////////////////////////////
        private MyPrefabContainerManager()
        {
            short  modifier = (short)MyShortcut.ModifierValue.Control + (short)MyShortcut.ModifierValue.Shift;
            string category = "MyPrefabContainerManager";

            //@ debug draw Container
            MyShortcut shortcut = new MyShortcut(Keys.P, modifier);

            MyDebugConsole.GetInstance().RegisterShortcut(MyDebugSystem.Editor, category, "Debug draw container", shortcut, OnToggleDebugDraw);

            //@ invalidate nodes
            shortcut = new MyShortcut(Keys.L, modifier);
            MyDebugConsole.GetInstance().RegisterShortcut(MyDebugSystem.Editor, category, "ShowPhysicsAABBUnderCursor", shortcut, OnShowPhysAABB);



            MyRender.RegisterRenderModule(MyRenderModuleEnum.PrefabContainerManager, "Prefab container manager", DebugDraw, MyRenderStage.DebugDraw);
            //@ check res if duplicity registration
        }