Example #1
0
bool UIWidget::onMouseMove(const Point& mousePos, const Point& mouseMoved)
{
    if(isDragable() && isPressed() && !m_dragging && !g_ui.getDraggingWidget()) {
        setDragging(true);
        g_ui.setDraggingWidget(asUIWidget());
        onDragEnter(mousePos - mouseMoved);
    }

    return callLuaField<bool>("onMouseMove", mousePos, mouseMoved);
}
Example #2
0
void QuickButton::leaveEvent(QEvent*)
{
   if (_changeCursorOverItem)
      setCursor(_oldCursor);
   setDragging(false);
}