FC3Editor.Tools.ToolObject.SetSelection C# (CSharp) Method

SetSelection() public method

public SetSelection ( EditorObjectSelection selection, EditorObject gizmoObject ) : void
selection FC3Editor.Nomad.EditorObjectSelection
gizmoObject FC3Editor.Nomad.EditorObject
return void
        public void SetSelection(EditorObjectSelection selection, EditorObject gizmoObject)
        {
            this.ClearSelectionState();
            this.m_selection.Dispose();
            this.m_selection = selection;
            this.m_selection.ComputeCenter();
            if (!this.m_selection.Contains(gizmoObject))
            {
                gizmoObject = EditorObject.Null;
            }
            if (!gizmoObject.IsValid && this.m_selection.Count > 0)
            {
                gizmoObject = this.m_selection[0];
            }
            if (gizmoObject.IsValid)
            {
                this.SetupGizmo(gizmoObject);
            }
            else
            {
                this.ClearGizmo();
            }
            this.UpdateSelectionState();
            this.UpdateSelection();
            this.m_paramObjectSelection.Value = -1;
        }