// -------------------------------------------------------------------- private void FillObjectInspector(SceneObject obj) { if (obj.GetType() == typeof(EntityProxy)) { tableLayoutPanel.Controls.Add(CreatePropertyInspector(new EntityProxyInspector((EntityProxy)obj))); } else if (obj.GetType().IsSubclassOf(typeof(Camera))) { CameraInspectorControl camInspector = new CameraInspectorControl((Camera)obj); InspectorChanged += camInspector.OnObjectInspectorChanged; tableLayoutPanel.Controls.Add(camInspector); } }
// -------------------------------------------------------------------- private void FillObjectInspector(SceneObject obj) { if (obj.GetType() == typeof(EntityProxy)) { tableLayoutPanel.Controls.Add(CreatePropertyInspector(new EntityProxyInspector((EntityProxy)obj))); } else if (obj.GetType().IsSubclassOf(typeof(Camera))) { CameraInspectorControl camInspector = new CameraInspectorControl((Camera)obj); // This is so the camera preview updates when it is moved from the inspector // TODO - Need to find a place to unregister this safely // InspectorChanged += camInspector.OnObjectInspectorChanged; tableLayoutPanel.Controls.Add(camInspector); } }