public TerrainManipulator(IContextRegistry contextRegistry, TerrainNamingBridge namingBridge) { _manipContext = new GUILayer.ActiveManipulatorContext(); _manipContext.OnActiveManipulatorChange += (object sender, EventArgs e) => { if (this.OnHoveringControlChanged != null) { this.OnHoveringControlChanged(null, EventArgs.Empty); } }; _nativeManip = null; _attachedSceneManager = new WeakReference(null); _attachedTerrainManiContext = null; _contextRegistry = new WeakReference(contextRegistry); contextRegistry.ActiveContextChanged += OnActiveContextChanged; _nativeManip = new GUILayer.NativeManipulatorLayer(_manipContext); _baseTextureCombo = new System.Windows.Forms.ComboBox(); _baseTextureCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; _baseTextureCombo.DisplayMember = "Text"; _baseTextureCombo.ValueMember = "Value"; _decorationMaterialCombo = new System.Windows.Forms.ComboBox(); _decorationMaterialCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; _decorationMaterialCombo.DisplayMember = "Text"; _decorationMaterialCombo.ValueMember = "Value"; _namingBridge = namingBridge; _namingBridge.OnBaseTextureMaterialsChanged += OnBaseTextureMaterialsChanged; _namingBridge.OnDecorationMaterialsChanged += OnDecorationMaterialsChanged; }
public TerrainManipulator(IContextRegistry contextRegistry) { _manipContext = new GUILayer.ActiveManipulatorContext(); _nativeManip = null; _contextRegistry = new WeakReference(contextRegistry); contextRegistry.ActiveContextChanged += OnActiveContextChanged; _nativeManip = new GUILayer.NativeManipulatorLayer(_manipContext); }
public PlacementManipulator(IContextRegistry contextRegistry, LevelEditorCore.ResourceLister resourceLister) { _manipContext = new GUILayer.ActiveManipulatorContext(); _nativeManip = null; _manipSettings = new Settings(); _nativeManip = new GUILayer.NativeManipulatorLayer(_manipContext); if (resourceLister != null) { resourceLister.SelectionChanged += resourceLister_SelectionChanged; _resourceLister = new WeakReference(resourceLister); } _contextRegistry = new WeakReference(contextRegistry); contextRegistry.ActiveContextChanged += OnActiveContextChanged; _nativeManip = new GUILayer.NativeManipulatorLayer(_manipContext); }
public void SetActiveContext(GUILayer.ActiveManipulatorContext context) { if (_context != null) { _context.OnActiveManipulatorChange -= OnActiveManipulatorChange; _context.OnManipulatorSetChange -= OnManipulatorSetChange; } manipulatorProperties.Bind(null); _context = context; if (_context != null) { _context.OnActiveManipulatorChange += OnActiveManipulatorChange; _context.OnManipulatorSetChange += OnManipulatorSetChange; } OnManipulatorSetChange(null, null); }