--clubstyle.lua
require("scripts/styles/style.lua");

-- Base style for non-balloon text.
BaseButtonStyle = {
	font = {
		standardFont,
		23,
		Color(182, 40, 154),
	},
--~ 	upState =
--~ 	{
--~ 		bitmap = "common/buttons/btn_default",
--~ 	},
--~ 	overState = {
--~ 		bitmap = "common/buttons/btn_rollover",
--~ 	},
--~ 	downState = {
--~ 		bitmap = "common/buttons/btn_pushed",
--~ 		sound = kDefaultButtonSound,
--~ 	},
	
};
StandardFontStyle = {

	font = {
		standardFont,
		23,
		Color(182, 40, 154),
	},

};
SmallInfoStyle = {
	
	
				secondaryFont,
				12,
				DefaultColor,
			

}
BigButtonStyle = {
	font = {
		standardFont,
		30,
		Color(182, 40, 154),
	},
--~ 	upState =
--~ 	{
--~ 		bitmap = "common/buttons/btn_default",
--~ 	},
--~ 	overState = {
--~ 		bitmap = "common/buttons/btn_rollover",
--~ 	},
--~ 	downState = {
--~ 		bitmap = "common/buttons/btn_pushed",
--~ 		sound = kDefaultButtonSound,
--~ 	},
	
};

-- Main Menu Buttons
MainMenuButtonStyle = {
	parent = BigButtonStyle,
};

-- Core Game UI Buttons
CoreUIButtonStyle = {
	parent = BaseButtonStyle,
};

-- Level Selector Buttons
LevelSelectorButtonStyle = {
	parent = BaseButtonStyle,
};

-- In-game Windows Buttons
InGameButtonStyle = {
	parent = BaseButtonStyle,
};

-- Mini-game Buttons
MiniGameButtonStyle = {
	parent = BaseButtonStyle,
};

-- Flower decoration styles
UILeaf1Style = 
{
	autoPlay = true,
	animation = {
		keyframes = {
			{
				index = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 1920,
				skewX = 180.0,
				skewY = 180.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 3840,
				skewX = 360.0,
				skewY = 360.0,
			},
		},
	};
};

UILeaf2Style = 
{
	autoPlay = true,
	animation = {
		keyframes = {
			{
				index = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 1800,
				skewX = -180.0,
				skewY = -180.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 3600,
				skewX = -360.0,
				skewY = -360.0,
			},
		},
	};
};

UIFlower1Style = 
{
	autoPlay = true,
	animation = {
		keyframes = {
			{
				index = 0,
				skewX = -4,
				skewY = -4,
				tweens = {
					{
						type = "CustomEase",
						target = TWEEN_ALL,
						points = {
							{x = 0.5, y = 0},
							{x = 0.5, y = 1},
						},
					},
				},
			},
			{
				index = 200,
				x = 0,
				y = 0,
				skewX = 4,
				skewY = 4,
				tweens = {
					{
						type = "CustomEase",
						target = TWEEN_ALL,
						points = {
							{x = 0.5, y = 0},
							{x = 0.5, y = 1},
						},
					},
				},
			},
			{
				index = 400,
				skewX = -4,
				skewY = -4,
			},
		},
	};
};

UIFlower2Style = 
{
	autoPlay = true,
	animation = {
		keyframes = {
			{
				index = 0,
				skewX = -5,
				skewY = -5,
				tweens = {
					{
						type = "CustomEase",
						target = TWEEN_ALL,
						points = {
							{x = 0.5, y = 0},
							{x = 0.5, y = 1},
						},
					},
				},
			},
			{
				index = 240,
				x = 0,
				y = 0,
				skewX = 5,
				skewY = 5,
				tweens = {
					{
						type = "CustomEase",
						target = TWEEN_ALL,
						points = {
							{x = 0.5, y = 0},
							{x = 0.5, y = 1},
						},
					},
				},
			},
			{
				index = 480,
				skewX = -5,
				skewY = -5,
			},
		},
	};
};


--------------------------------------------------------------------------------------------------
-- Dialog window intro animations

-- Window background animation. Based on a pivot at the top left corner of the image
WindowBGStyle = {
	animation = {
		transformationPoint = {x = 0.1, y = 0},
		keyframes = {
			{
				index = 0,
				scaleX = 0.1,
				alpha = 0.0,
			},
			{
				index = 15,
				scaleX = 0.1,
				alpha = 0.0,
				tweens = {
					{
						type = "CustomEase",
						target = TWEEN_ALL,
						points = {
							{x = 0.4, y = 0},
							{x = 0.7698, y = 0.1875},
						},
					},
				},
			},
			{
				index = 32,
				scaleX = 1.04,
				alpha = 1.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 42,
				scaleX = 0.94,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 55,
				scaleX = 1.0,
			},
		},
	};
};

-- Logo animation. Based on a pivot point at the center of the image and a final scale of 1.
WindowLogoStyle = {
	repeatCount = -1,
	animation = {
		transformationPoint = {x = 0.5, y = 0.6},
		keyframes = {
			{
				index = 0,
				scaleX = 0.5,
				scaleY = 0.5,
				alpha = 0.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 10,
				scaleX = 1.17,
				scaleY = 1.17,
				alpha = 1.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 18,
				x = 0,
				scaleX = 0.87,
				scaleY = 0.87,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 24,
				scaleX = 1.03,
				scaleY = 1.03,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 28,
				scaleX = 1.0,
				scaleY = 1.0,
			},
		},
	};
};

-- First button to appear. Pivot point is based on the top right corner
Button1Style = {
	autoPlay = true,
	font = {
		standardFont,
		25,
		DefaultColor,
	},
	animation = {
		keyframes = {
			{
				index = 0,
				scaleX = 0.1,
				alpha = 0.0,
			},
			{
				index = 25,
				scaleX = 0.1,
				alpha = 0.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 32,
				scaleX = 1.09,
				alpha = 1.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 38,
				scaleX = 1.0,
			},
		},
	};
};

-- Second button to appear. Pivot point is based on the top right corner
Button2Style = {
	autoPlay = true,
	font = {
		standardFont,
		25,
		DefaultColor,
	},
	animation = {
		keyframes = {
			{
				index = 0,
				scaleX = 0.1,
				alpha = 0.0,
			},
			{
				index = 35,
				scaleX = 0.1,
				alpha = 0.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 42,
				scaleX = 1.09,
				alpha = 1.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 48,
				scaleX = 1.0,
			},
		},
	};
};

-- Third button to appear. Pivot point is based on the top right corner
Button3Style = {
	font = {
		standardFont,
		25,
		DefaultColor,
	},
	autoPlay = true,
	animation = {
		keyframes = {
			{
				index = 0,
				scaleX = 0.1,
				alpha = 0.0,
			},
			{
				index = 45,
				scaleX = 0.1,
				alpha = 0.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 52,
				scaleX = 1.09,
				alpha = 1.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 58,
				scaleX = 1.0,
			},
		},
	};
};

-- Fourth button to appear. Pivot point is based on the top right corner
Button4Style = {
	font = {
		standardFont,
		25,
		DefaultColor,
	},
	autoPlay = true,
	animation = {
		keyframes = {
			{
				index = 0,
				scaleX = 0.1,
				alpha = 0.0,
			},
			{
				index = 55,
				scaleX = 0.1,
				alpha = 0.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 62,
				scaleX = 1.09,
				alpha = 1.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 68,
				scaleX = 1.0,
			},
		},
	};
};

-- Fifth button to appear. Pivot point is based on the top right corner
Button5Style = {
	font = {
		standardFont,
		25,
		DefaultColor,
	},
	autoPlay = true,
	animation = {
		keyframes = {
			{
				index = 0,
				scaleX = 0.1,
				alpha = 0.0,
			},
			{
				index = 65,
				scaleX = 0.1,
				alpha = 0.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 72,
				scaleX = 1.09,
				alpha = 1.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 78,
				scaleX = 1.0,
			},
		},
	};
};

LogoCircleStyle = {
	animation = {
		transformationPoint = {x = 0.5, y = 0.5},
		keyframes = {
			{
				index = 0,
				rotateDirection = ROTATION_DIRECTION_CW,
				rotateTimes = 1,
				
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
			{
				index = 16000,
				skewX = -0.0225,
				skewY = -0.0225,
			},
		},
	},
};