diff --git a/source/gui/CButton.cpp b/source/gui/CButton.cpp index 5cad85cdd9..37f135d9c5 100755 --- a/source/gui/CButton.cpp +++ b/source/gui/CButton.cpp @@ -135,13 +135,10 @@ void CButton::Draw() // Do this glBegin(GL_QUADS); //glBegin(GL_TRIANGLES); - //CRect ca = GetBaseSettings().m_Size.GetClientArea(CRect(0, 0, g_xres, g_yres)); - CRect ca = m_CachedActualSize; - - glVertex2i(ca.right, ca.bottom); - glVertex2i(ca.left, ca.bottom); - glVertex2i(ca.left, ca.top); - glVertex2i(ca.right, ca.top); + glVertex2i(m_CachedActualSize.right, m_CachedActualSize.bottom); + glVertex2i(m_CachedActualSize.left, m_CachedActualSize.bottom); + glVertex2i(m_CachedActualSize.left, m_CachedActualSize.top); + glVertex2i(m_CachedActualSize.right, m_CachedActualSize.top); /* glVertex2i(GetBaseSettings().m_Size.right, GetBaseSettings().m_Size.bottom); glVertex2i(GetBaseSettings().m_Size.left, GetBaseSettings().m_Size.bottom); diff --git a/source/gui/CGUI.cpp b/source/gui/CGUI.cpp index 8ec79ea898..38f9b68156 100755 --- a/source/gui/CGUI.cpp +++ b/source/gui/CGUI.cpp @@ -603,7 +603,8 @@ void CGUI::Xerces_ReadObject(DOMElement *pElement, IGUIObject *pParent) // Text is only okay if it's the first element i.e. caption ... if (i==0) { - // GeeTODO !!!!! CROP STRING! + // Thank you CStr =) + caption.Trim(PS_TRIM_BOTH); // Set the setting caption to this GUI::SetSetting(object, "caption", caption); diff --git a/source/gui/IGUIObject.cpp b/source/gui/IGUIObject.cpp index 175982371a..58d5d99fc8 100755 --- a/source/gui/IGUIObject.cpp +++ b/source/gui/IGUIObject.cpp @@ -314,9 +314,7 @@ void IGUIObject::UpdateCachedSize() // use its cached size instead of the screen. Notice // it must have just been cached for it to work. if (m_BaseSettings.m_Absolute == false && m_pParent) - { m_CachedActualSize = m_BaseSettings.m_Size.GetClientArea( m_pParent->m_CachedActualSize ); - } else m_CachedActualSize = m_BaseSettings.m_Size.GetClientArea( CRect(0, 0, g_xres, g_yres) ); } diff --git a/source/gui/IGUIObject.h b/source/gui/IGUIObject.h index fbcc35b964..f3a853db49 100755 --- a/source/gui/IGUIObject.h +++ b/source/gui/IGUIObject.h @@ -86,7 +86,6 @@ struct SGUIBaseSettings bool m_Hidden; bool m_Enabled; bool m_Absolute; -// CRect m_Size2; CClientArea m_Size; CStr m_Style; float m_Z;