, __isScrollValueModified(false)
, __isTouchMoveInProgress(false)
, __isTitleSliding(false)
- , __touchPressInfo(Point(-1, -1))
+ , __touchPressInfo(FloatPoint(-1.0f, -1.0f))
, __editContentFontSize(0.0f)
{
}
{
int tokenIndex = GetTokenIndexFromCoordinate(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()));
+ _TouchInfo TouchInfo(touchinfo);
if (tokenIndex != -1)
{
if (tokenIndex == __edittingTokenIndex)
{
- __touchPressInfo.x = _CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()).x;
- __touchPressInfo.y = _CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()).y;
+ __touchPressInfo.x = touchinfo.GetCurrentPosition().x;
+ __touchPressInfo.y = touchinfo.GetCurrentPosition().y;
+
+ _Token* pToken = null;
+ pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+ if (pToken)
+ {
+ float tokenX = pToken->displayRect.x;
+ float tokenY = pToken->displayRect.y;
+ FloatPoint point(__touchPressInfo.x - tokenX, __touchPressInfo.y - tokenY);
+ TouchInfo.SetTouchInfo(touchinfo.GetPointId(), touchinfo.GetTouchStatus(), point, touchinfo.IsFlicked(), touchinfo.GetTimeStamp());
+ }
}
- return false;
}
- return _EditPresenter::OnTouchPressed(source, touchinfo);
+ return _EditPresenter::OnTouchPressed(source, TouchInfo);
}
bool
_TokenEditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
{
- __touchPressInfo = Point(-1, -1);
+ __touchPressInfo = FloatPoint(-1.0f, -1.0f);
ProcessTokeningByTouchEvent(source, touchinfo);
if (GetTokenCount())
_Token* pToken = null;
if (__edittingTokenIndex >= 0)
{
- if (__touchPressInfo.y > 0)
+ if (__touchPressInfo.y > 0.0f)
{
pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
if (pToken)
{
- int tokenX = _CoordinateSystemUtils::ConvertToInteger(pToken->displayRect.x);
- int tokenY = _CoordinateSystemUtils::ConvertToInteger(pToken->displayRect.y);
- Point point(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()).x - tokenX, __touchPressInfo.y - tokenY);
+ float tokenX = pToken->displayRect.x;
+ float tokenY = pToken->displayRect.y;
+ FloatPoint point(touchinfo.GetCurrentPosition().x - tokenX, __touchPressInfo.y - tokenY);
TouchInfo.SetTouchInfo(touchinfo.GetPointId(), touchinfo.GetTouchStatus(), point, touchinfo.IsFlicked(), touchinfo.GetTimeStamp());
}
}
}
- return false; // Event through
+ return _EditPresenter::OnTouchMoved(source, touchinfo);
}
else
{