| 132 | } |
| 133 | |
| 134 | Uint32 UISlider::onMouseDown( const Vector2i& position, const Uint32& flags ) { |
| 135 | if ( !getEventDispatcher()->isNodeDragging() ) { |
| 136 | Vector2f mouseDownInitPos( getEventDispatcher()->getMouseDownPos().asFloat() ); |
| 137 | worldToNode( mouseDownInitPos ); |
| 138 | if ( getLocalDpBounds().contains( mouseDownInitPos ) ) { |
| 139 | Vector2f localPos( position.asFloat() ); |
| 140 | worldToNode( localPos ); |
| 141 | if ( localPos.y >= mSlider->getPosition().y && |
| 142 | localPos.y <= mSlider->getPosition().y + mSlider->getSize().getHeight() ) { |
| 143 | mSlider->startDragging( position.asFloat() ); |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | return UIWidget::onMouseDown( position, flags ); |
| 148 | } |
| 149 | |
| 150 | void UISlider::adjustChildren() { |
| 151 | mUpdating = true; |
nothing calls this directly
no test coverage detected