Пример #1
0
        private void SyncSpecialLayerToAnimation()
        {
            int previousSelectedLayer = surface.ActiveLayerIndex;

            surface.SetActiveLayer(LayerAnimCenter);
            Settings.QuickEditor.TextSurface = surface;
            Settings.QuickEditor.Fill(Color.White, Color.Transparent, 0);
            surface.GetCell(selectedAnimation.Center.X, selectedAnimation.Center.Y).Glyph      = 42;
            surface.GetCell(selectedAnimation.Center.X, selectedAnimation.Center.Y).Background = Color.Black;

            surface.SetActiveLayer(LayerBackground);
            Settings.QuickEditor.Fill(Color.White, Color.White * 0.6f, 0);

            // Change this to a prop (SHOWCENTER LAYER) and have tool on selected
            surface.GetLayer(LayerAnimCenter).IsVisible = ShowCenterLayer;
            surface.GetLayer(LayerAnimBox).IsVisible    = false;
            surface.GetLayer(LayerBackground).IsVisible = ShowCenterLayer;

            surface.SetActiveLayer(previousSelectedLayer);
            // TODO: Draw box on LayerAnimBox for collision rect
        }