public LayerNode(ActLayerObject layer, FormActFile form)
        {
            this.layer = layer;
            this.form = form;

            this.Text = layer.properties.stName;
            this.ImageIndex = 1;
            this.SelectedImageIndex = 1;
            this.ContextMenuStrip = form.ContextMenuLayer;

            ResetChildren();
        }
        public static ActLayerObject CreateDefault(string name, int id, int resID)
        {
            ActLayerObject ret = new ActLayerObject();

            ret.properties.expand = true;
            ret.properties.layerID = id;
            ret.properties.parentID = -1;
            ret.properties.resourceID = resID;
            ret.properties.stName = name;
            ret.properties.useKeyTimeline = true;
            ret.properties.visible = true;

            ret.keys.Add(ActKeyObject.CreateDefault());
            return ret;
        }
 private void RenderLayerWithCameraRatio(Graphics g, float x, float y, float ratio, ActLayerObject l)
 {
     RenderLayer(g, (x * (1.0f - ratio)) - 400, y - 300, l);
 }
 private void RenderLayer(Graphics g, float x, float y, ActLayerObject layer)
 {
     var saved = g.Save();
     g.TranslateTransform(-x, -y);
     foreach (var element in layer.GetLayout().elements)
     {
         DrawElement(g, element);
     }
     g.Restore(saved);
 }