From: Andrew C. <ac...@us...> - 2007-09-09 02:27:43
|
Update of /cvsroot/planeshift/planeshift/src/common/paws In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11532/src/common/paws Modified Files: pawsbutton.cpp pawscrollbar.cpp pawsnumberpromptwindow.cpp Log Message: Fixed bug FS#132. Involved a couple Scrollbar issues. Index: pawsbutton.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/common/paws/pawsbutton.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** pawsbutton.cpp 24 Aug 2007 04:16:26 -0000 1.32 --- pawsbutton.cpp 9 Sep 2007 02:27:45 -0000 1.33 *************** *** 326,339 **** bool pawsButton::OnMouseUp( int button, int modifiers, int x, int y ) { ! if (!enabled) ! return false; ! if (!toggle) ! SetState(false, false); if (notify != NULL) notify->OnButtonReleased( button, this ); else if ( parent ) return parent->OnButtonReleased( button, this ); return false; --- 326,345 ---- bool pawsButton::OnMouseUp( int button, int modifiers, int x, int y ) { ! if (!enabled) ! { ! return false; ! } ! if (!toggle) ! SetState(false, false); if (notify != NULL) + { notify->OnButtonReleased( button, this ); + } else if ( parent ) + { return parent->OnButtonReleased( button, this ); + } return false; Index: pawscrollbar.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/common/paws/pawscrollbar.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** pawscrollbar.cpp 23 Aug 2007 05:28:11 -0000 1.31 --- pawscrollbar.cpp 9 Sep 2007 02:27:45 -0000 1.32 *************** *** 402,410 **** --- 402,413 ---- else thumbDragPoint = y - thumb->ScreenFrame().ymin; + mouseIsDraggingThumb = true; thumb->SetBackground(thumbMoving); } else + { MoveThumbToMouse(); + } return true; *************** *** 449,468 **** { if ( currentValue >= maxValue ) ! { currentValue = maxValue; ! if (downButton) ! downButton->SetEnabled(false); ! } ! else if (downButton) ! downButton->SetEnabled(true); if ( currentValue <= minValue ) ! { currentValue = minValue; ! if (upButton) ! upButton->SetEnabled(false); ! } ! else if (upButton) ! upButton->SetEnabled(true); } --- 452,478 ---- { if ( currentValue >= maxValue ) ! { currentValue = maxValue; ! if (downButton) ! { ! downButton->SetEnabled(false); ! mouseDown = false; ! } ! } ! else if (downButton) ! downButton->SetEnabled(true); if ( currentValue <= minValue ) ! { currentValue = minValue; ! if (upButton) ! { ! upButton->SetEnabled(false); ! mouseDown = false; ! } ! } ! else if (upButton) ! upButton->SetEnabled(true); ! } *************** *** 470,473 **** --- 480,484 ---- { mouseDown = true; + scrollTicks = clock->GetCurrentTicks(); *************** *** 562,566 **** --- 573,579 ---- if ( mouseDown && (clock->GetCurrentTicks() - scrollTicks > SCROLL_TICKS )) + { OnButtonPressed(lastButton, lastModifiers, lastWidget); + } } Index: pawsnumberpromptwindow.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/common/paws/pawsnumberpromptwindow.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** pawsnumberpromptwindow.cpp 9 Feb 2007 21:50:26 -0000 1.30 --- pawsnumberpromptwindow.cpp 9 Sep 2007 02:27:45 -0000 1.31 *************** *** 47,55 **** scrollBar = new pawsScrollBar(); ! AddChild(scrollBar); scrollBar->SetRelativeFrame(0, 33, 110, 20); - scrollBar->SetHorizontal(true); scrollBar->SetTickValue(1); scrollBar->PostSetup(); } --- 47,56 ---- scrollBar = new pawsScrollBar(); ! scrollBar->SetHorizontal(true); scrollBar->SetRelativeFrame(0, 33, 110, 20); scrollBar->SetTickValue(1); scrollBar->PostSetup(); + AddChild(scrollBar); + } |