|
From: <ar...@us...> - 2003-07-12 08:55:49
|
Update of /cvsroot/aedgui/aedGUI/src
In directory sc8-pr-cvs1:/tmp/cvs-serv7123/src
Modified Files:
aedEditableText.cpp
Log Message:
some aedEditableText bug fixes. still has some though, and some ratty code
work arounds. has some annoying problems with our rendering system.
Index: aedEditableText.cpp
===================================================================
RCS file: /cvsroot/aedgui/aedGUI/src/aedEditableText.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** aedEditableText.cpp 9 Jul 2003 20:43:42 -0000 1.4
--- aedEditableText.cpp 12 Jul 2003 08:55:46 -0000 1.5
***************
*** 61,65 ****
aedEditableText::wm_lbuttondown(Uint16 x, Uint16 y)
{
! aedRect myPos = getMyPosition();
if ( m_Caption.size() < 1 )
--- 61,66 ----
aedEditableText::wm_lbuttondown(Uint16 x, Uint16 y)
{
! aedRect myPos;
! Uint16 width, height;
if ( m_Caption.size() < 1 )
***************
*** 68,72 ****
}
! m_CaretPos = getPosAtPixel(x - myPos.getX(), y - myPos.getY());
return(0);
--- 69,94 ----
}
! myPos = getMyPosition();
! myPos.setX(myPos.getX() + cPad + 1);
! myPos.setY(myPos.getY() + cPad);
! myPos.setWidth(myPos.getWidth() - ( cPad * 2 ) + 2);
! myPos.setHeight(myPos.getHeight() - ( cPad * 2 ));
!
!
! m_Font->getTextSize(m_Caption.c_str(), &width, &height);
!
! if ( width < myPos.getWidth() )
! {
! if ( m_Justification == JUST_RIGHT )
! {
! myPos.setX(myPos.getX() + myPos.getWidth() - width);
! }
! else if ( m_Justification == JUST_CENTER )
! {
! myPos.setX(myPos.getX() + ( ( myPos.getWidth() - width) / 2 ) );
! }
! }
!
! m_CaretPos = getPosAtPixel(x - myPos.getX(), y - myPos.getY()) - 1;
return(0);
***************
*** 252,256 ****
else if ( m_Justification == JUST_CENTER )
{
! dest.x = ( dest.w - ( width1 + width2 ) ) / 2;
}
}
--- 274,278 ----
else if ( m_Justification == JUST_CENTER )
{
! dest.x += ( dest.w - ( width1 + width2 ) ) / 2;
}
}
|