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
+6 -5
View File
@@ -8,9 +8,9 @@
#define TEXT_OFFSET_Y THEME->GetMetricF("OptionIcon","TextOffsetY")
#define TEXT_H_ALIGN THEME->GetMetricI("OptionIcon","TextHAlign")
#define TEXT_V_ALIGN THEME->GetMetricI("OptionIcon","TextVAlign")
#define TEXT_WIDTH THEME->GetMetricI("OptionIcon","TextWidth")
#define TEXT_ZOOM THEME->GetMetricF("OptionIcon","TextZoom")
#define UPPERCASE THEME->GetMetricB("OptionIcon","Uppercase")
#define TEXT_WIDTH THEME->GetMetricI("OptionIcon","TextWidth")
#define TEXT_ZOOM THEME->GetMetricF("OptionIcon","TextZoom")
#define UPPERCASE THEME->GetMetricB("OptionIcon","Uppercase")
OptionIcon::OptionIcon()
@@ -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 );
}