|
From: <kw...@us...> - 2003-11-01 02:22:34
|
Update of /cvsroot/aedgui/aedGUI/src
In directory sc8-pr-cvs1:/tmp/cvs-serv22310/src
Modified Files:
aedWidget.cpp aedWindow.cpp
Log Message:
Added same Grab mouse motion functionality to Right Button
Index: aedWidget.cpp
===================================================================
RCS file: /cvsroot/aedgui/aedGUI/src/aedWidget.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** aedWidget.cpp 1 Nov 2003 00:38:28 -0000 1.4
--- aedWidget.cpp 1 Nov 2003 02:22:31 -0000 1.5
***************
*** 580,584 ****
aedWidget::wm_lbuttondown(Uint16 x, Uint16 y)
{
! m_isPressed=true;
return 0;
}
--- 580,584 ----
aedWidget::wm_lbuttondown(Uint16 x, Uint16 y)
{
! m_isLPressed=true;
return 0;
}
***************
*** 587,591 ****
aedWidget::wm_lbuttonup(Uint16 x, Uint16 y)
{
! m_isPressed=false;
return 0;
}
--- 587,591 ----
aedWidget::wm_lbuttonup(Uint16 x, Uint16 y)
{
! m_isLPressed=false;
return 0;
}
***************
*** 594,597 ****
--- 594,598 ----
aedWidget::wm_rbuttondown(Uint16 x, Uint16 y)
{
+ m_isRPressed=true;
return 0;
}
***************
*** 600,603 ****
--- 601,605 ----
aedWidget::wm_rbuttonup(Uint16 x, Uint16 y)
{
+ m_isRPressed=true;
return 0;
}
***************
*** 691,695 ****
case SDL_MOUSEMOTION:
! if(pFocused != NULL && pFocused->isEnabled() && pFocused->isPressed())
{
child = pFocused;
--- 693,697 ----
case SDL_MOUSEMOTION:
! if(pFocused != NULL && pFocused->isEnabled() && (pFocused->isLPressed()||pFocused->isRPressed()))
{
child = pFocused;
Index: aedWindow.cpp
===================================================================
RCS file: /cvsroot/aedgui/aedGUI/src/aedWindow.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** aedWindow.cpp 1 Nov 2003 00:38:28 -0000 1.66
--- aedWindow.cpp 1 Nov 2003 02:22:31 -0000 1.67
***************
*** 5,9 ****
m_InitComplete = false;
! m_isPressed = false;
m_Moveable = false;
m_Caption = "";
--- 5,9 ----
m_InitComplete = false;
! m_isLPressed = false;
m_Moveable = false;
m_Caption = "";
***************
*** 129,133 ****
if ((y > m_Pos.getY() + 5) && y < m_Pos.getY() + 45)
{
! m_isPressed = true;
dragXoffset = x-m_Pos.getX();
dragYoffset = y-m_Pos.getY();
--- 129,133 ----
if ((y > m_Pos.getY() + 5) && y < m_Pos.getY() + 45)
{
! m_isLPressed = true;
dragXoffset = x-m_Pos.getX();
dragYoffset = y-m_Pos.getY();
***************
*** 139,143 ****
int aedWindow::wm_lbuttonup(Uint16 x, Uint16 y)
{
! m_isPressed = false;
return 0;
}
--- 139,143 ----
int aedWindow::wm_lbuttonup(Uint16 x, Uint16 y)
{
! m_isLPressed = false;
return 0;
}
***************
*** 145,150 ****
int aedWindow::wm_mousemove(Uint16 x, Uint16 y, Uint16 dx, Uint16 dy)
{
! // FIX ME:We can't rely on wm_mousemove for dragging.
! if (m_isPressed)
{
//setPos(getPos().getX() + dx, getPos().getY() + dy);
--- 145,149 ----
int aedWindow::wm_mousemove(Uint16 x, Uint16 y, Uint16 dx, Uint16 dy)
{
! if (m_isLPressed)
{
//setPos(getPos().getX() + dx, getPos().getY() + dy);
|