Fixed clip planes initial push clip state.

Minor refactor on onDrag* functions.

--HG--
branch : dev
This commit is contained in:
Martí­n Lucas Golini
2017-04-18 01:13:12 -03:00
parent 5da3e5ee60
commit 7ea7cd51cd
4 changed files with 8 additions and 8 deletions

View File

@@ -44,9 +44,9 @@ class EE_API UIDragableControl : public UIControl {
virtual Uint32 onDrag( const Vector2i& position );
virtual Uint32 OnDragStart( const Vector2i& position );
virtual Uint32 onDragStart( const Vector2i& position );
virtual Uint32 OnDragEnd( const Vector2i& position );
virtual Uint32 onDragEnd( const Vector2i& position );
};
}}

View File

@@ -32,7 +32,7 @@ void ClippingMask::clipEnable( const Int32& x, const Int32& y, const Int32& Widt
void ClippingMask::clipDisable() {
GlobalBatchRenderer::instance()->draw();
if ( ! mScissorsClipped.empty() ) { // This should always be true
if ( !mScissorsClipped.empty() ) { // This should always be true
mScissorsClipped.pop_back();
}
@@ -82,6 +82,7 @@ void ClippingMask::clipPlaneDisable() {
ClippingMask::ClippingMask() :
mPushScissorClip( true ),
mPushClip( true ),
mMode( Inclusive )
{
}

View File

@@ -91,11 +91,11 @@ Uint32 UIDragableControl::onDrag( const Vector2i& Pos ) {
return 1;
}
Uint32 UIDragableControl::OnDragStart( const Vector2i& Pos ) {
Uint32 UIDragableControl::onDragStart( const Vector2i& Pos ) {
return 1;
}
Uint32 UIDragableControl::OnDragEnd( const Vector2i& Pos ) {
Uint32 UIDragableControl::onDragEnd( const Vector2i& Pos ) {
return 1;
}
@@ -118,12 +118,12 @@ void UIDragableControl::setDragging( const bool& dragging ) {
UIMessage tMsg( this, UIMessage::MsgDragStart, 0 );
messagePost( &tMsg );
OnDragStart( UIManager::instance()->getMousePos() );
onDragStart( UIManager::instance()->getMousePos() );
} else {
UIMessage tMsg( this, UIMessage::MsgDragEnd, 0 );
messagePost( &tMsg );
OnDragEnd( UIManager::instance()->getMousePos() );
onDragEnd( UIManager::instance()->getMousePos() );
}
}

View File

@@ -71,7 +71,6 @@ void UITouchDragableWidget::update() {
onTouchDragValueChange( diff );
mTouchDragAcceleration += elapsed * diff * mTouchDragDeceleration;
mTouchDragPoint = Pos;