コード例 #1
0
 static void LogEvent(InputHandler obj, MessageType message)
 {
     log.Write(obj.GetType().Name.PadRight(13) + message);
 }
コード例 #2
0
            public override void OnEnter()
            {
                base.OnEnter();

                oldInputHandler = view.StateInputHandler;
                editor1 = new Graphics.Editors.GroundTextureEditor
                {
                    Camera = view.Scene.Camera,
                    GroundIntersect = view.GroundProbe,
                    SoftwareTexture = new Graphics.Software.Texture<Graphics.Software.Texel.A8R8G8B8>[]
                    {
                        new Graphics.Software.Texture<Graphics.Software.Texel.A8R8G8B8>(
                            TextureUtil.ReadTexture<Graphics.Software.Texel.A8R8G8B8>(MainWindow.Instance.CurrentMap.Ground.SplatMap1.Resource9, 0)),
                        new Graphics.Software.Texture<Graphics.Software.Texel.A8R8G8B8>(
                            TextureUtil.ReadTexture<Graphics.Software.Texel.A8R8G8B8>(MainWindow.Instance.CurrentMap.Ground.SplatMap2.Resource9, 0)),
                    },
                    Texture9 = new SlimDX.Direct3D9.Texture[]
                    {
                        MainWindow.Instance.CurrentMap.Ground.SplatMap1.Resource9,
                        MainWindow.Instance.CurrentMap.Ground.SplatMap2.Resource9
                    },
                    Position = MainWindow.Instance.CurrentMap.Ground.Translation,
                    Size = MainWindow.Instance.CurrentMap.Ground.Size,
                    Viewport = view.Viewport
                };
                editor1.TextureValuesChanged += new Graphics.Editors.TextureValuesChangedEventHandler(editor_TextureValuesChanged);
                editorRenderer = new Graphics.Editors.GroundTextureEditorRenderer(editor1);
                editor1.Pencil = settings.Pencil1;

                view.StateInputHandler = editor1;
            }
コード例 #3
0
            public override void OnEnter()
            {
                oldInputHandler = view.StateInputHandler;

                if (regionsControl == null)
                {
                    regionsControl = new RegionsEditorControl { Dock = System.Windows.Forms.DockStyle.Fill };
                    regionsControl.LoadRegions(MainWindow.Instance.CurrentMap);
                }

                regionsControl.RegionSelected += new EventHandler(regionsControl_RegionSelected);

                editor = new Graphics.Editors.BoundingRegionEditor(view, view.GroundProbe)
                {
                    NodeScale = 0.1f
                };
                editorRenderer = new Graphics.Editors.BoundingRegionEditor.Renderer9(editor)
                {
                    Camera = view.Scene.Camera,
                    StateManager = view.StateManager
                };
                view.StateInputHandler = editor;
            }
コード例 #4
0
 public override void OnEnter()
 {
     oldInputHandler = view.StateInputHandler;
     editor = new Graphics.Editors.BoundingRegionEditor(view, view.GroundProbe)
     {
         NodeScale = 0.1f
     };
     editor.Region = MainWindow.Instance.CurrentMap.NavMesh.BoundingRegion;
     editorRenderer = new Graphics.Editors.BoundingRegionEditor.Renderer9(editor)
     {
         Camera = view.Scene.Camera,
         StateManager = view.StateManager
     };
     view.StateInputHandler = editor;
 }
コード例 #5
0
 public override void OnEnter()
 {
     base.OnEnter();
     oldInputHandler = view.StateInputHandler;
     editor = new Graphics.Editors.GroundTextureEditor
     {
         Camera = view.Scene.Camera,
         GroundIntersect = view.GroundProbe,
         SoftwareTexture = new Graphics.Software.Texture<Graphics.Software.Texel.R32F>[]
         {
             new Graphics.Software.Texture<Graphics.Software.Texel.R32F>(
                 MainWindow.Instance.CurrentMap.Ground.Heightmap)
         },
         Position = MainWindow.Instance.CurrentMap.Ground.Translation,
         Size = MainWindow.Instance.CurrentMap.Ground.Size,
         Viewport = view.Viewport
     };
     editor.TextureValuesChanged += new Graphics.Editors.TextureValuesChangedEventHandler(editor_TextureValuesChanged);
     editorRenderer = new Graphics.Editors.GroundTextureEditorRenderer(editor);
     InputHandler = editor;
     view.StateInputHandler = this;
     editor.Pencil = pencil;
 }
コード例 #6
0
 static void LogEvent(InputHandler obj, MessageType message)
 {
     log.Write(obj.GetType().Name.PadRight(13) + message);
 }