Beispiel #1
0
 private void ActiveChanged(object sender, EventArgs e)
 {
     if (this._CurrentDrawObject == null)
     {
         return;
     }
     _CurrentDrawObject.Active = (bool)_Active.GetValue();
     _Interface.ForceUpdate(InterfaceUpdateMessage.SceneObjectsUpdated);
 }
 private void NameChanged(object sender, EventArgs e)
 {
     if (this._CurrentSceneObject == null)
     {
         return;
     }
     _CurrentSceneObject.Name = (string)_Name.GetValue();
     _Interface.ForceUpdate(InterfaceUpdateMessage.SceneObjectsUpdated);
 }
Beispiel #3
0
 private void GLControl_MouseMove(object sender, MouseEventArgs e)
 {
     if (_BlockEvents)
     {
         return;
     }
     if (_Interface.CurrentScene.Type == SceneType.Scene2D)
     {
         if (this._MouseDown)
         {
             this._CurrentPoint = e.Location;
             float XIntensity = this._CurrentPoint.X - this._OriginalPoint.X;
             float YIntensity = this._CurrentPoint.Y - this._OriginalPoint.Y;
             if (_MouseMoved == null)
             {
                 (_Interface.CurrentScene as Scene2D).Transformation.Translation = new Vertex(this._OriginalTranslation.X + XIntensity, this._OriginalTranslation.Y + YIntensity, 0);
             }
             else
             {
                 Sprite CurrentSprite = _MouseMoved as Sprite;
                 CurrentSprite.Translation = new Vertex(this._OriginalTranslation.X + XIntensity, this._OriginalTranslation.Y + YIntensity, this._OriginalTranslation.Z);
                 _Interface.ForceUpdate(InterfaceUpdateMessage.SceneObjectsUpdated);
             }
         }
     }
     else if (_Interface.CurrentScene.Type == SceneType.Scene3D)
     {
         if (this._MouseDown)
         {
             this._CurrentPoint = e.Location;
             float XIntensity = this._CurrentPoint.X - this._OriginalPoint.X;
             float YIntensity = this._CurrentPoint.Y - this._OriginalPoint.Y;
             (_Interface.CurrentScene as Scene3D).EditorCamera.Rotation    = new Vertex(this._OriginalRotation.X, this._OriginalRotation.Y + XIntensity, this._OriginalRotation.Z);
             (_Interface.CurrentScene as Scene3D).EditorCamera.Translation = MatrixTransformer.TransformVertex(MatrixTransformer.MTRotate(1, XIntensity), this._OriginalTranslation);
         }
     }
 }
Beispiel #4
0
 private void Name_Update(object sender, EventArgs e)
 {
     _Interface.CurrentScene.Name = _SceneName.GetValue().ToString();
     _Interface.ForceUpdate(InterfaceUpdateMessage.SceneUpdated);
 }