paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/test/colorselector pgcolorselector.cpp,1.1.2.


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/test/colorselector pgcolorselector.cpp,1.1.2.4,1.1.2.5
Date: Fri, 12 Jul 2002 16:35:48 -0400

Update of /cvsroot/paragui/paragui/test/colorselector
In directory subversions:/tmp/cvs-serv10935/test/colorselector

Modified Files:
      Tag: devel-1-0
        pgcolorselector.cpp 
Log Message:
colorselector improvements

Index: pgcolorselector.cpp
===================================================================
RCS file: 
/cvsroot/paragui/paragui/test/colorselector/Attic/pgcolorselector.cpp,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -r1.1.2.4 -r1.1.2.5
*** pgcolorselector.cpp 12 Jul 2002 10:12:14 -0000      1.1.2.4
--- pgcolorselector.cpp 12 Jul 2002 20:35:46 -0000      1.1.2.5
***************
*** 18,21 ****
--- 18,38 ----
        
        p = ScreenToClient(motion->x, motion->y);
+ 
+       if(p.x < 0) {
+               p.x = 0;
+       }
+ 
+       if(p.x >= my_width-1) {
+               p.x = my_width-1;
+       }
+ 
+       if(p.y < 0) {
+               p.y = 0;
+       }
+ 
+       if(p.y >= my_height-1) {
+               p.y = my_height-1;
+       }
+ 
        Update();
        GetParent()->SetBaseColor(GetBaseColor());
***************
*** 27,31 ****
                return false;
        }
!       
        my_btndown = true;
        p = ScreenToClient(button->x, button->y);
--- 44,49 ----
                return false;
        }
! 
!       SetCapture();
        my_btndown = true;
        p = ScreenToClient(button->x, button->y);
***************
*** 36,39 ****
--- 54,62 ----
  
  bool PG_ColorSelector::PG_ColorBox::eventMouseButtonUp(const 
SDL_MouseButtonEvent* button) {
+       if(!my_btndown) {
+               return false;
+       }
+ 
+       ReleaseCapture();
        my_btndown = false;
        return true;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]