public static StateSave GetRoundedRectangleState() { if (roundedRectangleState == null) { roundedRectangleState = new StateSave(); roundedRectangleState.Name = "Default"; AddVisibleVariable(roundedRectangleState); roundedRectangleState.Variables.Add(new VariableSave { SetsValue = true, Type = "float", Value = 5, Name = "CornerRadius", Category = "Dimensions" }); roundedRectangleState.Variables.Add(new VariableSave { Type = "float", Value = 0.0f, Category = "Flip and Rotation", Name = "Rotation" }); StandardElementsManager.AddPositioningVariables(roundedRectangleState); StandardElementsManager.AddDimensionsVariables(roundedRectangleState, 64, 64, StandardElementsManager.DimensionVariableAction.ExcludeFileOptions); StandardElementsManager.AddColorVariables(roundedRectangleState); AddDropshadowVariables(roundedRectangleState); AddStrokeAndFilledVariables(roundedRectangleState); } return(roundedRectangleState); }
public static StateSave GetSvgState() { if (svgState == null) { svgState = new StateSave(); svgState.Name = "Default"; AddVisibleVariable(svgState); StandardElementsManager.AddPositioningVariables(svgState); StandardElementsManager.AddDimensionsVariables(svgState, 100, 100, Gum.Managers.StandardElementsManager.DimensionVariableAction.AllowFileOptions); foreach (var variableSave in svgState.Variables.Where(item => item.Type == typeof(DimensionUnitType).Name)) { variableSave.Value = DimensionUnitType.Absolute; variableSave.ExcludedValuesForEnum.Add(DimensionUnitType.PercentageOfSourceFile); //variableSave.ExcludedValuesForEnum.Add(DimensionUnitType.MaintainFileAspectRatio); } //StandardElementsManager.AddColorVariables(svgState); svgState.Variables.Add(new VariableSave { SetsValue = true, Type = "string", Value = "", Name = "SourceFile", IsFile = true }); svgState.Variables.Add(new VariableSave { SetsValue = true, Type = "bool", Value = false, Name = "UseColorTextureAlpha" }); svgState.Variables.Add(new VariableSave { Type = "float", Value = 0.0f, Category = "Flip and Rotation", Name = "Rotation" }); } return(svgState); }
public static StateSave GetArcState() { if (arcState == null) { arcState = new StateSave(); arcState.Name = "Default"; arcState.Variables.Add(new VariableSave { Type = "float", Value = 10, Category = "Arc", Name = "Thickness" }); arcState.Variables.Add(new VariableSave { Type = "float", Value = 0, Category = "Arc", Name = "StartAngle" }); arcState.Variables.Add(new VariableSave { Type = "float", Value = 90, Category = "Arc", Name = "SweepAngle" }); AddVisibleVariable(arcState); StandardElementsManager.AddPositioningVariables(arcState); StandardElementsManager.AddDimensionsVariables(arcState, 64, 64, StandardElementsManager.DimensionVariableAction.ExcludeFileOptions); StandardElementsManager.AddColorVariables(arcState); } return(arcState); }
public static StateSave GetColoredCircleState() { if (filledCircleState == null) { filledCircleState = new StateSave(); filledCircleState.Name = "Default"; AddVisibleVariable(filledCircleState); StandardElementsManager.AddPositioningVariables(filledCircleState); StandardElementsManager.AddDimensionsVariables(filledCircleState, 64, 64, StandardElementsManager.DimensionVariableAction.ExcludeFileOptions); StandardElementsManager.AddColorVariables(filledCircleState); } return(filledCircleState); }