mirror of https://github.com/axmolengine/axmol.git
updated to latest version of cocos2d
This commit is contained in:
parent
5c5b0184ab
commit
50336dca40
|
@ -271,6 +271,61 @@ void WinRTWindow::OnPointerWheelChanged(CoreWindow^ sender, PointerEventArgs^ ar
|
|||
GLView::sharedOpenGLView()->handleTouchesEnd(1, &id, &p.x, &p.y);
|
||||
}
|
||||
|
||||
// user pressed the Back Key on the phone
|
||||
void GLView::OnBackKeyPress()
|
||||
{
|
||||
#if 0
|
||||
if (m_delegate)
|
||||
{
|
||||
m_delegate->Invoke(Cocos2dEvent::TerminateApp);
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
}
|
||||
|
||||
|
||||
void GLView::OnPointerPressed(PointerEventArgs^ args)
|
||||
{
|
||||
#if 0
|
||||
int id = args->CurrentPoint->PointerId;
|
||||
Vector2 pt = GetPoint(args);
|
||||
handleTouchesBegin(1, &id, &pt.x, &pt.y);
|
||||
#endif
|
||||
}
|
||||
|
||||
void GLView::OnPointerMoved(PointerEventArgs^ args)
|
||||
{
|
||||
#if 0
|
||||
auto currentPoint = args->CurrentPoint;
|
||||
if (currentPoint->IsInContact)
|
||||
{
|
||||
if (m_lastPointValid)
|
||||
{
|
||||
int id = args->CurrentPoint->PointerId;
|
||||
Vector2 p = GetPoint(args);
|
||||
handleTouchesMove(1, &id, &p.x, &p.y);
|
||||
}
|
||||
m_lastPoint = currentPoint->Position;
|
||||
m_lastPointValid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lastPointValid = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void GLView::OnPointerReleased(PointerEventArgs^ args)
|
||||
{
|
||||
#if 0
|
||||
int id = args->CurrentPoint->PointerId;
|
||||
Vector2 pt = GetPoint(args);
|
||||
handleTouchesEnd(1, &id, &pt.x, &pt.y);
|
||||
#endif // 0
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void WinRTWindow::OnPointerPressed(CoreWindow^ sender, PointerEventArgs^ args)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,6 @@ THE SOFTWARE.
|
|||
#include "CCGL.h"
|
||||
#include "platform/CCCommon.h"
|
||||
#include "InputEvent.h"
|
||||
#include "CCGeometry.h"
|
||||
#include "platform/CCGLViewProtocol.h"
|
||||
#include <agile.h>
|
||||
|
||||
|
@ -80,7 +79,7 @@ private:
|
|||
|
||||
Platform::Agile<Windows::UI::Core::CoreWindow> m_window;
|
||||
|
||||
Windows::Foundation::Vector2 m_lastPoint;
|
||||
Windows::Foundation::Point m_lastPoint;
|
||||
Windows::Foundation::EventRegistrationToken m_eventToken;
|
||||
bool m_lastPointValid;
|
||||
bool m_textInputEnabled;
|
||||
|
@ -114,9 +113,16 @@ public:
|
|||
void OnSuspending();
|
||||
void GLView::QueueEvent(std::shared_ptr<InputEvent>& event);
|
||||
|
||||
void OnPointerPressed(Windows::UI::Core::PointerEventArgs^ args);
|
||||
void OnPointerMoved(Windows::UI::Core::PointerEventArgs^ args);
|
||||
void OnPointerReleased(Windows::UI::Core::PointerEventArgs^ args);
|
||||
void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
|
||||
void OnBackKeyPress();
|
||||
|
||||
|
||||
private:
|
||||
Windows::Foundation::EventRegistrationToken m_eventToken;
|
||||
Windows::Foundation::Vector2 m_lastPoint;
|
||||
Windows::Foundation::Point m_lastPoint;
|
||||
bool m_lastPointValid;
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue