//
//  Wumbo-TouchInput_iOS.h
//  Wumbo
//
//  Created by Wade McGillis on 10/28/13.
//  Copyright (c) 2013 Wade McGillis. All rights reserved.
//

#ifndef __Wumbo_TouchInput_iOS_h__
#define __Wumbo_TouchInput_iOS_h__
#include "Wumbo-TouchInput.h"
#if PLATFORM_IOS
#include <vector>
namespace Wumbo
{
	class TouchInput_iOS : public TouchInput
	{
	private:
		int maxCount;
		int touchCount;
		std::vector<UITouch *> touches;
		bool swipe[4];
		bool newSwipe[4];
		UIViewController *controller;
		CGSize screenSize;
	public:
		void initialize();
		void deinitialize();
		void update();
		void onEndOfFrame();
		
		TouchInput_iOS(InputManager *man);
		void clearTouches();
		bool touched();
		bool swiped(int direction);
		bool touched(int x, int y, int x2, int y2);
		
		CGPoint fixTouchForOrientation(CGPoint p);
		void addTouch(UITouch *touch);
		void removeTouch(UITouch *touch);
		void addSwipe(int direction);
	};
};
#endif

#endif /* defined(__Wumbo__Wumbo_TouchInput_iOS__) */
