public ToolObject() { ToolObject.s_instance = this; this.m_selectMode = new ToolObject.SelectMode(this); this.m_moveMode = new ToolObject.MoveMode(this); this.m_rotateMode = new ToolObject.RotateMode(this); this.m_addMode = new ToolObject.AddMode(this); this.m_paramMode.Names = new string[] { Localizer.Localize("TOOL_OBJECT_MODE_SELECT") + " (1)", Localizer.Localize("TOOL_OBJECT_MODE_MOVE") + " (2)", Localizer.Localize("TOOL_OBJECT_MODE_ROTATE") + " (3)", Localizer.Localize("TOOL_OBJECT_MODE_ADD") + " (4)" }; this.m_paramMode.Values = new ToolObject.Mode[] { this.m_selectMode, this.m_moveMode, this.m_rotateMode, this.m_addMode }; this.m_paramMode.Images = new Image[] { this.m_selectMode.GetToolImage(), this.m_moveMode.GetToolImage(), this.m_rotateMode.GetToolImage(), this.m_addMode.GetToolImage() }; this.m_paramMode.ValueChanged += new EventHandler(this.editTool_ValueChanged); this.m_paramMode.Value = this.m_addMode; this.m_paramAxisType.Names = new string[] { Localizer.Localize("PARAM_AXIS_LOCAL"), Localizer.Localize("PARAM_AXIS_WORLD") }; this.m_paramAxisType.ValueChanged += new EventHandler(this.axisType_ValueChanged); this.m_actionCopyClipboard.Callback = new ParamButton.ButtonDelegate(this.action_CopyClipboard); this.m_actionDelete.Callback = new ParamButton.ButtonDelegate(this.action_Delete); this.m_actionFreeze.Callback = new ParamButton.ButtonDelegate(this.action_Freeze); this.m_actionUnfreeze.Callback = new ParamButton.ButtonDelegate(this.action_Unfreeze); this.m_actionGotoObject.Callback = new ParamButton.ButtonDelegate(this.action_GotoObject); this.m_paramObjectSelection.ActionPerformed += new EventHandler(this.action_GotoObject); this.m_paramObjectSelection.ValueChanged += new EventHandler(this.action_SelectionValueChanged); }
public AddMode(ToolObject context) : base(context) { this.m_paramObject.ValueChanged += new EventHandler(this.paramObject_ValueChanged); this.m_paramObject.FolderChanged += new EventHandler(this.paramObject_FolderChanged); ParamCheckButton expr_8F = this.m_pasteFromClipboard; expr_8F.ActivateCallback = (ParamCheckButton.ButtonDelegate)Delegate.Combine(expr_8F.ActivateCallback, new ParamCheckButton.ButtonDelegate(this.pasteFromClipboard_Activate)); ParamCheckButton expr_B6 = this.m_pasteFromClipboard; expr_B6.DeactivateCallback = (ParamCheckButton.ButtonDelegate)Delegate.Combine(expr_B6.DeactivateCallback, new ParamCheckButton.ButtonDelegate(this.pasteFromClipboard_Deactivate)); this.m_paramPreview.ValueChanged += new EventHandler(this.paramPreview_ValueChanged); }
private void SwitchMode(ToolObject.Mode prevMode, ToolObject.Mode mode) { this.ClearMode(prevMode); this.m_paramMode.Value = mode; this.SetMode(mode); }
private void SetMode(ToolObject.Mode mode) { this.m_mode = mode; Editor.PushInput(mode); mode.Activate(); if (this.ParamsChanged != null) { this.ParamsChanged(this, null); } this.UpdateContextHelp(); mode.AfterActivate(); }
private void ClearMode(ToolObject.Mode mode) { mode.Deactivate(); Editor.PopInput(mode); }
public SnapAction(ToolObject context) { this.m_context = context; }
public void SwitchMode(ToolObject.Mode mode) { this.SwitchMode(this.m_paramMode.Value, mode); }
public RotateAction(ToolObject context) { this.m_context = context; }
public SelectAction(ToolObject context) { this.m_context = context; }
public AdminMode(ToolObject context) : base(context) { }
public MovePhysicsAction(ToolObject context) { this.m_context = context; }
public SnapMode(ToolObject context) : base(context) { this.m_paramUseSnapAngle.ValueChanged += new EventHandler(this.paramUseSnapAngle_ValueChanged); this.m_paramPreserveOrientation.ValueChanged += new EventHandler(this.paramPreserveOrientation_ValueChanged); this.m_paramUseSnapAngle.Enabled = !this.m_paramPreserveOrientation.Value; this.m_paramSnapAngle.Enabled = (!this.m_paramPreserveOrientation.Value && this.m_paramUseSnapAngle.Value); this.m_paramAngleDir.Enabled = (!this.m_paramPreserveOrientation.Value && this.m_paramUseSnapAngle.Value); }
public SelectMode(ToolObject context) : base(context) { }
public RotateMode(ToolObject context) : base(context) { this.m_paramRotation.ValueChanged += new EventHandler(this.rotation_ValueChanged); this.m_paramSnap.ValueChanged += new EventHandler(this.snap_ValueChanged); this.m_actionResetAngles.Callback = new ParamButton.ButtonDelegate(this.action_ResetAngles); this.m_paramSnapSize.Enabled = false; }
public MoveMode(ToolObject context) : base(context) { this.m_paramSnapSize.Enabled = false; this.m_paramSnapObjectSize.Enabled = false; this.m_paramPosition.ValueChanged += new EventHandler(this.position_ValueChanged); this.m_paramSnap.ValueChanged += new EventHandler(this.snap_ValueChanged); this.m_paramSnapObjectSize.ValueChanged += new EventHandler(this.snapObjectSize_ValueChanged); this.m_paramUseGizmos.ValueChanged += new EventHandler(this.useGizmos_ValueChanged); this.m_actionAlignToObject.ActivateCallback = new ParamCheckButton.ButtonDelegate(this.alignToObject_Activate); this.m_actionAlignToObject.DeactivateCallback = new ParamCheckButton.ButtonDelegate(this.alignToObject_Deactivate); this.m_actionDropToPhysics.Callback = new ParamButton.ButtonDelegate(this.action_DropToPhysics); }
public Mode(ToolObject context) { this.m_context = context; }