fix some ui events

This commit is contained in:
Eduardo Bart 2011-08-14 15:02:28 -03:00
parent afc197f2dc
commit 80564b9dff
4 changed files with 7 additions and 16 deletions

View File

@ -14,8 +14,8 @@ function MessageBox.create(title, text, flags)
window.id = "messageBoxWindow"
window.title = title
window:centerIn("parent")
--window:setLocked(true)
rootWidget:addChild(window)
window:lock()
-- create messagebox label
local label = UILabel.create()

View File

@ -364,6 +364,9 @@ void UILineEdit::onKeyPress(UIKeyEvent& event)
event.ignore();
} else
event.ignore();
if(!event.isAccepted())
UIWidget::onKeyPress(event);
}
void UILineEdit::onMousePress(UIMouseEvent& event)

View File

@ -687,8 +687,6 @@ void UIWidget::onKeyPress(UIKeyEvent& event)
if(event.isAccepted())
break;
else
child->UIWidget::onKeyPress(event);
}
}
@ -712,8 +710,6 @@ void UIWidget::onKeyRelease(UIKeyEvent& event)
if(event.isAccepted())
break;
else
child->UIWidget::onKeyRelease(event);
}
}
@ -741,8 +737,6 @@ void UIWidget::onMousePress(UIMouseEvent& event)
if(event.isAccepted())
break;
else
child->UIWidget::onMousePress(event);
}
}
@ -764,8 +758,6 @@ void UIWidget::onMouseRelease(UIMouseEvent& event)
if(event.isAccepted())
break;
else
child->UIWidget::onMouseRelease(event);
}
}
@ -798,8 +790,6 @@ void UIWidget::onMouseMove(UIMouseEvent& event)
if(event.isAccepted())
break;
else
child->UIWidget::onMouseMove(event);
}
}
@ -823,7 +813,5 @@ void UIWidget::onMouseWheel(UIMouseEvent& event)
if(event.isAccepted())
break;
else
child->UIWidget::onMouseWheel(event);
}
}

View File

@ -97,7 +97,7 @@ void UIWindow::onMousePress(UIMouseEvent& event)
m_moving = true;
m_movingReference = event.pos() - getGeometry().topLeft();
} else
event.ignore();
UIWidget::onMousePress(event);
}
void UIWindow::onMouseRelease(UIMouseEvent& event)
@ -105,7 +105,7 @@ void UIWindow::onMouseRelease(UIMouseEvent& event)
if(m_moving)
m_moving = false;
else
event.ignore();
UIWidget::onMouseRelease(event);
}
void UIWindow::onMouseMove(UIMouseEvent& event)
@ -113,5 +113,5 @@ void UIWindow::onMouseMove(UIMouseEvent& event)
if(m_moving)
move(event.pos() - m_movingReference);
else
event.ignore();
UIWidget::onMouseMove(event);
}