Fixed slider.

Removed duplicated virtual function.
This commit is contained in:
spartanj
2010-10-13 15:08:05 -03:00
parent caa2dcc745
commit 07fd433fb0
4 changed files with 11 additions and 41 deletions

View File

@@ -373,8 +373,8 @@ void cEETest::CreateUI() {
C->Enabled( true );
C->Pos( 320, 240 );
C->DragEnable( true );
//C->StartRotation( 0.f, 360.f, 2500.f );
/*
C->StartRotation( 0.f, 360.f, 2500.f );
Params.Flags &= ~UI_CLIP_ENABLE;
Params.Background.Corners(0);
Params.Background.Colors( eeColorA( 0x7700FF00 ), eeColorA( 0x7700CC00 ), eeColorA( 0x7700CC00 ), eeColorA( 0x7700FF00 ) );
@@ -394,7 +394,7 @@ void cEETest::CreateUI() {
Child2->Visible( true );
Child2->Enabled( true );
Child2->StartRotation( 0.f, 360.f * 10.f, 5000.f * 10.f );
/*
cUIGfx::CreateParams GfxParams;
GfxParams.Parent( C );
GfxParams.PosSet( 160, 100 );

View File

@@ -53,34 +53,6 @@ void cUIControlAnim::Alpha( const eeFloat& alpha ) {
OnAlphaChange();
}
cUIControl * cUIControlAnim::OverFind( const eeVector2i& Point ) {
cUIControl * pOver = NULL;
if ( mVisible && mEnabled ) {
UpdateQuad();
eeVector2f Localf( (eeFloat)Point.x, (eeFloat)Point.y );
if ( IntersectQuad2( mQuad, eeQuad2f( Localf, Localf, Localf, Localf ) ) ) {
cUIControl * ChildLoop = mChild;
while ( NULL != ChildLoop ) {
cUIControl * ChildOver = ChildLoop->OverFind( Point );
if ( NULL != ChildOver )
pOver = ChildOver;
ChildLoop = ChildLoop->mNext;
}
if ( NULL == pOver )
pOver = const_cast<cUIControl *>( reinterpret_cast<const cUIControl *>( this ) );
}
}
return pOver;
}
void cUIControlAnim::MatrixSet() {
if ( mScale != 1.f || mAngle != 0.f ) {
glPushMatrix();

View File

@@ -66,8 +66,6 @@ class EE_API cUIControlAnim : public cUIDragable {
cInterpolation * mAlphaAnim;
cWaypoints * mMoveAnim;
virtual cUIControl * OverFind( const eeVector2i& Point );
virtual void BackgroundDraw();
virtual void BorderDraw();

View File

@@ -137,9 +137,9 @@ void cUISlider::Value( const eeFloat& Val ) {
if ( !mOnPosChange ) {
if ( !mVertical )
mSlider->Pos( mBackSlider->Size().Width() * (Int32)( Val - mMinValue ), mSlider->Pos().y );
mSlider->Pos( (Int32)( (eeFloat)mBackSlider->Size().Width() * ( Val - mMinValue ) ), mSlider->Pos().y );
else
mSlider->Pos( mSlider->Pos().x, mBackSlider->Size().Height() * (Int32)( Val - mMinValue ) );
mSlider->Pos( mSlider->Pos().x, (Int32)( (eeFloat)mBackSlider->Size().Height() * ( Val - mMinValue ) ) );
}
OnValueChange();
@@ -204,20 +204,20 @@ void cUISlider::ManageClick( const Uint32& Flags ) {
if ( Flags & EE_BUTTON_LMASK && !mSlider->IsMouseOver() ) {
if ( !mVertical ) {
if ( ControlPos.x < 0 )
Value( Value() - ClickStep() );
Value( mValue - mClickStep );
else
Value( Value() + ClickStep() );
Value( mValue + mClickStep );
} else {
if ( ControlPos.y < 0 )
Value( Value() - ClickStep() );
Value( mValue - mClickStep );
else
Value( Value() + ClickStep() );
Value( mValue + mClickStep );
}
} else if ( Flags & EE_BUTTONS_WUWD ) {
if ( Flags & EE_BUTTON( EE_BUTTON_WHEELUP ) )
Value( Value() - ClickStep() );
Value( mValue - mClickStep );
else
Value( Value() + ClickStep() );
Value( mValue + mClickStep );
}
}
}