fixing ui

This commit is contained in:
Vladislav Khorev 2013-11-04 06:16:25 +00:00
parent 73fc81572e
commit 327a15854c
2 changed files with 18 additions and 0 deletions

View File

@ -25,6 +25,7 @@ public:
virtual void OnTapDown(vec2 pos) { } virtual void OnTapDown(vec2 pos) { }
virtual void OnTapUp(vec2 pos) { } virtual void OnTapUp(vec2 pos) { }
virtual void OnTapUpAfterMove(vec2 pos) { } virtual void OnTapUpAfterMove(vec2 pos) { }
virtual void OnTapUpAfterMoveOut(vec2 pos) { }
virtual void OnMove(vec2 shift) { } virtual void OnMove(vec2 shift) { }
virtual void OnMoveOut() { } virtual void OnMoveOut() { }
virtual void OnKeyPress(int key) { } virtual void OnKeyPress(int key) { }

View File

@ -347,6 +347,21 @@ void TGUIManager::OnMouseUp(vec2 pos)
//signalMap.push_back((i->SignalMap[CONST_CLICK_SIGNAL_NAME])); //signalMap.push_back((i->SignalMap[CONST_CLICK_SIGNAL_NAME]));
//Do not call signals here //Do not call signals here
if (! isTransparentForInput)
{
break;
}
}
if (i->Widget->CheckClick(LastTapPos) && !i->Widget->CheckClick(pos))
{
bool isTransparentForInput = i->Widget->IsTransparentForInput();
i->Widget->OnTapUpAfterMoveOut(pos);
i->IsMouseDown = false;
//signalMap.push_back((i->SignalMap[CONST_CLICK_SIGNAL_NAME]));
//Do not call signals here
if (! isTransparentForInput) if (! isTransparentForInput)
{ {
break; break;
@ -376,6 +391,8 @@ void TGUIManager::OnMove(vec2 shift)
TotalShift += shift; TotalShift += shift;
//LastTapPos += shift;
std::vector<std::shared_ptr<boost::signal<void (TSignalParam)>>> signalMap; std::vector<std::shared_ptr<boost::signal<void (TSignalParam)>>> signalMap;
for (i = WidgetArr.rbegin(); i != WidgetArr.rend(); ++i) for (i = WidgetArr.rbegin(); i != WidgetArr.rend(); ++i)