Hack to make SetHorizAlign() and SetVertAlign() call the correct functions. Anything using the OptionIcon with TextHAlign and TextVAlign of anything other than 0 needs to be fixed as the alignment is now being properly handled. Values of 1 were being treated as align_right and align_bottom.

This commit is contained in:
Steve Checkoway
2007-04-03 07:10:56 +00:00
parent c330a32ce7
commit 4f11ae0d98
+3 -2
View File
@@ -37,8 +37,9 @@ void OptionIcon::Load( RString sType )
m_text.SetShadowLength( 0 );
m_text.SetZoom( TEXT_ZOOM );
m_text.SetXY( TEXT_OFFSET_X, TEXT_OFFSET_Y );
m_text.SetHorizAlign( (HorizAlign)TEXT_H_ALIGN );
m_text.SetVertAlign( (VertAlign)TEXT_V_ALIGN );
// XXX: Hack to make this call the correct function.
((Actor&)m_text).SetHorizAlign( (HorizAlign)TEXT_H_ALIGN );
((Actor&)m_text).SetVertAlign( (VertAlign)TEXT_V_ALIGN );
this->AddChild( &m_text );
}