public FizzikFrame(int w, int h, string name = "Frame <Unnamed>") { imgWidth = w; imgHeight = h; this.name = name; layers = new List <FizzikLayer>(); layers.Add(new FizzikLayer(imgWidth, imgHeight, FizzikLayer.getDefaultLayerName(layerNameCount++))); //Add default first layer updateTexture(); //Texture is initialized in here }
/* * Adds a brand new layer on top of the currently selected layer, will select the new layer after creation. */ public FizzikLayer createNewLayer(Object undoObject = null) { string layerName = FizzikLayer.getDefaultLayerName(layerNameCount++); if (undoObject) { Undo.RecordObject(undoObject, "Create Layer (" + layerName + ")"); } FizzikLayer layer = new FizzikLayer(imgWidth, imgHeight, layerName); layers.Insert(workingLayer + 1, layer); workingLayer = workingLayer + 1; return(layer); }