SpriteEditor.Gui.GuiMessages.GridListBoxDoubleClick C# (CSharp) Method

GridListBoxDoubleClick() public method

public GridListBoxDoubleClick ( Window callingWindow ) : void
callingWindow FlatRedBall.Gui.Window
return void
        public void GridListBoxDoubleClick(Window callingWindow)
        {
            SpriteGrid sg = ((CollapseListBox)callingWindow).GetFirstHighlightedObject() as SpriteGrid;
            if (sg != null)
            {
                this.camera.X = (sg.XLeftBound + sg.XRightBound) / 2f;
                if (sg.GridPlane == SpriteGrid.Plane.XY)
                {
                    this.camera.Y = (sg.YBottomBound + sg.YTopBound) / 2f;
                }
                else
                {
                    this.camera.Y = sg.Blueprint.Y;
                }
            }
        }