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

-- Background and common elements.
-----------------------------------------------------------------------------

-- The background graphics fades in.
-- Use this when you want screen elements to fade in without any delay.
BackgroundInStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 60,
				alpha = 1.0,
			},
		},
	};
};

-- The background graphics fades out.
BackgroundOutStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 1.0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = -1,
					},
				},
			},
			{
				index = 60,
				alpha = 0,
			},
		},
	};
};

-- The small logo on the bottom right corner fades in.
-- Use this when you want elements to fade in after a one-second delay.
LogoInStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 0,
			},
			{
				index = 60,
				alpha = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 120,
				alpha = 0.5,
			},
		},
	};
};

-- The small logo on the bottom right corner fades out.
LogoOutStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 1,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = -1,
					},
				},
			},
			{
				index = 60,
				alpha = 0,
			},
		},
	};
};

-- The story background element fades in.
StoryBGInStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 60,
				alpha = 1.0,
			},
		},
	};
};

-- The story background element stays still.
StoryBGStyle = {
	animation = {
	};
}

-- The story background element fades out.
StoryBGOutStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 1,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = -1,
					},
				},
			},
			{
				index = 30,
				alpha = 0,
			},
		},
	};
};

TopBandInStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				y = -150,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 60,
				y = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
		},
	};
};

TopBandOutStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = -1,
					},
				},
			},
			{
				index = 60,
				y = -150,
			},
		},
	};
};

BottomBandInStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				y = 150,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 60,
				y = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 0,
					},
				},
			},
		},
	};
};

BottomBandOutStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = -1,
					},
				},
			},
			{
				index = 60,
				y = 150,
			},
		},
	};
};

-- Characters
-----------------------------------------------------------------------------

LeftFadeToCenterStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 60,
				x = 282,
				alpha = 0.0,
			},
		},
	};
};

RightFadeToCenterStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 60,
				x = -282,
				alpha = 0.0,
			},
		},
	};
};

-- Left Characters

-- Character stays in place
LeftStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
			},
		},
	};
};

-- Character enters the screen from the same side
LeftInStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = -430,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Character enters the screen from the opposite side
LeftOppositeInStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = 1250,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 30,
				x = 0,
			},
		},
	};
};

-- Character leaves the screen from the same side
LeftOutStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = -430,
			},
		},
	};
};

-- Character shifts from front right to front left
LeftShortShiftStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = 634,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Character shifts from back right to front left
LeftMidShiftStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = 764,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Character shifts from back right to back left
LeftLongShiftStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = 894,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Front character swaps to back character
LeftSwapToBackStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = 130,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Back character swaps to front character
LeftSwapToFrontStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = -130,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Right Characters

-- Character stays in place
RightStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
			},
		},
	};
};

-- Character enters from the same side
RightInStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = 430,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Character enters from the opposite side
RightOppositeInStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = -1230,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 30,
				x = 0,
			},
		},
	};
};

-- Character exits from the same side
RightOutStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = -1,
					},
				},
			},
			{
				index = 15,
				x = 430,
			},
		},
	};
};

-- Character shifts from front left to front right
RightShortShiftStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = -634,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Character shifts from back left to front right
RightMidShiftStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = -764,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Character shifts from back left to back right
RightLongShiftStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = -894,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Front character swaps to back character
RightSwapToBackStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = -130,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Back character swaps to front character
RightSwapToFrontStyle = {
	animation = {
		keyframes = {
			{
				index = 0,
				x = 130,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 15,
				x = 0,
			},
		},
	};
};

-- Text Balloons
-----------------------------------------------------------------------------

-- Base style for non-balloon text.
BaseTextStyle = {
	font = {
		secondaryFont,
		24,
		Color(255, 255, 255),
	},
};

-- Non-balloon text fades in with a small delay, used for the first text.
TextInitialStyle = {

	parent = BaseTextStyle,
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 0,
			},
			{
				index = 60,
				alpha = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 90,
				alpha = 1,
			},
		},
	};
};

-- Non-balloon text fades in with a small delay, used for the first text.
TextTransitionStyle = {

	parent = BaseTextStyle,
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 0,
			},
			{
				index = 30,
				alpha = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 60,
				alpha = 1,
			},
		},
	};
};

-- Non-balloon text fades in
TextInStyle = {

	parent = BaseTextStyle,
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 30,
				alpha = 1,
			},
		},
	};
};

-- Non-balloon text stands still
TextStyle = {

	parent = BaseTextStyle,
	animation = {
	};
};

-- Non-balloon text fades out
TextOutStyle = {

	parent = BaseTextStyle,
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 1,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 30,
				alpha = 0,
			},
		},
	};
};

-- Base style. Stuff like font, color, etc. goes here.
BaseBalloonStyle = {
	font = {
		secondaryFont,
		24,
		Color(0, 0, 0, 255),
	},
};

-- The balloon fades in and moves to reading position, with a small delay.
-- Use this style for the first text on each sequence, and whenever a character moves and speaks.
BalloonInitialStyle = {

	parent = BaseBalloonStyle,
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 0,
				y = 200,
				scaleX = 0.5,
				scaleY = 0.5,
			},
			{
				index = 10,
				alpha = 0,
				y = 200,
				scaleX = 0.5,
				scaleY = 0.5,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 20,
				alpha = 1,
				y = 0,
				scaleX = 1.0,
				scaleY = 1.0,
			},
		},
	};
};

-- Balloon fades in and moves to reading position, without delay.
-- Use this for most dialogue sequences.
BalloonInStyle = {

	parent = BaseBalloonStyle,
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 0,
				y = 200,
				scaleX = 0.5,
				scaleY = 0.5,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 10,
				alpha = 1,
				y = 0,
				scaleX = 1.0,
				scaleY = 1.0,
			},
		},
	};
};

-- Balloon moves from reading position to semi-faded position.
BalloonMidStyle = {

	parent = BaseBalloonStyle,
	animation = {
		keyframes = {
			{
				index = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 10,
				y = -200,
				alpha = 0.5,
			},
		},
	};
};

-- Balloon moves from semi-faded position to out position.
BalloonOutStyle = {

	parent = BaseBalloonStyle,
	animation = {
		keyframes = {
			{
				index = 0,
				alpha = 0.75,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 10,
				y = -150,
				alpha = 0,
			},
		},
	};
};

-- Balloon moves from reading position to out position.
-- Use this when you need the text to exit the screen quickly
BalloonOutQuickStyle = {

	parent = BaseBalloonStyle,
	animation = {
		keyframes = {
			{
				index = 0,
				tweens = {
					{
						type = "SimpleEase",
						target = TWEEN_ALL,
						ease = 1,
					},
				},
			},
			{
				index = 10,
				y = -400,
				alpha = 0,
			},
		},
	};
};