// Character Action Overlay Handler.
// Worthless Bums 2012.


// Initializes Character Action Overlay (CAO).
// NOTE: Hook this to the active character indicator.
// NOTE: This is no longer used!
function initializeCAO ()
{//echo("initializeCAO()");
	// Move Up Button.
	if (!isObject($moveUpButton))
	{
		$moveUpButton = new Sprite("Move Up")
		{
			SceneLayer = 0;
			graph = 0;
			position = "4000 4000";
			scenegraph = levelSceneGraph;
			imagemap = "FreeIndicatorFramesImageMap";
			visible = true;
			size = "4 4";
			useMouseEvents = "1";
		};
	}
	$moveUpButton.mount($playerSquad[$activeCharacter], 0.0, -2.0, 50.0, true, false, true, true);
	
	// Move Down Button.
	if (!isObject($moveDownButton))
	{
		$moveDownButton = new Sprite("Move Down")
		{
			SceneLayer = 0;
			graph = 0;
			position = "4000 4000";
			scenegraph = levelSceneGraph;
			imagemap = "FreeIndicatorFramesImageMap";
			visible = true;
			size = "4 4";
			useMouseEvents = "1";
		};
	}
	$moveDownButton.mount($playerSquad[$activeCharacter], 0.0, 2.0, 50.0, true, false, true, true);
	
	// Move Left Button.
	if (!isObject($moveLeftButton))
	{
		$moveLeftButton = new Sprite("Move Left")
		{
			SceneLayer = 0;
			graph = 0;
			position = "4000 4000";
			scenegraph = levelSceneGraph;
			imagemap = "FreeIndicatorFramesImageMap";
			visible = true;
			size = "4 4";
			useMouseEvents = "1";
		};
	}
	$moveLeftButton.mount($playerSquad[$activeCharacter], -2.0, 0.0, 50.0, true, false, true, true);
	
	// Move Right Button.
	if (!isObject($moveRightButton))
	{
		$moveRightButton = new Sprite("Move Right")
		{
			SceneLayer = 0;
			graph = 0;
			position = "4000 4000";
			scenegraph = levelSceneGraph;
			imagemap = "FreeIndicatorFramesImageMap";
			visible = true;
			size = "4 4";
			useMouseEvents = "1";
		};
	}
	$moveRightButton.mount($playerSquad[$activeCharacter], 2.0, 0.0, 50.0, true, false, true, true);
}